diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 8576feb6a..8ef565c8e 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -9e950cbf7b5a814a98f27d1a94b72cd6f1df2078 \ No newline at end of file +6f80705d2d79a2be4fee472e1156515f7bbfe3e3 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 604997fea..ad0b5d451 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2203 \ No newline at end of file +v2204 \ No newline at end of file diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index a4bc718ab..2ec661828 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -4188,12 +4188,6 @@ class MandateOptions(StripeObject): financial_connections: Optional[FinancialConnections] mandate_options: Optional[MandateOptions] - preferred_settlement_speed: Optional[ - Literal["fastest", "standard"] - ] - """ - Preferred transaction settlement speed - """ setup_future_usage: Optional[ Literal["none", "off_session", "on_session"] ] diff --git a/stripe/events/_v2_core_health_fraud_rate_increased_event.py b/stripe/events/_v2_core_health_fraud_rate_increased_event.py index 2f46db71e..a742707a7 100644 --- a/stripe/events/_v2_core_health_fraud_rate_increased_event.py +++ b/stripe/events/_v2_core_health_fraud_rate_increased_event.py @@ -3,6 +3,7 @@ from stripe._api_mode import ApiMode from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse +from stripe.v2._amount import Amount from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING, override @@ -36,16 +37,6 @@ class V2CoreHealthFraudRateIncreasedEvent(Event): class V2CoreHealthFraudRateIncreasedEventData(StripeObject): class Impact(StripeObject): - class RealizedFraudAmount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - attack_type: Literal["spike", "sustained_attack"] """ Fraud attack type. @@ -54,11 +45,10 @@ class RealizedFraudAmount(StripeObject): """ The number of impacted requests which are detected. """ - realized_fraud_amount: RealizedFraudAmount + realized_fraud_amount: Amount """ Estimated aggregated amount for the impacted requests. """ - _inner_class_types = {"realized_fraud_amount": RealizedFraudAmount} alert_id: str """ diff --git a/stripe/events/_v2_core_health_issuing_authorization_request_errors_firing_event.py b/stripe/events/_v2_core_health_issuing_authorization_request_errors_firing_event.py index 6562961d5..886d50373 100644 --- a/stripe/events/_v2_core_health_issuing_authorization_request_errors_firing_event.py +++ b/stripe/events/_v2_core_health_issuing_authorization_request_errors_firing_event.py @@ -3,6 +3,7 @@ from stripe._api_mode import ApiMode from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse +from stripe.v2._amount import Amount from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING, override @@ -44,27 +45,7 @@ class V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventData( StripeObject, ): class Impact(StripeObject): - class ApprovedAmount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - class DeclinedAmount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - approved_amount: Optional[ApprovedAmount] + approved_amount: Optional[Amount] """ Estimated aggregated amount for the approved requests. """ @@ -72,7 +53,7 @@ class DeclinedAmount(StripeObject): """ The number of approved requests which are impacted. """ - declined_amount: Optional[DeclinedAmount] + declined_amount: Optional[Amount] """ Estimated aggregated amount for the declined requests. """ @@ -80,10 +61,6 @@ class DeclinedAmount(StripeObject): """ The number of declined requests which are impacted. """ - _inner_class_types = { - "approved_amount": ApprovedAmount, - "declined_amount": DeclinedAmount, - } grouping_key: str """ diff --git a/stripe/events/_v2_core_health_issuing_authorization_request_errors_resolved_event.py b/stripe/events/_v2_core_health_issuing_authorization_request_errors_resolved_event.py index b02abb8ce..f3c1c4f74 100644 --- a/stripe/events/_v2_core_health_issuing_authorization_request_errors_resolved_event.py +++ b/stripe/events/_v2_core_health_issuing_authorization_request_errors_resolved_event.py @@ -3,6 +3,7 @@ from stripe._api_mode import ApiMode from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse +from stripe.v2._amount import Amount from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING, override @@ -52,27 +53,7 @@ class V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventData( StripeObject, ): class Impact(StripeObject): - class ApprovedAmount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - class DeclinedAmount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - approved_amount: Optional[ApprovedAmount] + approved_amount: Optional[Amount] """ Estimated aggregated amount for the approved requests. """ @@ -80,7 +61,7 @@ class DeclinedAmount(StripeObject): """ The number of approved requests which are impacted. """ - declined_amount: Optional[DeclinedAmount] + declined_amount: Optional[Amount] """ Estimated aggregated amount for the declined requests. """ @@ -88,10 +69,6 @@ class DeclinedAmount(StripeObject): """ The number of declined requests which are impacted. """ - _inner_class_types = { - "approved_amount": ApprovedAmount, - "declined_amount": DeclinedAmount, - } grouping_key: str """ diff --git a/stripe/events/_v2_core_health_issuing_authorization_request_timeout_firing_event.py b/stripe/events/_v2_core_health_issuing_authorization_request_timeout_firing_event.py index d810d67e1..b42787484 100644 --- a/stripe/events/_v2_core_health_issuing_authorization_request_timeout_firing_event.py +++ b/stripe/events/_v2_core_health_issuing_authorization_request_timeout_firing_event.py @@ -3,6 +3,7 @@ from stripe._api_mode import ApiMode from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse +from stripe.v2._amount import Amount from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING, override @@ -48,27 +49,7 @@ class V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventData( StripeObject, ): class Impact(StripeObject): - class ApprovedAmount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - class DeclinedAmount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - approved_amount: Optional[ApprovedAmount] + approved_amount: Optional[Amount] """ Estimated aggregated amount for the approved requests. """ @@ -76,7 +57,7 @@ class DeclinedAmount(StripeObject): """ The number of approved requests which are impacted. """ - declined_amount: Optional[DeclinedAmount] + declined_amount: Optional[Amount] """ Estimated aggregated amount for the declined requests. """ @@ -84,10 +65,6 @@ class DeclinedAmount(StripeObject): """ The number of declined requests which are impacted. """ - _inner_class_types = { - "approved_amount": ApprovedAmount, - "declined_amount": DeclinedAmount, - } alert_id: str """ diff --git a/stripe/events/_v2_core_health_issuing_authorization_request_timeout_resolved_event.py b/stripe/events/_v2_core_health_issuing_authorization_request_timeout_resolved_event.py index aa4d286f1..0ba247ccf 100644 --- a/stripe/events/_v2_core_health_issuing_authorization_request_timeout_resolved_event.py +++ b/stripe/events/_v2_core_health_issuing_authorization_request_timeout_resolved_event.py @@ -3,6 +3,7 @@ from stripe._api_mode import ApiMode from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse +from stripe.v2._amount import Amount from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING, override @@ -52,27 +53,7 @@ class V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventData( StripeObject, ): class Impact(StripeObject): - class ApprovedAmount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - class DeclinedAmount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - approved_amount: Optional[ApprovedAmount] + approved_amount: Optional[Amount] """ Estimated aggregated amount for the approved requests. """ @@ -80,7 +61,7 @@ class DeclinedAmount(StripeObject): """ The number of approved requests which are impacted. """ - declined_amount: Optional[DeclinedAmount] + declined_amount: Optional[Amount] """ Estimated aggregated amount for the declined requests. """ @@ -88,10 +69,6 @@ class DeclinedAmount(StripeObject): """ The number of declined requests which are impacted. """ - _inner_class_types = { - "approved_amount": ApprovedAmount, - "declined_amount": DeclinedAmount, - } grouping_key: str """ diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index cbf1bec5d..ae437f7b8 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -6451,12 +6451,6 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): """ Bank account verification method. """ - preferred_settlement_speed: NotRequired[ - "Literal['']|Literal['fastest', 'standard']" - ] - """ - Preferred transaction settlement speed - """ class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index e31a0b96c..19333a8b3 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -6574,12 +6574,6 @@ class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): """ Bank account verification method. """ - preferred_settlement_speed: NotRequired[ - "Literal['']|Literal['fastest', 'standard']" - ] - """ - Preferred transaction settlement speed - """ class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index 14077857a..e0070eb61 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -6422,12 +6422,6 @@ class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): """ Bank account verification method. """ - preferred_settlement_speed: NotRequired[ - "Literal['']|Literal['fastest', 'standard']" - ] - """ - Preferred transaction settlement speed - """ class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index 5cb04cc9e..aa67e610f 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -6421,12 +6421,6 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): """ Bank account verification method. """ - preferred_settlement_speed: NotRequired[ - "Literal['']|Literal['fastest', 'standard']" - ] - """ - Preferred transaction settlement speed - """ class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( diff --git a/stripe/params/v2/billing/__init__.py b/stripe/params/v2/billing/__init__.py index d8965556e..e8d83f40d 100644 --- a/stripe/params/v2/billing/__init__.py +++ b/stripe/params/v2/billing/__init__.py @@ -334,14 +334,12 @@ ServiceActionCreateParamsCreditGrant as ServiceActionCreateParamsCreditGrant, ServiceActionCreateParamsCreditGrantAmount as ServiceActionCreateParamsCreditGrantAmount, ServiceActionCreateParamsCreditGrantAmountCustomPricingUnit as ServiceActionCreateParamsCreditGrantAmountCustomPricingUnit, - ServiceActionCreateParamsCreditGrantAmountMonetary as ServiceActionCreateParamsCreditGrantAmountMonetary, ServiceActionCreateParamsCreditGrantApplicabilityConfig as ServiceActionCreateParamsCreditGrantApplicabilityConfig, ServiceActionCreateParamsCreditGrantApplicabilityConfigScope as ServiceActionCreateParamsCreditGrantApplicabilityConfigScope, ServiceActionCreateParamsCreditGrantExpiryConfig as ServiceActionCreateParamsCreditGrantExpiryConfig, ServiceActionCreateParamsCreditGrantPerTenant as ServiceActionCreateParamsCreditGrantPerTenant, ServiceActionCreateParamsCreditGrantPerTenantAmount as ServiceActionCreateParamsCreditGrantPerTenantAmount, ServiceActionCreateParamsCreditGrantPerTenantAmountCustomPricingUnit as ServiceActionCreateParamsCreditGrantPerTenantAmountCustomPricingUnit, - ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary as ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary, ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig as ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig, ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfigScope as ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfigScope, ServiceActionCreateParamsCreditGrantPerTenantExpiryConfig as ServiceActionCreateParamsCreditGrantPerTenantExpiryConfig, @@ -1131,10 +1129,6 @@ "stripe.params.v2.billing._service_action_create_params", False, ), - "ServiceActionCreateParamsCreditGrantAmountMonetary": ( - "stripe.params.v2.billing._service_action_create_params", - False, - ), "ServiceActionCreateParamsCreditGrantApplicabilityConfig": ( "stripe.params.v2.billing._service_action_create_params", False, @@ -1159,10 +1153,6 @@ "stripe.params.v2.billing._service_action_create_params", False, ), - "ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary": ( - "stripe.params.v2.billing._service_action_create_params", - False, - ), "ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig": ( "stripe.params.v2.billing._service_action_create_params", False, diff --git a/stripe/params/v2/billing/_service_action_create_params.py b/stripe/params/v2/billing/_service_action_create_params.py index b20d3f6cf..8402775ae 100644 --- a/stripe/params/v2/billing/_service_action_create_params.py +++ b/stripe/params/v2/billing/_service_action_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing import List from typing_extensions import Literal, NotRequired, TypedDict @@ -73,7 +74,7 @@ class ServiceActionCreateParamsCreditGrantAmount(TypedDict): """ The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. """ - monetary: NotRequired["ServiceActionCreateParamsCreditGrantAmountMonetary"] + monetary: NotRequired[AmountParam] """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ @@ -90,17 +91,6 @@ class ServiceActionCreateParamsCreditGrantAmountCustomPricingUnit(TypedDict): """ -class ServiceActionCreateParamsCreditGrantAmountMonetary(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class ServiceActionCreateParamsCreditGrantApplicabilityConfig(TypedDict): scope: "ServiceActionCreateParamsCreditGrantApplicabilityConfigScope" """ @@ -172,9 +162,7 @@ class ServiceActionCreateParamsCreditGrantPerTenantAmount(TypedDict): """ The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. """ - monetary: NotRequired[ - "ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary" - ] + monetary: NotRequired[AmountParam] """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ @@ -193,17 +181,6 @@ class ServiceActionCreateParamsCreditGrantPerTenantAmountCustomPricingUnit( """ -class ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig( TypedDict, ): diff --git a/stripe/params/v2/core/__init__.py b/stripe/params/v2/core/__init__.py index 80b91c4ae..37d6226ae 100644 --- a/stripe/params/v2/core/__init__.py +++ b/stripe/params/v2/core/__init__.py @@ -212,7 +212,6 @@ AccountCreateParamsIdentityBusinessDetails as AccountCreateParamsIdentityBusinessDetails, AccountCreateParamsIdentityBusinessDetailsAddress as AccountCreateParamsIdentityBusinessDetailsAddress, AccountCreateParamsIdentityBusinessDetailsAnnualRevenue as AccountCreateParamsIdentityBusinessDetailsAnnualRevenue, - AccountCreateParamsIdentityBusinessDetailsAnnualRevenueAmount as AccountCreateParamsIdentityBusinessDetailsAnnualRevenueAmount, AccountCreateParamsIdentityBusinessDetailsDocuments as AccountCreateParamsIdentityBusinessDetailsDocuments, AccountCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification as AccountCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification, AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense as AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense, @@ -227,7 +226,6 @@ AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership as AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership, AccountCreateParamsIdentityBusinessDetailsIdNumber as AccountCreateParamsIdentityBusinessDetailsIdNumber, AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue as AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue, - AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount as AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount, AccountCreateParamsIdentityBusinessDetailsRegistrationDate as AccountCreateParamsIdentityBusinessDetailsRegistrationDate, AccountCreateParamsIdentityBusinessDetailsScriptAddresses as AccountCreateParamsIdentityBusinessDetailsScriptAddresses, AccountCreateParamsIdentityBusinessDetailsScriptAddressesKana as AccountCreateParamsIdentityBusinessDetailsScriptAddressesKana, @@ -311,7 +309,6 @@ AccountTokenCreateParamsIdentityBusinessDetails as AccountTokenCreateParamsIdentityBusinessDetails, AccountTokenCreateParamsIdentityBusinessDetailsAddress as AccountTokenCreateParamsIdentityBusinessDetailsAddress, AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenue as AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenue, - AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenueAmount as AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenueAmount, AccountTokenCreateParamsIdentityBusinessDetailsDocuments as AccountTokenCreateParamsIdentityBusinessDetailsDocuments, AccountTokenCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification, AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense, @@ -326,7 +323,6 @@ AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership, AccountTokenCreateParamsIdentityBusinessDetailsIdNumber as AccountTokenCreateParamsIdentityBusinessDetailsIdNumber, AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue as AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue, - AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount as AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount, AccountTokenCreateParamsIdentityBusinessDetailsRegistrationDate as AccountTokenCreateParamsIdentityBusinessDetailsRegistrationDate, AccountTokenCreateParamsIdentityBusinessDetailsScriptAddresses as AccountTokenCreateParamsIdentityBusinessDetailsScriptAddresses, AccountTokenCreateParamsIdentityBusinessDetailsScriptAddressesKana as AccountTokenCreateParamsIdentityBusinessDetailsScriptAddressesKana, @@ -563,7 +559,6 @@ AccountUpdateParamsIdentityBusinessDetails as AccountUpdateParamsIdentityBusinessDetails, AccountUpdateParamsIdentityBusinessDetailsAddress as AccountUpdateParamsIdentityBusinessDetailsAddress, AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue as AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue, - AccountUpdateParamsIdentityBusinessDetailsAnnualRevenueAmount as AccountUpdateParamsIdentityBusinessDetailsAnnualRevenueAmount, AccountUpdateParamsIdentityBusinessDetailsDocuments as AccountUpdateParamsIdentityBusinessDetailsDocuments, AccountUpdateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification as AccountUpdateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification, AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyLicense as AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyLicense, @@ -578,7 +573,6 @@ AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership as AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership, AccountUpdateParamsIdentityBusinessDetailsIdNumber as AccountUpdateParamsIdentityBusinessDetailsIdNumber, AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue as AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue, - AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount as AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount, AccountUpdateParamsIdentityBusinessDetailsRegistrationDate as AccountUpdateParamsIdentityBusinessDetailsRegistrationDate, AccountUpdateParamsIdentityBusinessDetailsScriptAddresses as AccountUpdateParamsIdentityBusinessDetailsScriptAddresses, AccountUpdateParamsIdentityBusinessDetailsScriptAddressesKana as AccountUpdateParamsIdentityBusinessDetailsScriptAddressesKana, @@ -1476,10 +1470,6 @@ "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsIdentityBusinessDetailsAnnualRevenueAmount": ( - "stripe.params.v2.core._account_create_params", - False, - ), "AccountCreateParamsIdentityBusinessDetailsDocuments": ( "stripe.params.v2.core._account_create_params", False, @@ -1536,10 +1526,6 @@ "stripe.params.v2.core._account_create_params", False, ), - "AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount": ( - "stripe.params.v2.core._account_create_params", - False, - ), "AccountCreateParamsIdentityBusinessDetailsRegistrationDate": ( "stripe.params.v2.core._account_create_params", False, @@ -1837,10 +1823,6 @@ "stripe.params.v2.core._account_token_create_params", False, ), - "AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenueAmount": ( - "stripe.params.v2.core._account_token_create_params", - False, - ), "AccountTokenCreateParamsIdentityBusinessDetailsDocuments": ( "stripe.params.v2.core._account_token_create_params", False, @@ -1897,10 +1879,6 @@ "stripe.params.v2.core._account_token_create_params", False, ), - "AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount": ( - "stripe.params.v2.core._account_token_create_params", - False, - ), "AccountTokenCreateParamsIdentityBusinessDetailsRegistrationDate": ( "stripe.params.v2.core._account_token_create_params", False, @@ -2829,10 +2807,6 @@ "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsIdentityBusinessDetailsAnnualRevenueAmount": ( - "stripe.params.v2.core._account_update_params", - False, - ), "AccountUpdateParamsIdentityBusinessDetailsDocuments": ( "stripe.params.v2.core._account_update_params", False, @@ -2889,10 +2863,6 @@ "stripe.params.v2.core._account_update_params", False, ), - "AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount": ( - "stripe.params.v2.core._account_update_params", - False, - ), "AccountUpdateParamsIdentityBusinessDetailsRegistrationDate": ( "stripe.params.v2.core._account_update_params", False, diff --git a/stripe/params/v2/core/_account_create_params.py b/stripe/params/v2/core/_account_create_params.py index 71e1dff35..d3d169964 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing import Dict, List from typing_extensions import Literal, NotRequired, TypedDict @@ -3533,9 +3534,7 @@ class AccountCreateParamsIdentityBusinessDetailsAddress(TypedDict): class AccountCreateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): - amount: NotRequired[ - "AccountCreateParamsIdentityBusinessDetailsAnnualRevenueAmount" - ] + amount: NotRequired[AmountParam] """ A non-negative integer representing the amount in the smallest currency unit. """ @@ -3545,17 +3544,6 @@ class AccountCreateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): """ -class AccountCreateParamsIdentityBusinessDetailsAnnualRevenueAmount(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class AccountCreateParamsIdentityBusinessDetailsDocuments(TypedDict): bank_account_ownership_verification: NotRequired[ "AccountCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification" @@ -3896,27 +3884,12 @@ class AccountCreateParamsIdentityBusinessDetailsIdNumber(TypedDict): class AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue( TypedDict, ): - amount: NotRequired[ - "AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount" - ] + amount: NotRequired[AmountParam] """ A non-negative integer representing the amount in the smallest currency unit. """ -class AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount( - TypedDict, -): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class AccountCreateParamsIdentityBusinessDetailsRegistrationDate(TypedDict): day: int """ diff --git a/stripe/params/v2/core/_account_token_create_params.py b/stripe/params/v2/core/_account_token_create_params.py index e84ffb528..78b7568b8 100644 --- a/stripe/params/v2/core/_account_token_create_params.py +++ b/stripe/params/v2/core/_account_token_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing import Dict, List, Optional from typing_extensions import Literal, NotRequired, TypedDict @@ -594,9 +595,7 @@ class AccountTokenCreateParamsIdentityBusinessDetailsAddress(TypedDict): class AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): - amount: NotRequired[ - "AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenueAmount" - ] + amount: NotRequired[AmountParam] """ A non-negative integer representing the amount in the smallest currency unit. """ @@ -606,19 +605,6 @@ class AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): """ -class AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenueAmount( - TypedDict, -): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class AccountTokenCreateParamsIdentityBusinessDetailsDocuments(TypedDict): bank_account_ownership_verification: NotRequired[ "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification" @@ -959,27 +945,12 @@ class AccountTokenCreateParamsIdentityBusinessDetailsIdNumber(TypedDict): class AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue( TypedDict, ): - amount: NotRequired[ - "AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount" - ] + amount: NotRequired[AmountParam] """ A non-negative integer representing the amount in the smallest currency unit. """ -class AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount( - TypedDict, -): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class AccountTokenCreateParamsIdentityBusinessDetailsRegistrationDate( TypedDict, ): diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py index 23644a8c0..5530ec94a 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing import Dict, List, Optional from typing_extensions import Literal, NotRequired, TypedDict @@ -3565,9 +3566,7 @@ class AccountUpdateParamsIdentityBusinessDetailsAddress(TypedDict): class AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): - amount: NotRequired[ - "AccountUpdateParamsIdentityBusinessDetailsAnnualRevenueAmount" - ] + amount: NotRequired[AmountParam] """ A non-negative integer representing the amount in the smallest currency unit. """ @@ -3577,17 +3576,6 @@ class AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): """ -class AccountUpdateParamsIdentityBusinessDetailsAnnualRevenueAmount(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class AccountUpdateParamsIdentityBusinessDetailsDocuments(TypedDict): bank_account_ownership_verification: NotRequired[ "AccountUpdateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification" @@ -3928,27 +3916,12 @@ class AccountUpdateParamsIdentityBusinessDetailsIdNumber(TypedDict): class AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue( TypedDict, ): - amount: NotRequired[ - "AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount" - ] + amount: NotRequired[AmountParam] """ A non-negative integer representing the amount in the smallest currency unit. """ -class AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount( - TypedDict, -): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class AccountUpdateParamsIdentityBusinessDetailsRegistrationDate(TypedDict): day: int """ diff --git a/stripe/params/v2/money_management/__init__.py b/stripe/params/v2/money_management/__init__.py index 5f1a99f3f..51ca08681 100644 --- a/stripe/params/v2/money_management/__init__.py +++ b/stripe/params/v2/money_management/__init__.py @@ -13,9 +13,7 @@ from stripe.params.v2.money_management._currency_conversion_create_params import ( CurrencyConversionCreateParams as CurrencyConversionCreateParams, CurrencyConversionCreateParamsFrom as CurrencyConversionCreateParamsFrom, - CurrencyConversionCreateParamsFromAmount as CurrencyConversionCreateParamsFromAmount, CurrencyConversionCreateParamsTo as CurrencyConversionCreateParamsTo, - CurrencyConversionCreateParamsToAmount as CurrencyConversionCreateParamsToAmount, ) from stripe.params.v2.money_management._currency_conversion_list_params import ( CurrencyConversionListParams as CurrencyConversionListParams, @@ -52,7 +50,6 @@ ) from stripe.params.v2.money_management._inbound_transfer_create_params import ( InboundTransferCreateParams as InboundTransferCreateParams, - InboundTransferCreateParamsAmount as InboundTransferCreateParamsAmount, InboundTransferCreateParamsFrom as InboundTransferCreateParamsFrom, InboundTransferCreateParamsTo as InboundTransferCreateParamsTo, ) @@ -67,7 +64,6 @@ ) from stripe.params.v2.money_management._outbound_payment_create_params import ( OutboundPaymentCreateParams as OutboundPaymentCreateParams, - OutboundPaymentCreateParamsAmount as OutboundPaymentCreateParamsAmount, OutboundPaymentCreateParamsDeliveryOptions as OutboundPaymentCreateParamsDeliveryOptions, OutboundPaymentCreateParamsDeliveryOptionsPaperCheck as OutboundPaymentCreateParamsDeliveryOptionsPaperCheck, OutboundPaymentCreateParamsFrom as OutboundPaymentCreateParamsFrom, @@ -79,7 +75,6 @@ ) from stripe.params.v2.money_management._outbound_payment_quote_create_params import ( OutboundPaymentQuoteCreateParams as OutboundPaymentQuoteCreateParams, - OutboundPaymentQuoteCreateParamsAmount as OutboundPaymentQuoteCreateParamsAmount, OutboundPaymentQuoteCreateParamsDeliveryOptions as OutboundPaymentQuoteCreateParamsDeliveryOptions, OutboundPaymentQuoteCreateParamsFrom as OutboundPaymentQuoteCreateParamsFrom, OutboundPaymentQuoteCreateParamsTo as OutboundPaymentQuoteCreateParamsTo, @@ -117,7 +112,6 @@ ) from stripe.params.v2.money_management._outbound_transfer_create_params import ( OutboundTransferCreateParams as OutboundTransferCreateParams, - OutboundTransferCreateParamsAmount as OutboundTransferCreateParamsAmount, OutboundTransferCreateParamsDeliveryOptions as OutboundTransferCreateParamsDeliveryOptions, OutboundTransferCreateParamsFrom as OutboundTransferCreateParamsFrom, OutboundTransferCreateParamsTo as OutboundTransferCreateParamsTo, @@ -196,18 +190,10 @@ "stripe.params.v2.money_management._currency_conversion_create_params", False, ), - "CurrencyConversionCreateParamsFromAmount": ( - "stripe.params.v2.money_management._currency_conversion_create_params", - False, - ), "CurrencyConversionCreateParamsTo": ( "stripe.params.v2.money_management._currency_conversion_create_params", False, ), - "CurrencyConversionCreateParamsToAmount": ( - "stripe.params.v2.money_management._currency_conversion_create_params", - False, - ), "CurrencyConversionListParams": ( "stripe.params.v2.money_management._currency_conversion_list_params", False, @@ -264,10 +250,6 @@ "stripe.params.v2.money_management._inbound_transfer_create_params", False, ), - "InboundTransferCreateParamsAmount": ( - "stripe.params.v2.money_management._inbound_transfer_create_params", - False, - ), "InboundTransferCreateParamsFrom": ( "stripe.params.v2.money_management._inbound_transfer_create_params", False, @@ -292,10 +274,6 @@ "stripe.params.v2.money_management._outbound_payment_create_params", False, ), - "OutboundPaymentCreateParamsAmount": ( - "stripe.params.v2.money_management._outbound_payment_create_params", - False, - ), "OutboundPaymentCreateParamsDeliveryOptions": ( "stripe.params.v2.money_management._outbound_payment_create_params", False, @@ -324,10 +302,6 @@ "stripe.params.v2.money_management._outbound_payment_quote_create_params", False, ), - "OutboundPaymentQuoteCreateParamsAmount": ( - "stripe.params.v2.money_management._outbound_payment_quote_create_params", - False, - ), "OutboundPaymentQuoteCreateParamsDeliveryOptions": ( "stripe.params.v2.money_management._outbound_payment_quote_create_params", False, @@ -404,10 +378,6 @@ "stripe.params.v2.money_management._outbound_transfer_create_params", False, ), - "OutboundTransferCreateParamsAmount": ( - "stripe.params.v2.money_management._outbound_transfer_create_params", - False, - ), "OutboundTransferCreateParamsDeliveryOptions": ( "stripe.params.v2.money_management._outbound_transfer_create_params", False, diff --git a/stripe/params/v2/money_management/_currency_conversion_create_params.py b/stripe/params/v2/money_management/_currency_conversion_create_params.py index a94347fab..393d25cf4 100644 --- a/stripe/params/v2/money_management/_currency_conversion_create_params.py +++ b/stripe/params/v2/money_management/_currency_conversion_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing_extensions import NotRequired, TypedDict _CurrencyConversionCreateParamsBase = TypedDict( @@ -20,7 +21,7 @@ class CurrencyConversionCreateParams(_CurrencyConversionCreateParamsBase): class CurrencyConversionCreateParamsFrom(TypedDict): - amount: NotRequired["CurrencyConversionCreateParamsFromAmount"] + amount: NotRequired[AmountParam] """ Amount object. """ @@ -30,19 +31,8 @@ class CurrencyConversionCreateParamsFrom(TypedDict): """ -class CurrencyConversionCreateParamsFromAmount(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class CurrencyConversionCreateParamsTo(TypedDict): - amount: NotRequired["CurrencyConversionCreateParamsToAmount"] + amount: NotRequired[AmountParam] """ Amount object. """ @@ -50,14 +40,3 @@ class CurrencyConversionCreateParamsTo(TypedDict): """ A lowercase alpha3 currency code like "usd". """ - - -class CurrencyConversionCreateParamsToAmount(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ diff --git a/stripe/params/v2/money_management/_inbound_transfer_create_params.py b/stripe/params/v2/money_management/_inbound_transfer_create_params.py index 715086b0e..db5250ed2 100644 --- a/stripe/params/v2/money_management/_inbound_transfer_create_params.py +++ b/stripe/params/v2/money_management/_inbound_transfer_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing_extensions import NotRequired, TypedDict _InboundTransferCreateParamsBase = TypedDict( @@ -9,7 +10,7 @@ class InboundTransferCreateParams(_InboundTransferCreateParamsBase): - amount: "InboundTransferCreateParamsAmount" + amount: AmountParam """ The amount, in specified currency, by which the FinancialAccount balance will increase due to the InboundTransfer. """ @@ -23,17 +24,6 @@ class InboundTransferCreateParams(_InboundTransferCreateParamsBase): """ -class InboundTransferCreateParamsAmount(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class InboundTransferCreateParamsFrom(TypedDict): currency: NotRequired[str] """ diff --git a/stripe/params/v2/money_management/_outbound_payment_create_params.py b/stripe/params/v2/money_management/_outbound_payment_create_params.py index d95e0b448..c2de0b197 100644 --- a/stripe/params/v2/money_management/_outbound_payment_create_params.py +++ b/stripe/params/v2/money_management/_outbound_payment_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing import Dict from typing_extensions import Literal, NotRequired, TypedDict @@ -10,7 +11,7 @@ class OutboundPaymentCreateParams(_OutboundPaymentCreateParamsBase): - amount: "OutboundPaymentCreateParamsAmount" + amount: AmountParam """ The "presentment amount" to be sent to the recipient. """ @@ -50,17 +51,6 @@ class OutboundPaymentCreateParams(_OutboundPaymentCreateParamsBase): """ -class OutboundPaymentCreateParamsAmount(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class OutboundPaymentCreateParamsDeliveryOptions(TypedDict): speed: NotRequired[Literal["instant", "next_business_day", "standard"]] """ diff --git a/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py b/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py index ea20f2ca0..ec40e4404 100644 --- a/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py +++ b/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing_extensions import Literal, NotRequired, TypedDict _OutboundPaymentQuoteCreateParamsBase = TypedDict( @@ -9,7 +10,7 @@ class OutboundPaymentQuoteCreateParams(_OutboundPaymentQuoteCreateParamsBase): - amount: "OutboundPaymentQuoteCreateParamsAmount" + amount: AmountParam """ The "presentment amount" to be sent to the recipient. """ @@ -25,17 +26,6 @@ class OutboundPaymentQuoteCreateParams(_OutboundPaymentQuoteCreateParamsBase): """ -class OutboundPaymentQuoteCreateParamsAmount(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class OutboundPaymentQuoteCreateParamsDeliveryOptions(TypedDict): speed: NotRequired[Literal["instant", "next_business_day", "standard"]] """ diff --git a/stripe/params/v2/money_management/_outbound_transfer_create_params.py b/stripe/params/v2/money_management/_outbound_transfer_create_params.py index 846aacbe3..ff999ef3f 100644 --- a/stripe/params/v2/money_management/_outbound_transfer_create_params.py +++ b/stripe/params/v2/money_management/_outbound_transfer_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing import Dict from typing_extensions import Literal, NotRequired, TypedDict @@ -10,7 +11,7 @@ class OutboundTransferCreateParams(_OutboundTransferCreateParamsBase): - amount: "OutboundTransferCreateParamsAmount" + amount: AmountParam """ The "presentment amount" for the OutboundPayment. """ @@ -38,17 +39,6 @@ class OutboundTransferCreateParams(_OutboundTransferCreateParamsBase): """ -class OutboundTransferCreateParamsAmount(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class OutboundTransferCreateParamsDeliveryOptions(TypedDict): bank_account: NotRequired[Literal["automatic", "local", "wire"]] """ diff --git a/stripe/params/v2/payments/__init__.py b/stripe/params/v2/payments/__init__.py index a0cbbdbd4..e36178b6a 100644 --- a/stripe/params/v2/payments/__init__.py +++ b/stripe/params/v2/payments/__init__.py @@ -16,7 +16,6 @@ ) from stripe.params.v2.payments._off_session_payment_create_params import ( OffSessionPaymentCreateParams as OffSessionPaymentCreateParams, - OffSessionPaymentCreateParamsAmount as OffSessionPaymentCreateParamsAmount, OffSessionPaymentCreateParamsCapture as OffSessionPaymentCreateParamsCapture, OffSessionPaymentCreateParamsPaymentMethodData as OffSessionPaymentCreateParamsPaymentMethodData, OffSessionPaymentCreateParamsPaymentMethodDataBillingDetails as OffSessionPaymentCreateParamsPaymentMethodDataBillingDetails, @@ -39,7 +38,6 @@ ) from stripe.params.v2.payments._settlement_allocation_intent_create_params import ( SettlementAllocationIntentCreateParams as SettlementAllocationIntentCreateParams, - SettlementAllocationIntentCreateParamsAmount as SettlementAllocationIntentCreateParamsAmount, ) from stripe.params.v2.payments._settlement_allocation_intent_list_params import ( SettlementAllocationIntentListParams as SettlementAllocationIntentListParams, @@ -52,7 +50,6 @@ ) from stripe.params.v2.payments._settlement_allocation_intent_update_params import ( SettlementAllocationIntentUpdateParams as SettlementAllocationIntentUpdateParams, - SettlementAllocationIntentUpdateParamsAmount as SettlementAllocationIntentUpdateParamsAmount, ) # name -> (import_target, is_submodule) @@ -77,10 +74,6 @@ "stripe.params.v2.payments._off_session_payment_create_params", False, ), - "OffSessionPaymentCreateParamsAmount": ( - "stripe.params.v2.payments._off_session_payment_create_params", - False, - ), "OffSessionPaymentCreateParamsCapture": ( "stripe.params.v2.payments._off_session_payment_create_params", False, @@ -137,10 +130,6 @@ "stripe.params.v2.payments._settlement_allocation_intent_create_params", False, ), - "SettlementAllocationIntentCreateParamsAmount": ( - "stripe.params.v2.payments._settlement_allocation_intent_create_params", - False, - ), "SettlementAllocationIntentListParams": ( "stripe.params.v2.payments._settlement_allocation_intent_list_params", False, @@ -157,10 +146,6 @@ "stripe.params.v2.payments._settlement_allocation_intent_update_params", False, ), - "SettlementAllocationIntentUpdateParamsAmount": ( - "stripe.params.v2.payments._settlement_allocation_intent_update_params", - False, - ), } if not TYPE_CHECKING: diff --git a/stripe/params/v2/payments/_off_session_payment_create_params.py b/stripe/params/v2/payments/_off_session_payment_create_params.py index 3cb29576b..56ef48c2a 100644 --- a/stripe/params/v2/payments/_off_session_payment_create_params.py +++ b/stripe/params/v2/payments/_off_session_payment_create_params.py @@ -1,11 +1,12 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing import Dict from typing_extensions import Literal, NotRequired, TypedDict class OffSessionPaymentCreateParams(TypedDict): - amount: "OffSessionPaymentCreateParamsAmount" + amount: AmountParam """ The “presentment amount” to be collected from the customer. """ @@ -81,17 +82,6 @@ class OffSessionPaymentCreateParams(TypedDict): """ -class OffSessionPaymentCreateParamsAmount(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - - class OffSessionPaymentCreateParamsCapture(TypedDict): capture_method: Literal["automatic", "manual"] """ diff --git a/stripe/params/v2/payments/_settlement_allocation_intent_create_params.py b/stripe/params/v2/payments/_settlement_allocation_intent_create_params.py index 1a4b2be27..cd57a11ab 100644 --- a/stripe/params/v2/payments/_settlement_allocation_intent_create_params.py +++ b/stripe/params/v2/payments/_settlement_allocation_intent_create_params.py @@ -1,11 +1,12 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing import Dict from typing_extensions import NotRequired, TypedDict class SettlementAllocationIntentCreateParams(TypedDict): - amount: "SettlementAllocationIntentCreateParamsAmount" + amount: AmountParam """ The amount and currency of the SettlementAllocationIntent. Allowed Currencies are `gbp` | `eur`. """ @@ -25,14 +26,3 @@ class SettlementAllocationIntentCreateParams(TypedDict): """ Reference for the SettlementAllocationIntent. This should be same as the transaction reference used by payments processor to send funds to Stripe. Must have length between 5 and 255 characters and it must be unique among existing SettlementAllocationIntents that have a non-terminal status (`pending`, `submitted`, `matched`, `errored`). """ - - -class SettlementAllocationIntentCreateParamsAmount(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ diff --git a/stripe/params/v2/payments/_settlement_allocation_intent_update_params.py b/stripe/params/v2/payments/_settlement_allocation_intent_update_params.py index 83ad0180c..7249cbcac 100644 --- a/stripe/params/v2/payments/_settlement_allocation_intent_update_params.py +++ b/stripe/params/v2/payments/_settlement_allocation_intent_update_params.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing_extensions import NotRequired, TypedDict class SettlementAllocationIntentUpdateParams(TypedDict): - amount: NotRequired["SettlementAllocationIntentUpdateParamsAmount"] + amount: NotRequired[AmountParam] """ The new amount for the SettlementAllocationIntent. Only amount.value can be updated and currency must remain same. """ @@ -12,14 +13,3 @@ class SettlementAllocationIntentUpdateParams(TypedDict): """ The new reference for the SettlementAllocationIntent. """ - - -class SettlementAllocationIntentUpdateParamsAmount(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ diff --git a/stripe/params/v2/payments/settlement_allocation_intents/__init__.py b/stripe/params/v2/payments/settlement_allocation_intents/__init__.py index f38eb74a8..41f8f910a 100644 --- a/stripe/params/v2/payments/settlement_allocation_intents/__init__.py +++ b/stripe/params/v2/payments/settlement_allocation_intents/__init__.py @@ -9,7 +9,6 @@ ) from stripe.params.v2.payments.settlement_allocation_intents._split_create_params import ( SplitCreateParams as SplitCreateParams, - SplitCreateParamsAmount as SplitCreateParamsAmount, ) from stripe.params.v2.payments.settlement_allocation_intents._split_list_params import ( SplitListParams as SplitListParams, @@ -28,10 +27,6 @@ "stripe.params.v2.payments.settlement_allocation_intents._split_create_params", False, ), - "SplitCreateParamsAmount": ( - "stripe.params.v2.payments.settlement_allocation_intents._split_create_params", - False, - ), "SplitListParams": ( "stripe.params.v2.payments.settlement_allocation_intents._split_list_params", False, diff --git a/stripe/params/v2/payments/settlement_allocation_intents/_split_create_params.py b/stripe/params/v2/payments/settlement_allocation_intents/_split_create_params.py index 4458a60cd..72cba8848 100644 --- a/stripe/params/v2/payments/settlement_allocation_intents/_split_create_params.py +++ b/stripe/params/v2/payments/settlement_allocation_intents/_split_create_params.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing import Dict from typing_extensions import Literal, NotRequired, TypedDict @@ -9,7 +10,7 @@ class SplitCreateParams(TypedDict): """ The target account for settling the SettlementAllocationIntentSplit. """ - amount: "SplitCreateParamsAmount" + amount: AmountParam """ The amount and currency of the SettlementAllocationIntentSplit. """ @@ -21,14 +22,3 @@ class SplitCreateParams(TypedDict): """ The type of the fund transfer. """ - - -class SplitCreateParamsAmount(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ diff --git a/stripe/params/v2/test_helpers/__init__.py b/stripe/params/v2/test_helpers/__init__.py index 2e5c7778a..ac9619333 100644 --- a/stripe/params/v2/test_helpers/__init__.py +++ b/stripe/params/v2/test_helpers/__init__.py @@ -6,7 +6,6 @@ if TYPE_CHECKING: from stripe.params.v2.test_helpers._financial_address_credit_params import ( FinancialAddressCreditParams as FinancialAddressCreditParams, - FinancialAddressCreditParamsAmount as FinancialAddressCreditParamsAmount, ) from stripe.params.v2.test_helpers._financial_address_generate_microdeposits_params import ( FinancialAddressGenerateMicrodepositsParams as FinancialAddressGenerateMicrodepositsParams, @@ -21,10 +20,6 @@ "stripe.params.v2.test_helpers._financial_address_credit_params", False, ), - "FinancialAddressCreditParamsAmount": ( - "stripe.params.v2.test_helpers._financial_address_credit_params", - False, - ), "FinancialAddressGenerateMicrodepositsParams": ( "stripe.params.v2.test_helpers._financial_address_generate_microdeposits_params", False, diff --git a/stripe/params/v2/test_helpers/_financial_address_credit_params.py b/stripe/params/v2/test_helpers/_financial_address_credit_params.py index 5ff7bbc34..72931ad01 100644 --- a/stripe/params/v2/test_helpers/_financial_address_credit_params.py +++ b/stripe/params/v2/test_helpers/_financial_address_credit_params.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam from typing_extensions import Literal, NotRequired, TypedDict class FinancialAddressCreditParams(TypedDict): - amount: "FinancialAddressCreditParamsAmount" + amount: AmountParam """ Object containing the amount value and currency to credit. """ @@ -16,14 +17,3 @@ class FinancialAddressCreditParams(TypedDict): """ String explaining funds flow. Use this field to populate the statement descriptor of the ReceivedCredit created as an eventual result of this simulation. """ - - -class FinancialAddressCreditParamsAmount(TypedDict): - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ diff --git a/stripe/v2/_financial_address_generated_microdeposits.py b/stripe/v2/_financial_address_generated_microdeposits.py index f53dfcf52..f1c345be7 100644 --- a/stripe/v2/_financial_address_generated_microdeposits.py +++ b/stripe/v2/_financial_address_generated_microdeposits.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, List from typing_extensions import Literal @@ -13,17 +14,6 @@ class FinancialAddressGeneratedMicrodeposits(StripeObject): OBJECT_NAME: ClassVar[ Literal["financial_address_generated_microdeposits"] ] = "financial_address_generated_microdeposits" - - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - amounts: List[Amount] """ The amounts of the microdeposits that were generated. @@ -40,4 +30,3 @@ class Amount(StripeObject): """ Closed Enum. The status of the request. """ - _inner_class_types = {"amounts": Amount} diff --git a/stripe/v2/billing/_service_action.py b/stripe/v2/billing/_service_action.py index b87c2748b..5308caaee 100644 --- a/stripe/v2/billing/_service_action.py +++ b/stripe/v2/billing/_service_action.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount as V2AmountResource from typing import ClassVar, List, Optional from typing_extensions import Literal, TYPE_CHECKING @@ -37,21 +38,11 @@ class CustomPricingUnit(StripeObject): The value of the credit grant, decimal value represented as a string. """ - class Monetary(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - custom_pricing_unit: Optional[CustomPricingUnit] """ The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. """ - monetary: Optional[Monetary] + monetary: Optional[V2AmountResource] """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ @@ -59,10 +50,7 @@ class Monetary(StripeObject): """ The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. """ - _inner_class_types = { - "custom_pricing_unit": CustomPricingUnit, - "monetary": Monetary, - } + _inner_class_types = {"custom_pricing_unit": CustomPricingUnit} class ApplicabilityConfig(StripeObject): class Scope(StripeObject): @@ -135,21 +123,11 @@ class CustomPricingUnit(StripeObject): The value of the credit grant, decimal value represented as a string. """ - class Monetary(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - custom_pricing_unit: Optional[CustomPricingUnit] """ The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. """ - monetary: Optional[Monetary] + monetary: Optional[V2AmountResource] """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ @@ -157,10 +135,7 @@ class Monetary(StripeObject): """ The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. """ - _inner_class_types = { - "custom_pricing_unit": CustomPricingUnit, - "monetary": Monetary, - } + _inner_class_types = {"custom_pricing_unit": CustomPricingUnit} class ApplicabilityConfig(StripeObject): class Scope(StripeObject): diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index bc143dca2..699564e0a 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, Dict, List, Optional from typing_extensions import Literal @@ -5700,16 +5701,6 @@ class Address(StripeObject): """ class AnnualRevenue(StripeObject): - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - amount: Optional[Amount] """ Annual revenue amount in minor currency units (for example, '123' for 1.23 USD). @@ -5718,7 +5709,6 @@ class Amount(StripeObject): """ The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. """ - _inner_class_types = {"amount": Amount} class Documents(StripeObject): class BankAccountOwnershipVerification(StripeObject): @@ -6020,21 +6010,10 @@ class IdNumber(StripeObject): """ class MonthlyEstimatedRevenue(StripeObject): - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - amount: Optional[Amount] """ Estimated monthly revenue amount in minor currency units (for example, '123' for 1.23 USD). """ - _inner_class_types = {"amount": Amount} class RegistrationDate(StripeObject): day: int diff --git a/stripe/v2/money_management/_adjustment.py b/stripe/v2/money_management/_adjustment.py index 910857a63..59653e5d8 100644 --- a/stripe/v2/money_management/_adjustment.py +++ b/stripe/v2/money_management/_adjustment.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, Optional from typing_extensions import Literal @@ -53,16 +54,6 @@ class AdjustedFlow(StripeObject): Closed Enum. If applicable, the type of flow linked to this Adjustment. The field matching this value will contain the ID of the flow. """ - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - adjusted_flow: Optional[AdjustedFlow] """ If applicable, contains information about the original flow linked to this Adjustment. @@ -103,4 +94,4 @@ class Amount(StripeObject): """ A reference for the Adjustment that associates it with related records or operations. """ - _inner_class_types = {"adjusted_flow": AdjustedFlow, "amount": Amount} + _inner_class_types = {"adjusted_flow": AdjustedFlow} diff --git a/stripe/v2/money_management/_currency_conversion.py b/stripe/v2/money_management/_currency_conversion.py index 517c74e39..7c8e805c7 100644 --- a/stripe/v2/money_management/_currency_conversion.py +++ b/stripe/v2/money_management/_currency_conversion.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar from typing_extensions import Literal @@ -15,38 +16,16 @@ class CurrencyConversion(StripeObject): ] = "v2.money_management.currency_conversion" class From(StripeObject): - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - amount: Amount """ Amount object. """ - _inner_class_types = {"amount": Amount} class To(StripeObject): - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - amount: Amount """ Amount object. """ - _inner_class_types = {"amount": Amount} created: str """ diff --git a/stripe/v2/money_management/_financial_account.py b/stripe/v2/money_management/_financial_account.py index 70da1c20e..1e7a559aa 100644 --- a/stripe/v2/money_management/_financial_account.py +++ b/stripe/v2/money_management/_financial_account.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, Dict, List, Optional from typing_extensions import Literal @@ -25,58 +26,18 @@ class AccruedFees(StripeObject): """ class Balance(StripeObject): - class Available(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - class InboundPending(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - class OutboundPending(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - available: Dict[str, Available] + available: Dict[str, Amount] """ Balance that can be used for money movement. """ - inbound_pending: Dict[str, InboundPending] + inbound_pending: Dict[str, Amount] """ Balance of inbound funds that will later transition to the `available` balance. """ - outbound_pending: Dict[str, OutboundPending] + outbound_pending: Dict[str, Amount] """ Balance of funds that are being used for a pending outbound money movement. """ - _inner_class_types = { - "available": Available, - "inbound_pending": InboundPending, - "outbound_pending": OutboundPending, - } - _inner_class_dicts = [ - "available", - "inbound_pending", - "outbound_pending", - ] class ManagedBy(StripeObject): type: Literal["multiprocessor_settlement"] @@ -92,26 +53,14 @@ class Other(StripeObject): class Payments(StripeObject): class StartingBalance(StripeObject): - class Available(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - at: str """ When the balance was projected. """ - available: Dict[str, Available] + available: Dict[str, Amount] """ The available balance at the time when the balance was projected. """ - _inner_class_types = {"available": Available} - _inner_class_dicts = ["available"] default_currency: str """ diff --git a/stripe/v2/money_management/_inbound_transfer.py b/stripe/v2/money_management/_inbound_transfer.py index 463523c93..c08bda17a 100644 --- a/stripe/v2/money_management/_inbound_transfer.py +++ b/stripe/v2/money_management/_inbound_transfer.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Literal @@ -15,27 +16,7 @@ class InboundTransfer(StripeObject): "v2.money_management.inbound_transfer" ) - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - class From(StripeObject): - class Debited(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - class PaymentMethod(StripeObject): type: str """ @@ -46,7 +27,7 @@ class PaymentMethod(StripeObject): The destination US bank account identifier. eg "usba_***". """ - debited: Debited + debited: Amount """ The amount in specified currency that was debited from the Payment Method. """ @@ -54,23 +35,10 @@ class PaymentMethod(StripeObject): """ The Payment Method object used to create the InboundTransfer. """ - _inner_class_types = { - "debited": Debited, - "payment_method": PaymentMethod, - } + _inner_class_types = {"payment_method": PaymentMethod} class To(StripeObject): - class Credited(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - credited: Credited + credited: Amount """ The amount by which the FinancialAccount balance is credited. """ @@ -78,7 +46,6 @@ class Credited(StripeObject): """ The FinancialAccount that funds will land in. """ - _inner_class_types = {"credited": Credited} class TransferHistory(StripeObject): class BankDebitFailed(StripeObject): @@ -197,7 +164,6 @@ class BankDebitReturned(StripeObject): A list of history objects, representing changes in the state of the InboundTransfer. """ _inner_class_types = { - "amount": Amount, "from": From, "to": To, "transfer_history": TransferHistory, diff --git a/stripe/v2/money_management/_outbound_payment.py b/stripe/v2/money_management/_outbound_payment.py index cf97c47a1..ed833e5d6 100644 --- a/stripe/v2/money_management/_outbound_payment.py +++ b/stripe/v2/money_management/_outbound_payment.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, Dict, Optional from typing_extensions import Literal @@ -14,16 +15,6 @@ class OutboundPayment(StripeObject): "v2.money_management.outbound_payment" ) - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - class DeliveryOptions(StripeObject): class PaperCheck(StripeObject): memo: Optional[str] @@ -54,17 +45,7 @@ class PaperCheck(StripeObject): _inner_class_types = {"paper_check": PaperCheck} class From(StripeObject): - class Debited(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - debited: Debited + debited: Amount """ The monetary amount debited from the sender, only set on responses. """ @@ -72,7 +53,6 @@ class Debited(StripeObject): """ The FinancialAccount that funds were pulled from. """ - _inner_class_types = {"debited": Debited} class RecipientNotification(StripeObject): setting: Literal["configured", "none"] @@ -146,17 +126,7 @@ class StatusTransitions(StripeObject): """ class To(StripeObject): - class Credited(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - credited: Credited + credited: Amount """ The monetary amount being credited to the destination. """ @@ -168,7 +138,6 @@ class Credited(StripeObject): """ To which account the OutboundPayment is sent. """ - _inner_class_types = {"credited": Credited} class TraceId(StripeObject): status: Literal["pending", "supported", "unsupported"] @@ -349,7 +318,6 @@ class MailingAddress(StripeObject): Information to track this OutboundPayment with the recipient bank. """ _inner_class_types = { - "amount": Amount, "delivery_options": DeliveryOptions, "from": From, "recipient_notification": RecipientNotification, diff --git a/stripe/v2/money_management/_outbound_payment_quote.py b/stripe/v2/money_management/_outbound_payment_quote.py index c6b220005..b486ac4e6 100644 --- a/stripe/v2/money_management/_outbound_payment_quote.py +++ b/stripe/v2/money_management/_outbound_payment_quote.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, Dict, List, Optional from typing_extensions import Literal @@ -14,16 +15,6 @@ class OutboundPaymentQuote(StripeObject): Literal["v2.money_management.outbound_payment_quote"] ] = "v2.money_management.outbound_payment_quote" - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - class DeliveryOptions(StripeObject): bank_account: Optional[Literal["automatic", "local", "wire"]] """ @@ -35,16 +26,6 @@ class DeliveryOptions(StripeObject): """ class EstimatedFee(StripeObject): - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - amount: Amount """ The fee amount for corresponding fee type. @@ -60,20 +41,9 @@ class Amount(StripeObject): """ The fee type. """ - _inner_class_types = {"amount": Amount} class From(StripeObject): - class Debited(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - debited: Debited + debited: Amount """ The monetary amount debited from the sender, only set on responses. """ @@ -81,7 +51,6 @@ class Debited(StripeObject): """ The FinancialAccount that funds were pulled from. """ - _inner_class_types = {"debited": Debited} class FxQuote(StripeObject): class Rates(StripeObject): @@ -114,17 +83,7 @@ class Rates(StripeObject): _inner_class_dicts = ["rates"] class To(StripeObject): - class Credited(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - credited: Credited + credited: Amount """ The monetary amount being credited to the destination. """ @@ -136,7 +95,6 @@ class Credited(StripeObject): """ To which account the OutboundPayment is sent. """ - _inner_class_types = {"credited": Credited} amount: Amount """ @@ -180,7 +138,6 @@ class Credited(StripeObject): Details about the recipient of an OutboundPaymentQuote. """ _inner_class_types = { - "amount": Amount, "delivery_options": DeliveryOptions, "estimated_fees": EstimatedFee, "from": From, diff --git a/stripe/v2/money_management/_outbound_transfer.py b/stripe/v2/money_management/_outbound_transfer.py index 9e2cce6d6..a7b5081ba 100644 --- a/stripe/v2/money_management/_outbound_transfer.py +++ b/stripe/v2/money_management/_outbound_transfer.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, Dict, Optional from typing_extensions import Literal @@ -14,16 +15,6 @@ class OutboundTransfer(StripeObject): "v2.money_management.outbound_transfer" ) - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - class DeliveryOptions(StripeObject): bank_account: Optional[Literal["automatic", "local", "wire"]] """ @@ -31,17 +22,7 @@ class DeliveryOptions(StripeObject): """ class From(StripeObject): - class Debited(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - debited: Debited + debited: Amount """ The monetary amount debited from the sender, only set on responses. """ @@ -49,7 +30,6 @@ class Debited(StripeObject): """ The FinancialAccount that funds were pulled from. """ - _inner_class_types = {"debited": Debited} class StatusDetails(StripeObject): class Failed(StripeObject): @@ -116,17 +96,7 @@ class StatusTransitions(StripeObject): """ class To(StripeObject): - class Credited(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - credited: Credited + credited: Amount """ The monetary amount being credited to the destination. """ @@ -134,7 +104,6 @@ class Credited(StripeObject): """ The payout method which the OutboundTransfer uses to send payout. """ - _inner_class_types = {"credited": Credited} class TraceId(StripeObject): status: Literal["pending", "supported", "unsupported"] @@ -231,7 +200,6 @@ class TraceId(StripeObject): A unique identifier that can be used to track this OutboundTransfer with recipient bank. Banks might call this a "reference number" or something similar. """ _inner_class_types = { - "amount": Amount, "delivery_options": DeliveryOptions, "from": From, "status_details": StatusDetails, diff --git a/stripe/v2/money_management/_received_credit.py b/stripe/v2/money_management/_received_credit.py index e965d05a2..2acf9a9e0 100644 --- a/stripe/v2/money_management/_received_credit.py +++ b/stripe/v2/money_management/_received_credit.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, Optional from typing_extensions import Literal @@ -14,16 +15,6 @@ class ReceivedCredit(StripeObject): "v2.money_management.received_credit" ) - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - class BalanceTransfer(StripeObject): from_account: Optional[str] """ @@ -178,16 +169,6 @@ class Refund(StripeObject): """ _inner_class_types = {"dispute": Dispute, "refund": Refund} - class ExternalAmount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - class StatusDetails(StripeObject): class Failed(StripeObject): reason: Literal[ @@ -264,7 +245,7 @@ class StripeBalancePayment(StripeObject): """ Freeform string set by originator of the ReceivedCredit. """ - external_amount: Optional[ExternalAmount] + external_amount: Optional[Amount] """ The amount and currency of the original/external credit request. """ @@ -315,11 +296,9 @@ class StripeBalancePayment(StripeObject): Open Enum. The type of flow that caused the ReceivedCredit. """ _inner_class_types = { - "amount": Amount, "balance_transfer": BalanceTransfer, "bank_transfer": BankTransfer, "card_spend": CardSpend, - "external_amount": ExternalAmount, "status_details": StatusDetails, "status_transitions": StatusTransitions, "stripe_balance_payment": StripeBalancePayment, diff --git a/stripe/v2/money_management/_received_debit.py b/stripe/v2/money_management/_received_debit.py index ea51de36a..f7d94e954 100644 --- a/stripe/v2/money_management/_received_debit.py +++ b/stripe/v2/money_management/_received_debit.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, List, Optional from typing_extensions import Literal @@ -14,16 +15,6 @@ class ReceivedDebit(StripeObject): "v2.money_management.received_debit" ) - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - class BalanceTransfer(StripeObject): topup: Optional[str] """ @@ -73,16 +64,6 @@ class UsBankAccount(StripeObject): class CardSpend(StripeObject): class Authorization(StripeObject): - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - amount: Amount """ Amount associated with this issuing authorization. @@ -91,19 +72,8 @@ class Amount(StripeObject): """ The reference to the v1 issuing authorization ID. """ - _inner_class_types = {"amount": Amount} class CardTransaction(StripeObject): - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - amount: Amount """ Amount associated with this issuing transaction. @@ -112,7 +82,6 @@ class Amount(StripeObject): """ The reference to the v1 issuing transaction ID. """ - _inner_class_types = {"amount": Amount} authorization: Optional[Authorization] """ @@ -131,16 +100,6 @@ class Amount(StripeObject): "card_transactions": CardTransaction, } - class ExternalAmount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - class StatusDetails(StripeObject): class Failed(StripeObject): reason: Literal[ @@ -211,7 +170,7 @@ class StripeBalancePayment(StripeObject): """ Freeform string sent by the originator of the ReceivedDebit. """ - external_amount: Optional[ExternalAmount] + external_amount: Optional[Amount] """ The amount and currency of the original/external debit request. """ @@ -262,11 +221,9 @@ class StripeBalancePayment(StripeObject): Open Enum. The type of the ReceivedDebit. """ _inner_class_types = { - "amount": Amount, "balance_transfer": BalanceTransfer, "bank_transfer": BankTransfer, "card_spend": CardSpend, - "external_amount": ExternalAmount, "status_details": StatusDetails, "status_transitions": StatusTransitions, "stripe_balance_payment": StripeBalancePayment, diff --git a/stripe/v2/money_management/_transaction.py b/stripe/v2/money_management/_transaction.py index 1cba9de28..94b09a1a2 100644 --- a/stripe/v2/money_management/_transaction.py +++ b/stripe/v2/money_management/_transaction.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, Optional from typing_extensions import Literal @@ -14,64 +15,19 @@ class Transaction(StripeObject): "v2.money_management.transaction" ) - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - class BalanceImpact(StripeObject): - class Available(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - class InboundPending(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - class OutboundPending(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - available: Available + available: Amount """ Impact to the available balance. """ - inbound_pending: InboundPending + inbound_pending: Amount """ Impact to the inbound_pending balance. """ - outbound_pending: OutboundPending + outbound_pending: Amount """ Impact to the outbound_pending balance. """ - _inner_class_types = { - "available": Available, - "inbound_pending": InboundPending, - "outbound_pending": OutboundPending, - } class Flow(StripeObject): adjustment: Optional[str] @@ -287,7 +243,6 @@ class StatusTransitions(StripeObject): Timestamps for when the Transaction transitioned to a particular status. """ _inner_class_types = { - "amount": Amount, "balance_impact": BalanceImpact, "flow": Flow, "status_transitions": StatusTransitions, diff --git a/stripe/v2/money_management/_transaction_entry.py b/stripe/v2/money_management/_transaction_entry.py index 4468f2c5a..b198c713d 100644 --- a/stripe/v2/money_management/_transaction_entry.py +++ b/stripe/v2/money_management/_transaction_entry.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, Optional from typing_extensions import Literal @@ -15,53 +16,18 @@ class TransactionEntry(StripeObject): ) class BalanceImpact(StripeObject): - class Available(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - class InboundPending(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - class OutboundPending(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - available: Available + available: Amount """ Impact to the available balance. """ - inbound_pending: InboundPending + inbound_pending: Amount """ Impact to the inbound_pending balance. """ - outbound_pending: OutboundPending + outbound_pending: Amount """ Impact to the outbound_pending balance. """ - _inner_class_types = { - "available": Available, - "inbound_pending": InboundPending, - "outbound_pending": OutboundPending, - } class TransactionDetails(StripeObject): class Flow(StripeObject): diff --git a/stripe/v2/payments/_off_session_payment.py b/stripe/v2/payments/_off_session_payment.py index cbdfad51f..549b72459 100644 --- a/stripe/v2/payments/_off_session_payment.py +++ b/stripe/v2/payments/_off_session_payment.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, Dict, Optional from typing_extensions import Literal @@ -19,26 +20,6 @@ class OffSessionPayment(StripeObject): "v2.payments.off_session_payment" ) - class AmountCapturable(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - - class AmountRequested(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - class Capture(StripeObject): capture_before: Optional[str] """ @@ -86,11 +67,11 @@ class TransferData(StripeObject): where funds from the payment are transferred to after payment success. """ - amount_capturable: Optional[AmountCapturable] + amount_capturable: Optional[Amount] """ The amount available to be captured. """ - amount_requested: AmountRequested + amount_requested: Amount """ The “presentment amount” to be collected from the customer. """ @@ -205,8 +186,6 @@ class TransferData(StripeObject): The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.stripe.com/payments/connected-accounts). """ _inner_class_types = { - "amount_capturable": AmountCapturable, - "amount_requested": AmountRequested, "capture": Capture, "payments_orchestration": PaymentsOrchestration, "retry_details": RetryDetails, diff --git a/stripe/v2/payments/_settlement_allocation_intent.py b/stripe/v2/payments/_settlement_allocation_intent.py index 1f3a3c171..c31d4c76e 100644 --- a/stripe/v2/payments/_settlement_allocation_intent.py +++ b/stripe/v2/payments/_settlement_allocation_intent.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, Dict, List, Optional from typing_extensions import Literal @@ -14,16 +15,6 @@ class SettlementAllocationIntent(StripeObject): Literal["v2.payments.settlement_allocation_intent"] ] = "v2.payments.settlement_allocation_intent" - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - class StatusDetails(StripeObject): class Errored(StripeObject): doc_url: Optional[str] @@ -95,4 +86,4 @@ class Errored(StripeObject): """ Status details for a SettlementAllocationIntent in `errored` state. """ - _inner_class_types = {"amount": Amount, "status_details": StatusDetails} + _inner_class_types = {"status_details": StatusDetails} diff --git a/stripe/v2/payments/_settlement_allocation_intent_split.py b/stripe/v2/payments/_settlement_allocation_intent_split.py index 576c4b859..53e852fff 100644 --- a/stripe/v2/payments/_settlement_allocation_intent_split.py +++ b/stripe/v2/payments/_settlement_allocation_intent_split.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject +from stripe.v2._amount import Amount from typing import ClassVar, Optional from typing_extensions import Literal @@ -14,16 +15,6 @@ class SettlementAllocationIntentSplit(StripeObject): Literal["v2.payments.settlement_allocation_intent_split"] ] = "v2.payments.settlement_allocation_intent_split" - class Amount(StripeObject): - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - value: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). - """ - class Flow(StripeObject): outbound_payment: Optional[str] """ @@ -84,4 +75,4 @@ class Flow(StripeObject): """ The type of the SettlementAllocationIntentSplit. """ - _inner_class_types = {"amount": Amount, "flow": Flow} + _inner_class_types = {"flow": Flow} diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 59a9de500..a83f43639 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -44048,7 +44048,7 @@ def test_v2_billing_intent_post_service( "maximum_applications": { "type": "indefinite" }, - "percent_off": "percent_off", + "percent_off": "991934883.3333334", }, }, "spend_modifier_rule": { @@ -44182,7 +44182,7 @@ def test_v2_billing_intent_post_service( path="/v2/billing/intents", query_string="", api_base="https://api.stripe.com", - post_data='{"actions":[{"type":"apply","apply":{"effective_at":{"type":"current_billing_period_end"},"type":"invoice_discount_rule","invoice_discount_rule":{"applies_to":"cadence","type":"percent_off","percent_off":{"maximum_applications":{"type":"indefinite"},"percent_off":"percent_off"}},"spend_modifier_rule":{"applies_to":"cadence","type":"max_billing_period_spend","max_billing_period_spend":{"amount":{"type":"custom_pricing_unit","custom_pricing_unit":{"value":"value"}},"custom_pricing_unit_overage_rate":{"id":"obj_123"}}}},"deactivate":{"cancellation_details":{"comment":"comment","feedback":"other"},"collect_at":"next_billing_date","effective_at":{"timestamp":"1970-01-01T15:18:46.294Z","type":"on_reserve"},"pricing_plan_subscription_details":{"overrides":{"partial_period_behaviors":[{"type":"license_fee","license_fee":{"credit_proration_behavior":"prorated"}}]},"pricing_plan_subscription":"pricing_plan_subscription"},"type":"pricing_plan_subscription_details"},"modify":{"collect_at":"next_billing_date","effective_at":{"timestamp":"1970-01-01T15:18:46.294Z","type":"current_billing_period_start"},"pricing_plan_subscription_details":{"component_configurations":[{"quantity":1285004149,"lookup_key":"lookup_key","pricing_plan_component":"pricing_plan_component"}],"new_pricing_plan":"new_pricing_plan","new_pricing_plan_version":"new_pricing_plan_version","overrides":{"partial_period_behaviors":[{"type":"license_fee","license_fee":{"credit_proration_behavior":"prorated","debit_proration_behavior":"none"}}]},"pricing_plan_subscription":"pricing_plan_subscription"},"type":"pricing_plan_subscription_details"},"remove":{"effective_at":{"type":"current_billing_period_end"},"type":"invoice_discount_rule","invoice_discount_rule":"invoice_discount_rule","spend_modifier_rule":"spend_modifier_rule"},"subscribe":{"collect_at":"next_billing_date","effective_at":{"timestamp":"1970-01-01T15:18:46.294Z","type":"current_billing_period_start"},"type":"pricing_plan_subscription_details","pricing_plan_subscription_details":{"component_configurations":[{"quantity":1285004149,"lookup_key":"lookup_key","pricing_plan_component":"pricing_plan_component"}],"metadata":{"key":"metadata"},"overrides":{"partial_period_behaviors":[{"type":"license_fee","license_fee":{"debit_proration_behavior":"none"}}]},"pricing_plan":"pricing_plan","pricing_plan_version":"pricing_plan_version"},"v1_subscription_details":{"description":"description","items":[{"metadata":{"key":"metadata"},"price":"price","quantity":1285004149}],"metadata":{"key":"metadata"}}}}],"currency":"usd"}', + post_data='{"actions":[{"type":"apply","apply":{"effective_at":{"type":"current_billing_period_end"},"type":"invoice_discount_rule","invoice_discount_rule":{"applies_to":"cadence","type":"percent_off","percent_off":{"maximum_applications":{"type":"indefinite"},"percent_off":"991934883.3333334"}},"spend_modifier_rule":{"applies_to":"cadence","type":"max_billing_period_spend","max_billing_period_spend":{"amount":{"type":"custom_pricing_unit","custom_pricing_unit":{"value":"value"}},"custom_pricing_unit_overage_rate":{"id":"obj_123"}}}},"deactivate":{"cancellation_details":{"comment":"comment","feedback":"other"},"collect_at":"next_billing_date","effective_at":{"timestamp":"1970-01-01T15:18:46.294Z","type":"on_reserve"},"pricing_plan_subscription_details":{"overrides":{"partial_period_behaviors":[{"type":"license_fee","license_fee":{"credit_proration_behavior":"prorated"}}]},"pricing_plan_subscription":"pricing_plan_subscription"},"type":"pricing_plan_subscription_details"},"modify":{"collect_at":"next_billing_date","effective_at":{"timestamp":"1970-01-01T15:18:46.294Z","type":"current_billing_period_start"},"pricing_plan_subscription_details":{"component_configurations":[{"quantity":1285004149,"lookup_key":"lookup_key","pricing_plan_component":"pricing_plan_component"}],"new_pricing_plan":"new_pricing_plan","new_pricing_plan_version":"new_pricing_plan_version","overrides":{"partial_period_behaviors":[{"type":"license_fee","license_fee":{"credit_proration_behavior":"prorated","debit_proration_behavior":"none"}}]},"pricing_plan_subscription":"pricing_plan_subscription"},"type":"pricing_plan_subscription_details"},"remove":{"effective_at":{"type":"current_billing_period_end"},"type":"invoice_discount_rule","invoice_discount_rule":"invoice_discount_rule","spend_modifier_rule":"spend_modifier_rule"},"subscribe":{"collect_at":"next_billing_date","effective_at":{"timestamp":"1970-01-01T15:18:46.294Z","type":"current_billing_period_start"},"type":"pricing_plan_subscription_details","pricing_plan_subscription_details":{"component_configurations":[{"quantity":1285004149,"lookup_key":"lookup_key","pricing_plan_component":"pricing_plan_component"}],"metadata":{"key":"metadata"},"overrides":{"partial_period_behaviors":[{"type":"license_fee","license_fee":{"debit_proration_behavior":"none"}}]},"pricing_plan":"pricing_plan","pricing_plan_version":"pricing_plan_version"},"v1_subscription_details":{"description":"description","items":[{"metadata":{"key":"metadata"},"price":"price","quantity":1285004149}],"metadata":{"key":"metadata"}}}}],"currency":"usd"}', is_json=True, ) @@ -46967,11 +46967,11 @@ def test_v2_money_management_currency_conversion_post_service( { "financial_account": "financial_account", "from": { - "amount": {"value": 111972721, "currency": "usd"}, + "amount": {"currency": "USD", "value": 96}, "currency": "usd", }, "to": { - "amount": {"value": 111972721, "currency": "usd"}, + "amount": {"currency": "USD", "value": 96}, "currency": "usd", }, } @@ -46981,7 +46981,7 @@ def test_v2_money_management_currency_conversion_post_service( path="/v2/money_management/currency_conversions", query_string="", api_base="https://api.stripe.com", - post_data='{"financial_account":"financial_account","from":{"amount":{"value":111972721,"currency":"usd"},"currency":"usd"},"to":{"amount":{"value":111972721,"currency":"usd"},"currency":"usd"}}', + post_data='{"financial_account":"financial_account","from":{"amount":{"currency":"USD","value":96},"currency":"usd"},"to":{"amount":{"currency":"USD","value":96},"currency":"usd"}}', is_json=True, ) @@ -47216,7 +47216,7 @@ def test_v2_money_management_inbound_transfer_post_service( client.v2.money_management.inbound_transfers.create( { - "amount": {"value": 111972721, "currency": "usd"}, + "amount": {"currency": "USD", "value": 96}, "from": { "currency": "usd", "payment_method": "payment_method", @@ -47232,7 +47232,7 @@ def test_v2_money_management_inbound_transfer_post_service( path="/v2/money_management/inbound_transfers", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"value":111972721,"currency":"usd"},"from":{"currency":"usd","payment_method":"payment_method"},"to":{"currency":"usd","financial_account":"financial_account"}}', + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","payment_method":"payment_method"},"to":{"currency":"usd","financial_account":"financial_account"}}', is_json=True, ) @@ -47290,7 +47290,7 @@ def test_v2_money_management_outbound_payment_post_service( client.v2.money_management.outbound_payments.create( { - "amount": {"value": 111972721, "currency": "usd"}, + "amount": {"currency": "USD", "value": 96}, "from": { "currency": "usd", "financial_account": "financial_account", @@ -47307,7 +47307,7 @@ def test_v2_money_management_outbound_payment_post_service( path="/v2/money_management/outbound_payments", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"value":111972721,"currency":"usd"},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","recipient":"recipient"}}', + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","recipient":"recipient"}}', is_json=True, ) @@ -47367,7 +47367,7 @@ def test_v2_money_management_outbound_payment_quote_post_service( client.v2.money_management.outbound_payment_quotes.create( { - "amount": {"value": 111972721, "currency": "usd"}, + "amount": {"currency": "USD", "value": 96}, "from": { "currency": "usd", "financial_account": "financial_account", @@ -47384,7 +47384,7 @@ def test_v2_money_management_outbound_payment_quote_post_service( path="/v2/money_management/outbound_payment_quotes", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"value":111972721,"currency":"usd"},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","recipient":"recipient"}}', + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","recipient":"recipient"}}', is_json=True, ) @@ -47548,7 +47548,7 @@ def test_v2_money_management_outbound_transfer_post_service( client.v2.money_management.outbound_transfers.create( { - "amount": {"value": 111972721, "currency": "usd"}, + "amount": {"currency": "USD", "value": 96}, "from": { "currency": "usd", "financial_account": "financial_account", @@ -47561,7 +47561,7 @@ def test_v2_money_management_outbound_transfer_post_service( path="/v2/money_management/outbound_transfers", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"value":111972721,"currency":"usd"},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method"}}', + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method"}}', is_json=True, ) @@ -47975,7 +47975,7 @@ def test_v2_payments_off_session_payment_post_service( client.v2.payments.off_session_payments.create( { - "amount": {"value": 111972721, "currency": "usd"}, + "amount": {"currency": "USD", "value": 96}, "cadence": "unscheduled", "customer": "customer", "metadata": {"key": "metadata"}, @@ -47986,7 +47986,7 @@ def test_v2_payments_off_session_payment_post_service( path="/v2/payments/off_session_payments", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"value":111972721,"currency":"usd"},"cadence":"unscheduled","customer":"customer","metadata":{"key":"metadata"}}', + post_data='{"amount":{"currency":"USD","value":96},"cadence":"unscheduled","customer":"customer","metadata":{"key":"metadata"}}', is_json=True, ) @@ -48091,7 +48091,7 @@ def test_v2_payments_settlement_allocation_intent_post_service( client.v2.payments.settlement_allocation_intents.create( { - "amount": {"value": 111972721, "currency": "usd"}, + "amount": {"currency": "USD", "value": 96}, "expected_settlement_date": "1970-01-22T14:14:13.629Z", "financial_account": "financial_account", "reference": "reference", @@ -48102,7 +48102,7 @@ def test_v2_payments_settlement_allocation_intent_post_service( path="/v2/payments/settlement_allocation_intents", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"value":111972721,"currency":"usd"},"expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","reference":"reference"}', + post_data='{"amount":{"currency":"USD","value":96},"expected_settlement_date":"1970-01-22T14:14:13.629Z","financial_account":"financial_account","reference":"reference"}', is_json=True, ) @@ -48230,7 +48230,7 @@ def test_v2_payments_settlement_allocation_intents_split_post_service( "settlement_allocation_intent_id_123", { "account": "account", - "amount": {"value": 111972721, "currency": "usd"}, + "amount": {"currency": "USD", "value": 96}, "type": "credit", }, ) @@ -48239,7 +48239,7 @@ def test_v2_payments_settlement_allocation_intents_split_post_service( path="/v2/payments/settlement_allocation_intents/settlement_allocation_intent_id_123/splits", query_string="", api_base="https://api.stripe.com", - post_data='{"account":"account","amount":{"value":111972721,"currency":"usd"},"type":"credit"}', + post_data='{"account":"account","amount":{"currency":"USD","value":96},"type":"credit"}', is_json=True, ) @@ -48410,7 +48410,7 @@ def test_v2_tax_manual_rule_post_service( "description": "description", "display_name": "display_name", "jurisdiction": "jurisdiction", - "percentage": "percentage", + "percentage": "614555204", "state": "state", }, ], @@ -48424,7 +48424,7 @@ def test_v2_tax_manual_rule_post_service( path="/v2/tax/manual_rules", query_string="", api_base="https://api.stripe.com", - post_data='{"scheduled_tax_rates":[{"rates":[{"country":"country","description":"description","display_name":"display_name","jurisdiction":"jurisdiction","percentage":"percentage","state":"state"}],"starts_at":"1970-01-25T15:13:01.215Z"}]}', + post_data='{"scheduled_tax_rates":[{"rates":[{"country":"country","description":"description","display_name":"display_name","jurisdiction":"jurisdiction","percentage":"614555204","state":"state"}],"starts_at":"1970-01-25T15:13:01.215Z"}]}', is_json=True, ) @@ -48471,7 +48471,7 @@ def test_v2_tax_manual_rule_post_2_service( "description": "description", "display_name": "display_name", "jurisdiction": "jurisdiction", - "percentage": "percentage", + "percentage": "614555204", "state": "state", }, ], @@ -48485,7 +48485,7 @@ def test_v2_tax_manual_rule_post_2_service( path="/v2/tax/manual_rules/id_123", query_string="", api_base="https://api.stripe.com", - post_data='{"scheduled_tax_rates":[{"rates":[{"country":"country","description":"description","display_name":"display_name","jurisdiction":"jurisdiction","percentage":"percentage","state":"state"}],"starts_at":"1970-01-25T15:13:01.215Z"}]}', + post_data='{"scheduled_tax_rates":[{"rates":[{"country":"country","description":"description","display_name":"display_name","jurisdiction":"jurisdiction","percentage":"614555204","state":"state"}],"starts_at":"1970-01-25T15:13:01.215Z"}]}', is_json=True, ) @@ -48525,17 +48525,14 @@ def test_v2_test_helpers_financial_address_post_service( client.v2.test_helpers.financial_addresses.credit( "id_123", - { - "amount": {"value": 111972721, "currency": "usd"}, - "network": "ach", - }, + {"amount": {"currency": "USD", "value": 96}, "network": "ach"}, ) http_client_mock.assert_requested( "post", path="/v2/test_helpers/financial_addresses/id_123/credit", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"value":111972721,"currency":"usd"},"network":"ach"}', + post_data='{"amount":{"currency":"USD","value":96},"network":"ach"}', is_json=True, ) @@ -48815,7 +48812,7 @@ def test_insufficient_funds_error_service( try: client.v2.money_management.outbound_payments.create( { - "amount": {"value": 111972721, "currency": "usd"}, + "amount": {"currency": "USD", "value": 96}, "from": { "currency": "usd", "financial_account": "financial_account", @@ -48830,7 +48827,7 @@ def test_insufficient_funds_error_service( path="/v2/money_management/outbound_payments", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"value":111972721,"currency":"usd"},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"recipient":"recipient"}}', + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"recipient":"recipient"}}', is_json=True, ) @@ -49019,7 +49016,7 @@ def test_recipient_not_notifiable_error_service( try: client.v2.money_management.outbound_payments.create( { - "amount": {"value": 111972721, "currency": "usd"}, + "amount": {"currency": "USD", "value": 96}, "from": { "currency": "usd", "financial_account": "financial_account", @@ -49034,7 +49031,7 @@ def test_recipient_not_notifiable_error_service( path="/v2/money_management/outbound_payments", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"value":111972721,"currency":"usd"},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"recipient":"recipient"}}', + post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"recipient":"recipient"}}', is_json=True, )