From ea2c0abb4c55997e74b8191c460cf34ffc73a4b1 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 1/3] 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 b52e8c7d..fa77aa9b 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 b3415e44..13901fb7 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: @@ -367,8 +298,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", ) ``` @@ -394,8 +323,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", ) ``` @@ -439,8 +366,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')) @@ -461,8 +386,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 e519813a..5e410171 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 # Webhooks @@ -772,13 +779,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 @@ -786,14 +793,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 @@ -802,14 +809,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 9f14e71a..d229f5d7 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 fa2474e3..78a8d1f0 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 87901642..9ddf0934 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 6aa93303..6e578495 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 080ab2bf..9d1fe7f2 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 7d2af5fe..d5af0d51 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 d07b5534..09fdf9a7 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 23891509..95d52f96 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 56be104f..0c56bc39 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 c437c618..2d952c4d 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 2ef4e695..f8f29061 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 c314d0e6..06cc1adb 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 c768f094..02453179 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 b72363fc..98d8113b 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 c0002391..be0d3fd9 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 e24a34ac..8b6443a1 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 f5dae730..6f21b8d5 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 2683f91a..b0e22c08 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 d7773c3c..2b6512c5 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 17f7eab9..e3816301 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 84cbd129..14821fb8 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 f41d35b7..175b4548 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 90b72744..84b5d5c9 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 ddbdf06a..53ed5f6f 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 faa47793..4e6d7ccb 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 0e6be4fb..14a61d72 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 754a1a9d..69426e55 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 f1ec6f56..3ee97ff7 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 1ae25dc7..09cf8cf9 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 8e0880de..dcf7fab9 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 465202ce..7b129776 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 4337bcd6..b615d677 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 9a314e19..fa317235 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 7e04c794..1a22ffa0 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 8bbf1d4f..bba57022 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 b1e02507..fdd8c378 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 96480414..15bfffee 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 0fadbae5..c1d2c768 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 53e2563c..8c6f4b6a 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 276fe76b..29aee7cd 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 d69d83ab..d8641324 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 aa27390a..e1c4466b 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 19747929..e1ae84eb 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 67e2b910..695b9fcb 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 818ed4ba..c4326af9 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 9130af3f..50450bc4 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 40605dc8..6436c5c9 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 569b565d..8546d695 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 adb9d964..52735403 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 d61dda61..81aa2fac 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 ee73f74d..2836d501 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 08046828..40d3d3ed 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 6eaf9bf9..e798c8ed 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 00000000..4e47c074 --- /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 00000000..314a01c9 --- /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 00000000..e4e2c39c --- /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 00000000..7dff0783 --- /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 00000000..a782c2f2 --- /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 00000000..25902d2c --- /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 00000000..efede11c --- /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 00000000..ee89ccac --- /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 00000000..d890a6ea --- /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 00000000..0b89989e --- /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 00000000..b85edf42 --- /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 00000000..5d87ddb6 --- /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 00000000..b30e1be1 --- /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 00000000..73cbe9d1 --- /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 00000000..58e5983c --- /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 00000000..df2980ff --- /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 00000000..0c3c6171 --- /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 00000000..5c3fbeaf --- /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 00000000..1b0e0a20 --- /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 00000000..7cbdf20b --- /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 00000000..92365ce7 --- /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 00000000..e55dbd33 --- /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 00000000..01947e53 --- /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 00000000..c19eeb06 --- /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 00000000..9cebc95f --- /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 00000000..711ac5d9 --- /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 00000000..998c5af1 --- /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 00000000..f8702c2c --- /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 00000000..a3f74634 --- /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 00000000..c81705c0 --- /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 00000000..eff7dd4c --- /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 00000000..6c116adb --- /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 00000000..7770553f --- /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 00000000..9bd2b08e --- /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 00000000..d31dd0d0 --- /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 00000000..f2453fb2 --- /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 00000000..fff7494f --- /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 00000000..ff1d9ae4 --- /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 00000000..092b3725 --- /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 00000000..9ac9647c --- /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 00000000..828bfe80 --- /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 00000000..ee304363 --- /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 00000000..3f7ecb0b --- /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 00000000..de23c3d0 --- /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 00000000..365a6f30 --- /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 00000000..21d077c5 --- /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 4b7bd3d7..c0cdc691 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 00000000..7910e0bb --- /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 00000000..c09e0958 --- /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 00000000..2ea3043b --- /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 00000000..b6566a16 --- /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 d97124c7..6223cf6c 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 0caeb7f4..23c46c97 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 02f608a4..ed14e99c 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 d6edc5ab..e9b99596 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 c86c2044..36739941 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 103899c1..c323e54f 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 e22057f1..e7cd661f 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 2e78003b..a289b0c1 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 e13a51f2..bf35a8bc 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 ac4e7297..4ef303a7 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 aa0b599f..69dd9644 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 7bbf0fcd..a8c5efe7 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 c12a8d0d..48f920d9 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 f25e35b7..3fc40a71 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 566aeed1..69a2bb2a 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 ac1a9a3a..2fdf6471 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 9f9a14b8..459dca00 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 43df830d..fca9c6f0 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 dbacde8c..9ff72648 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 38bbafee..2b8c928a 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 1ce1ba95..a13595fe 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 c0d808c7..23e989e6 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 ace0390a..987aa4fe 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 f8577e2c..f43599a6 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 101cba4b..d6de1afb 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 496ac45e..66cafb08 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 4d639e66..33b48e74 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 c13a3ee4..1e7e0434 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 e36671d6..d210a6fa 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 9c73918f..f70dee03 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 0b4064f1..f501d9a7 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 7ea08107..a23be479 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 8f4229b5..1de275ae 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 305dfa6f..d5b61f5e 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 8d0fb6d0..f412ee60 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 6087c698..2f091c3e 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 8ed6b998..fff8e948 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 b3564fc6..abbd2081 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 b8e2b12b..4b3c3581 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 17280bde..547c9711 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 52eb24ab..38fe62c6 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 af444a4d..6d79a1d4 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 012a2030..9a716658 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 42fda8cd..8dc612bc 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 1a4df07a..75841a25 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 09e20196..3eaee878 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 62e2949a..359f80cd 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 5e15c288..4df75ae8 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 d5491798..84461982 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 dd4783e3..7284c4d8 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 e68b3645..3330fa39 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 2b9c5ca3e89845202c4e6440712bf3c4e118f933 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 2/3] 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 fa77aa9b..b52e8c7d 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 13901fb7..b3415e44 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: @@ -298,6 +367,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", ) ``` @@ -323,6 +394,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", ) ``` @@ -366,6 +439,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')) @@ -386,6 +461,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 5e410171..e519813a 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 # Webhooks @@ -779,13 +772,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 @@ -793,14 +786,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 @@ -809,14 +802,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 d229f5d7..9f14e71a 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 78a8d1f0..fa2474e3 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 9ddf0934..87901642 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 6e578495..6aa93303 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 9d1fe7f2..080ab2bf 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 d5af0d51..7d2af5fe 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 09fdf9a7..d07b5534 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 95d52f96..23891509 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 0c56bc39..56be104f 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 2d952c4d..c437c618 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 f8f29061..2ef4e695 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 06cc1adb..c314d0e6 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 02453179..c768f094 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 98d8113b..b72363fc 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 be0d3fd9..c0002391 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 8b6443a1..e24a34ac 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 6f21b8d5..f5dae730 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 b0e22c08..2683f91a 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 2b6512c5..d7773c3c 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 e3816301..17f7eab9 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 14821fb8..84cbd129 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 175b4548..f41d35b7 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 84b5d5c9..90b72744 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 53ed5f6f..ddbdf06a 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 4e6d7ccb..faa47793 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 14a61d72..0e6be4fb 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 69426e55..754a1a9d 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 3ee97ff7..f1ec6f56 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 09cf8cf9..1ae25dc7 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 dcf7fab9..8e0880de 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 7b129776..465202ce 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 b615d677..4337bcd6 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 fa317235..9a314e19 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 1a22ffa0..7e04c794 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 bba57022..8bbf1d4f 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 fdd8c378..b1e02507 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 15bfffee..96480414 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 c1d2c768..0fadbae5 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 8c6f4b6a..53e2563c 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 29aee7cd..276fe76b 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 d8641324..d69d83ab 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 e1c4466b..aa27390a 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 e1ae84eb..19747929 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 695b9fcb..67e2b910 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 c4326af9..818ed4ba 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 50450bc4..9130af3f 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 6436c5c9..40605dc8 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 8546d695..569b565d 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 52735403..adb9d964 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 81aa2fac..d61dda61 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 2836d501..ee73f74d 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 40d3d3ed..08046828 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 e798c8ed..6eaf9bf9 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 4e47c074..00000000 --- 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 314a01c9..00000000 --- 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 e4e2c39c..00000000 --- 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 7dff0783..00000000 --- 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 a782c2f2..00000000 --- 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 25902d2c..00000000 --- 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 efede11c..00000000 --- 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 ee89ccac..00000000 --- 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 d890a6ea..00000000 --- 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 0b89989e..00000000 --- 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 b85edf42..00000000 --- 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 5d87ddb6..00000000 --- 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 b30e1be1..00000000 --- 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 73cbe9d1..00000000 --- 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 58e5983c..00000000 --- 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 df2980ff..00000000 --- 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 0c3c6171..00000000 --- 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 5c3fbeaf..00000000 --- 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 1b0e0a20..00000000 --- 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 7cbdf20b..00000000 --- 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 92365ce7..00000000 --- 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 e55dbd33..00000000 --- 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 01947e53..00000000 --- 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 c19eeb06..00000000 --- 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 9cebc95f..00000000 --- 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 711ac5d9..00000000 --- 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 998c5af1..00000000 --- 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 f8702c2c..00000000 --- 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 a3f74634..00000000 --- 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 c81705c0..00000000 --- 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 eff7dd4c..00000000 --- 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 6c116adb..00000000 --- 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 7770553f..00000000 --- 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 9bd2b08e..00000000 --- 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 d31dd0d0..00000000 --- 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 f2453fb2..00000000 --- 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 fff7494f..00000000 --- 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 ff1d9ae4..00000000 --- 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 092b3725..00000000 --- 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 9ac9647c..00000000 --- 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 828bfe80..00000000 --- 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 ee304363..00000000 --- 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 3f7ecb0b..00000000 --- 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 de23c3d0..00000000 --- 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 365a6f30..00000000 --- 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 21d077c5..00000000 --- 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 c0cdc691..4b7bd3d7 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 7910e0bb..00000000 --- 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 c09e0958..00000000 --- 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 2ea3043b..00000000 --- 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 b6566a16..00000000 --- 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 6223cf6c..d97124c7 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 23c46c97..0caeb7f4 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 ed14e99c..02f608a4 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 e9b99596..d6edc5ab 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 36739941..c86c2044 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 c323e54f..103899c1 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 e7cd661f..e22057f1 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 a289b0c1..2e78003b 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 bf35a8bc..e13a51f2 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 4ef303a7..ac4e7297 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 69dd9644..aa0b599f 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 a8c5efe7..7bbf0fcd 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 48f920d9..c12a8d0d 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 3fc40a71..f25e35b7 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 69a2bb2a..566aeed1 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 2fdf6471..ac1a9a3a 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 459dca00..9f9a14b8 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 fca9c6f0..43df830d 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 9ff72648..dbacde8c 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 2b8c928a..38bbafee 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 a13595fe..1ce1ba95 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 23e989e6..c0d808c7 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 987aa4fe..ace0390a 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 f43599a6..f8577e2c 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 d6de1afb..101cba4b 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 66cafb08..496ac45e 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 33b48e74..4d639e66 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 1e7e0434..c13a3ee4 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 d210a6fa..e36671d6 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 f70dee03..9c73918f 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 f501d9a7..0b4064f1 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 a23be479..7ea08107 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 1de275ae..8f4229b5 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 d5b61f5e..305dfa6f 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 f412ee60..8d0fb6d0 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 2f091c3e..6087c698 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 fff8e948..8ed6b998 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 abbd2081..b3564fc6 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 4b3c3581..b8e2b12b 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 547c9711..17280bde 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 38fe62c6..52eb24ab 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 6d79a1d4..af444a4d 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 9a716658..012a2030 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 8dc612bc..42fda8cd 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 75841a25..1a4df07a 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 3eaee878..09e20196 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 359f80cd..62e2949a 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 4df75ae8..5e15c288 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 84461982..d5491798 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 7284c4d8..dd4783e3 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 3330fa39..e68b3645 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 7d88475c61891ac397ec9f08179efab57531cd42 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:41 +0000 Subject: [PATCH 3/3] release: 0.402.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ pyproject.toml | 2 +- src/increase/_version.py | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f4b8c8ab..82487aa1 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/CHANGELOG.md b/CHANGELOG.md index 70fe5fd4..2724b8b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.402.0 (2025-11-26) + +Full Changelog: [v0.401.0...v0.402.0](https://github.com/Increase/increase-python/compare/v0.401.0...v0.402.0) + +### Features + +* **api:** api update ([2b9c5ca](https://github.com/Increase/increase-python/commit/2b9c5ca3e89845202c4e6440712bf3c4e118f933)) +* **api:** api update ([ea2c0ab](https://github.com/Increase/increase-python/commit/ea2c0abb4c55997e74b8191c460cf34ffc73a4b1)) + ## 0.401.0 (2025-11-24) Full Changelog: [v0.400.0...v0.401.0](https://github.com/Increase/increase-python/compare/v0.400.0...v0.401.0) diff --git a/pyproject.toml b/pyproject.toml index 19cc2e34..0807076a 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 5db0e202..147dd81e 100644 --- a/src/increase/_version.py +++ b/src/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