From 61d17bdf92d8b0e9d875e573f5d7d17d14a3988b Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 16:16:41 -0400 Subject: [PATCH 01/13] Update generated code (#1332) * Update generated code for v1040 * Update generated code for v1044 * Update generated code for v1045 * Update generated code for v1046 * Update generated code for v1047 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_account.py | 2 +- stripe/_account_session.py | 16 ++++++++ stripe/_account_session_service.py | 8 ++++ stripe/_invoice.py | 45 ++++++++++++----------- stripe/_invoice_item.py | 8 ++-- stripe/_invoice_item_service.py | 8 ++-- stripe/_invoice_line_item.py | 4 +- stripe/_invoice_line_item_service.py | 4 +- stripe/_invoice_service.py | 28 +++++++------- stripe/_invoice_upcoming_lines_service.py | 16 ++++---- stripe/_payment_intent.py | 1 + stripe/_setup_attempt.py | 1 + stripe/_setup_intent.py | 1 + stripe/_subscription.py | 12 +++--- stripe/_subscription_item.py | 4 +- stripe/_subscription_item_service.py | 4 +- stripe/_subscription_schedule.py | 8 ++-- stripe/_subscription_schedule_service.py | 8 ++-- stripe/_subscription_service.py | 12 +++--- stripe/checkout/_session.py | 4 ++ 21 files changed, 114 insertions(+), 82 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e0801e4ff..20970a9f9 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1039 \ No newline at end of file +v1047 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 4e47dcbf8..e58390170 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -268,7 +268,7 @@ class Capabilities(StripeObject): """ mobilepay_payments: Optional[Literal["active", "inactive", "pending"]] """ - The status of the MobilepPay capability of the account, or whether the account can directly process MobilePay charges. + The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. """ oxxo_payments: Optional[Literal["active", "inactive", "pending"]] """ diff --git a/stripe/_account_session.py b/stripe/_account_session.py index dee4292d1..c4ae483f8 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -55,6 +55,10 @@ class Features(StripeObject): """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ + external_account_collection: bool + """ + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ instant_payouts: bool """ Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. @@ -154,6 +158,10 @@ class Features(StripeObject): """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ + external_account_collection: bool + """ + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ instant_payouts: bool """ Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. @@ -319,6 +327,10 @@ class CreateParamsComponentsBalancesFeatures(TypedDict): """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ + external_account_collection: NotRequired[bool] + """ + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ instant_payouts: NotRequired[bool] """ Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. @@ -438,6 +450,10 @@ class CreateParamsComponentsPayoutsFeatures(TypedDict): """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ + external_account_collection: NotRequired[bool] + """ + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ instant_payouts: NotRequired[bool] """ Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. diff --git a/stripe/_account_session_service.py b/stripe/_account_session_service.py index f30dfb65f..39b7f6407 100644 --- a/stripe/_account_session_service.py +++ b/stripe/_account_session_service.py @@ -131,6 +131,10 @@ class CreateParamsComponentsBalancesFeatures(TypedDict): """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ + external_account_collection: NotRequired[bool] + """ + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ instant_payouts: NotRequired[bool] """ Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. @@ -250,6 +254,10 @@ class CreateParamsComponentsPayoutsFeatures(TypedDict): """ Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. """ + external_account_collection: NotRequired[bool] + """ + Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for custom accounts (or accounts where the platform is compliance owner). Otherwise, bank account collection is determined by compliance requirements. + """ instant_payouts: NotRequired[bool] """ Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 7f450660b..f6cbbbfb6 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -476,6 +476,7 @@ class LastFinalizationError(StripeObject): "terminal_location_country_unsupported", "terminal_reader_busy", "terminal_reader_hardware_fault", + "terminal_reader_invalid_location_for_payment", "terminal_reader_offline", "terminal_reader_timeout", "testmode_charges_only", @@ -1922,13 +1923,13 @@ class CreatePreviewParamsInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "Invoice.CreatePreviewParamsInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -2156,13 +2157,13 @@ class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "Invoice.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -2488,13 +2489,13 @@ class CreatePreviewParamsSubscriptionDetailsItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired[ "Invoice.CreatePreviewParamsSubscriptionDetailsItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -3699,13 +3700,13 @@ class UpcomingLinesParamsInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "Invoice.UpcomingLinesParamsInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -3933,13 +3934,13 @@ class UpcomingLinesParamsScheduleDetailsPhaseAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "Invoice.UpcomingLinesParamsScheduleDetailsPhaseAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -4265,13 +4266,13 @@ class UpcomingLinesParamsSubscriptionDetailsItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired[ "Invoice.UpcomingLinesParamsSubscriptionDetailsItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -4379,13 +4380,13 @@ class UpcomingLinesParamsSubscriptionItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired[ "Invoice.UpcomingLinesParamsSubscriptionItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -4831,11 +4832,11 @@ class UpcomingParamsInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired["Invoice.UpcomingParamsInvoiceItemPriceData"] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -5059,13 +5060,13 @@ class UpcomingParamsScheduleDetailsPhaseAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "Invoice.UpcomingParamsScheduleDetailsPhaseAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -5381,13 +5382,13 @@ class UpcomingParamsSubscriptionDetailsItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired[ "Invoice.UpcomingParamsSubscriptionDetailsItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -5493,13 +5494,13 @@ class UpcomingParamsSubscriptionItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired[ "Invoice.UpcomingParamsSubscriptionItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ diff --git a/stripe/_invoice_item.py b/stripe/_invoice_item.py index 9fa29f594..968f94dd0 100644 --- a/stripe/_invoice_item.py +++ b/stripe/_invoice_item.py @@ -106,11 +106,11 @@ class CreateParams(RequestOptions): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired["InvoiceItem.CreateParamsPriceData"] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -279,11 +279,11 @@ class ModifyParams(RequestOptions): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired["InvoiceItem.ModifyParamsPriceData"] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ diff --git a/stripe/_invoice_item_service.py b/stripe/_invoice_item_service.py index f1f2cf8d0..aa97cd0c7 100644 --- a/stripe/_invoice_item_service.py +++ b/stripe/_invoice_item_service.py @@ -55,11 +55,11 @@ class CreateParams(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired["InvoiceItemService.CreateParamsPriceData"] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -234,11 +234,11 @@ class UpdateParams(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired["InvoiceItemService.UpdateParamsPriceData"] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py index 837e0b337..4ebc11c7f 100644 --- a/stripe/_invoice_line_item.py +++ b/stripe/_invoice_line_item.py @@ -137,11 +137,11 @@ class ModifyParams(RequestOptions): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired["InvoiceLineItem.ModifyParamsPriceData"] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ diff --git a/stripe/_invoice_line_item_service.py b/stripe/_invoice_line_item_service.py index 4cacab135..21be17673 100644 --- a/stripe/_invoice_line_item_service.py +++ b/stripe/_invoice_line_item_service.py @@ -61,11 +61,11 @@ class UpdateParams(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired["InvoiceLineItemService.UpdateParamsPriceData"] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 52ce5b187..82a527768 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -964,13 +964,13 @@ class CreatePreviewParamsInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "InvoiceService.CreatePreviewParamsInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -1200,13 +1200,13 @@ class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -1532,13 +1532,13 @@ class CreatePreviewParamsSubscriptionDetailsItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired[ "InvoiceService.CreatePreviewParamsSubscriptionDetailsItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -2154,13 +2154,13 @@ class UpcomingParamsInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "InvoiceService.UpcomingParamsInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -2388,13 +2388,13 @@ class UpcomingParamsScheduleDetailsPhaseAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "InvoiceService.UpcomingParamsScheduleDetailsPhaseAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -2708,13 +2708,13 @@ class UpcomingParamsSubscriptionDetailsItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired[ "InvoiceService.UpcomingParamsSubscriptionDetailsItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -2818,13 +2818,13 @@ class UpcomingParamsSubscriptionItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired[ "InvoiceService.UpcomingParamsSubscriptionItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ diff --git a/stripe/_invoice_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index ca4b3665d..0087c058e 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -410,13 +410,13 @@ class ListParamsInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "InvoiceUpcomingLinesService.ListParamsInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -646,13 +646,13 @@ class ListParamsScheduleDetailsPhaseAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "InvoiceUpcomingLinesService.ListParamsScheduleDetailsPhaseAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -968,13 +968,13 @@ class ListParamsSubscriptionDetailsItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired[ "InvoiceUpcomingLinesService.ListParamsSubscriptionDetailsItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -1078,13 +1078,13 @@ class ListParamsSubscriptionItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired[ "InvoiceUpcomingLinesService.ListParamsSubscriptionItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 9fea82170..b64e38c66 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -257,6 +257,7 @@ class LastPaymentError(StripeObject): "terminal_location_country_unsupported", "terminal_reader_busy", "terminal_reader_hardware_fault", + "terminal_reader_invalid_location_for_payment", "terminal_reader_offline", "terminal_reader_timeout", "testmode_charges_only", diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index 027b1280d..7aedd8bb3 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -589,6 +589,7 @@ class SetupError(StripeObject): "terminal_location_country_unsupported", "terminal_reader_busy", "terminal_reader_hardware_fault", + "terminal_reader_invalid_location_for_payment", "terminal_reader_offline", "terminal_reader_timeout", "testmode_charges_only", diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 72d19b7d8..55eda45b1 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -242,6 +242,7 @@ class LastSetupError(StripeObject): "terminal_location_country_unsupported", "terminal_reader_busy", "terminal_reader_hardware_fault", + "terminal_reader_invalid_location_for_payment", "terminal_reader_offline", "terminal_reader_timeout", "testmode_charges_only", diff --git a/stripe/_subscription.py b/stripe/_subscription.py index dd79eb2f0..0f51f8a44 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -643,13 +643,13 @@ class CreateParamsAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "Subscription.CreateParamsAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -1444,13 +1444,13 @@ class ModifyParamsAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "Subscription.ModifyParamsAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -1612,11 +1612,11 @@ class ModifyParamsItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired["Subscription.ModifyParamsItemPriceData"] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ diff --git a/stripe/_subscription_item.py b/stripe/_subscription_item.py index 9fbf79626..4614d3a90 100644 --- a/stripe/_subscription_item.py +++ b/stripe/_subscription_item.py @@ -302,11 +302,11 @@ class ModifyParams(RequestOptions): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired["SubscriptionItem.ModifyParamsPriceData"] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ proration_behavior: NotRequired[ Literal["always_invoice", "create_prorations", "none"] diff --git a/stripe/_subscription_item_service.py b/stripe/_subscription_item_service.py index 2e591da78..e8f520ec7 100644 --- a/stripe/_subscription_item_service.py +++ b/stripe/_subscription_item_service.py @@ -252,13 +252,13 @@ class UpdateParams(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired[ "SubscriptionItemService.UpdateParamsPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ proration_behavior: NotRequired[ Literal["always_invoice", "create_prorations", "none"] diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index 11738c8f3..d688436d7 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -717,13 +717,13 @@ class CreateParamsPhaseAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -1347,13 +1347,13 @@ class ModifyParamsPhaseAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ diff --git a/stripe/_subscription_schedule_service.py b/stripe/_subscription_schedule_service.py index ca63af91f..48bd47bfb 100644 --- a/stripe/_subscription_schedule_service.py +++ b/stripe/_subscription_schedule_service.py @@ -301,13 +301,13 @@ class CreateParamsPhaseAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "SubscriptionScheduleService.CreateParamsPhaseAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -949,13 +949,13 @@ class UpdateParamsPhaseAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "SubscriptionScheduleService.UpdateParamsPhaseAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index 0fbe94712..4e8b279eb 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -236,13 +236,13 @@ class CreateParamsAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "SubscriptionService.CreateParamsAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -1093,13 +1093,13 @@ class UpdateParamsAddInvoiceItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. + The ID of the price object. One of `price` or `price_data` is required. """ price_data: NotRequired[ "SubscriptionService.UpdateParamsAddInvoiceItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ @@ -1263,13 +1263,13 @@ class UpdateParamsItem(TypedDict): """ price: NotRequired[str] """ - The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. """ price_data: NotRequired[ "SubscriptionService.UpdateParamsItemPriceData" ] """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. """ quantity: NotRequired[int] """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 8d504d963..8535824d1 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -1064,6 +1064,10 @@ class SavedPaymentMethodOptions(StripeObject): """ Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout. """ + payment_method_remove: Optional[Literal["disabled", "enabled"]] + """ + Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. + """ payment_method_save: Optional[Literal["disabled", "enabled"]] """ Enable customers to choose if they wish to save their payment method for future use. Disabled by default. From c5e2eab211ff8cb39a93d08da45706bc42f8123e Mon Sep 17 00:00:00 2001 From: Prathmesh Ranaut Date: Thu, 23 May 2024 16:23:14 -0400 Subject: [PATCH 02/13] Bump version to 9.8.0 --- CHANGELOG.md | 6 ++++++ VERSION | 2 +- stripe/_version.py | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f02a0b82..a5009538d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 9.8.0 - 2024-05-23 +* [#1332](https://github.com/stripe/stripe-python/pull/1332) Update generated code + * Add support for `external_account_collection` on resource classes `stripe.AccountSession.Components.Balances.Features` and `stripe.AccountSession.Components.Payouts.Features` and parameter classes `stripe.AccountSession.CreateParamsComponentsBalancesFeatures` and `stripe.AccountSession.CreateParamsComponentsPayoutsFeatures` + * Add support for `payment_method_remove` on resource class `stripe.checkout.Session.SavedPaymentMethodOptions` + * Add support for `terminal_reader_invalid_location_for_payment` on enums `stripe.Invoice.LastFinalizationError.code`, `stripe.PaymentIntent.LastPaymentError.code`, `stripe.SetupAttempt.SetupError.code`, and `stripe.SetupIntent.LastSetupError.code` + ## 9.7.0 - 2024-05-16 * [#1328](https://github.com/stripe/stripe-python/pull/1328) Update generated code * Add support for `fee_source` on resource `stripe.ApplicationFee` diff --git a/VERSION b/VERSION index a458a24cc..834eb3fa8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.7.0 +9.8.0 diff --git a/stripe/_version.py b/stripe/_version.py index 0cb2df74f..7334c2bfe 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "9.7.0" +VERSION = "9.8.0" From e559fded2793ae9b25749c6824378018e785a762 Mon Sep 17 00:00:00 2001 From: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> Date: Fri, 24 May 2024 10:42:02 -0700 Subject: [PATCH 03/13] Add method to list invoice line items (#1335) --- stripe/_invoice.py | 56 +++++++++++++++++++++++++++++ tests/api_resources/test_invoice.py | 5 +++ 2 files changed, 61 insertions(+) diff --git a/stripe/_invoice.py b/stripe/_invoice.py index f6cbbbfb6..5b628c477 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -5,6 +5,7 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource +from stripe._nested_resource_class_methods import nested_resource_class_methods from stripe._request_options import RequestOptions from stripe._search_result_object import SearchResultObject from stripe._searchable_api_resource import SearchableAPIResource @@ -51,6 +52,7 @@ from stripe.test_helpers._test_clock import TestClock +@nested_resource_class_methods("line") class Invoice( CreateableAPIResource["Invoice"], DeletableAPIResource["Invoice"], @@ -2581,6 +2583,24 @@ class FinalizeInvoiceParams(RequestOptions): Specifies which fields in the response should be expanded. """ + class ListLinesParams(RequestOptions): + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + """ + class ListParams(RequestOptions): collection_method: NotRequired[ Literal["charge_automatically", "send_invoice"] @@ -6883,6 +6903,42 @@ async def search_auto_paging_iter_async( ) -> AsyncIterator["Invoice"]: return (await cls.search_async(*args, **kwargs)).auto_paging_iter() + @classmethod + def list_lines( + cls, invoice: str, **params: Unpack["Invoice.ListLinesParams"] + ) -> ListObject["InvoiceLineItem"]: + """ + When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + """ + return cast( + ListObject["InvoiceLineItem"], + cls._static_request( + "get", + "/v1/invoices/{invoice}/lines".format( + invoice=sanitize_id(invoice) + ), + params=params, + ), + ) + + @classmethod + async def list_lines_async( + cls, invoice: str, **params: Unpack["Invoice.ListLinesParams"] + ) -> ListObject["InvoiceLineItem"]: + """ + When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + """ + return cast( + ListObject["InvoiceLineItem"], + await cls._static_request_async( + "get", + "/v1/invoices/{invoice}/lines".format( + invoice=sanitize_id(invoice) + ), + params=params, + ), + ) + _inner_class_types = { "automatic_tax": AutomaticTax, "custom_fields": CustomField, diff --git a/tests/api_resources/test_invoice.py b/tests/api_resources/test_invoice.py index 12e05701e..904c36382 100644 --- a/tests/api_resources/test_invoice.py +++ b/tests/api_resources/test_invoice.py @@ -144,3 +144,8 @@ def test_can_iterate_lines(self): seen = [item["id"] for item in resource.lines.auto_paging_iter()] assert seen.__len__() > 0 + + def test_can_list_line_items(self): + resource = stripe.Invoice.list_lines(TEST_RESOURCE_ID) + assert isinstance(resource.data, list) + assert isinstance(resource.data[0], stripe.InvoiceLineItem) From 47be2594d3b6dce5032e522c011fbf3831e816f5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Sat, 25 May 2024 11:48:25 +0000 Subject: [PATCH 04/13] Update generated code for v1049 --- OPENAPI_VERSION | 2 +- stripe/_charge.py | 2 +- stripe/_order.py | 4 ++++ stripe/_order_service.py | 4 ++++ stripe/_payment_intent.py | 6 ++++++ stripe/_payment_intent_service.py | 6 ++++++ 6 files changed, 22 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 09176b50f..012c92b1b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1048 \ No newline at end of file +v1049 \ No newline at end of file diff --git a/stripe/_charge.py b/stripe/_charge.py index 54cca75e2..9c352c71b 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -1263,7 +1263,7 @@ class Klarna(StripeObject): preferred_locale: Optional[str] """ Preferred language of the Klarna authorization page that the customer is redirected to. - Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` + Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` """ class Konbini(StripeObject): diff --git a/stripe/_order.py b/stripe/_order.py index 0b72f7d5c..4ed14fe96 100644 --- a/stripe/_order.py +++ b/stripe/_order.py @@ -1573,6 +1573,7 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): "en-NZ", "en-PL", "en-PT", + "en-RO", "en-SE", "en-US", "es-ES", @@ -1589,6 +1590,7 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): "nl-NL", "pl-PL", "pt-PT", + "ro-RO", "sv-FI", "sv-SE", ] @@ -2794,6 +2796,7 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): "en-NZ", "en-PL", "en-PT", + "en-RO", "en-SE", "en-US", "es-ES", @@ -2810,6 +2813,7 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): "nl-NL", "pl-PL", "pt-PT", + "ro-RO", "sv-FI", "sv-SE", ] diff --git a/stripe/_order_service.py b/stripe/_order_service.py index 0a6349825..cc85784d6 100644 --- a/stripe/_order_service.py +++ b/stripe/_order_service.py @@ -722,6 +722,7 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): "en-NZ", "en-PL", "en-PT", + "en-RO", "en-SE", "en-US", "es-ES", @@ -738,6 +739,7 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): "nl-NL", "pl-PL", "pt-PT", + "ro-RO", "sv-FI", "sv-SE", ] @@ -1953,6 +1955,7 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): "en-NZ", "en-PL", "en-PT", + "en-RO", "en-SE", "en-US", "es-ES", @@ -1969,6 +1972,7 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): "nl-NL", "pl-PL", "pt-PT", + "ro-RO", "sv-FI", "sv-SE", ] diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 066a2fbb2..e3ce34447 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -5552,6 +5552,7 @@ class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): "en-NZ", "en-PL", "en-PT", + "en-RO", "en-SE", "en-US", "es-ES", @@ -5568,6 +5569,7 @@ class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): "nl-NL", "pl-PL", "pt-PT", + "ro-RO", "sv-FI", "sv-SE", ] @@ -8666,6 +8668,7 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): "en-NZ", "en-PL", "en-PT", + "en-RO", "en-SE", "en-US", "es-ES", @@ -8682,6 +8685,7 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): "nl-NL", "pl-PL", "pt-PT", + "ro-RO", "sv-FI", "sv-SE", ] @@ -11837,6 +11841,7 @@ class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): "en-NZ", "en-PL", "en-PT", + "en-RO", "en-SE", "en-US", "es-ES", @@ -11853,6 +11858,7 @@ class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): "nl-NL", "pl-PL", "pt-PT", + "ro-RO", "sv-FI", "sv-SE", ] diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 1cade630f..afb31fedb 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -3230,6 +3230,7 @@ class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): "en-NZ", "en-PL", "en-PT", + "en-RO", "en-SE", "en-US", "es-ES", @@ -3246,6 +3247,7 @@ class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): "nl-NL", "pl-PL", "pt-PT", + "ro-RO", "sv-FI", "sv-SE", ] @@ -6384,6 +6386,7 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): "en-NZ", "en-PL", "en-PT", + "en-RO", "en-SE", "en-US", "es-ES", @@ -6400,6 +6403,7 @@ class CreateParamsPaymentMethodOptionsKlarna(TypedDict): "nl-NL", "pl-PL", "pt-PT", + "ro-RO", "sv-FI", "sv-SE", ] @@ -9625,6 +9629,7 @@ class UpdateParamsPaymentMethodOptionsKlarna(TypedDict): "en-NZ", "en-PL", "en-PT", + "en-RO", "en-SE", "en-US", "es-ES", @@ -9641,6 +9646,7 @@ class UpdateParamsPaymentMethodOptionsKlarna(TypedDict): "nl-NL", "pl-PL", "pt-PT", + "ro-RO", "sv-FI", "sv-SE", ] From 681ab16cf6076f0ca2e225930f5a24ce85f9e019 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 14:51:26 +0000 Subject: [PATCH 05/13] Update generated code for v1050 --- OPENAPI_VERSION | 2 +- stripe/checkout/_session.py | 24 ++++++++++++++++++++++++ stripe/checkout/_session_service.py | 12 ++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 012c92b1b..931ea0aec 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1049 \ No newline at end of file +v1050 \ No newline at end of file diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 2af21161a..df6e6edcc 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -175,6 +175,10 @@ class Option(StripeObject): The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. """ + default_value: Optional[str] + """ + The value that will pre-fill on the payment page. + """ options: List[Option] """ The options available for the customer to select. Up to 200 options allowed. @@ -196,6 +200,10 @@ class Label(StripeObject): """ class Numeric(StripeObject): + default_value: Optional[str] + """ + The value that will pre-fill the field on the payment page. + """ maximum_length: Optional[int] """ The maximum character length constraint for the customer's input. @@ -210,6 +218,10 @@ class Numeric(StripeObject): """ class Text(StripeObject): + default_value: Optional[str] + """ + The value that will pre-fill the field on the payment page. + """ maximum_length: Optional[int] """ The maximum character length constraint for the customer's input. @@ -1969,6 +1981,10 @@ class CreateParamsCustomField(TypedDict): """ class CreateParamsCustomFieldDropdown(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. + """ options: List["Session.CreateParamsCustomFieldDropdownOption"] """ The options available for the customer to select. Up to 200 options allowed. @@ -1995,6 +2011,10 @@ class CreateParamsCustomFieldLabel(TypedDict): """ class CreateParamsCustomFieldNumeric(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page. + """ maximum_length: NotRequired[int] """ The maximum character length constraint for the customer's input. @@ -2005,6 +2025,10 @@ class CreateParamsCustomFieldNumeric(TypedDict): """ class CreateParamsCustomFieldText(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page. + """ maximum_length: NotRequired[int] """ The maximum character length constraint for the customer's input. diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index 6d279d840..b67670166 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -450,6 +450,10 @@ class CreateParamsCustomField(TypedDict): """ class CreateParamsCustomFieldDropdown(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. + """ options: List["SessionService.CreateParamsCustomFieldDropdownOption"] """ The options available for the customer to select. Up to 200 options allowed. @@ -476,6 +480,10 @@ class CreateParamsCustomFieldLabel(TypedDict): """ class CreateParamsCustomFieldNumeric(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page. + """ maximum_length: NotRequired[int] """ The maximum character length constraint for the customer's input. @@ -486,6 +494,10 @@ class CreateParamsCustomFieldNumeric(TypedDict): """ class CreateParamsCustomFieldText(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page. + """ maximum_length: NotRequired[int] """ The maximum character length constraint for the customer's input. From 6e2f939d18001e8db7f2e67d271f681800d85cfe Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 17:56:59 +0000 Subject: [PATCH 06/13] Update generated code for v1051 --- OPENAPI_VERSION | 2 +- stripe/_account.py | 2 +- stripe/_account_service.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 931ea0aec..6661b2fdb 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1050 \ No newline at end of file +v1051 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 11fc02896..1c0419980 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -1334,7 +1334,7 @@ class CreateParams(RequestOptions): """ tos_acceptance: NotRequired["Account.CreateParamsTosAcceptance"] """ - Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. """ type: NotRequired[Literal["custom", "express", "standard"]] """ diff --git a/stripe/_account_service.py b/stripe/_account_service.py index 7c1c643c9..eddcb7073 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -105,7 +105,7 @@ class CreateParams(TypedDict): """ tos_acceptance: NotRequired["AccountService.CreateParamsTosAcceptance"] """ - Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. """ type: NotRequired[Literal["custom", "express", "standard"]] """ @@ -1829,7 +1829,7 @@ class UpdateParams(TypedDict): """ tos_acceptance: NotRequired["AccountService.UpdateParamsTosAcceptance"] """ - Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. """ class UpdateParamsBankAccount(TypedDict): From 388f7ac4a32829d0afcc9d46878dae774fb0e7a4 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 23:17:13 +0000 Subject: [PATCH 07/13] Update generated code for v1052 --- OPENAPI_VERSION | 2 +- stripe/_order.py | 36 +++---- stripe/_order_service.py | 36 +++---- stripe/_payment_intent.py | 162 +++++++++++++++--------------- stripe/_payment_intent_service.py | 162 +++++++++++++++--------------- 5 files changed, 199 insertions(+), 199 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6661b2fdb..07b3c7b7a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1051 \ No newline at end of file +v1052 \ No newline at end of file diff --git a/stripe/_order.py b/stripe/_order.py index 4ed14fe96..71b1e8f8d 100644 --- a/stripe/_order.py +++ b/stripe/_order.py @@ -1379,11 +1379,11 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( Literal["automatic", "automatic_async", "manual"] ] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ reference: NotRequired[str] """ @@ -1539,11 +1539,11 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[ Literal[ @@ -1612,11 +1612,11 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): class CreateParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ persistent_token: NotRequired[str] """ @@ -2602,11 +2602,11 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( Literal["automatic", "automatic_async", "manual"] ] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ reference: NotRequired[str] """ @@ -2762,11 +2762,11 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[ Literal[ @@ -2835,11 +2835,11 @@ class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): class ModifyParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ persistent_token: NotRequired[str] """ diff --git a/stripe/_order_service.py b/stripe/_order_service.py index cc85784d6..f4da3bbc4 100644 --- a/stripe/_order_service.py +++ b/stripe/_order_service.py @@ -528,11 +528,11 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( Literal["automatic", "automatic_async", "manual"] ] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ reference: NotRequired[str] """ @@ -688,11 +688,11 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[ Literal[ @@ -761,11 +761,11 @@ class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): class CreateParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ persistent_token: NotRequired[str] """ @@ -1761,11 +1761,11 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( Literal["automatic", "automatic_async", "manual"] ] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ reference: NotRequired[str] """ @@ -1921,11 +1921,11 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[ Literal[ @@ -1994,11 +1994,11 @@ class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): class UpdateParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ persistent_token: NotRequired[str] """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index e3ce34447..3bf337893 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -4869,11 +4869,11 @@ class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class ConfirmParamsPaymentMethodOptionsAffirm(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[str] """ @@ -4893,11 +4893,11 @@ class ConfirmParamsPaymentMethodOptionsAffirm(TypedDict): class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ reference: NotRequired[str] """ @@ -4932,11 +4932,11 @@ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']" @@ -5032,11 +5032,11 @@ class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): class ConfirmParamsPaymentMethodOptionsCard(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ cvc_token: NotRequired[str] """ @@ -5363,11 +5363,11 @@ class ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBanca class ConfirmParamsPaymentMethodOptionsCashapp(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" @@ -5518,11 +5518,11 @@ class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[ Literal[ @@ -5619,11 +5619,11 @@ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): class ConfirmParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ persistent_token: NotRequired[str] """ @@ -5645,11 +5645,11 @@ class ConfirmParamsPaymentMethodOptionsLink(TypedDict): class ConfirmParamsPaymentMethodOptionsMobilepay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[Literal["none"]] """ @@ -5892,11 +5892,11 @@ class ConfirmParamsPaymentMethodOptionsRechnung(TypedDict): class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']" @@ -7985,11 +7985,11 @@ class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class CreateParamsPaymentMethodOptionsAffirm(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[str] """ @@ -8009,11 +8009,11 @@ class CreateParamsPaymentMethodOptionsAffirm(TypedDict): class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ reference: NotRequired[str] """ @@ -8048,11 +8048,11 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']" @@ -8148,11 +8148,11 @@ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): class CreateParamsPaymentMethodOptionsCard(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ cvc_token: NotRequired[str] """ @@ -8479,11 +8479,11 @@ class CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancai class CreateParamsPaymentMethodOptionsCashapp(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" @@ -8634,11 +8634,11 @@ class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): class CreateParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[ Literal[ @@ -8735,11 +8735,11 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): class CreateParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ persistent_token: NotRequired[str] """ @@ -8761,11 +8761,11 @@ class CreateParamsPaymentMethodOptionsLink(TypedDict): class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[Literal["none"]] """ @@ -9008,11 +9008,11 @@ class CreateParamsPaymentMethodOptionsRechnung(TypedDict): class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']" @@ -11158,11 +11158,11 @@ class ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class ModifyParamsPaymentMethodOptionsAffirm(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[str] """ @@ -11182,11 +11182,11 @@ class ModifyParamsPaymentMethodOptionsAffirm(TypedDict): class ModifyParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ reference: NotRequired[str] """ @@ -11221,11 +11221,11 @@ class ModifyParamsPaymentMethodOptionsAlipay(TypedDict): class ModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']" @@ -11321,11 +11321,11 @@ class ModifyParamsPaymentMethodOptionsBoleto(TypedDict): class ModifyParamsPaymentMethodOptionsCard(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ cvc_token: NotRequired[str] """ @@ -11652,11 +11652,11 @@ class ModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancai class ModifyParamsPaymentMethodOptionsCashapp(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" @@ -11807,11 +11807,11 @@ class ModifyParamsPaymentMethodOptionsInteracPresent(TypedDict): class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[ Literal[ @@ -11908,11 +11908,11 @@ class ModifyParamsPaymentMethodOptionsKonbini(TypedDict): class ModifyParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ persistent_token: NotRequired[str] """ @@ -11934,11 +11934,11 @@ class ModifyParamsPaymentMethodOptionsLink(TypedDict): class ModifyParamsPaymentMethodOptionsMobilepay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[Literal["none"]] """ @@ -12181,11 +12181,11 @@ class ModifyParamsPaymentMethodOptionsRechnung(TypedDict): class ModifyParamsPaymentMethodOptionsRevolutPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']" diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index afb31fedb..4418fff30 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -2547,11 +2547,11 @@ class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class ConfirmParamsPaymentMethodOptionsAffirm(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[str] """ @@ -2571,11 +2571,11 @@ class ConfirmParamsPaymentMethodOptionsAffirm(TypedDict): class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ reference: NotRequired[str] """ @@ -2610,11 +2610,11 @@ class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']" @@ -2710,11 +2710,11 @@ class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): class ConfirmParamsPaymentMethodOptionsCard(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ cvc_token: NotRequired[str] """ @@ -3041,11 +3041,11 @@ class ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBanca class ConfirmParamsPaymentMethodOptionsCashapp(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" @@ -3196,11 +3196,11 @@ class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[ Literal[ @@ -3297,11 +3297,11 @@ class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): class ConfirmParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ persistent_token: NotRequired[str] """ @@ -3323,11 +3323,11 @@ class ConfirmParamsPaymentMethodOptionsLink(TypedDict): class ConfirmParamsPaymentMethodOptionsMobilepay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[Literal["none"]] """ @@ -3570,11 +3570,11 @@ class ConfirmParamsPaymentMethodOptionsRechnung(TypedDict): class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']" @@ -5703,11 +5703,11 @@ class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class CreateParamsPaymentMethodOptionsAffirm(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[str] """ @@ -5727,11 +5727,11 @@ class CreateParamsPaymentMethodOptionsAffirm(TypedDict): class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ reference: NotRequired[str] """ @@ -5766,11 +5766,11 @@ class CreateParamsPaymentMethodOptionsAlipay(TypedDict): class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']" @@ -5866,11 +5866,11 @@ class CreateParamsPaymentMethodOptionsBoleto(TypedDict): class CreateParamsPaymentMethodOptionsCard(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ cvc_token: NotRequired[str] """ @@ -6197,11 +6197,11 @@ class CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancai class CreateParamsPaymentMethodOptionsCashapp(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" @@ -6352,11 +6352,11 @@ class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): class CreateParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[ Literal[ @@ -6453,11 +6453,11 @@ class CreateParamsPaymentMethodOptionsKonbini(TypedDict): class CreateParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ persistent_token: NotRequired[str] """ @@ -6479,11 +6479,11 @@ class CreateParamsPaymentMethodOptionsLink(TypedDict): class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[Literal["none"]] """ @@ -6726,11 +6726,11 @@ class CreateParamsPaymentMethodOptionsRechnung(TypedDict): class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']" @@ -8946,11 +8946,11 @@ class UpdateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): class UpdateParamsPaymentMethodOptionsAffirm(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[str] """ @@ -8970,11 +8970,11 @@ class UpdateParamsPaymentMethodOptionsAffirm(TypedDict): class UpdateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ reference: NotRequired[str] """ @@ -9009,11 +9009,11 @@ class UpdateParamsPaymentMethodOptionsAlipay(TypedDict): class UpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']" @@ -9109,11 +9109,11 @@ class UpdateParamsPaymentMethodOptionsBoleto(TypedDict): class UpdateParamsPaymentMethodOptionsCard(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ cvc_token: NotRequired[str] """ @@ -9440,11 +9440,11 @@ class UpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancai class UpdateParamsPaymentMethodOptionsCashapp(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session', 'on_session']" @@ -9595,11 +9595,11 @@ class UpdateParamsPaymentMethodOptionsInteracPresent(TypedDict): class UpdateParamsPaymentMethodOptionsKlarna(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ preferred_locale: NotRequired[ Literal[ @@ -9696,11 +9696,11 @@ class UpdateParamsPaymentMethodOptionsKonbini(TypedDict): class UpdateParamsPaymentMethodOptionsLink(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ persistent_token: NotRequired[str] """ @@ -9722,11 +9722,11 @@ class UpdateParamsPaymentMethodOptionsLink(TypedDict): class UpdateParamsPaymentMethodOptionsMobilepay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[Literal["none"]] """ @@ -9969,11 +9969,11 @@ class UpdateParamsPaymentMethodOptionsRechnung(TypedDict): class UpdateParamsPaymentMethodOptionsRevolutPay(TypedDict): capture_method: NotRequired["Literal['']|Literal['manual']"] """ - Controls when the funds will be captured from the customer's account. + Controls when the funds are captured from the customer's account. - If provided, this parameter will override the top level behavior of `capture_method` when finalizing the payment with this payment method type. + If provided, this parameter overrides the behavior of the top-level [capture_method](https://stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type. + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. """ setup_future_usage: NotRequired[ "Literal['']|Literal['none', 'off_session']" From dd1b73dda02b876f7aa8c0f0ab2afd5618472198 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 29 May 2024 13:49:17 +0000 Subject: [PATCH 08/13] Update generated code for v1053 --- OPENAPI_VERSION | 2 +- stripe/_invoice.py | 6 +++--- stripe/_invoice_service.py | 4 ++-- stripe/_invoice_upcoming_lines_service.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 07b3c7b7a..f818b5bce 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1052 \ No newline at end of file +v1053 \ No newline at end of file diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 2a7a828c0..c53b7f3e6 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -2056,7 +2056,7 @@ class CreatePreviewParams(RequestOptions): """ subscription: NotRequired[str] """ - The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. """ subscription_details: NotRequired[ "Invoice.CreatePreviewParamsSubscriptionDetails" @@ -4791,7 +4791,7 @@ class UpcomingLinesParams(RequestOptions): """ subscription: NotRequired[str] """ - The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. """ subscription_billing_cycle_anchor: NotRequired[ "Literal['now', 'unchanged']|int" @@ -6852,7 +6852,7 @@ class UpcomingParams(RequestOptions): """ subscription: NotRequired[str] """ - The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. """ subscription_billing_cycle_anchor: NotRequired[ "Literal['now', 'unchanged']|int" diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 23ece4573..f75948ef6 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -1020,7 +1020,7 @@ class CreatePreviewParams(TypedDict): """ subscription: NotRequired[str] """ - The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. """ subscription_details: NotRequired[ "InvoiceService.CreatePreviewParamsSubscriptionDetails" @@ -3065,7 +3065,7 @@ class UpcomingParams(TypedDict): """ subscription: NotRequired[str] """ - The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. """ subscription_billing_cycle_anchor: NotRequired[ "Literal['now', 'unchanged']|int" diff --git a/stripe/_invoice_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index 218647751..faab4a74f 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -86,7 +86,7 @@ class ListParams(TypedDict): """ subscription: NotRequired[str] """ - The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. """ subscription_billing_cycle_anchor: NotRequired[ "Literal['now', 'unchanged']|int" From ccb15721bb349427a6a90085bc10a5914d635af0 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 29 May 2024 14:13:47 +0000 Subject: [PATCH 09/13] Update generated code for v1054 --- OPENAPI_VERSION | 2 +- stripe/issuing/_physical_bundle.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f818b5bce..37b2d49e1 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1053 \ No newline at end of file +v1054 \ No newline at end of file diff --git a/stripe/issuing/_physical_bundle.py b/stripe/issuing/_physical_bundle.py index 45b959c11..7f2661d49 100644 --- a/stripe/issuing/_physical_bundle.py +++ b/stripe/issuing/_physical_bundle.py @@ -4,7 +4,7 @@ from stripe._listable_api_resource import ListableAPIResource from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional +from typing import ClassVar, List from typing_extensions import Literal, NotRequired, Unpack @@ -63,7 +63,7 @@ class RetrieveParams(RequestOptions): Specifies which fields in the response should be expanded. """ - features: Optional[Features] + features: Features id: str """ Unique identifier for the object. From a4632c91eef3e1e6bf0ea4608e8e93271ac7f79e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 29 May 2024 17:31:02 +0000 Subject: [PATCH 10/13] Update generated code for v1055 --- OPENAPI_VERSION | 2 +- stripe/checkout/_session.py | 2 +- stripe/checkout/_session_service.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 37b2d49e1..07d3a0c43 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1054 \ No newline at end of file +v1055 \ No newline at end of file diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index df6e6edcc..f554064b3 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -3466,7 +3466,7 @@ class CreateParamsShippingOption(TypedDict): "Session.CreateParamsShippingOptionShippingRateData" ] """ - Parameters to be passed to Shipping Rate creation for this shipping option + Parameters to be passed to Shipping Rate creation for this shipping option. """ class CreateParamsShippingOptionShippingRateData(TypedDict): diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index b67670166..54073e326 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -1971,7 +1971,7 @@ class CreateParamsShippingOption(TypedDict): "SessionService.CreateParamsShippingOptionShippingRateData" ] """ - Parameters to be passed to Shipping Rate creation for this shipping option + Parameters to be passed to Shipping Rate creation for this shipping option. """ class CreateParamsShippingOptionShippingRateData(TypedDict): From c28ec9de3faa58b429f5a65fd1bbb49fd9860044 Mon Sep 17 00:00:00 2001 From: David Brownman <109395161+xavdid-stripe@users.noreply.github.com> Date: Wed, 29 May 2024 14:40:50 -0700 Subject: [PATCH 11/13] update VSCode settings (#1337) --- .vscode/extensions.json | 8 ++++---- .vscode/settings.json | 17 ++++++++++++++--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index e1511b0d9..d0344aead 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,8 +1,8 @@ { "recommendations": [ - "ms-python.python", - "EditorConfig.editorconfig", - "ms-python.flake8", - "charliermarsh.ruff" + "EditorConfig.editorconfig", // default + "ms-python.python", // intellisense + "ms-python.flake8", // linting + "charliermarsh.ruff" // formatting ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 20ac11136..324c33a9a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,19 +4,30 @@ "editor.renderWhitespace": "all", "files.exclude": { - "**/*.pyc": { "when": "$(basename).py" }, - "**/__pycache__": true + "**/*.pyc": true, + "**/__pycache__": true, + ".pytest_cache": true, + ".mypy_cache": true, + ".ruff_cache": true, + ".tox": true, + "*.egg-info": true, + "venv": true }, + // uses default venv name from Makefile + "python.defaultInterpreterPath": "./venv/bin/python", // Formatting "editor.formatOnSave": true, + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff" + }, // Tests "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, "python.terminal.activateEnvironment": true, - "python.defaultInterpreterPath": "~/venv/bin/python3", "python.analysis.diagnosticMode": "workspace", "python.analysis.typeCheckingMode": "basic", + "ruff.lint.enable": false // in favor of flake8 } From b0ebc5a7113b9192a1eaf373b80234c1f5042a01 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 30 May 2024 02:38:59 +0000 Subject: [PATCH 12/13] Update generated code for v1056 --- OPENAPI_VERSION | 2 +- stripe/_account.py | 2 ++ stripe/_bank_account.py | 2 ++ stripe/_capability.py | 2 ++ stripe/_person.py | 2 ++ 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 07d3a0c43..cc59b9c8c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1055 \ No newline at end of file +v1056 \ No newline at end of file diff --git a/stripe/_account.py b/stripe/_account.py index 1c0419980..526d11b47 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -748,6 +748,7 @@ class Error(StripeObject): "verification_missing_executives", "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", ] """ The code for the type of error. @@ -896,6 +897,7 @@ class Error(StripeObject): "verification_missing_executives", "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", ] """ The code for the type of error. diff --git a/stripe/_bank_account.py b/stripe/_bank_account.py index c74515d33..8f3799e37 100644 --- a/stripe/_bank_account.py +++ b/stripe/_bank_account.py @@ -126,6 +126,7 @@ class Error(StripeObject): "verification_missing_executives", "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", ] """ The code for the type of error. @@ -248,6 +249,7 @@ class Error(StripeObject): "verification_missing_executives", "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", ] """ The code for the type of error. diff --git a/stripe/_capability.py b/stripe/_capability.py index 8e800be8f..53ca37edd 100644 --- a/stripe/_capability.py +++ b/stripe/_capability.py @@ -119,6 +119,7 @@ class Error(StripeObject): "verification_missing_executives", "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", ] """ The code for the type of error. @@ -267,6 +268,7 @@ class Error(StripeObject): "verification_missing_executives", "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", ] """ The code for the type of error. diff --git a/stripe/_person.py b/stripe/_person.py index d3461e966..399a97f2f 100644 --- a/stripe/_person.py +++ b/stripe/_person.py @@ -242,6 +242,7 @@ class Error(StripeObject): "verification_missing_executives", "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", ] """ The code for the type of error. @@ -438,6 +439,7 @@ class Error(StripeObject): "verification_missing_executives", "verification_missing_owners", "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", ] """ The code for the type of error. From 86587441df6767c4f4fa5321c6fcb9039eb107e2 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 30 May 2024 17:37:50 +0000 Subject: [PATCH 13/13] Update generated code for v1058 --- OPENAPI_VERSION | 2 +- stripe/_confirmation_token.py | 182 ++++++++++++++++++++++++++++++++++ stripe/_payment_method.py | 180 +++++++++++++++++++++++++++++++++ 3 files changed, 363 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index cc59b9c8c..4161e81ad 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1056 \ No newline at end of file +v1058 \ No newline at end of file diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 3f026c9a5..02138e5a5 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -209,6 +209,183 @@ class Checks(StripeObject): If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. """ + class GeneratedFrom(StripeObject): + class PaymentMethodDetails(StripeObject): + class CardPresent(StripeObject): + class Offline(StripeObject): + stored_at: Optional[int] + """ + Time at which the payment was collected while offline + """ + + class Receipt(StripeObject): + account_type: Optional[ + Literal[ + "checking", "credit", "prepaid", "unknown" + ] + ] + """ + The type of account being debited or credited + """ + application_cryptogram: Optional[str] + """ + EMV tag 9F26, cryptogram generated by the integrated circuit chip. + """ + application_preferred_name: Optional[str] + """ + Mnenomic of the Application Identifier. + """ + authorization_code: Optional[str] + """ + Identifier for this transaction. + """ + authorization_response_code: Optional[str] + """ + EMV tag 8A. A code returned by the card issuer. + """ + cardholder_verification_method: Optional[str] + """ + Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + """ + dedicated_file_name: Optional[str] + """ + EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + """ + terminal_verification_results: Optional[str] + """ + The outcome of a series of EMV functions performed by the card reader. + """ + transaction_status_information: Optional[str] + """ + An indication of various EMV functions performed during the transaction. + """ + + amount_authorized: Optional[int] + """ + The authorized amount + """ + brand: Optional[str] + """ + Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + """ + capture_before: Optional[int] + """ + When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + """ + cardholder_name: Optional[str] + """ + The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + """ + country: Optional[str] + """ + Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + """ + description: Optional[str] + """ + A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + """ + emv_auth_data: Optional[str] + """ + Authorization response cryptogram. + """ + exp_month: int + """ + Two-digit number representing the card's expiration month. + """ + exp_year: int + """ + Four-digit number representing the card's expiration year. + """ + fingerprint: Optional[str] + """ + Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + + *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + """ + funding: Optional[str] + """ + Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + """ + generated_card: Optional[str] + """ + ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + """ + iin: Optional[str] + """ + Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + """ + incremental_authorization_supported: bool + """ + Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + """ + issuer: Optional[str] + """ + The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + """ + last4: Optional[str] + """ + The last four digits of the card. + """ + network: Optional[str] + """ + Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + """ + offline: Optional[Offline] + """ + Details about payments collected offline. + """ + overcapture_supported: bool + """ + Defines whether the authorized amount can be over-captured or not + """ + preferred_locales: Optional[List[str]] + """ + EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + """ + read_method: Optional[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ] + ] + """ + How card details were read in this transaction. + """ + receipt: Optional[Receipt] + """ + A collection of fields required to be displayed on receipts. Only required for EMV transactions. + """ + _inner_class_types = { + "offline": Offline, + "receipt": Receipt, + } + + card_present: Optional[CardPresent] + type: str + """ + The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. + """ + _inner_class_types = {"card_present": CardPresent} + + charge: Optional[str] + """ + The charge that created this object. + """ + payment_method_details: Optional[PaymentMethodDetails] + """ + Transaction-specific details of the payment method used in the payment. + """ + setup_attempt: Optional[ExpandableField["SetupAttempt"]] + """ + The ID of the SetupAttempt that generated this PaymentMethod, if any. + """ + _inner_class_types = { + "payment_method_details": PaymentMethodDetails, + } + class Networks(StripeObject): available: List[str] """ @@ -460,6 +637,10 @@ class ShippingAddress(StripeObject): """ Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. """ + generated_from: Optional[GeneratedFrom] + """ + Details of the original PaymentMethod that created this object. + """ iin: Optional[str] """ Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) @@ -486,6 +667,7 @@ class ShippingAddress(StripeObject): """ _inner_class_types = { "checks": Checks, + "generated_from": GeneratedFrom, "networks": Networks, "three_d_secure_usage": ThreeDSecureUsage, "wallet": Wallet, diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 5daff4c08..268f3e86f 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -172,6 +172,181 @@ class Checks(StripeObject): If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. """ + class GeneratedFrom(StripeObject): + class PaymentMethodDetails(StripeObject): + class CardPresent(StripeObject): + class Offline(StripeObject): + stored_at: Optional[int] + """ + Time at which the payment was collected while offline + """ + + class Receipt(StripeObject): + account_type: Optional[ + Literal["checking", "credit", "prepaid", "unknown"] + ] + """ + The type of account being debited or credited + """ + application_cryptogram: Optional[str] + """ + EMV tag 9F26, cryptogram generated by the integrated circuit chip. + """ + application_preferred_name: Optional[str] + """ + Mnenomic of the Application Identifier. + """ + authorization_code: Optional[str] + """ + Identifier for this transaction. + """ + authorization_response_code: Optional[str] + """ + EMV tag 8A. A code returned by the card issuer. + """ + cardholder_verification_method: Optional[str] + """ + Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + """ + dedicated_file_name: Optional[str] + """ + EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + """ + terminal_verification_results: Optional[str] + """ + The outcome of a series of EMV functions performed by the card reader. + """ + transaction_status_information: Optional[str] + """ + An indication of various EMV functions performed during the transaction. + """ + + amount_authorized: Optional[int] + """ + The authorized amount + """ + brand: Optional[str] + """ + Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + """ + capture_before: Optional[int] + """ + When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + """ + cardholder_name: Optional[str] + """ + The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + """ + country: Optional[str] + """ + Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + """ + description: Optional[str] + """ + A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + """ + emv_auth_data: Optional[str] + """ + Authorization response cryptogram. + """ + exp_month: int + """ + Two-digit number representing the card's expiration month. + """ + exp_year: int + """ + Four-digit number representing the card's expiration year. + """ + fingerprint: Optional[str] + """ + Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + + *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + """ + funding: Optional[str] + """ + Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + """ + generated_card: Optional[str] + """ + ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + """ + iin: Optional[str] + """ + Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + """ + incremental_authorization_supported: bool + """ + Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + """ + issuer: Optional[str] + """ + The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + """ + last4: Optional[str] + """ + The last four digits of the card. + """ + network: Optional[str] + """ + Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. + """ + offline: Optional[Offline] + """ + Details about payments collected offline. + """ + overcapture_supported: bool + """ + Defines whether the authorized amount can be over-captured or not + """ + preferred_locales: Optional[List[str]] + """ + EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + """ + read_method: Optional[ + Literal[ + "contact_emv", + "contactless_emv", + "contactless_magstripe_mode", + "magnetic_stripe_fallback", + "magnetic_stripe_track2", + ] + ] + """ + How card details were read in this transaction. + """ + receipt: Optional[Receipt] + """ + A collection of fields required to be displayed on receipts. Only required for EMV transactions. + """ + _inner_class_types = { + "offline": Offline, + "receipt": Receipt, + } + + card_present: Optional[CardPresent] + type: str + """ + The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. + """ + _inner_class_types = {"card_present": CardPresent} + + charge: Optional[str] + """ + The charge that created this object. + """ + payment_method_details: Optional[PaymentMethodDetails] + """ + Transaction-specific details of the payment method used in the payment. + """ + setup_attempt: Optional[ExpandableField["SetupAttempt"]] + """ + The ID of the SetupAttempt that generated this PaymentMethod, if any. + """ + _inner_class_types = { + "payment_method_details": PaymentMethodDetails, + } + class Networks(StripeObject): available: List[str] """ @@ -423,6 +598,10 @@ class ShippingAddress(StripeObject): """ Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. """ + generated_from: Optional[GeneratedFrom] + """ + Details of the original PaymentMethod that created this object. + """ iin: Optional[str] """ Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) @@ -449,6 +628,7 @@ class ShippingAddress(StripeObject): """ _inner_class_types = { "checks": Checks, + "generated_from": GeneratedFrom, "networks": Networks, "three_d_secure_usage": ThreeDSecureUsage, "wallet": Wallet,