diff --git a/.stats.yml b/.stats.yml
index d2c97de2..8d96c023 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
configured_endpoints: 158
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury-b8e6b7422f42fdd348a261b4dbf7a2acd931dde684f6d1c8ce2120b0b325263e.yml
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/modern-treasury-c27744e18a0ea38825b41f133bb8b61d41d3c6649d96ff605581a0000dc80f06.yml
diff --git a/api.md b/api.md
index 938a5220..464d10e6 100644
--- a/api.md
+++ b/api.md
@@ -79,7 +79,11 @@ Methods:
Types:
```python
-from modern_treasury.types import ExternalAccount, ExternalAccountType
+from modern_treasury.types import (
+ ExternalAccount,
+ ExternalAccountType,
+ ExternalAccountVerifyResponse,
+)
```
Methods:
@@ -90,7 +94,7 @@ Methods:
- client.external_accounts.list(\*\*params) -> SyncPage[ExternalAccount]
- client.external_accounts.delete(id) -> None
- client.external_accounts.complete_verification(id, \*\*params) -> ExternalAccount
-- client.external_accounts.verify(id, \*\*params) -> ExternalAccount
+- client.external_accounts.verify(id, \*\*params) -> ExternalAccountVerifyResponse
# IncomingPaymentDetails
diff --git a/src/modern_treasury/resources/account_details.py b/src/modern_treasury/resources/account_details.py
index 76df2b27..c8ee4bb4 100644
--- a/src/modern_treasury/resources/account_details.py
+++ b/src/modern_treasury/resources/account_details.py
@@ -43,7 +43,18 @@ def create(
*,
accounts_type: Literal["external_accounts"],
account_number: str,
- account_number_type: Literal["clabe", "hk_number", "iban", "nz_number", "other", "pan", "wallet_address"]
+ account_number_type: Literal[
+ "au_number",
+ "clabe",
+ "hk_number",
+ "iban",
+ "id_number",
+ "nz_number",
+ "other",
+ "pan",
+ "sg_number",
+ "wallet_address",
+ ]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -246,7 +257,18 @@ async def create(
*,
accounts_type: Literal["external_accounts"],
account_number: str,
- account_number_type: Literal["clabe", "hk_number", "iban", "nz_number", "other", "pan", "wallet_address"]
+ account_number_type: Literal[
+ "au_number",
+ "clabe",
+ "hk_number",
+ "iban",
+ "id_number",
+ "nz_number",
+ "other",
+ "pan",
+ "sg_number",
+ "wallet_address",
+ ]
| NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
diff --git a/src/modern_treasury/resources/counterparties.py b/src/modern_treasury/resources/counterparties.py
index feb6c1c7..454aeff5 100644
--- a/src/modern_treasury/resources/counterparties.py
+++ b/src/modern_treasury/resources/counterparties.py
@@ -374,13 +374,13 @@ def collect_account(
"brCodigo",
"routingNumberType",
"address",
- "jp_zengin_code",
- "se_bankgiro_clearing_code",
- "nz_national_clearing_code",
- "hk_interbank_clearing_code",
- "hu_interbank_clearing_code",
- "dk_interbank_clearing_code",
- "id_sknbi_code",
+ "jpZenginCode",
+ "seBankgiroClearingCode",
+ "nzNationalClearingCode",
+ "hkInterbankClearingCode",
+ "huInterbankClearingCode",
+ "dkInterbankClearingCode",
+ "idSknbiCode",
]
]
| NotGiven = NOT_GIVEN,
@@ -789,13 +789,13 @@ async def collect_account(
"brCodigo",
"routingNumberType",
"address",
- "jp_zengin_code",
- "se_bankgiro_clearing_code",
- "nz_national_clearing_code",
- "hk_interbank_clearing_code",
- "hu_interbank_clearing_code",
- "dk_interbank_clearing_code",
- "id_sknbi_code",
+ "jpZenginCode",
+ "seBankgiroClearingCode",
+ "nzNationalClearingCode",
+ "hkInterbankClearingCode",
+ "huInterbankClearingCode",
+ "dkInterbankClearingCode",
+ "idSknbiCode",
]
]
| NotGiven = NOT_GIVEN,
diff --git a/src/modern_treasury/resources/external_accounts.py b/src/modern_treasury/resources/external_accounts.py
index f792ef87..fa257029 100644
--- a/src/modern_treasury/resources/external_accounts.py
+++ b/src/modern_treasury/resources/external_accounts.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Dict, Iterable, Optional
+from typing import Any, Dict, Iterable, Optional, cast
from typing_extensions import Literal
import httpx
@@ -32,6 +32,7 @@
from ..types.shared.currency import Currency
from ..types.external_account import ExternalAccount
from ..types.external_account_type import ExternalAccountType
+from ..types.external_account_verify_response import ExternalAccountVerifyResponse
__all__ = ["ExternalAccounts", "AsyncExternalAccounts"]
@@ -428,7 +429,7 @@ def verify(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> ExternalAccount:
+ ) -> ExternalAccountVerifyResponse:
"""
verify external account
@@ -459,26 +460,31 @@ def verify(
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
- return self._post(
- f"/api/external_accounts/{id}/verify",
- body=maybe_transform(
- {
- "originating_account_id": originating_account_id,
- "payment_type": payment_type,
- "currency": currency,
- "fallback_type": fallback_type,
- "priority": priority,
- },
- external_account_verify_params.ExternalAccountVerifyParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- idempotency_key=idempotency_key,
+ return cast(
+ ExternalAccountVerifyResponse,
+ self._post(
+ f"/api/external_accounts/{id}/verify",
+ body=maybe_transform(
+ {
+ "originating_account_id": originating_account_id,
+ "payment_type": payment_type,
+ "currency": currency,
+ "fallback_type": fallback_type,
+ "priority": priority,
+ },
+ external_account_verify_params.ExternalAccountVerifyParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ idempotency_key=idempotency_key,
+ ),
+ cast_to=cast(
+ Any, ExternalAccountVerifyResponse
+ ), # Union types cannot be passed in as arguments in the type system
),
- cast_to=ExternalAccount,
)
@@ -874,7 +880,7 @@ async def verify(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
idempotency_key: str | None = None,
- ) -> ExternalAccount:
+ ) -> ExternalAccountVerifyResponse:
"""
verify external account
@@ -905,26 +911,31 @@ async def verify(
"""
if not id:
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
- return await self._post(
- f"/api/external_accounts/{id}/verify",
- body=await async_maybe_transform(
- {
- "originating_account_id": originating_account_id,
- "payment_type": payment_type,
- "currency": currency,
- "fallback_type": fallback_type,
- "priority": priority,
- },
- external_account_verify_params.ExternalAccountVerifyParams,
- ),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- idempotency_key=idempotency_key,
+ return cast(
+ ExternalAccountVerifyResponse,
+ await self._post(
+ f"/api/external_accounts/{id}/verify",
+ body=await async_maybe_transform(
+ {
+ "originating_account_id": originating_account_id,
+ "payment_type": payment_type,
+ "currency": currency,
+ "fallback_type": fallback_type,
+ "priority": priority,
+ },
+ external_account_verify_params.ExternalAccountVerifyParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ idempotency_key=idempotency_key,
+ ),
+ cast_to=cast(
+ Any, ExternalAccountVerifyResponse
+ ), # Union types cannot be passed in as arguments in the type system
),
- cast_to=ExternalAccount,
)
diff --git a/src/modern_treasury/resources/ledger_accounts.py b/src/modern_treasury/resources/ledger_accounts.py
index 6a318762..597bd4e3 100644
--- a/src/modern_treasury/resources/ledger_accounts.py
+++ b/src/modern_treasury/resources/ledger_accounts.py
@@ -248,7 +248,7 @@ def list(
ledger_account_category_id: str | NotGiven = NOT_GIVEN,
ledger_id: str | NotGiven = NOT_GIVEN,
metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
+ name: List[str] | NotGiven = NOT_GIVEN,
pending_balance_amount: ledger_account_list_params.PendingBalanceAmount | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
posted_balance_amount: ledger_account_list_params.PostedBalanceAmount | NotGiven = NOT_GIVEN,
@@ -284,6 +284,9 @@ def list(
`Loan`, the query would be `metadata%5BType%5D=Loan`. This encodes the query
parameters.
+ name: If you have specific names to retrieve in bulk, you can pass them as query
+ parameters delimited with `name[]=`, for example `?name[]=123&name[]=abc`.
+
pending_balance_amount: Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), `eq` (=), or `not_eq` (!=) to
filter by balance amount.
@@ -588,7 +591,7 @@ def list(
ledger_account_category_id: str | NotGiven = NOT_GIVEN,
ledger_id: str | NotGiven = NOT_GIVEN,
metadata: Dict[str, str] | NotGiven = NOT_GIVEN,
- name: str | NotGiven = NOT_GIVEN,
+ name: List[str] | NotGiven = NOT_GIVEN,
pending_balance_amount: ledger_account_list_params.PendingBalanceAmount | NotGiven = NOT_GIVEN,
per_page: int | NotGiven = NOT_GIVEN,
posted_balance_amount: ledger_account_list_params.PostedBalanceAmount | NotGiven = NOT_GIVEN,
@@ -624,6 +627,9 @@ def list(
`Loan`, the query would be `metadata%5BType%5D=Loan`. This encodes the query
parameters.
+ name: If you have specific names to retrieve in bulk, you can pass them as query
+ parameters delimited with `name[]=`, for example `?name[]=123&name[]=abc`.
+
pending_balance_amount: Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), `eq` (=), or `not_eq` (!=) to
filter by balance amount.
diff --git a/src/modern_treasury/types/__init__.py b/src/modern_treasury/types/__init__.py
index 0890a503..d19cc725 100644
--- a/src/modern_treasury/types/__init__.py
+++ b/src/modern_treasury/types/__init__.py
@@ -110,6 +110,7 @@
from .ledger_account_retrieve_params import LedgerAccountRetrieveParams as LedgerAccountRetrieveParams
from .ledger_transaction_list_params import LedgerTransactionListParams as LedgerTransactionListParams
from .ledgerable_event_create_params import LedgerableEventCreateParams as LedgerableEventCreateParams
+from .external_account_verify_response import ExternalAccountVerifyResponse as ExternalAccountVerifyResponse
from .ledger_event_handler_list_params import LedgerEventHandlerListParams as LedgerEventHandlerListParams
from .ledger_transaction_create_params import LedgerTransactionCreateParams as LedgerTransactionCreateParams
from .ledger_transaction_update_params import LedgerTransactionUpdateParams as LedgerTransactionUpdateParams
diff --git a/src/modern_treasury/types/account_detail.py b/src/modern_treasury/types/account_detail.py
index c18a1783..f9d52afd 100644
--- a/src/modern_treasury/types/account_detail.py
+++ b/src/modern_treasury/types/account_detail.py
@@ -15,7 +15,18 @@ class AccountDetail(BaseModel):
account_number_safe: str
"""The last 4 digits of the account_number."""
- account_number_type: Literal["clabe", "hk_number", "iban", "nz_number", "other", "pan", "wallet_address"]
+ account_number_type: Literal[
+ "au_number",
+ "clabe",
+ "hk_number",
+ "iban",
+ "id_number",
+ "nz_number",
+ "other",
+ "pan",
+ "sg_number",
+ "wallet_address",
+ ]
"""One of `iban`, `clabe`, `wallet_address`, or `other`.
Use `other` if the bank account number is in a generic format.
diff --git a/src/modern_treasury/types/account_detail_create_params.py b/src/modern_treasury/types/account_detail_create_params.py
index c4cf20de..69abd97c 100644
--- a/src/modern_treasury/types/account_detail_create_params.py
+++ b/src/modern_treasury/types/account_detail_create_params.py
@@ -13,7 +13,18 @@ class AccountDetailCreateParams(TypedDict, total=False):
account_number: Required[str]
"""The account number for the bank account."""
- account_number_type: Literal["clabe", "hk_number", "iban", "nz_number", "other", "pan", "wallet_address"]
+ account_number_type: Literal[
+ "au_number",
+ "clabe",
+ "hk_number",
+ "iban",
+ "id_number",
+ "nz_number",
+ "other",
+ "pan",
+ "sg_number",
+ "wallet_address",
+ ]
"""One of `iban`, `clabe`, `wallet_address`, or `other`.
Use `other` if the bank account number is in a generic format.
diff --git a/src/modern_treasury/types/bulk_request_create_params.py b/src/modern_treasury/types/bulk_request_create_params.py
index 348a4702..2f3bc18b 100644
--- a/src/modern_treasury/types/bulk_request_create_params.py
+++ b/src/modern_treasury/types/bulk_request_create_params.py
@@ -291,7 +291,18 @@ class ResourcePaymentOrderAsyncCreateRequestLineItem(TypedDict, total=False):
class ResourcePaymentOrderAsyncCreateRequestReceivingAccountAccountDetail(TypedDict, total=False):
account_number: Required[str]
- account_number_type: Literal["iban", "hk_number", "clabe", "nz_number", "wallet_address", "pan", "other"]
+ account_number_type: Literal[
+ "au_number",
+ "clabe",
+ "hk_number",
+ "iban",
+ "id_number",
+ "nz_number",
+ "other",
+ "pan",
+ "sg_number",
+ "wallet_address",
+ ]
ResourcesPaymentOrderAsyncCreateRequestReceivingAccountAccountDetails = (
@@ -1298,7 +1309,18 @@ class ResourcePaymentOrderUpdateRequestWithIDLineItem(TypedDict, total=False):
class ResourcePaymentOrderUpdateRequestWithIDReceivingAccountAccountDetail(TypedDict, total=False):
account_number: Required[str]
- account_number_type: Literal["iban", "hk_number", "clabe", "nz_number", "wallet_address", "pan", "other"]
+ account_number_type: Literal[
+ "au_number",
+ "clabe",
+ "hk_number",
+ "iban",
+ "id_number",
+ "nz_number",
+ "other",
+ "pan",
+ "sg_number",
+ "wallet_address",
+ ]
ResourcesPaymentOrderUpdateRequestWithIDReceivingAccountAccountDetails = (
diff --git a/src/modern_treasury/types/connection_legal_entity.py b/src/modern_treasury/types/connection_legal_entity.py
index e8d17e3d..e4644d90 100644
--- a/src/modern_treasury/types/connection_legal_entity.py
+++ b/src/modern_treasury/types/connection_legal_entity.py
@@ -34,3 +34,6 @@ class ConnectionLegalEntity(BaseModel):
"""The status of the connection legal entity."""
updated_at: datetime
+
+ vendor_id: str
+ """The ID of the legal entity at the vendor."""
diff --git a/src/modern_treasury/types/counterparty.py b/src/modern_treasury/types/counterparty.py
index efc8c62c..e471982c 100644
--- a/src/modern_treasury/types/counterparty.py
+++ b/src/modern_treasury/types/counterparty.py
@@ -141,6 +141,8 @@ class Account(BaseModel):
updated_at: Optional[datetime] = None
+ verification_source: Optional[Literal["ach_prenote", "microdeposits", "plaid"]] = None
+
verification_status: Optional[Literal["pending_verification", "unverified", "verified"]] = None
diff --git a/src/modern_treasury/types/counterparty_collect_account_params.py b/src/modern_treasury/types/counterparty_collect_account_params.py
index 0fc78532..955b96a5 100644
--- a/src/modern_treasury/types/counterparty_collect_account_params.py
+++ b/src/modern_treasury/types/counterparty_collect_account_params.py
@@ -49,13 +49,13 @@ class CounterpartyCollectAccountParams(TypedDict, total=False):
"brCodigo",
"routingNumberType",
"address",
- "jp_zengin_code",
- "se_bankgiro_clearing_code",
- "nz_national_clearing_code",
- "hk_interbank_clearing_code",
- "hu_interbank_clearing_code",
- "dk_interbank_clearing_code",
- "id_sknbi_code",
+ "jpZenginCode",
+ "seBankgiroClearingCode",
+ "nzNationalClearingCode",
+ "hkInterbankClearingCode",
+ "huInterbankClearingCode",
+ "dkInterbankClearingCode",
+ "idSknbiCode",
]
]
"""The list of fields you want on the form.
diff --git a/src/modern_treasury/types/counterparty_create_params.py b/src/modern_treasury/types/counterparty_create_params.py
index d902d1a0..1207b4b3 100644
--- a/src/modern_treasury/types/counterparty_create_params.py
+++ b/src/modern_treasury/types/counterparty_create_params.py
@@ -98,7 +98,18 @@ class Accounting(TypedDict, total=False):
class AccountAccountDetail(TypedDict, total=False):
account_number: Required[str]
- account_number_type: Literal["iban", "hk_number", "clabe", "nz_number", "wallet_address", "pan", "other"]
+ account_number_type: Literal[
+ "au_number",
+ "clabe",
+ "hk_number",
+ "iban",
+ "id_number",
+ "nz_number",
+ "other",
+ "pan",
+ "sg_number",
+ "wallet_address",
+ ]
AccountsAccountDetails = AccountAccountDetail
diff --git a/src/modern_treasury/types/external_account.py b/src/modern_treasury/types/external_account.py
index b2f59686..79f4a3e2 100644
--- a/src/modern_treasury/types/external_account.py
+++ b/src/modern_treasury/types/external_account.py
@@ -128,4 +128,6 @@ class ExternalAccount(BaseModel):
updated_at: datetime
+ verification_source: Optional[Literal["ach_prenote", "microdeposits", "plaid"]] = None
+
verification_status: Literal["pending_verification", "unverified", "verified"]
diff --git a/src/modern_treasury/types/external_account_create_params.py b/src/modern_treasury/types/external_account_create_params.py
index b32af364..3798c48c 100644
--- a/src/modern_treasury/types/external_account_create_params.py
+++ b/src/modern_treasury/types/external_account_create_params.py
@@ -78,7 +78,18 @@ class ExternalAccountCreateParams(TypedDict, total=False):
class AccountDetail(TypedDict, total=False):
account_number: Required[str]
- account_number_type: Literal["iban", "hk_number", "clabe", "nz_number", "wallet_address", "pan", "other"]
+ account_number_type: Literal[
+ "au_number",
+ "clabe",
+ "hk_number",
+ "iban",
+ "id_number",
+ "nz_number",
+ "other",
+ "pan",
+ "sg_number",
+ "wallet_address",
+ ]
AccountDetails = AccountDetail
diff --git a/src/modern_treasury/types/external_account_verify_response.py b/src/modern_treasury/types/external_account_verify_response.py
new file mode 100644
index 00000000..bc5497f4
--- /dev/null
+++ b/src/modern_treasury/types/external_account_verify_response.py
@@ -0,0 +1,81 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Union, Optional
+from datetime import datetime
+from typing_extensions import Literal
+
+from .._models import BaseModel
+from .external_account import ExternalAccount
+
+__all__ = ["ExternalAccountVerifyResponse", "ExternalAccountVerificationAttempt"]
+
+
+class ExternalAccountVerificationAttempt(BaseModel):
+ id: str
+
+ created_at: datetime
+
+ external_account_id: str
+ """The ID of the external account."""
+
+ live_mode: bool
+ """
+ This field will be true if this object exists in the live environment or false
+ if it exists in the test environment.
+ """
+
+ object: str
+
+ originating_account_id: str
+ """The ID of the internal account where the micro-deposits originate from."""
+
+ payment_type: Literal[
+ "ach",
+ "au_becs",
+ "bacs",
+ "book",
+ "card",
+ "chats",
+ "check",
+ "cross_border",
+ "dk_nets",
+ "eft",
+ "hu_ics",
+ "interac",
+ "masav",
+ "mx_ccen",
+ "neft",
+ "nics",
+ "nz_becs",
+ "pl_elixir",
+ "provxchange",
+ "ro_sent",
+ "rtp",
+ "se_bankgirot",
+ "sen",
+ "sepa",
+ "sg_giro",
+ "sic",
+ "signet",
+ "sknbi",
+ "wire",
+ "zengin",
+ ]
+ """The type of payment that can be made to this account.
+
+ Can be `ach`, `eft`, or `rtp`.
+ """
+
+ priority: Optional[Literal["high", "normal"]] = None
+ """The priority of the payment. Can be `normal` or `high`."""
+
+ status: Literal["cancelled", "failed", "pending_verification", "verified"]
+ """The status of the verification attempt.
+
+ Can be `pending_verification`, `verified`, `failed`, or `cancelled`.
+ """
+
+ updated_at: datetime
+
+
+ExternalAccountVerifyResponse = Union[ExternalAccount, ExternalAccountVerificationAttempt]
diff --git a/src/modern_treasury/types/incoming_payment_detail.py b/src/modern_treasury/types/incoming_payment_detail.py
index b3cb0e18..e0e00a25 100644
--- a/src/modern_treasury/types/incoming_payment_detail.py
+++ b/src/modern_treasury/types/incoming_payment_detail.py
@@ -68,7 +68,18 @@ class IncomingPaymentDetail(BaseModel):
"""
originating_account_number_type: Optional[
- Literal["clabe", "hk_number", "iban", "nz_number", "other", "pan", "wallet_address"]
+ Literal[
+ "au_number",
+ "clabe",
+ "hk_number",
+ "iban",
+ "id_number",
+ "nz_number",
+ "other",
+ "pan",
+ "sg_number",
+ "wallet_address",
+ ]
] = None
"""The type of the originating account number for the incoming payment detail."""
diff --git a/src/modern_treasury/types/ledger_account_list_params.py b/src/modern_treasury/types/ledger_account_list_params.py
index a82f206a..7b23e9a3 100644
--- a/src/modern_treasury/types/ledger_account_list_params.py
+++ b/src/modern_treasury/types/ledger_account_list_params.py
@@ -61,7 +61,11 @@ class LedgerAccountListParams(TypedDict, total=False):
parameters.
"""
- name: str
+ name: List[str]
+ """
+ If you have specific names to retrieve in bulk, you can pass them as query
+ parameters delimited with `name[]=`, for example `?name[]=123&name[]=abc`.
+ """
pending_balance_amount: PendingBalanceAmount
"""
diff --git a/src/modern_treasury/types/payment_order_create_async_params.py b/src/modern_treasury/types/payment_order_create_async_params.py
index b106d32a..792ce471 100644
--- a/src/modern_treasury/types/payment_order_create_async_params.py
+++ b/src/modern_treasury/types/payment_order_create_async_params.py
@@ -417,7 +417,18 @@ class LineItem(TypedDict, total=False):
class ReceivingAccountAccountDetail(TypedDict, total=False):
account_number: Required[str]
- account_number_type: Literal["iban", "hk_number", "clabe", "nz_number", "wallet_address", "pan", "other"]
+ account_number_type: Literal[
+ "au_number",
+ "clabe",
+ "hk_number",
+ "iban",
+ "id_number",
+ "nz_number",
+ "other",
+ "pan",
+ "sg_number",
+ "wallet_address",
+ ]
ReceivingAccountAccountDetails = ReceivingAccountAccountDetail
diff --git a/src/modern_treasury/types/payment_order_create_params.py b/src/modern_treasury/types/payment_order_create_params.py
index f1556c71..da4cba69 100644
--- a/src/modern_treasury/types/payment_order_create_params.py
+++ b/src/modern_treasury/types/payment_order_create_params.py
@@ -461,7 +461,18 @@ class LineItem(TypedDict, total=False):
class ReceivingAccountAccountDetail(TypedDict, total=False):
account_number: Required[str]
- account_number_type: Literal["iban", "hk_number", "clabe", "nz_number", "wallet_address", "pan", "other"]
+ account_number_type: Literal[
+ "au_number",
+ "clabe",
+ "hk_number",
+ "iban",
+ "id_number",
+ "nz_number",
+ "other",
+ "pan",
+ "sg_number",
+ "wallet_address",
+ ]
ReceivingAccountAccountDetails = ReceivingAccountAccountDetail
diff --git a/src/modern_treasury/types/payment_order_subtype.py b/src/modern_treasury/types/payment_order_subtype.py
index b01b5f02..dc6b3ff2 100644
--- a/src/modern_treasury/types/payment_order_subtype.py
+++ b/src/modern_treasury/types/payment_order_subtype.py
@@ -5,4 +5,37 @@
__all__ = ["PaymentOrderSubtype"]
-PaymentOrderSubtype = Optional[Literal["0C", "0N", "0S", "CCD", "CIE", "CTX", "IAT", "PPD", "TEL", "WEB"]]
+PaymentOrderSubtype = Optional[
+ Literal[
+ "0C",
+ "0N",
+ "0S",
+ "CCD",
+ "CIE",
+ "CTX",
+ "IAT",
+ "PPD",
+ "TEL",
+ "WEB",
+ "au_becs",
+ "bacs",
+ "chats",
+ "dk_nets",
+ "eft",
+ "hu_ics",
+ "interac",
+ "masav",
+ "mx_ccen",
+ "neft",
+ "nics",
+ "nz_becs",
+ "pl_elixir",
+ "ro_sent",
+ "se_bankgirot",
+ "sepa",
+ "sg_giro",
+ "sic",
+ "sknbi",
+ "zengin",
+ ]
+]
diff --git a/src/modern_treasury/types/payment_order_update_params.py b/src/modern_treasury/types/payment_order_update_params.py
index 9e0acc87..b50bcb22 100644
--- a/src/modern_treasury/types/payment_order_update_params.py
+++ b/src/modern_treasury/types/payment_order_update_params.py
@@ -311,7 +311,18 @@ class LineItem(TypedDict, total=False):
class ReceivingAccountAccountDetail(TypedDict, total=False):
account_number: Required[str]
- account_number_type: Literal["iban", "hk_number", "clabe", "nz_number", "wallet_address", "pan", "other"]
+ account_number_type: Literal[
+ "au_number",
+ "clabe",
+ "hk_number",
+ "iban",
+ "id_number",
+ "nz_number",
+ "other",
+ "pan",
+ "sg_number",
+ "wallet_address",
+ ]
ReceivingAccountAccountDetails = ReceivingAccountAccountDetail
diff --git a/src/modern_treasury/types/transaction.py b/src/modern_treasury/types/transaction.py
index fc95f1af..fac3e913 100644
--- a/src/modern_treasury/types/transaction.py
+++ b/src/modern_treasury/types/transaction.py
@@ -167,6 +167,7 @@ class Transaction(BaseModel):
"jpmc",
"mx",
"plaid",
+ "pnc",
"rspec_vendor",
"signet",
"silvergate",
diff --git a/src/modern_treasury/types/virtual_account_create_params.py b/src/modern_treasury/types/virtual_account_create_params.py
index 8ec9f8ae..5f965003 100644
--- a/src/modern_treasury/types/virtual_account_create_params.py
+++ b/src/modern_treasury/types/virtual_account_create_params.py
@@ -68,7 +68,18 @@ class AccountDetail(TypedDict, total=False):
account_number: Required[str]
"""The account number for the bank account."""
- account_number_type: Literal["clabe", "hk_number", "iban", "nz_number", "other", "pan", "wallet_address"]
+ account_number_type: Literal[
+ "au_number",
+ "clabe",
+ "hk_number",
+ "iban",
+ "id_number",
+ "nz_number",
+ "other",
+ "pan",
+ "sg_number",
+ "wallet_address",
+ ]
"""One of `iban`, `clabe`, `wallet_address`, or `other`.
Use `other` if the bank account number is in a generic format.
diff --git a/tests/api_resources/test_account_details.py b/tests/api_resources/test_account_details.py
index 7247d51e..71df9a95 100644
--- a/tests/api_resources/test_account_details.py
+++ b/tests/api_resources/test_account_details.py
@@ -33,7 +33,7 @@ def test_method_create_with_all_params(self, client: ModernTreasury) -> None:
"string",
accounts_type="external_accounts",
account_number="string",
- account_number_type="clabe",
+ account_number_type="au_number",
)
assert_matches_type(AccountDetail, account_detail, path=["response"])
@@ -251,7 +251,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncModernTrea
"string",
accounts_type="external_accounts",
account_number="string",
- account_number_type="clabe",
+ account_number_type="au_number",
)
assert_matches_type(AccountDetail, account_detail, path=["response"])
diff --git a/tests/api_resources/test_bulk_requests.py b/tests/api_resources/test_bulk_requests.py
index bd89b025..02d8ce6e 100644
--- a/tests/api_resources/test_bulk_requests.py
+++ b/tests/api_resources/test_bulk_requests.py
@@ -108,15 +108,15 @@ def test_method_create_with_all_params(self, client: ModernTreasury) -> None:
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -328,15 +328,15 @@ def test_method_create_with_all_params(self, client: ModernTreasury) -> None:
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -548,15 +548,15 @@ def test_method_create_with_all_params(self, client: ModernTreasury) -> None:
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -960,15 +960,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncModernTrea
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -1180,15 +1180,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncModernTrea
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -1400,15 +1400,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncModernTrea
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
diff --git a/tests/api_resources/test_counterparties.py b/tests/api_resources/test_counterparties.py
index 7308d587..789a53d8 100644
--- a/tests/api_resources/test_counterparties.py
+++ b/tests/api_resources/test_counterparties.py
@@ -50,15 +50,15 @@ def test_method_create_with_all_params(self, client: ModernTreasury) -> None:
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -136,15 +136,15 @@ def test_method_create_with_all_params(self, client: ModernTreasury) -> None:
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -222,15 +222,15 @@ def test_method_create_with_all_params(self, client: ModernTreasury) -> None:
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -875,15 +875,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncModernTrea
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -961,15 +961,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncModernTrea
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -1047,15 +1047,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncModernTrea
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py
index 15cbc1ae..ad571194 100644
--- a/tests/api_resources/test_external_accounts.py
+++ b/tests/api_resources/test_external_accounts.py
@@ -11,6 +11,7 @@
from modern_treasury import ModernTreasury, AsyncModernTreasury
from modern_treasury.types import (
ExternalAccount,
+ ExternalAccountVerifyResponse,
)
from modern_treasury.pagination import SyncPage, AsyncPage
@@ -34,15 +35,15 @@ def test_method_create_with_all_params(self, client: ModernTreasury) -> None:
account_details=[
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
account_type="cash",
@@ -366,7 +367,7 @@ def test_method_verify(self, client: ModernTreasury) -> None:
originating_account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
payment_type="ach",
)
- assert_matches_type(ExternalAccount, external_account, path=["response"])
+ assert_matches_type(ExternalAccountVerifyResponse, external_account, path=["response"])
@parametrize
def test_method_verify_with_all_params(self, client: ModernTreasury) -> None:
@@ -378,7 +379,7 @@ def test_method_verify_with_all_params(self, client: ModernTreasury) -> None:
fallback_type="ach",
priority="high",
)
- assert_matches_type(ExternalAccount, external_account, path=["response"])
+ assert_matches_type(ExternalAccountVerifyResponse, external_account, path=["response"])
@parametrize
def test_raw_response_verify(self, client: ModernTreasury) -> None:
@@ -391,7 +392,7 @@ def test_raw_response_verify(self, client: ModernTreasury) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
external_account = response.parse()
- assert_matches_type(ExternalAccount, external_account, path=["response"])
+ assert_matches_type(ExternalAccountVerifyResponse, external_account, path=["response"])
@parametrize
def test_streaming_response_verify(self, client: ModernTreasury) -> None:
@@ -404,7 +405,7 @@ def test_streaming_response_verify(self, client: ModernTreasury) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
external_account = response.parse()
- assert_matches_type(ExternalAccount, external_account, path=["response"])
+ assert_matches_type(ExternalAccountVerifyResponse, external_account, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -435,15 +436,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncModernTrea
account_details=[
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
account_type="cash",
@@ -767,7 +768,7 @@ async def test_method_verify(self, async_client: AsyncModernTreasury) -> None:
originating_account_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
payment_type="ach",
)
- assert_matches_type(ExternalAccount, external_account, path=["response"])
+ assert_matches_type(ExternalAccountVerifyResponse, external_account, path=["response"])
@parametrize
async def test_method_verify_with_all_params(self, async_client: AsyncModernTreasury) -> None:
@@ -779,7 +780,7 @@ async def test_method_verify_with_all_params(self, async_client: AsyncModernTrea
fallback_type="ach",
priority="high",
)
- assert_matches_type(ExternalAccount, external_account, path=["response"])
+ assert_matches_type(ExternalAccountVerifyResponse, external_account, path=["response"])
@parametrize
async def test_raw_response_verify(self, async_client: AsyncModernTreasury) -> None:
@@ -792,7 +793,7 @@ async def test_raw_response_verify(self, async_client: AsyncModernTreasury) -> N
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
external_account = response.parse()
- assert_matches_type(ExternalAccount, external_account, path=["response"])
+ assert_matches_type(ExternalAccountVerifyResponse, external_account, path=["response"])
@parametrize
async def test_streaming_response_verify(self, async_client: AsyncModernTreasury) -> None:
@@ -805,7 +806,7 @@ async def test_streaming_response_verify(self, async_client: AsyncModernTreasury
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
external_account = await response.parse()
- assert_matches_type(ExternalAccount, external_account, path=["response"])
+ assert_matches_type(ExternalAccountVerifyResponse, external_account, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/test_ledger_accounts.py b/tests/api_resources/test_ledger_accounts.py
index f15a9f8c..41cfad2a 100644
--- a/tests/api_resources/test_ledger_accounts.py
+++ b/tests/api_resources/test_ledger_accounts.py
@@ -218,7 +218,7 @@ def test_method_list_with_all_params(self, client: ModernTreasury) -> None:
ledger_account_category_id="string",
ledger_id="string",
metadata={"foo": "string"},
- name="string",
+ name=["string", "string", "string"],
pending_balance_amount={
"gt": 0,
"lt": 0,
@@ -499,7 +499,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncModernTreasu
ledger_account_category_id="string",
ledger_id="string",
metadata={"foo": "string"},
- name="string",
+ name=["string", "string", "string"],
pending_balance_amount={
"gt": 0,
"lt": 0,
diff --git a/tests/api_resources/test_payment_orders.py b/tests/api_resources/test_payment_orders.py
index 74157422..db0a51b9 100644
--- a/tests/api_resources/test_payment_orders.py
+++ b/tests/api_resources/test_payment_orders.py
@@ -194,15 +194,15 @@ def test_method_create_with_all_params(self, client: ModernTreasury) -> None:
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -434,15 +434,15 @@ def test_method_update_with_all_params(self, client: ModernTreasury) -> None:
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -748,15 +748,15 @@ def test_method_create_async_with_all_params(self, client: ModernTreasury) -> No
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -1038,15 +1038,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncModernTrea
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -1278,15 +1278,15 @@ async def test_method_update_with_all_params(self, async_client: AsyncModernTrea
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
@@ -1592,15 +1592,15 @@ async def test_method_create_async_with_all_params(self, async_client: AsyncMode
"account_details": [
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "iban",
+ "account_number_type": "au_number",
},
],
"routing_details": [
diff --git a/tests/api_resources/test_virtual_accounts.py b/tests/api_resources/test_virtual_accounts.py
index 79327ad0..c71989c8 100644
--- a/tests/api_resources/test_virtual_accounts.py
+++ b/tests/api_resources/test_virtual_accounts.py
@@ -36,15 +36,15 @@ def test_method_create_with_all_params(self, client: ModernTreasury) -> None:
account_details=[
{
"account_number": "string",
- "account_number_type": "clabe",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "clabe",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "clabe",
+ "account_number_type": "au_number",
},
],
counterparty_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
@@ -299,15 +299,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncModernTrea
account_details=[
{
"account_number": "string",
- "account_number_type": "clabe",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "clabe",
+ "account_number_type": "au_number",
},
{
"account_number": "string",
- "account_number_type": "clabe",
+ "account_number_type": "au_number",
},
],
counterparty_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",