diff --git a/.stats.yml b/.stats.yml index 0e130cdf..51bc2543 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 175 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-abe6a4f82f696099fa8ecb1cc44f08979e17d56578ae7ea68b0e9182e21df508.yml -openapi_spec_hash: d2ce51592a9a234c6f34a1168a31f91f -config_hash: f4b1d2f464e80527f970de61cba0c52f +configured_endpoints: 173 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-4fd8048b287f409ad2b91f7d0f0b7fc13cc9bc4ccc7859666f21203bab3d2f01.yml +openapi_spec_hash: a554c54d96a7604a770b6a8b1df46395 +config_hash: df0af4ff639b8a6923a6244d2247910c diff --git a/api.md b/api.md index c07d4f4d..4ca0eeaf 100644 --- a/api.md +++ b/api.md @@ -214,18 +214,6 @@ Methods: - client.cards.get_embed_html(\*args) -> str - client.cards.get_embed_url(\*args) -> URL -## AggregateBalances - -Types: - -```python -from lithic.types.cards import AggregateBalanceListResponse -``` - -Methods: - -- client.cards.aggregate_balances.list(\*\*params) -> SyncSinglePage[AggregateBalanceListResponse] - ## Balances Methods: @@ -266,18 +254,6 @@ Methods: - client.balances.list(\*\*params) -> SyncSinglePage[Balance] -# AggregateBalances - -Types: - -```python -from lithic.types import AggregateBalance -``` - -Methods: - -- client.aggregate_balances.list(\*\*params) -> SyncSinglePage[AggregateBalance] - # Disputes Types: diff --git a/src/lithic/_base_client.py b/src/lithic/_base_client.py index ddcf4528..e8b7c42d 100644 --- a/src/lithic/_base_client.py +++ b/src/lithic/_base_client.py @@ -1262,9 +1262,12 @@ def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + ) return self.request(cast_to, opts) def put( @@ -1796,9 +1799,12 @@ async def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options + ) return await self.request(cast_to, opts) async def put( diff --git a/src/lithic/_client.py b/src/lithic/_client.py index 363745a1..baca51df 100644 --- a/src/lithic/_client.py +++ b/src/lithic/_client.py @@ -61,7 +61,6 @@ digital_card_art, network_programs, external_payments, - aggregate_balances, financial_accounts, responder_endpoints, management_operations, @@ -86,44 +85,19 @@ from .resources.reports.reports import Reports, AsyncReports from .resources.account_activity import AccountActivity, AsyncAccountActivity from .resources.card_bulk_orders import CardBulkOrders, AsyncCardBulkOrders - from .resources.digital_card_art import ( - DigitalCardArtResource, - AsyncDigitalCardArtResource, - ) + from .resources.digital_card_art import DigitalCardArtResource, AsyncDigitalCardArtResource from .resources.network_programs import NetworkPrograms, AsyncNetworkPrograms from .resources.external_payments import ExternalPayments, AsyncExternalPayments from .resources.three_ds.three_ds import ThreeDS, AsyncThreeDS - from .resources.aggregate_balances import AggregateBalances, AsyncAggregateBalances - from .resources.responder_endpoints import ( - ResponderEndpoints, - AsyncResponderEndpoints, - ) + from .resources.responder_endpoints import ResponderEndpoints, AsyncResponderEndpoints from .resources.auth_rules.auth_rules import AuthRules, AsyncAuthRules - from .resources.management_operations import ( - ManagementOperations, - AsyncManagementOperations, - ) - from .resources.auth_stream_enrollment import ( - AuthStreamEnrollment, - AsyncAuthStreamEnrollment, - ) - from .resources.tokenization_decisioning import ( - TokenizationDecisioning, - AsyncTokenizationDecisioning, - ) + from .resources.management_operations import ManagementOperations, AsyncManagementOperations + from .resources.auth_stream_enrollment import AuthStreamEnrollment, AsyncAuthStreamEnrollment + from .resources.tokenization_decisioning import TokenizationDecisioning, AsyncTokenizationDecisioning from .resources.transactions.transactions import Transactions, AsyncTransactions - from .resources.credit_products.credit_products import ( - CreditProducts, - AsyncCreditProducts, - ) - from .resources.financial_accounts.financial_accounts import ( - FinancialAccounts, - AsyncFinancialAccounts, - ) - from .resources.external_bank_accounts.external_bank_accounts import ( - ExternalBankAccounts, - AsyncExternalBankAccounts, - ) + from .resources.credit_products.credit_products import CreditProducts, AsyncCreditProducts + from .resources.financial_accounts.financial_accounts import FinancialAccounts, AsyncFinancialAccounts + from .resources.external_bank_accounts.external_bank_accounts import ExternalBankAccounts, AsyncExternalBankAccounts __all__ = [ "ENVIRONMENTS", @@ -284,12 +258,6 @@ def balances(self) -> Balances: return Balances(self) - @cached_property - def aggregate_balances(self) -> AggregateBalances: - from .resources.aggregate_balances import AggregateBalances - - return AggregateBalances(self) - @cached_property def disputes(self) -> Disputes: from .resources.disputes import Disputes @@ -514,10 +482,7 @@ def api_status( return self.get( "/v1/status", options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), cast_to=APIStatus, ) @@ -697,12 +662,6 @@ def balances(self) -> AsyncBalances: return AsyncBalances(self) - @cached_property - def aggregate_balances(self) -> AsyncAggregateBalances: - from .resources.aggregate_balances import AsyncAggregateBalances - - return AsyncAggregateBalances(self) - @cached_property def disputes(self) -> AsyncDisputes: from .resources.disputes import AsyncDisputes @@ -927,10 +886,7 @@ async def api_status( return await self.get( "/v1/status", options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), cast_to=APIStatus, ) @@ -998,22 +954,14 @@ def auth_rules(self) -> auth_rules.AuthRulesWithRawResponse: return AuthRulesWithRawResponse(self._client.auth_rules) @cached_property - def auth_stream_enrollment( - self, - ) -> auth_stream_enrollment.AuthStreamEnrollmentWithRawResponse: - from .resources.auth_stream_enrollment import ( - AuthStreamEnrollmentWithRawResponse, - ) + def auth_stream_enrollment(self) -> auth_stream_enrollment.AuthStreamEnrollmentWithRawResponse: + from .resources.auth_stream_enrollment import AuthStreamEnrollmentWithRawResponse return AuthStreamEnrollmentWithRawResponse(self._client.auth_stream_enrollment) @cached_property - def tokenization_decisioning( - self, - ) -> tokenization_decisioning.TokenizationDecisioningWithRawResponse: - from .resources.tokenization_decisioning import ( - TokenizationDecisioningWithRawResponse, - ) + def tokenization_decisioning(self) -> tokenization_decisioning.TokenizationDecisioningWithRawResponse: + from .resources.tokenization_decisioning import TokenizationDecisioningWithRawResponse return TokenizationDecisioningWithRawResponse(self._client.tokenization_decisioning) @@ -1041,12 +989,6 @@ def balances(self) -> balances.BalancesWithRawResponse: return BalancesWithRawResponse(self._client.balances) - @cached_property - def aggregate_balances(self) -> aggregate_balances.AggregateBalancesWithRawResponse: - from .resources.aggregate_balances import AggregateBalancesWithRawResponse - - return AggregateBalancesWithRawResponse(self._client.aggregate_balances) - @cached_property def disputes(self) -> disputes.DisputesWithRawResponse: from .resources.disputes import DisputesWithRawResponse @@ -1078,20 +1020,14 @@ def transactions(self) -> transactions.TransactionsWithRawResponse: return TransactionsWithRawResponse(self._client.transactions) @cached_property - def responder_endpoints( - self, - ) -> responder_endpoints.ResponderEndpointsWithRawResponse: + def responder_endpoints(self) -> responder_endpoints.ResponderEndpointsWithRawResponse: from .resources.responder_endpoints import ResponderEndpointsWithRawResponse return ResponderEndpointsWithRawResponse(self._client.responder_endpoints) @cached_property - def external_bank_accounts( - self, - ) -> external_bank_accounts.ExternalBankAccountsWithRawResponse: - from .resources.external_bank_accounts import ( - ExternalBankAccountsWithRawResponse, - ) + def external_bank_accounts(self) -> external_bank_accounts.ExternalBankAccountsWithRawResponse: + from .resources.external_bank_accounts import ExternalBankAccountsWithRawResponse return ExternalBankAccountsWithRawResponse(self._client.external_bank_accounts) @@ -1120,9 +1056,7 @@ def card_programs(self) -> card_programs.CardProgramsWithRawResponse: return CardProgramsWithRawResponse(self._client.card_programs) @cached_property - def digital_card_art( - self, - ) -> digital_card_art.DigitalCardArtResourceWithRawResponse: + def digital_card_art(self) -> digital_card_art.DigitalCardArtResourceWithRawResponse: from .resources.digital_card_art import DigitalCardArtResourceWithRawResponse return DigitalCardArtResourceWithRawResponse(self._client.digital_card_art) @@ -1146,9 +1080,7 @@ def external_payments(self) -> external_payments.ExternalPaymentsWithRawResponse return ExternalPaymentsWithRawResponse(self._client.external_payments) @cached_property - def management_operations( - self, - ) -> management_operations.ManagementOperationsWithRawResponse: + def management_operations(self) -> management_operations.ManagementOperationsWithRawResponse: from .resources.management_operations import ManagementOperationsWithRawResponse return ManagementOperationsWithRawResponse(self._client.management_operations) @@ -1207,22 +1139,14 @@ def auth_rules(self) -> auth_rules.AsyncAuthRulesWithRawResponse: return AsyncAuthRulesWithRawResponse(self._client.auth_rules) @cached_property - def auth_stream_enrollment( - self, - ) -> auth_stream_enrollment.AsyncAuthStreamEnrollmentWithRawResponse: - from .resources.auth_stream_enrollment import ( - AsyncAuthStreamEnrollmentWithRawResponse, - ) + def auth_stream_enrollment(self) -> auth_stream_enrollment.AsyncAuthStreamEnrollmentWithRawResponse: + from .resources.auth_stream_enrollment import AsyncAuthStreamEnrollmentWithRawResponse return AsyncAuthStreamEnrollmentWithRawResponse(self._client.auth_stream_enrollment) @cached_property - def tokenization_decisioning( - self, - ) -> tokenization_decisioning.AsyncTokenizationDecisioningWithRawResponse: - from .resources.tokenization_decisioning import ( - AsyncTokenizationDecisioningWithRawResponse, - ) + def tokenization_decisioning(self) -> tokenization_decisioning.AsyncTokenizationDecisioningWithRawResponse: + from .resources.tokenization_decisioning import AsyncTokenizationDecisioningWithRawResponse return AsyncTokenizationDecisioningWithRawResponse(self._client.tokenization_decisioning) @@ -1250,14 +1174,6 @@ def balances(self) -> balances.AsyncBalancesWithRawResponse: return AsyncBalancesWithRawResponse(self._client.balances) - @cached_property - def aggregate_balances( - self, - ) -> aggregate_balances.AsyncAggregateBalancesWithRawResponse: - from .resources.aggregate_balances import AsyncAggregateBalancesWithRawResponse - - return AsyncAggregateBalancesWithRawResponse(self._client.aggregate_balances) - @cached_property def disputes(self) -> disputes.AsyncDisputesWithRawResponse: from .resources.disputes import AsyncDisputesWithRawResponse @@ -1277,9 +1193,7 @@ def events(self) -> events.AsyncEventsWithRawResponse: return AsyncEventsWithRawResponse(self._client.events) @cached_property - def financial_accounts( - self, - ) -> financial_accounts.AsyncFinancialAccountsWithRawResponse: + def financial_accounts(self) -> financial_accounts.AsyncFinancialAccountsWithRawResponse: from .resources.financial_accounts import AsyncFinancialAccountsWithRawResponse return AsyncFinancialAccountsWithRawResponse(self._client.financial_accounts) @@ -1291,22 +1205,14 @@ def transactions(self) -> transactions.AsyncTransactionsWithRawResponse: return AsyncTransactionsWithRawResponse(self._client.transactions) @cached_property - def responder_endpoints( - self, - ) -> responder_endpoints.AsyncResponderEndpointsWithRawResponse: - from .resources.responder_endpoints import ( - AsyncResponderEndpointsWithRawResponse, - ) + def responder_endpoints(self) -> responder_endpoints.AsyncResponderEndpointsWithRawResponse: + from .resources.responder_endpoints import AsyncResponderEndpointsWithRawResponse return AsyncResponderEndpointsWithRawResponse(self._client.responder_endpoints) @cached_property - def external_bank_accounts( - self, - ) -> external_bank_accounts.AsyncExternalBankAccountsWithRawResponse: - from .resources.external_bank_accounts import ( - AsyncExternalBankAccountsWithRawResponse, - ) + def external_bank_accounts(self) -> external_bank_accounts.AsyncExternalBankAccountsWithRawResponse: + from .resources.external_bank_accounts import AsyncExternalBankAccountsWithRawResponse return AsyncExternalBankAccountsWithRawResponse(self._client.external_bank_accounts) @@ -1335,12 +1241,8 @@ def card_programs(self) -> card_programs.AsyncCardProgramsWithRawResponse: return AsyncCardProgramsWithRawResponse(self._client.card_programs) @cached_property - def digital_card_art( - self, - ) -> digital_card_art.AsyncDigitalCardArtResourceWithRawResponse: - from .resources.digital_card_art import ( - AsyncDigitalCardArtResourceWithRawResponse, - ) + def digital_card_art(self) -> digital_card_art.AsyncDigitalCardArtResourceWithRawResponse: + from .resources.digital_card_art import AsyncDigitalCardArtResourceWithRawResponse return AsyncDigitalCardArtResourceWithRawResponse(self._client.digital_card_art) @@ -1357,20 +1259,14 @@ def credit_products(self) -> credit_products.AsyncCreditProductsWithRawResponse: return AsyncCreditProductsWithRawResponse(self._client.credit_products) @cached_property - def external_payments( - self, - ) -> external_payments.AsyncExternalPaymentsWithRawResponse: + def external_payments(self) -> external_payments.AsyncExternalPaymentsWithRawResponse: from .resources.external_payments import AsyncExternalPaymentsWithRawResponse return AsyncExternalPaymentsWithRawResponse(self._client.external_payments) @cached_property - def management_operations( - self, - ) -> management_operations.AsyncManagementOperationsWithRawResponse: - from .resources.management_operations import ( - AsyncManagementOperationsWithRawResponse, - ) + def management_operations(self) -> management_operations.AsyncManagementOperationsWithRawResponse: + from .resources.management_operations import AsyncManagementOperationsWithRawResponse return AsyncManagementOperationsWithRawResponse(self._client.management_operations) @@ -1428,22 +1324,14 @@ def auth_rules(self) -> auth_rules.AuthRulesWithStreamingResponse: return AuthRulesWithStreamingResponse(self._client.auth_rules) @cached_property - def auth_stream_enrollment( - self, - ) -> auth_stream_enrollment.AuthStreamEnrollmentWithStreamingResponse: - from .resources.auth_stream_enrollment import ( - AuthStreamEnrollmentWithStreamingResponse, - ) + def auth_stream_enrollment(self) -> auth_stream_enrollment.AuthStreamEnrollmentWithStreamingResponse: + from .resources.auth_stream_enrollment import AuthStreamEnrollmentWithStreamingResponse return AuthStreamEnrollmentWithStreamingResponse(self._client.auth_stream_enrollment) @cached_property - def tokenization_decisioning( - self, - ) -> tokenization_decisioning.TokenizationDecisioningWithStreamingResponse: - from .resources.tokenization_decisioning import ( - TokenizationDecisioningWithStreamingResponse, - ) + def tokenization_decisioning(self) -> tokenization_decisioning.TokenizationDecisioningWithStreamingResponse: + from .resources.tokenization_decisioning import TokenizationDecisioningWithStreamingResponse return TokenizationDecisioningWithStreamingResponse(self._client.tokenization_decisioning) @@ -1471,14 +1359,6 @@ def balances(self) -> balances.BalancesWithStreamingResponse: return BalancesWithStreamingResponse(self._client.balances) - @cached_property - def aggregate_balances( - self, - ) -> aggregate_balances.AggregateBalancesWithStreamingResponse: - from .resources.aggregate_balances import AggregateBalancesWithStreamingResponse - - return AggregateBalancesWithStreamingResponse(self._client.aggregate_balances) - @cached_property def disputes(self) -> disputes.DisputesWithStreamingResponse: from .resources.disputes import DisputesWithStreamingResponse @@ -1498,9 +1378,7 @@ def events(self) -> events.EventsWithStreamingResponse: return EventsWithStreamingResponse(self._client.events) @cached_property - def financial_accounts( - self, - ) -> financial_accounts.FinancialAccountsWithStreamingResponse: + def financial_accounts(self) -> financial_accounts.FinancialAccountsWithStreamingResponse: from .resources.financial_accounts import FinancialAccountsWithStreamingResponse return FinancialAccountsWithStreamingResponse(self._client.financial_accounts) @@ -1512,22 +1390,14 @@ def transactions(self) -> transactions.TransactionsWithStreamingResponse: return TransactionsWithStreamingResponse(self._client.transactions) @cached_property - def responder_endpoints( - self, - ) -> responder_endpoints.ResponderEndpointsWithStreamingResponse: - from .resources.responder_endpoints import ( - ResponderEndpointsWithStreamingResponse, - ) + def responder_endpoints(self) -> responder_endpoints.ResponderEndpointsWithStreamingResponse: + from .resources.responder_endpoints import ResponderEndpointsWithStreamingResponse return ResponderEndpointsWithStreamingResponse(self._client.responder_endpoints) @cached_property - def external_bank_accounts( - self, - ) -> external_bank_accounts.ExternalBankAccountsWithStreamingResponse: - from .resources.external_bank_accounts import ( - ExternalBankAccountsWithStreamingResponse, - ) + def external_bank_accounts(self) -> external_bank_accounts.ExternalBankAccountsWithStreamingResponse: + from .resources.external_bank_accounts import ExternalBankAccountsWithStreamingResponse return ExternalBankAccountsWithStreamingResponse(self._client.external_bank_accounts) @@ -1556,12 +1426,8 @@ def card_programs(self) -> card_programs.CardProgramsWithStreamingResponse: return CardProgramsWithStreamingResponse(self._client.card_programs) @cached_property - def digital_card_art( - self, - ) -> digital_card_art.DigitalCardArtResourceWithStreamingResponse: - from .resources.digital_card_art import ( - DigitalCardArtResourceWithStreamingResponse, - ) + def digital_card_art(self) -> digital_card_art.DigitalCardArtResourceWithStreamingResponse: + from .resources.digital_card_art import DigitalCardArtResourceWithStreamingResponse return DigitalCardArtResourceWithStreamingResponse(self._client.digital_card_art) @@ -1578,20 +1444,14 @@ def credit_products(self) -> credit_products.CreditProductsWithStreamingResponse return CreditProductsWithStreamingResponse(self._client.credit_products) @cached_property - def external_payments( - self, - ) -> external_payments.ExternalPaymentsWithStreamingResponse: + def external_payments(self) -> external_payments.ExternalPaymentsWithStreamingResponse: from .resources.external_payments import ExternalPaymentsWithStreamingResponse return ExternalPaymentsWithStreamingResponse(self._client.external_payments) @cached_property - def management_operations( - self, - ) -> management_operations.ManagementOperationsWithStreamingResponse: - from .resources.management_operations import ( - ManagementOperationsWithStreamingResponse, - ) + def management_operations(self) -> management_operations.ManagementOperationsWithStreamingResponse: + from .resources.management_operations import ManagementOperationsWithStreamingResponse return ManagementOperationsWithStreamingResponse(self._client.management_operations) @@ -1637,9 +1497,7 @@ def accounts(self) -> accounts.AsyncAccountsWithStreamingResponse: return AsyncAccountsWithStreamingResponse(self._client.accounts) @cached_property - def account_holders( - self, - ) -> account_holders.AsyncAccountHoldersWithStreamingResponse: + def account_holders(self) -> account_holders.AsyncAccountHoldersWithStreamingResponse: from .resources.account_holders import AsyncAccountHoldersWithStreamingResponse return AsyncAccountHoldersWithStreamingResponse(self._client.account_holders) @@ -1651,22 +1509,14 @@ def auth_rules(self) -> auth_rules.AsyncAuthRulesWithStreamingResponse: return AsyncAuthRulesWithStreamingResponse(self._client.auth_rules) @cached_property - def auth_stream_enrollment( - self, - ) -> auth_stream_enrollment.AsyncAuthStreamEnrollmentWithStreamingResponse: - from .resources.auth_stream_enrollment import ( - AsyncAuthStreamEnrollmentWithStreamingResponse, - ) + def auth_stream_enrollment(self) -> auth_stream_enrollment.AsyncAuthStreamEnrollmentWithStreamingResponse: + from .resources.auth_stream_enrollment import AsyncAuthStreamEnrollmentWithStreamingResponse return AsyncAuthStreamEnrollmentWithStreamingResponse(self._client.auth_stream_enrollment) @cached_property - def tokenization_decisioning( - self, - ) -> tokenization_decisioning.AsyncTokenizationDecisioningWithStreamingResponse: - from .resources.tokenization_decisioning import ( - AsyncTokenizationDecisioningWithStreamingResponse, - ) + def tokenization_decisioning(self) -> tokenization_decisioning.AsyncTokenizationDecisioningWithStreamingResponse: + from .resources.tokenization_decisioning import AsyncTokenizationDecisioningWithStreamingResponse return AsyncTokenizationDecisioningWithStreamingResponse(self._client.tokenization_decisioning) @@ -1683,9 +1533,7 @@ def cards(self) -> cards.AsyncCardsWithStreamingResponse: return AsyncCardsWithStreamingResponse(self._client.cards) @cached_property - def card_bulk_orders( - self, - ) -> card_bulk_orders.AsyncCardBulkOrdersWithStreamingResponse: + def card_bulk_orders(self) -> card_bulk_orders.AsyncCardBulkOrdersWithStreamingResponse: from .resources.card_bulk_orders import AsyncCardBulkOrdersWithStreamingResponse return AsyncCardBulkOrdersWithStreamingResponse(self._client.card_bulk_orders) @@ -1696,16 +1544,6 @@ def balances(self) -> balances.AsyncBalancesWithStreamingResponse: return AsyncBalancesWithStreamingResponse(self._client.balances) - @cached_property - def aggregate_balances( - self, - ) -> aggregate_balances.AsyncAggregateBalancesWithStreamingResponse: - from .resources.aggregate_balances import ( - AsyncAggregateBalancesWithStreamingResponse, - ) - - return AsyncAggregateBalancesWithStreamingResponse(self._client.aggregate_balances) - @cached_property def disputes(self) -> disputes.AsyncDisputesWithStreamingResponse: from .resources.disputes import AsyncDisputesWithStreamingResponse @@ -1725,12 +1563,8 @@ def events(self) -> events.AsyncEventsWithStreamingResponse: return AsyncEventsWithStreamingResponse(self._client.events) @cached_property - def financial_accounts( - self, - ) -> financial_accounts.AsyncFinancialAccountsWithStreamingResponse: - from .resources.financial_accounts import ( - AsyncFinancialAccountsWithStreamingResponse, - ) + def financial_accounts(self) -> financial_accounts.AsyncFinancialAccountsWithStreamingResponse: + from .resources.financial_accounts import AsyncFinancialAccountsWithStreamingResponse return AsyncFinancialAccountsWithStreamingResponse(self._client.financial_accounts) @@ -1741,22 +1575,14 @@ def transactions(self) -> transactions.AsyncTransactionsWithStreamingResponse: return AsyncTransactionsWithStreamingResponse(self._client.transactions) @cached_property - def responder_endpoints( - self, - ) -> responder_endpoints.AsyncResponderEndpointsWithStreamingResponse: - from .resources.responder_endpoints import ( - AsyncResponderEndpointsWithStreamingResponse, - ) + def responder_endpoints(self) -> responder_endpoints.AsyncResponderEndpointsWithStreamingResponse: + from .resources.responder_endpoints import AsyncResponderEndpointsWithStreamingResponse return AsyncResponderEndpointsWithStreamingResponse(self._client.responder_endpoints) @cached_property - def external_bank_accounts( - self, - ) -> external_bank_accounts.AsyncExternalBankAccountsWithStreamingResponse: - from .resources.external_bank_accounts import ( - AsyncExternalBankAccountsWithStreamingResponse, - ) + def external_bank_accounts(self) -> external_bank_accounts.AsyncExternalBankAccountsWithStreamingResponse: + from .resources.external_bank_accounts import AsyncExternalBankAccountsWithStreamingResponse return AsyncExternalBankAccountsWithStreamingResponse(self._client.external_bank_accounts) @@ -1785,12 +1611,8 @@ def card_programs(self) -> card_programs.AsyncCardProgramsWithStreamingResponse: return AsyncCardProgramsWithStreamingResponse(self._client.card_programs) @cached_property - def digital_card_art( - self, - ) -> digital_card_art.AsyncDigitalCardArtResourceWithStreamingResponse: - from .resources.digital_card_art import ( - AsyncDigitalCardArtResourceWithStreamingResponse, - ) + def digital_card_art(self) -> digital_card_art.AsyncDigitalCardArtResourceWithStreamingResponse: + from .resources.digital_card_art import AsyncDigitalCardArtResourceWithStreamingResponse return AsyncDigitalCardArtResourceWithStreamingResponse(self._client.digital_card_art) @@ -1801,30 +1623,20 @@ def book_transfers(self) -> book_transfers.AsyncBookTransfersWithStreamingRespon return AsyncBookTransfersWithStreamingResponse(self._client.book_transfers) @cached_property - def credit_products( - self, - ) -> credit_products.AsyncCreditProductsWithStreamingResponse: + def credit_products(self) -> credit_products.AsyncCreditProductsWithStreamingResponse: from .resources.credit_products import AsyncCreditProductsWithStreamingResponse return AsyncCreditProductsWithStreamingResponse(self._client.credit_products) @cached_property - def external_payments( - self, - ) -> external_payments.AsyncExternalPaymentsWithStreamingResponse: - from .resources.external_payments import ( - AsyncExternalPaymentsWithStreamingResponse, - ) + def external_payments(self) -> external_payments.AsyncExternalPaymentsWithStreamingResponse: + from .resources.external_payments import AsyncExternalPaymentsWithStreamingResponse return AsyncExternalPaymentsWithStreamingResponse(self._client.external_payments) @cached_property - def management_operations( - self, - ) -> management_operations.AsyncManagementOperationsWithStreamingResponse: - from .resources.management_operations import ( - AsyncManagementOperationsWithStreamingResponse, - ) + def management_operations(self) -> management_operations.AsyncManagementOperationsWithStreamingResponse: + from .resources.management_operations import AsyncManagementOperationsWithStreamingResponse return AsyncManagementOperationsWithStreamingResponse(self._client.management_operations) @@ -1841,22 +1653,14 @@ def fraud(self) -> fraud.AsyncFraudWithStreamingResponse: return AsyncFraudWithStreamingResponse(self._client.fraud) @cached_property - def network_programs( - self, - ) -> network_programs.AsyncNetworkProgramsWithStreamingResponse: - from .resources.network_programs import ( - AsyncNetworkProgramsWithStreamingResponse, - ) + def network_programs(self) -> network_programs.AsyncNetworkProgramsWithStreamingResponse: + from .resources.network_programs import AsyncNetworkProgramsWithStreamingResponse return AsyncNetworkProgramsWithStreamingResponse(self._client.network_programs) @cached_property - def account_activity( - self, - ) -> account_activity.AsyncAccountActivityWithStreamingResponse: - from .resources.account_activity import ( - AsyncAccountActivityWithStreamingResponse, - ) + def account_activity(self) -> account_activity.AsyncAccountActivityWithStreamingResponse: + from .resources.account_activity import AsyncAccountActivityWithStreamingResponse return AsyncAccountActivityWithStreamingResponse(self._client.account_activity) diff --git a/src/lithic/resources/__init__.py b/src/lithic/resources/__init__.py index face2018..77245ab4 100644 --- a/src/lithic/resources/__init__.py +++ b/src/lithic/resources/__init__.py @@ -185,14 +185,6 @@ ExternalPaymentsWithStreamingResponse, AsyncExternalPaymentsWithStreamingResponse, ) -from .aggregate_balances import ( - AggregateBalances, - AsyncAggregateBalances, - AggregateBalancesWithRawResponse, - AsyncAggregateBalancesWithRawResponse, - AggregateBalancesWithStreamingResponse, - AsyncAggregateBalancesWithStreamingResponse, -) from .financial_accounts import ( FinancialAccounts, AsyncFinancialAccounts, @@ -297,12 +289,6 @@ "AsyncBalancesWithRawResponse", "BalancesWithStreamingResponse", "AsyncBalancesWithStreamingResponse", - "AggregateBalances", - "AsyncAggregateBalances", - "AggregateBalancesWithRawResponse", - "AsyncAggregateBalancesWithRawResponse", - "AggregateBalancesWithStreamingResponse", - "AsyncAggregateBalancesWithStreamingResponse", "Disputes", "AsyncDisputes", "DisputesWithRawResponse", diff --git a/src/lithic/resources/aggregate_balances.py b/src/lithic/resources/aggregate_balances.py deleted file mode 100644 index 5d35dc36..00000000 --- a/src/lithic/resources/aggregate_balances.py +++ /dev/null @@ -1,182 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal - -import httpx - -from .. import _legacy_response -from ..types import aggregate_balance_list_params -from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..pagination import SyncSinglePage, AsyncSinglePage -from .._base_client import AsyncPaginator, make_request_options -from ..types.aggregate_balance import AggregateBalance - -__all__ = ["AggregateBalances", "AsyncAggregateBalances"] - - -class AggregateBalances(SyncAPIResource): - @cached_property - def with_raw_response(self) -> AggregateBalancesWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/lithic-com/lithic-python#accessing-raw-response-data-eg-headers - """ - return AggregateBalancesWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AggregateBalancesWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response - """ - return AggregateBalancesWithStreamingResponse(self) - - def list( - self, - *, - financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncSinglePage[AggregateBalance]: - """ - Get the aggregated balance across all end-user accounts by financial account - type - - Args: - financial_account_type: Get the aggregate balance for a given Financial Account type. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/v1/aggregate_balances", - page=SyncSinglePage[AggregateBalance], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - {"financial_account_type": financial_account_type}, - aggregate_balance_list_params.AggregateBalanceListParams, - ), - ), - model=AggregateBalance, - ) - - -class AsyncAggregateBalances(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncAggregateBalancesWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/lithic-com/lithic-python#accessing-raw-response-data-eg-headers - """ - return AsyncAggregateBalancesWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncAggregateBalancesWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response - """ - return AsyncAggregateBalancesWithStreamingResponse(self) - - def list( - self, - *, - financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[AggregateBalance, AsyncSinglePage[AggregateBalance]]: - """ - Get the aggregated balance across all end-user accounts by financial account - type - - Args: - financial_account_type: Get the aggregate balance for a given Financial Account type. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/v1/aggregate_balances", - page=AsyncSinglePage[AggregateBalance], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - {"financial_account_type": financial_account_type}, - aggregate_balance_list_params.AggregateBalanceListParams, - ), - ), - model=AggregateBalance, - ) - - -class AggregateBalancesWithRawResponse: - def __init__(self, aggregate_balances: AggregateBalances) -> None: - self._aggregate_balances = aggregate_balances - - self.list = _legacy_response.to_raw_response_wrapper( - aggregate_balances.list, - ) - - -class AsyncAggregateBalancesWithRawResponse: - def __init__(self, aggregate_balances: AsyncAggregateBalances) -> None: - self._aggregate_balances = aggregate_balances - - self.list = _legacy_response.async_to_raw_response_wrapper( - aggregate_balances.list, - ) - - -class AggregateBalancesWithStreamingResponse: - def __init__(self, aggregate_balances: AggregateBalances) -> None: - self._aggregate_balances = aggregate_balances - - self.list = to_streamed_response_wrapper( - aggregate_balances.list, - ) - - -class AsyncAggregateBalancesWithStreamingResponse: - def __init__(self, aggregate_balances: AsyncAggregateBalances) -> None: - self._aggregate_balances = aggregate_balances - - self.list = async_to_streamed_response_wrapper( - aggregate_balances.list, - ) diff --git a/src/lithic/resources/cards/__init__.py b/src/lithic/resources/cards/__init__.py index 790baf59..71ca7811 100644 --- a/src/lithic/resources/cards/__init__.py +++ b/src/lithic/resources/cards/__init__.py @@ -16,14 +16,6 @@ BalancesWithStreamingResponse, AsyncBalancesWithStreamingResponse, ) -from .aggregate_balances import ( - AggregateBalances, - AsyncAggregateBalances, - AggregateBalancesWithRawResponse, - AsyncAggregateBalancesWithRawResponse, - AggregateBalancesWithStreamingResponse, - AsyncAggregateBalancesWithStreamingResponse, -) from .financial_transactions import ( FinancialTransactions, AsyncFinancialTransactions, @@ -34,12 +26,6 @@ ) __all__ = [ - "AggregateBalances", - "AsyncAggregateBalances", - "AggregateBalancesWithRawResponse", - "AsyncAggregateBalancesWithRawResponse", - "AggregateBalancesWithStreamingResponse", - "AsyncAggregateBalancesWithStreamingResponse", "Balances", "AsyncBalances", "BalancesWithRawResponse", diff --git a/src/lithic/resources/cards/aggregate_balances.py b/src/lithic/resources/cards/aggregate_balances.py deleted file mode 100644 index 97db711d..00000000 --- a/src/lithic/resources/cards/aggregate_balances.py +++ /dev/null @@ -1,190 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ... import _legacy_response -from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ..._utils import maybe_transform -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ...pagination import SyncSinglePage, AsyncSinglePage -from ...types.cards import aggregate_balance_list_params -from ..._base_client import AsyncPaginator, make_request_options -from ...types.cards.aggregate_balance_list_response import AggregateBalanceListResponse - -__all__ = ["AggregateBalances", "AsyncAggregateBalances"] - - -class AggregateBalances(SyncAPIResource): - @cached_property - def with_raw_response(self) -> AggregateBalancesWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/lithic-com/lithic-python#accessing-raw-response-data-eg-headers - """ - return AggregateBalancesWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AggregateBalancesWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response - """ - return AggregateBalancesWithStreamingResponse(self) - - def list( - self, - *, - account_token: str | Omit = omit, - business_account_token: str | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncSinglePage[AggregateBalanceListResponse]: - """ - Get the aggregated card balance across all end-user accounts. - - Args: - account_token: Cardholder to retrieve aggregate balances for. - - business_account_token: Business to retrieve aggregate balances for. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/v1/cards/aggregate_balances", - page=SyncSinglePage[AggregateBalanceListResponse], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "account_token": account_token, - "business_account_token": business_account_token, - }, - aggregate_balance_list_params.AggregateBalanceListParams, - ), - ), - model=AggregateBalanceListResponse, - ) - - -class AsyncAggregateBalances(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncAggregateBalancesWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/lithic-com/lithic-python#accessing-raw-response-data-eg-headers - """ - return AsyncAggregateBalancesWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncAggregateBalancesWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response - """ - return AsyncAggregateBalancesWithStreamingResponse(self) - - def list( - self, - *, - account_token: str | Omit = omit, - business_account_token: str | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[AggregateBalanceListResponse, AsyncSinglePage[AggregateBalanceListResponse]]: - """ - Get the aggregated card balance across all end-user accounts. - - Args: - account_token: Cardholder to retrieve aggregate balances for. - - business_account_token: Business to retrieve aggregate balances for. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/v1/cards/aggregate_balances", - page=AsyncSinglePage[AggregateBalanceListResponse], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "account_token": account_token, - "business_account_token": business_account_token, - }, - aggregate_balance_list_params.AggregateBalanceListParams, - ), - ), - model=AggregateBalanceListResponse, - ) - - -class AggregateBalancesWithRawResponse: - def __init__(self, aggregate_balances: AggregateBalances) -> None: - self._aggregate_balances = aggregate_balances - - self.list = _legacy_response.to_raw_response_wrapper( - aggregate_balances.list, - ) - - -class AsyncAggregateBalancesWithRawResponse: - def __init__(self, aggregate_balances: AsyncAggregateBalances) -> None: - self._aggregate_balances = aggregate_balances - - self.list = _legacy_response.async_to_raw_response_wrapper( - aggregate_balances.list, - ) - - -class AggregateBalancesWithStreamingResponse: - def __init__(self, aggregate_balances: AggregateBalances) -> None: - self._aggregate_balances = aggregate_balances - - self.list = to_streamed_response_wrapper( - aggregate_balances.list, - ) - - -class AsyncAggregateBalancesWithStreamingResponse: - def __init__(self, aggregate_balances: AsyncAggregateBalances) -> None: - self._aggregate_balances = aggregate_balances - - self.list = async_to_streamed_response_wrapper( - aggregate_balances.list, - ) diff --git a/src/lithic/resources/cards/cards.py b/src/lithic/resources/cards/cards.py index 5325041a..5a4da996 100644 --- a/src/lithic/resources/cards/cards.py +++ b/src/lithic/resources/cards/cards.py @@ -44,14 +44,6 @@ from ...pagination import SyncCursorPage, AsyncCursorPage from ...types.card import Card from ..._base_client import AsyncPaginator, _merge_mappings, make_request_options -from .aggregate_balances import ( - AggregateBalances, - AsyncAggregateBalances, - AggregateBalancesWithRawResponse, - AsyncAggregateBalancesWithRawResponse, - AggregateBalancesWithStreamingResponse, - AsyncAggregateBalancesWithStreamingResponse, -) from ...types.non_pci_card import NonPCICard from .financial_transactions import ( FinancialTransactions, @@ -72,10 +64,6 @@ class Cards(SyncAPIResource): - @cached_property - def aggregate_balances(self) -> AggregateBalances: - return AggregateBalances(self._client) - @cached_property def balances(self) -> Balances: return Balances(self._client) @@ -1258,10 +1246,6 @@ def web_provision( class AsyncCards(AsyncAPIResource): - @cached_property - def aggregate_balances(self) -> AsyncAggregateBalances: - return AsyncAggregateBalances(self._client) - @cached_property def balances(self) -> AsyncBalances: return AsyncBalances(self._client) @@ -2484,10 +2468,6 @@ def __init__(self, cards: Cards) -> None: cards.web_provision, ) - @cached_property - def aggregate_balances(self) -> AggregateBalancesWithRawResponse: - return AggregateBalancesWithRawResponse(self._cards.aggregate_balances) - @cached_property def balances(self) -> BalancesWithRawResponse: return BalancesWithRawResponse(self._cards.balances) @@ -2538,10 +2518,6 @@ def __init__(self, cards: AsyncCards) -> None: cards.web_provision, ) - @cached_property - def aggregate_balances(self) -> AsyncAggregateBalancesWithRawResponse: - return AsyncAggregateBalancesWithRawResponse(self._cards.aggregate_balances) - @cached_property def balances(self) -> AsyncBalancesWithRawResponse: return AsyncBalancesWithRawResponse(self._cards.balances) @@ -2592,10 +2568,6 @@ def __init__(self, cards: Cards) -> None: cards.web_provision, ) - @cached_property - def aggregate_balances(self) -> AggregateBalancesWithStreamingResponse: - return AggregateBalancesWithStreamingResponse(self._cards.aggregate_balances) - @cached_property def balances(self) -> BalancesWithStreamingResponse: return BalancesWithStreamingResponse(self._cards.balances) @@ -2646,10 +2618,6 @@ def __init__(self, cards: AsyncCards) -> None: cards.web_provision, ) - @cached_property - def aggregate_balances(self) -> AsyncAggregateBalancesWithStreamingResponse: - return AsyncAggregateBalancesWithStreamingResponse(self._cards.aggregate_balances) - @cached_property def balances(self) -> AsyncBalancesWithStreamingResponse: return AsyncBalancesWithStreamingResponse(self._cards.balances) diff --git a/src/lithic/types/__init__.py b/src/lithic/types/__init__.py index 89961e91..a81a6ba3 100644 --- a/src/lithic/types/__init__.py +++ b/src/lithic/types/__init__.py @@ -43,7 +43,6 @@ from .external_payment import ExternalPayment as ExternalPayment from .kyc_exempt_param import KYCExemptParam as KYCExemptParam from .statement_totals import StatementTotals as StatementTotals -from .aggregate_balance import AggregateBalance as AggregateBalance from .card_embed_params import CardEmbedParams as CardEmbedParams from .card_renew_params import CardRenewParams as CardRenewParams from .card_spend_limits import CardSpendLimits as CardSpendLimits @@ -100,242 +99,85 @@ from .card_get_embed_url_params import CardGetEmbedURLParams as CardGetEmbedURLParams from .card_search_by_pan_params import CardSearchByPanParams as CardSearchByPanParams from .card_web_provision_params import CardWebProvisionParams as CardWebProvisionParams -from .cardholder_authentication import ( - CardholderAuthentication as CardholderAuthentication, -) -from .financial_account_balance import ( - FinancialAccountBalance as FinancialAccountBalance, -) +from .cardholder_authentication import CardholderAuthentication as CardholderAuthentication +from .financial_account_balance import FinancialAccountBalance as FinancialAccountBalance from .funding_event_list_params import FundingEventListParams as FundingEventListParams -from .responder_endpoint_status import ( - ResponderEndpointStatus as ResponderEndpointStatus, -) -from .account_holder_list_params import ( - AccountHolderListParams as AccountHolderListParams, -) -from .card_created_webhook_event import ( - CardCreatedWebhookEvent as CardCreatedWebhookEvent, -) +from .responder_endpoint_status import ResponderEndpointStatus as ResponderEndpointStatus +from .account_holder_list_params import AccountHolderListParams as AccountHolderListParams +from .card_created_webhook_event import CardCreatedWebhookEvent as CardCreatedWebhookEvent from .card_get_embed_html_params import CardGetEmbedHTMLParams as CardGetEmbedHTMLParams -from .card_renewed_webhook_event import ( - CardRenewedWebhookEvent as CardRenewedWebhookEvent, -) -from .card_shipped_webhook_event import ( - CardShippedWebhookEvent as CardShippedWebhookEvent, -) -from .event_list_attempts_params import ( - EventListAttemptsParams as EventListAttemptsParams, -) -from .settlement_summary_details import ( - SettlementSummaryDetails as SettlementSummaryDetails, -) -from .book_transfer_create_params import ( - BookTransferCreateParams as BookTransferCreateParams, -) -from .card_bulk_order_list_params import ( - CardBulkOrderListParams as CardBulkOrderListParams, -) -from .card_reissued_webhook_event import ( - CardReissuedWebhookEvent as CardReissuedWebhookEvent, -) -from .card_web_provision_response import ( - CardWebProvisionResponse as CardWebProvisionResponse, -) -from .network_program_list_params import ( - NetworkProgramListParams as NetworkProgramListParams, -) -from .tokenization_decline_reason import ( - TokenizationDeclineReason as TokenizationDeclineReason, -) -from .account_activity_list_params import ( - AccountActivityListParams as AccountActivityListParams, -) -from .account_holder_create_params import ( - AccountHolderCreateParams as AccountHolderCreateParams, -) -from .account_holder_update_params import ( - AccountHolderUpdateParams as AccountHolderUpdateParams, -) -from .book_transfer_reverse_params import ( - BookTransferReverseParams as BookTransferReverseParams, -) -from .card_convert_physical_params import ( - CardConvertPhysicalParams as CardConvertPhysicalParams, -) -from .card_converted_webhook_event import ( - CardConvertedWebhookEvent as CardConvertedWebhookEvent, -) -from .digital_card_art_list_params import ( - DigitalCardArtListParams as DigitalCardArtListParams, -) -from .external_payment_list_params import ( - ExternalPaymentListParams as ExternalPaymentListParams, -) -from .tokenization_simulate_params import ( - TokenizationSimulateParams as TokenizationSimulateParams, -) -from .aggregate_balance_list_params import ( - AggregateBalanceListParams as AggregateBalanceListParams, -) -from .balance_updated_webhook_event import ( - BalanceUpdatedWebhookEvent as BalanceUpdatedWebhookEvent, -) -from .card_bulk_order_create_params import ( - CardBulkOrderCreateParams as CardBulkOrderCreateParams, -) -from .card_bulk_order_update_params import ( - CardBulkOrderUpdateParams as CardBulkOrderUpdateParams, -) -from .digital_wallet_token_metadata import ( - DigitalWalletTokenMetadata as DigitalWalletTokenMetadata, -) -from .dispute_list_evidences_params import ( - DisputeListEvidencesParams as DisputeListEvidencesParams, -) -from .dispute_updated_webhook_event import ( - DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent, -) -from .external_bank_account_address import ( - ExternalBankAccountAddress as ExternalBankAccountAddress, -) -from .financial_account_list_params import ( - FinancialAccountListParams as FinancialAccountListParams, -) -from .account_activity_list_response import ( - AccountActivityListResponse as AccountActivityListResponse, -) -from .account_holder_create_response import ( - AccountHolderCreateResponse as AccountHolderCreateResponse, -) -from .account_holder_update_response import ( - AccountHolderUpdateResponse as AccountHolderUpdateResponse, -) -from .external_payment_cancel_params import ( - ExternalPaymentCancelParams as ExternalPaymentCancelParams, -) -from .external_payment_create_params import ( - ExternalPaymentCreateParams as ExternalPaymentCreateParams, -) -from .external_payment_settle_params import ( - ExternalPaymentSettleParams as ExternalPaymentSettleParams, -) -from .payment_simulate_action_params import ( - PaymentSimulateActionParams as PaymentSimulateActionParams, -) -from .payment_simulate_return_params import ( - PaymentSimulateReturnParams as PaymentSimulateReturnParams, -) -from .external_payment_release_params import ( - ExternalPaymentReleaseParams as ExternalPaymentReleaseParams, -) -from .external_payment_reverse_params import ( - ExternalPaymentReverseParams as ExternalPaymentReverseParams, -) -from .financial_account_create_params import ( - FinancialAccountCreateParams as FinancialAccountCreateParams, -) -from .financial_account_update_params import ( - FinancialAccountUpdateParams as FinancialAccountUpdateParams, -) -from .loan_tape_created_webhook_event import ( - LoanTapeCreatedWebhookEvent as LoanTapeCreatedWebhookEvent, -) -from .loan_tape_updated_webhook_event import ( - LoanTapeUpdatedWebhookEvent as LoanTapeUpdatedWebhookEvent, -) -from .payment_simulate_receipt_params import ( - PaymentSimulateReceiptParams as PaymentSimulateReceiptParams, -) -from .payment_simulate_release_params import ( - PaymentSimulateReleaseParams as PaymentSimulateReleaseParams, -) -from .management_operation_list_params import ( - ManagementOperationListParams as ManagementOperationListParams, -) -from .management_operation_transaction import ( - ManagementOperationTransaction as ManagementOperationTransaction, -) -from .payment_simulate_action_response import ( - PaymentSimulateActionResponse as PaymentSimulateActionResponse, -) -from .payment_simulate_return_response import ( - PaymentSimulateReturnResponse as PaymentSimulateReturnResponse, -) -from .responder_endpoint_create_params import ( - ResponderEndpointCreateParams as ResponderEndpointCreateParams, -) -from .responder_endpoint_delete_params import ( - ResponderEndpointDeleteParams as ResponderEndpointDeleteParams, -) -from .statements_created_webhook_event import ( - StatementsCreatedWebhookEvent as StatementsCreatedWebhookEvent, -) -from .transaction_simulate_void_params import ( - TransactionSimulateVoidParams as TransactionSimulateVoidParams, -) -from .external_bank_account_list_params import ( - ExternalBankAccountListParams as ExternalBankAccountListParams, -) -from .payment_simulate_receipt_response import ( - PaymentSimulateReceiptResponse as PaymentSimulateReceiptResponse, -) -from .payment_simulate_release_response import ( - PaymentSimulateReleaseResponse as PaymentSimulateReleaseResponse, -) -from .tokenization_result_webhook_event import ( - TokenizationResultWebhookEvent as TokenizationResultWebhookEvent, -) -from .management_operation_create_params import ( - ManagementOperationCreateParams as ManagementOperationCreateParams, -) -from .responder_endpoint_create_response import ( - ResponderEndpointCreateResponse as ResponderEndpointCreateResponse, -) -from .tokenization_updated_webhook_event import ( - TokenizationUpdatedWebhookEvent as TokenizationUpdatedWebhookEvent, -) -from .transaction_simulate_return_params import ( - TransactionSimulateReturnParams as TransactionSimulateReturnParams, -) -from .transaction_simulate_void_response import ( - TransactionSimulateVoidResponse as TransactionSimulateVoidResponse, -) -from .external_bank_account_address_param import ( - ExternalBankAccountAddressParam as ExternalBankAccountAddressParam, -) -from .external_bank_account_create_params import ( - ExternalBankAccountCreateParams as ExternalBankAccountCreateParams, -) -from .external_bank_account_list_response import ( - ExternalBankAccountListResponse as ExternalBankAccountListResponse, -) -from .external_bank_account_update_params import ( - ExternalBankAccountUpdateParams as ExternalBankAccountUpdateParams, -) -from .funding_event_created_webhook_event import ( - FundingEventCreatedWebhookEvent as FundingEventCreatedWebhookEvent, -) -from .management_operation_reverse_params import ( - ManagementOperationReverseParams as ManagementOperationReverseParams, -) -from .network_total_created_webhook_event import ( - NetworkTotalCreatedWebhookEvent as NetworkTotalCreatedWebhookEvent, -) -from .network_total_updated_webhook_event import ( - NetworkTotalUpdatedWebhookEvent as NetworkTotalUpdatedWebhookEvent, -) -from .account_holder_created_webhook_event import ( - AccountHolderCreatedWebhookEvent as AccountHolderCreatedWebhookEvent, -) -from .account_holder_updated_webhook_event import ( - AccountHolderUpdatedWebhookEvent as AccountHolderUpdatedWebhookEvent, -) -from .transaction_simulate_clearing_params import ( - TransactionSimulateClearingParams as TransactionSimulateClearingParams, -) -from .transaction_simulate_return_response import ( - TransactionSimulateReturnResponse as TransactionSimulateReturnResponse, -) +from .card_renewed_webhook_event import CardRenewedWebhookEvent as CardRenewedWebhookEvent +from .card_shipped_webhook_event import CardShippedWebhookEvent as CardShippedWebhookEvent +from .event_list_attempts_params import EventListAttemptsParams as EventListAttemptsParams +from .settlement_summary_details import SettlementSummaryDetails as SettlementSummaryDetails +from .book_transfer_create_params import BookTransferCreateParams as BookTransferCreateParams +from .card_bulk_order_list_params import CardBulkOrderListParams as CardBulkOrderListParams +from .card_reissued_webhook_event import CardReissuedWebhookEvent as CardReissuedWebhookEvent +from .card_web_provision_response import CardWebProvisionResponse as CardWebProvisionResponse +from .network_program_list_params import NetworkProgramListParams as NetworkProgramListParams +from .tokenization_decline_reason import TokenizationDeclineReason as TokenizationDeclineReason +from .account_activity_list_params import AccountActivityListParams as AccountActivityListParams +from .account_holder_create_params import AccountHolderCreateParams as AccountHolderCreateParams +from .account_holder_update_params import AccountHolderUpdateParams as AccountHolderUpdateParams +from .book_transfer_reverse_params import BookTransferReverseParams as BookTransferReverseParams +from .card_convert_physical_params import CardConvertPhysicalParams as CardConvertPhysicalParams +from .card_converted_webhook_event import CardConvertedWebhookEvent as CardConvertedWebhookEvent +from .digital_card_art_list_params import DigitalCardArtListParams as DigitalCardArtListParams +from .external_payment_list_params import ExternalPaymentListParams as ExternalPaymentListParams +from .tokenization_simulate_params import TokenizationSimulateParams as TokenizationSimulateParams +from .balance_updated_webhook_event import BalanceUpdatedWebhookEvent as BalanceUpdatedWebhookEvent +from .card_bulk_order_create_params import CardBulkOrderCreateParams as CardBulkOrderCreateParams +from .card_bulk_order_update_params import CardBulkOrderUpdateParams as CardBulkOrderUpdateParams +from .digital_wallet_token_metadata import DigitalWalletTokenMetadata as DigitalWalletTokenMetadata +from .dispute_list_evidences_params import DisputeListEvidencesParams as DisputeListEvidencesParams +from .dispute_updated_webhook_event import DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent +from .external_bank_account_address import ExternalBankAccountAddress as ExternalBankAccountAddress +from .financial_account_list_params import FinancialAccountListParams as FinancialAccountListParams +from .account_activity_list_response import AccountActivityListResponse as AccountActivityListResponse +from .account_holder_create_response import AccountHolderCreateResponse as AccountHolderCreateResponse +from .account_holder_update_response import AccountHolderUpdateResponse as AccountHolderUpdateResponse +from .external_payment_cancel_params import ExternalPaymentCancelParams as ExternalPaymentCancelParams +from .external_payment_create_params import ExternalPaymentCreateParams as ExternalPaymentCreateParams +from .external_payment_settle_params import ExternalPaymentSettleParams as ExternalPaymentSettleParams +from .payment_simulate_action_params import PaymentSimulateActionParams as PaymentSimulateActionParams +from .payment_simulate_return_params import PaymentSimulateReturnParams as PaymentSimulateReturnParams +from .external_payment_release_params import ExternalPaymentReleaseParams as ExternalPaymentReleaseParams +from .external_payment_reverse_params import ExternalPaymentReverseParams as ExternalPaymentReverseParams +from .financial_account_create_params import FinancialAccountCreateParams as FinancialAccountCreateParams +from .financial_account_update_params import FinancialAccountUpdateParams as FinancialAccountUpdateParams +from .loan_tape_created_webhook_event import LoanTapeCreatedWebhookEvent as LoanTapeCreatedWebhookEvent +from .loan_tape_updated_webhook_event import LoanTapeUpdatedWebhookEvent as LoanTapeUpdatedWebhookEvent +from .payment_simulate_receipt_params import PaymentSimulateReceiptParams as PaymentSimulateReceiptParams +from .payment_simulate_release_params import PaymentSimulateReleaseParams as PaymentSimulateReleaseParams +from .management_operation_list_params import ManagementOperationListParams as ManagementOperationListParams +from .management_operation_transaction import ManagementOperationTransaction as ManagementOperationTransaction +from .payment_simulate_action_response import PaymentSimulateActionResponse as PaymentSimulateActionResponse +from .payment_simulate_return_response import PaymentSimulateReturnResponse as PaymentSimulateReturnResponse +from .responder_endpoint_create_params import ResponderEndpointCreateParams as ResponderEndpointCreateParams +from .responder_endpoint_delete_params import ResponderEndpointDeleteParams as ResponderEndpointDeleteParams +from .statements_created_webhook_event import StatementsCreatedWebhookEvent as StatementsCreatedWebhookEvent +from .transaction_simulate_void_params import TransactionSimulateVoidParams as TransactionSimulateVoidParams +from .external_bank_account_list_params import ExternalBankAccountListParams as ExternalBankAccountListParams +from .payment_simulate_receipt_response import PaymentSimulateReceiptResponse as PaymentSimulateReceiptResponse +from .payment_simulate_release_response import PaymentSimulateReleaseResponse as PaymentSimulateReleaseResponse +from .tokenization_result_webhook_event import TokenizationResultWebhookEvent as TokenizationResultWebhookEvent +from .management_operation_create_params import ManagementOperationCreateParams as ManagementOperationCreateParams +from .responder_endpoint_create_response import ResponderEndpointCreateResponse as ResponderEndpointCreateResponse +from .tokenization_updated_webhook_event import TokenizationUpdatedWebhookEvent as TokenizationUpdatedWebhookEvent +from .transaction_simulate_return_params import TransactionSimulateReturnParams as TransactionSimulateReturnParams +from .transaction_simulate_void_response import TransactionSimulateVoidResponse as TransactionSimulateVoidResponse +from .external_bank_account_address_param import ExternalBankAccountAddressParam as ExternalBankAccountAddressParam +from .external_bank_account_create_params import ExternalBankAccountCreateParams as ExternalBankAccountCreateParams +from .external_bank_account_list_response import ExternalBankAccountListResponse as ExternalBankAccountListResponse +from .external_bank_account_update_params import ExternalBankAccountUpdateParams as ExternalBankAccountUpdateParams +from .funding_event_created_webhook_event import FundingEventCreatedWebhookEvent as FundingEventCreatedWebhookEvent +from .management_operation_reverse_params import ManagementOperationReverseParams as ManagementOperationReverseParams +from .network_total_created_webhook_event import NetworkTotalCreatedWebhookEvent as NetworkTotalCreatedWebhookEvent +from .network_total_updated_webhook_event import NetworkTotalUpdatedWebhookEvent as NetworkTotalUpdatedWebhookEvent +from .account_holder_created_webhook_event import AccountHolderCreatedWebhookEvent as AccountHolderCreatedWebhookEvent +from .account_holder_updated_webhook_event import AccountHolderUpdatedWebhookEvent as AccountHolderUpdatedWebhookEvent +from .transaction_simulate_clearing_params import TransactionSimulateClearingParams as TransactionSimulateClearingParams +from .transaction_simulate_return_response import TransactionSimulateReturnResponse as TransactionSimulateReturnResponse from .account_holder_upload_document_params import ( AccountHolderUploadDocumentParams as AccountHolderUploadDocumentParams, ) diff --git a/src/lithic/types/aggregate_balance.py b/src/lithic/types/aggregate_balance.py deleted file mode 100644 index d74f4cee..00000000 --- a/src/lithic/types/aggregate_balance.py +++ /dev/null @@ -1,54 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["AggregateBalance"] - - -class AggregateBalance(BaseModel): - """Aggregate Balance across all end-user accounts""" - - available_amount: int - """Funds available for spend in the currency's smallest unit (e.g., cents for USD)""" - - created: datetime - """Date and time for when the balance was first created.""" - - currency: str - """3-character alphabetic ISO 4217 code for the local currency of the balance.""" - - financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] - """Type of financial account""" - - last_financial_account_token: str - """ - Globally unique identifier for the financial account that had its balance - updated most recently - """ - - last_transaction_event_token: str - """ - Globally unique identifier for the last transaction event that impacted this - balance - """ - - last_transaction_token: str - """Globally unique identifier for the last transaction that impacted this balance""" - - pending_amount: int - """Funds not available for spend due to card authorizations or pending ACH release. - - Shown in the currency's smallest unit (e.g., cents for USD) - """ - - total_amount: int - """ - The sum of available and pending balance in the currency's smallest unit (e.g., - cents for USD) - """ - - updated: datetime - """Date and time for when the balance was last updated.""" diff --git a/src/lithic/types/aggregate_balance_list_params.py b/src/lithic/types/aggregate_balance_list_params.py deleted file mode 100644 index 519ad11d..00000000 --- a/src/lithic/types/aggregate_balance_list_params.py +++ /dev/null @@ -1,12 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, TypedDict - -__all__ = ["AggregateBalanceListParams"] - - -class AggregateBalanceListParams(TypedDict, total=False): - financial_account_type: Literal["ISSUING", "OPERATING", "RESERVE", "SECURITY"] - """Get the aggregate balance for a given Financial Account type.""" diff --git a/src/lithic/types/cards/__init__.py b/src/lithic/types/cards/__init__.py index 63dfd5cb..3f28d3d0 100644 --- a/src/lithic/types/cards/__init__.py +++ b/src/lithic/types/cards/__init__.py @@ -3,6 +3,4 @@ from __future__ import annotations from .balance_list_params import BalanceListParams as BalanceListParams -from .aggregate_balance_list_params import AggregateBalanceListParams as AggregateBalanceListParams -from .aggregate_balance_list_response import AggregateBalanceListResponse as AggregateBalanceListResponse from .financial_transaction_list_params import FinancialTransactionListParams as FinancialTransactionListParams diff --git a/src/lithic/types/cards/aggregate_balance_list_params.py b/src/lithic/types/cards/aggregate_balance_list_params.py deleted file mode 100644 index 51b927dc..00000000 --- a/src/lithic/types/cards/aggregate_balance_list_params.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import TypedDict - -__all__ = ["AggregateBalanceListParams"] - - -class AggregateBalanceListParams(TypedDict, total=False): - account_token: str - """Cardholder to retrieve aggregate balances for.""" - - business_account_token: str - """Business to retrieve aggregate balances for.""" diff --git a/src/lithic/types/cards/aggregate_balance_list_response.py b/src/lithic/types/cards/aggregate_balance_list_response.py deleted file mode 100644 index 0075a93e..00000000 --- a/src/lithic/types/cards/aggregate_balance_list_response.py +++ /dev/null @@ -1,50 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from datetime import datetime - -from ..._models import BaseModel - -__all__ = ["AggregateBalanceListResponse"] - - -class AggregateBalanceListResponse(BaseModel): - """Card Aggregate Balance across all end-user accounts""" - - available_amount: int - """Funds available for spend in the currency's smallest unit (e.g., cents for USD)""" - - created: datetime - """Date and time for when the balance was first created.""" - - currency: str - """3-character alphabetic ISO 4217 code for the local currency of the balance.""" - - last_card_token: str - """ - Globally unique identifier for the card that had its balance updated most - recently - """ - - last_transaction_event_token: str - """ - Globally unique identifier for the last transaction event that impacted this - balance - """ - - last_transaction_token: str - """Globally unique identifier for the last transaction that impacted this balance""" - - pending_amount: int - """Funds not available for spend due to card authorizations or pending ACH release. - - Shown in the currency's smallest unit (e.g., cents for USD) - """ - - total_amount: int - """ - The sum of available and pending balance in the currency's smallest unit (e.g., - cents for USD) - """ - - updated: datetime - """Date and time for when the balance was last updated.""" diff --git a/tests/api_resources/cards/test_aggregate_balances.py b/tests/api_resources/cards/test_aggregate_balances.py deleted file mode 100644 index 745e313d..00000000 --- a/tests/api_resources/cards/test_aggregate_balances.py +++ /dev/null @@ -1,91 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from lithic import Lithic, AsyncLithic -from tests.utils import assert_matches_type -from lithic.pagination import SyncSinglePage, AsyncSinglePage -from lithic.types.cards import AggregateBalanceListResponse - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestAggregateBalances: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_list(self, client: Lithic) -> None: - aggregate_balance = client.cards.aggregate_balances.list() - assert_matches_type(SyncSinglePage[AggregateBalanceListResponse], aggregate_balance, path=["response"]) - - @parametrize - def test_method_list_with_all_params(self, client: Lithic) -> None: - aggregate_balance = client.cards.aggregate_balances.list( - account_token="account_token", - business_account_token="business_account_token", - ) - assert_matches_type(SyncSinglePage[AggregateBalanceListResponse], aggregate_balance, path=["response"]) - - @parametrize - def test_raw_response_list(self, client: Lithic) -> None: - response = client.cards.aggregate_balances.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - aggregate_balance = response.parse() - assert_matches_type(SyncSinglePage[AggregateBalanceListResponse], aggregate_balance, path=["response"]) - - @parametrize - def test_streaming_response_list(self, client: Lithic) -> None: - with client.cards.aggregate_balances.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - aggregate_balance = response.parse() - assert_matches_type(SyncSinglePage[AggregateBalanceListResponse], aggregate_balance, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncAggregateBalances: - parametrize = pytest.mark.parametrize( - "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] - ) - - @parametrize - async def test_method_list(self, async_client: AsyncLithic) -> None: - aggregate_balance = await async_client.cards.aggregate_balances.list() - assert_matches_type(AsyncSinglePage[AggregateBalanceListResponse], aggregate_balance, path=["response"]) - - @parametrize - async def test_method_list_with_all_params(self, async_client: AsyncLithic) -> None: - aggregate_balance = await async_client.cards.aggregate_balances.list( - account_token="account_token", - business_account_token="business_account_token", - ) - assert_matches_type(AsyncSinglePage[AggregateBalanceListResponse], aggregate_balance, path=["response"]) - - @parametrize - async def test_raw_response_list(self, async_client: AsyncLithic) -> None: - response = await async_client.cards.aggregate_balances.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - aggregate_balance = response.parse() - assert_matches_type(AsyncSinglePage[AggregateBalanceListResponse], aggregate_balance, path=["response"]) - - @parametrize - async def test_streaming_response_list(self, async_client: AsyncLithic) -> None: - async with async_client.cards.aggregate_balances.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - aggregate_balance = await response.parse() - assert_matches_type(AsyncSinglePage[AggregateBalanceListResponse], aggregate_balance, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_aggregate_balances.py b/tests/api_resources/test_aggregate_balances.py deleted file mode 100644 index 485f951f..00000000 --- a/tests/api_resources/test_aggregate_balances.py +++ /dev/null @@ -1,89 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from lithic import Lithic, AsyncLithic -from tests.utils import assert_matches_type -from lithic.types import AggregateBalance -from lithic.pagination import SyncSinglePage, AsyncSinglePage - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestAggregateBalances: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_list(self, client: Lithic) -> None: - aggregate_balance = client.aggregate_balances.list() - assert_matches_type(SyncSinglePage[AggregateBalance], aggregate_balance, path=["response"]) - - @parametrize - def test_method_list_with_all_params(self, client: Lithic) -> None: - aggregate_balance = client.aggregate_balances.list( - financial_account_type="ISSUING", - ) - assert_matches_type(SyncSinglePage[AggregateBalance], aggregate_balance, path=["response"]) - - @parametrize - def test_raw_response_list(self, client: Lithic) -> None: - response = client.aggregate_balances.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - aggregate_balance = response.parse() - assert_matches_type(SyncSinglePage[AggregateBalance], aggregate_balance, path=["response"]) - - @parametrize - def test_streaming_response_list(self, client: Lithic) -> None: - with client.aggregate_balances.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - aggregate_balance = response.parse() - assert_matches_type(SyncSinglePage[AggregateBalance], aggregate_balance, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncAggregateBalances: - parametrize = pytest.mark.parametrize( - "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] - ) - - @parametrize - async def test_method_list(self, async_client: AsyncLithic) -> None: - aggregate_balance = await async_client.aggregate_balances.list() - assert_matches_type(AsyncSinglePage[AggregateBalance], aggregate_balance, path=["response"]) - - @parametrize - async def test_method_list_with_all_params(self, async_client: AsyncLithic) -> None: - aggregate_balance = await async_client.aggregate_balances.list( - financial_account_type="ISSUING", - ) - assert_matches_type(AsyncSinglePage[AggregateBalance], aggregate_balance, path=["response"]) - - @parametrize - async def test_raw_response_list(self, async_client: AsyncLithic) -> None: - response = await async_client.aggregate_balances.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - aggregate_balance = response.parse() - assert_matches_type(AsyncSinglePage[AggregateBalance], aggregate_balance, path=["response"]) - - @parametrize - async def test_streaming_response_list(self, async_client: AsyncLithic) -> None: - async with async_client.aggregate_balances.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - aggregate_balance = await response.parse() - assert_matches_type(AsyncSinglePage[AggregateBalance], aggregate_balance, path=["response"]) - - assert cast(Any, response.is_closed) is True