diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 615972a62..308945cbf 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -e83a2c042b6fd289e2c574f1db817b0aa55d8b0d \ No newline at end of file +baff58c9d515cdd5f5c3231d101989d588788c6f \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 74db2059d..28d67d2bf 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2413 \ No newline at end of file +v2442 \ No newline at end of file diff --git a/examples/async_event_notification_handler_endpoint.py b/examples/async_event_notification_handler_endpoint.py new file mode 100644 index 000000000..2cad998ed --- /dev/null +++ b/examples/async_event_notification_handler_endpoint.py @@ -0,0 +1,102 @@ +""" +async_event_notification_handler_endpoint.py - receive and process event notifications (AKA thin events) like "v1.billing.meter.error_report_triggered" using AsyncEventNotificationHandler. + +The async equivalent of event_notification_handler_endpoint.py. In this example, we: + - write an async fallback callback to handle unrecognized event notifications + - create a StripeClient called client + - Initialize an AsyncStripeEventNotificationHandler with the client, webhook secret, and fallback callback + - register a pre_handle hook that deduplicates events by id before any callback runs + - register a specific handler for the "v1.billing.meter.error_report_triggered" event notification type + - await handler.handle_async() to process the received notification webhook body + +Note that only your callbacks are awaited. Verifying the signature and parsing the +payload are pure CPU work, so they stay synchronous even here. +""" + +import os +from fastapi import FastAPI, Request, Response + +from stripe import StripeClient, UnhandledNotificationDetails +from stripe.v2.core import EventNotification +from stripe.events import V1BillingMeterErrorReportTriggeredEventNotification + +app = FastAPI() +api_key = os.environ.get("STRIPE_API_KEY", "") +webhook_secret = os.environ.get("WEBHOOK_SECRET", "") + +# Webhooks can be delivered more than once, so we track ids we've already +# processed. In production, back this with something durable and shared +# across processes (e.g. Redis or a database table) instead of an in-memory set. +processed_event_ids: set[str] = set() + + +async def fallback_callback( + notif: EventNotification, + client: StripeClient, + details: UnhandledNotificationDetails, +): + print(f"Got an unhandled event of type {notif.type}!") + + +client = StripeClient(api_key) +handler = client.async_notification_handler(webhook_secret, fallback_callback) + +# Handles events delivered through a channel that has already authenticated them, such as +# AWS EventBridge or Azure Event Grid. Those payloads carry no Stripe-Signature header. +unverified_handler = client.async_notification_handler_without_verification( + fallback_callback +) + + +@handler.pre_handle +@unverified_handler.pre_handle +async def deduplicate_events( + notif: EventNotification, client: StripeClient +) -> bool: + """ + Runs before any registered callback. Returning False + here skips handling entirely for this delivery, which is useful for + deduplicating webhooks. + """ + if notif.id in processed_event_ids: + print(f"Already processed {notif.id}, skipping.") + return False + + processed_event_ids.add(notif.id) + return True + + +# can be anywhere in your codebase; registering on both handlers means either +# endpoint below will route this event type +@handler.on_v1_billing_meter_error_report_triggered +@unverified_handler.on_v1_billing_meter_error_report_triggered +async def handle_meter_error( + notif: V1BillingMeterErrorReportTriggeredEventNotification, + client: StripeClient, +): + # the async variants of the fetch methods keep the whole callback non-blocking + event = await notif.fetch_event_async() + print(f"Err! No meter found: {event.data.developer_message_summary}") + + +@app.post("/webhook") +async def webhook(request: Request): + webhook_body = await request.body() + sig_header = request.headers.get("Stripe-Signature", "") + + try: + await handler.handle_async(webhook_body.decode(), sig_header) + return Response(status_code=200) + except Exception as e: + return Response(content=str(e), status_code=500) + + +@app.post("/webhook-from-cloud-provider") +async def webhook_from_cloud_provider(request: Request): + # no signature header to pass along; the channel already authenticated this event + try: + body = await request.body() + await unverified_handler.handle_async(body) + return Response(status_code=200) + except Exception as e: + return Response(content=str(e), status_code=500) diff --git a/examples/event_notification_handler_endpoint.py b/examples/event_notification_handler_endpoint.py index 2cafda15d..c1db46f13 100644 --- a/examples/event_notification_handler_endpoint.py +++ b/examples/event_notification_handler_endpoint.py @@ -5,6 +5,7 @@ - write a fallback callback to handle unrecognized event notifications - create a StripeClient called client - Initialize an EventNotificationHandler with the client, webhook secret, and fallback callback + - register a pre_handle hook that deduplicates events by id before any callback runs - register a specific handler for the "v1.billing.meter.error_report_triggered" event notification type - use handler.handle() to process the received notification webhook body """ @@ -20,6 +21,11 @@ api_key = os.environ.get("STRIPE_API_KEY", "") webhook_secret = os.environ.get("WEBHOOK_SECRET", "") +# Webhooks can be delivered more than once, so we track ids we've already +# processed. In production, back this with something durable and shared +# across processes (e.g. Redis or a database table) instead of an in-memory set. +processed_event_ids: set[str] = set() + def fallback_callback( notif: EventNotification, @@ -39,6 +45,22 @@ def fallback_callback( ) +@handler.pre_handle +@unverified_handler.pre_handle +def deduplicate_events(notif: EventNotification, client: StripeClient) -> bool: + """ + Runs before any registered callback. Returning False + here skips handling entirely for this delivery, which is useful for + deduplicating webhooks. + """ + if notif.id in processed_event_ids: + print(f"Already processed {notif.id}, skipping.") + return False + + processed_event_ids.add(notif.id) + return True + + # can be anywhere in your codebase; registering on both handlers means either # endpoint below will route this event type @handler.on_v1_billing_meter_error_report_triggered @@ -53,10 +75,9 @@ def handle_meter_error( @app.route("/webhook", methods=["POST"]) def webhook(): - webhook_body = request.data - sig_header = request.headers.get("Stripe-Signature") - try: + webhook_body = request.data + sig_header = request.headers.get("Stripe-Signature") handler.handle(webhook_body, sig_header) return jsonify(success=True), 200 except Exception as e: diff --git a/examples/event_notification_webhook_handler.py b/examples/event_notification_webhook_handler.py index 0f0946971..16264a997 100644 --- a/examples/event_notification_webhook_handler.py +++ b/examples/event_notification_webhook_handler.py @@ -34,10 +34,10 @@ @app.route("/webhook", methods=["POST"]) def webhook(): - webhook_body = request.data - sig_header = request.headers.get("Stripe-Signature") - try: + webhook_body = request.data + sig_header = request.headers.get("Stripe-Signature") + event_notif = client.parse_event_notification( webhook_body, sig_header, webhook_secret ) diff --git a/examples/webhooks.py b/examples/webhooks.py index ca2a35d20..79352b1a6 100644 --- a/examples/webhooks.py +++ b/examples/webhooks.py @@ -13,7 +13,7 @@ @app.route("/webhooks", methods=["POST"]) def webhooks(): - payload = request.data.decode("utf-8") + payload = request.data received_sig = request.headers.get("Stripe-Signature", None) try: diff --git a/stripe/__init__.py b/stripe/__init__.py index 5e2eee03b..9a2c57720 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -319,6 +319,12 @@ def add_beta_version( from stripe._customer_session_service import ( CustomerSessionService as CustomerSessionService, ) + from stripe._customer_tax_exemption import ( + CustomerTaxExemption as CustomerTaxExemption, + ) + from stripe._customer_tax_exemption_service import ( + CustomerTaxExemptionService as CustomerTaxExemptionService, + ) from stripe._customer_tax_id_service import ( CustomerTaxIdService as CustomerTaxIdService, ) @@ -375,6 +381,8 @@ def add_beta_version( ) from stripe._event import Event as Event from stripe._event_notification_handler import ( + AsyncStripeEventNotificationHandler as AsyncStripeEventNotificationHandler, + AsyncStripeEventNotificationHandlerWithoutVerification as AsyncStripeEventNotificationHandlerWithoutVerification, StripeEventNotificationHandler as StripeEventNotificationHandler, StripeEventNotificationHandlerWithoutVerification as StripeEventNotificationHandlerWithoutVerification, UnhandledNotificationDetails as UnhandledNotificationDetails, @@ -830,6 +838,11 @@ def add_beta_version( "CustomerService": ("stripe._customer_service", False), "CustomerSession": ("stripe._customer_session", False), "CustomerSessionService": ("stripe._customer_session_service", False), + "CustomerTaxExemption": ("stripe._customer_tax_exemption", False), + "CustomerTaxExemptionService": ( + "stripe._customer_tax_exemption_service", + False, + ), "CustomerTaxIdService": ("stripe._customer_tax_id_service", False), "DelegatedCheckoutService": ("stripe._delegated_checkout_service", False), "DeletableAPIResource": ("stripe._deletable_api_resource", False), @@ -871,6 +884,14 @@ def add_beta_version( "ErrorObject": ("stripe._error_object", False), "OAuthErrorObject": ("stripe._error_object", False), "Event": ("stripe._event", False), + "AsyncStripeEventNotificationHandler": ( + "stripe._event_notification_handler", + False, + ), + "AsyncStripeEventNotificationHandlerWithoutVerification": ( + "stripe._event_notification_handler", + False, + ), "StripeEventNotificationHandler": ( "stripe._event_notification_handler", False, diff --git a/stripe/_account.py b/stripe/_account.py index 52b1a48f0..9e8fde208 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -597,12 +597,6 @@ class Capabilities(StripeObject): """ The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. """ - sequra_payments: Optional[ - Union[Literal["active", "inactive", "pending"], str] - ] - """ - The status of the SeQura capability of the account, or whether the account can directly process SeQura payments. - """ shopeepay_payments: Optional[ Union[Literal["active", "inactive", "pending"], str] ] @@ -1144,6 +1138,12 @@ class Alternative(StripeObject): """ class Error(StripeObject): + class Details(StripeObject): + partner_rejection_code: Optional[str] + """ + The rejection code as received from our payment method partner. + """ + code: Literal[ "external_request", "information_missing", @@ -1248,6 +1248,7 @@ class Error(StripeObject): """ The code for the type of error. """ + details: Optional[Details] reason: str """ An informative message that indicates the error type and provides additional details about the error. @@ -1256,6 +1257,7 @@ class Error(StripeObject): """ The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. """ + _inner_class_types = {"details": Details} alternatives: Optional[List[Alternative]] """ @@ -1327,6 +1329,12 @@ class Alternative(StripeObject): """ class Error(StripeObject): + class Details(StripeObject): + partner_rejection_code: Optional[str] + """ + The rejection code as received from our payment method partner. + """ + code: Literal[ "external_request", "information_missing", @@ -1431,6 +1439,7 @@ class Error(StripeObject): """ The code for the type of error. """ + details: Optional[Details] reason: str """ An informative message that indicates the error type and provides additional details about the error. @@ -1439,6 +1448,7 @@ class Error(StripeObject): """ The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. """ + _inner_class_types = {"details": Details} alternatives: Optional[List[Alternative]] """ diff --git a/stripe/_account_session.py b/stripe/_account_session.py index e554dba6d..9028c8e2a 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -509,6 +509,20 @@ class Features(StripeObject): features: Features _inner_class_types = {"features": Features} + class PaymentMethodSettings(StripeObject): + class Features(StripeObject): + disable_stripe_user_authentication: bool + """ + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. This is `false` by default. + """ + + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: Features + _inner_class_types = {"features": Features} + class Payments(StripeObject): class Features(StripeObject): capture_payments: bool @@ -715,6 +729,7 @@ class Features(StripeObject): notification_banner: NotificationBanner payment_details: PaymentDetails payment_disputes: PaymentDisputes + payment_method_settings: PaymentMethodSettings payments: Payments payout_details: PayoutDetails payout_reconciliation_report: PayoutReconciliationReport @@ -760,6 +775,7 @@ class Features(StripeObject): "notification_banner": NotificationBanner, "payment_details": PaymentDetails, "payment_disputes": PaymentDisputes, + "payment_method_settings": PaymentMethodSettings, "payments": Payments, "payout_details": PayoutDetails, "payout_reconciliation_report": PayoutReconciliationReport, diff --git a/stripe/_api_version.py b/stripe/_api_version.py index ff47050f3..15868d4ff 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2026-08-12.preview" + CURRENT = "2026-08-26.preview" CURRENT_MAJOR = "" diff --git a/stripe/_bank_account.py b/stripe/_bank_account.py index c52943f0f..68a55e4fb 100644 --- a/stripe/_bank_account.py +++ b/stripe/_bank_account.py @@ -38,6 +38,12 @@ class BankAccount( class FutureRequirements(StripeObject): class Error(StripeObject): + class Details(StripeObject): + partner_rejection_code: Optional[str] + """ + The rejection code as received from our payment method partner. + """ + code: Literal[ "external_request", "information_missing", @@ -142,6 +148,7 @@ class Error(StripeObject): """ The code for the type of error. """ + details: Optional[Details] reason: str """ An informative message that indicates the error type and provides additional details about the error. @@ -150,6 +157,7 @@ class Error(StripeObject): """ The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. """ + _inner_class_types = {"details": Details} currently_due: Optional[List[str]] """ @@ -171,6 +179,12 @@ class Error(StripeObject): class Requirements(StripeObject): class Error(StripeObject): + class Details(StripeObject): + partner_rejection_code: Optional[str] + """ + The rejection code as received from our payment method partner. + """ + code: Literal[ "external_request", "information_missing", @@ -275,6 +289,7 @@ class Error(StripeObject): """ The code for the type of error. """ + details: Optional[Details] reason: str """ An informative message that indicates the error type and provides additional details about the error. @@ -283,6 +298,7 @@ class Error(StripeObject): """ The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. """ + _inner_class_types = {"details": Details} currently_due: Optional[List[str]] """ diff --git a/stripe/_capability.py b/stripe/_capability.py index 1b955bf09..2efbc1547 100644 --- a/stripe/_capability.py +++ b/stripe/_capability.py @@ -30,6 +30,12 @@ class Alternative(StripeObject): """ class Error(StripeObject): + class Details(StripeObject): + partner_rejection_code: Optional[str] + """ + The rejection code as received from our payment method partner. + """ + code: Literal[ "external_request", "information_missing", @@ -134,6 +140,7 @@ class Error(StripeObject): """ The code for the type of error. """ + details: Optional[Details] reason: str """ An informative message that indicates the error type and provides additional details about the error. @@ -142,6 +149,7 @@ class Error(StripeObject): """ The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. """ + _inner_class_types = {"details": Details} alternatives: Optional[List[Alternative]] """ @@ -225,6 +233,12 @@ class Alternative(StripeObject): """ class Error(StripeObject): + class Details(StripeObject): + partner_rejection_code: Optional[str] + """ + The rejection code as received from our payment method partner. + """ + code: Literal[ "external_request", "information_missing", @@ -329,6 +343,7 @@ class Error(StripeObject): """ The code for the type of error. """ + details: Optional[Details] reason: str """ An informative message that indicates the error type and provides additional details about the error. @@ -337,6 +352,7 @@ class Error(StripeObject): """ The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. """ + _inner_class_types = {"details": Details} alternatives: Optional[List[Alternative]] """ diff --git a/stripe/_charge.py b/stripe/_charge.py index b0dcc2c97..b9c3f9db3 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -698,7 +698,10 @@ class GooglePay(StripeObject): pass class Link(StripeObject): - pass + funding_source_group: Optional[str] + """ + The [funding source group code](https://docs.stripe.com/payments/link/link-payment-methods) applied to this Link payment at confirmation time. + """ class Masterpass(StripeObject): class BillingAddress(StripeObject): @@ -1842,7 +1845,7 @@ class Link(StripeObject): """ funding_source_group: Optional[str] """ - The funding source group applied to this Link payment at confirmation time. Maps to a bundle in your Stripe pricing contract and on Stripe's published pricing page. Omitted if group lookup failed at confirmation time. + The [funding source group code](https://docs.stripe.com/payments/link/link-payment-methods) applied to this Link payment at confirmation time. """ class MbWay(StripeObject): @@ -2296,12 +2299,6 @@ class SepaDebit(StripeObject): Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://docs.stripe.com/api/mandates/retrieve). """ - class Sequra(StripeObject): - transaction_id: Optional[str] - """ - The SeQura transaction ID associated with this payment. - """ - class Shopeepay(StripeObject): pass @@ -2515,7 +2512,6 @@ class Zip(StripeObject): scalapay: Optional[Scalapay] sepa_credit_transfer: Optional[SepaCreditTransfer] sepa_debit: Optional[SepaDebit] - sequra: Optional[Sequra] shopeepay: Optional[Shopeepay] sofort: Optional[Sofort] stripe_account: Optional[StripeAccount] @@ -2593,7 +2589,6 @@ class Zip(StripeObject): "scalapay": Scalapay, "sepa_credit_transfer": SepaCreditTransfer, "sepa_debit": SepaDebit, - "sequra": Sequra, "shopeepay": Shopeepay, "sofort": Sofort, "stripe_account": StripeAccount, diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index afb8223a7..f34357686 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -1508,9 +1508,6 @@ class GeneratedFrom(StripeObject): """ _inner_class_types = {"generated_from": GeneratedFrom} - class Sequra(StripeObject): - pass - class Shopeepay(StripeObject): pass @@ -1722,7 +1719,6 @@ class Zip(StripeObject): satispay: Optional[Satispay] scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] - sequra: Optional[Sequra] shopeepay: Optional[Shopeepay] sofort: Optional[Sofort] stripe_balance: Optional[StripeBalance] @@ -1787,7 +1783,6 @@ class Zip(StripeObject): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", @@ -1867,7 +1862,6 @@ class Zip(StripeObject): "satispay": Satispay, "scalapay": Scalapay, "sepa_debit": SepaDebit, - "sequra": Sequra, "shopeepay": Shopeepay, "sofort": Sofort, "stripe_balance": StripeBalance, diff --git a/stripe/_customer.py b/stripe/_customer.py index ca3900ef9..ebcdd88c2 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -33,6 +33,7 @@ from stripe._customer_cash_balance_transaction import ( CustomerCashBalanceTransaction, ) + from stripe._customer_tax_exemption import CustomerTaxExemption from stripe._discount import Discount from stripe._funding_instructions import FundingInstructions from stripe._payment_method import PaymentMethod @@ -49,6 +50,9 @@ from stripe.params._customer_create_source_params import ( CustomerCreateSourceParams, ) + from stripe.params._customer_create_tax_exemption_params import ( + CustomerCreateTaxExemptionParams, + ) from stripe.params._customer_create_tax_id_params import ( CustomerCreateTaxIdParams, ) @@ -59,6 +63,9 @@ from stripe.params._customer_delete_source_params import ( CustomerDeleteSourceParams, ) + from stripe.params._customer_delete_tax_exemption_params import ( + CustomerDeleteTaxExemptionParams, + ) from stripe.params._customer_delete_tax_id_params import ( CustomerDeleteTaxIdParams, ) @@ -78,6 +85,9 @@ from stripe.params._customer_list_sources_params import ( CustomerListSourcesParams, ) + from stripe.params._customer_list_tax_exemptions_params import ( + CustomerListTaxExemptionsParams, + ) from stripe.params._customer_list_tax_ids_params import ( CustomerListTaxIdsParams, ) @@ -107,6 +117,9 @@ from stripe.params._customer_retrieve_source_params import ( CustomerRetrieveSourceParams, ) + from stripe.params._customer_retrieve_tax_exemption_params import ( + CustomerRetrieveTaxExemptionParams, + ) from stripe.params._customer_retrieve_tax_id_params import ( CustomerRetrieveTaxIdParams, ) @@ -116,6 +129,7 @@ @nested_resource_class_methods("balance_transaction") @nested_resource_class_methods("cash_balance_transaction") +@nested_resource_class_methods("tax_exemption") @nested_resource_class_methods("source") @nested_resource_class_methods("tax_id") class Customer( @@ -1442,6 +1456,166 @@ async def retrieve_cash_balance_transaction_async( ), ) + @classmethod + def delete_tax_exemption( + cls, + customer: str, + id: str, + **params: Unpack["CustomerDeleteTaxExemptionParams"], + ) -> "CustomerTaxExemption": + """ + Delete a location specific tax exemption for a customer. + """ + return cast( + "CustomerTaxExemption", + cls._static_request( + "delete", + "/v1/customers/{customer}/tax_exemptions/{id}".format( + customer=sanitize_id(customer), id=sanitize_id(id) + ), + params=params, + ), + ) + + @classmethod + async def delete_tax_exemption_async( + cls, + customer: str, + id: str, + **params: Unpack["CustomerDeleteTaxExemptionParams"], + ) -> "CustomerTaxExemption": + """ + Delete a location specific tax exemption for a customer. + """ + return cast( + "CustomerTaxExemption", + await cls._static_request_async( + "delete", + "/v1/customers/{customer}/tax_exemptions/{id}".format( + customer=sanitize_id(customer), id=sanitize_id(id) + ), + params=params, + ), + ) + + @classmethod + def retrieve_tax_exemption( + cls, + customer: str, + id: str, + **params: Unpack["CustomerRetrieveTaxExemptionParams"], + ) -> "CustomerTaxExemption": + """ + Retrieve a location specific tax exemption for a customer. + """ + return cast( + "CustomerTaxExemption", + cls._static_request( + "get", + "/v1/customers/{customer}/tax_exemptions/{id}".format( + customer=sanitize_id(customer), id=sanitize_id(id) + ), + params=params, + ), + ) + + @classmethod + async def retrieve_tax_exemption_async( + cls, + customer: str, + id: str, + **params: Unpack["CustomerRetrieveTaxExemptionParams"], + ) -> "CustomerTaxExemption": + """ + Retrieve a location specific tax exemption for a customer. + """ + return cast( + "CustomerTaxExemption", + await cls._static_request_async( + "get", + "/v1/customers/{customer}/tax_exemptions/{id}".format( + customer=sanitize_id(customer), id=sanitize_id(id) + ), + params=params, + ), + ) + + @classmethod + def list_tax_exemptions( + cls, customer: str, **params: Unpack["CustomerListTaxExemptionsParams"] + ) -> ListObject["CustomerTaxExemption"]: + """ + List all location specific tax exemptions for a customer. + """ + return cast( + ListObject["CustomerTaxExemption"], + cls._static_request( + "get", + "/v1/customers/{customer}/tax_exemptions".format( + customer=sanitize_id(customer) + ), + params=params, + ), + ) + + @classmethod + async def list_tax_exemptions_async( + cls, customer: str, **params: Unpack["CustomerListTaxExemptionsParams"] + ) -> ListObject["CustomerTaxExemption"]: + """ + List all location specific tax exemptions for a customer. + """ + return cast( + ListObject["CustomerTaxExemption"], + await cls._static_request_async( + "get", + "/v1/customers/{customer}/tax_exemptions".format( + customer=sanitize_id(customer) + ), + params=params, + ), + ) + + @classmethod + def create_tax_exemption( + cls, + customer: str, + **params: Unpack["CustomerCreateTaxExemptionParams"], + ) -> "CustomerTaxExemption": + """ + Create a location specific tax exemption for a customer. + """ + return cast( + "CustomerTaxExemption", + cls._static_request( + "post", + "/v1/customers/{customer}/tax_exemptions".format( + customer=sanitize_id(customer) + ), + params=params, + ), + ) + + @classmethod + async def create_tax_exemption_async( + cls, + customer: str, + **params: Unpack["CustomerCreateTaxExemptionParams"], + ) -> "CustomerTaxExemption": + """ + Create a location specific tax exemption for a customer. + """ + return cast( + "CustomerTaxExemption", + await cls._static_request_async( + "post", + "/v1/customers/{customer}/tax_exemptions".format( + customer=sanitize_id(customer) + ), + params=params, + ), + ) + @classmethod def list_sources( cls, customer: str, **params: Unpack["CustomerListSourcesParams"] diff --git a/stripe/_customer_service.py b/stripe/_customer_service.py index 58cc7f58c..c986fbca5 100644 --- a/stripe/_customer_service.py +++ b/stripe/_customer_service.py @@ -29,6 +29,9 @@ from stripe._customer_payment_source_service import ( CustomerPaymentSourceService, ) + from stripe._customer_tax_exemption_service import ( + CustomerTaxExemptionService, + ) from stripe._customer_tax_id_service import CustomerTaxIdService from stripe._discount import Discount from stripe._list_object import ListObject @@ -69,6 +72,10 @@ "stripe._customer_payment_source_service", "CustomerPaymentSourceService", ], + "tax_exemptions": [ + "stripe._customer_tax_exemption_service", + "CustomerTaxExemptionService", + ], "tax_ids": ["stripe._customer_tax_id_service", "CustomerTaxIdService"], } @@ -80,6 +87,7 @@ class CustomerService(StripeService): funding_instructions: "CustomerFundingInstructionsService" payment_methods: "CustomerPaymentMethodService" payment_sources: "CustomerPaymentSourceService" + tax_exemptions: "CustomerTaxExemptionService" tax_ids: "CustomerTaxIdService" def __init__(self, requestor): diff --git a/stripe/_customer_tax_exemption.py b/stripe/_customer_tax_exemption.py new file mode 100644 index 000000000..b3d12cc07 --- /dev/null +++ b/stripe/_customer_tax_exemption.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, Optional +from typing_extensions import Literal + + +class CustomerTaxExemption(StripeObject): + """ + Location specific customer tax exemptions. + """ + + OBJECT_NAME: ClassVar[Literal["customer_tax_exemption"]] = ( + "customer_tax_exemption" + ) + + class Ca(StripeObject): + state: Optional[str] + """ + Two-letter Canadian province code (ISO 3166-2). Null for country-wide GST/HST exemptions. + """ + tax_type: str + """ + The type of Canadian tax (gst_hst, PST, QST, RST). + """ + + class Us(StripeObject): + state: str + """ + Two-letter US state code (ISO 3166-2). + """ + + ca: Optional[Ca] + country: str + created: int + customer: str + deleted: Optional[bool] + """ + Present and true when the exemption has been deleted. + """ + effective_date: str + """ + ISO 8601 date (YYYY-MM-DD) when the exemption becomes effective. + """ + expiration_date: Optional[str] + """ + ISO 8601 date (YYYY-MM-DD) when the exemption expires. + """ + id: str + livemode: bool + object: Literal["customer_tax_exemption"] + us: Optional[Us] + _inner_class_types = {"ca": Ca, "us": Us} diff --git a/stripe/_customer_tax_exemption_service.py b/stripe/_customer_tax_exemption_service.py new file mode 100644 index 000000000..3f61a6226 --- /dev/null +++ b/stripe/_customer_tax_exemption_service.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_service import StripeService +from stripe._util import sanitize_id +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe._customer_tax_exemption import CustomerTaxExemption + from stripe._list_object import ListObject + from stripe._request_options import RequestOptions + from stripe.params._customer_tax_exemption_create_params import ( + CustomerTaxExemptionCreateParams, + ) + from stripe.params._customer_tax_exemption_delete_params import ( + CustomerTaxExemptionDeleteParams, + ) + from stripe.params._customer_tax_exemption_list_params import ( + CustomerTaxExemptionListParams, + ) + from stripe.params._customer_tax_exemption_retrieve_params import ( + CustomerTaxExemptionRetrieveParams, + ) + + +class CustomerTaxExemptionService(StripeService): + def delete( + self, + customer: str, + id: str, + params: Optional["CustomerTaxExemptionDeleteParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "CustomerTaxExemption": + """ + Delete a location specific tax exemption for a customer. + """ + return cast( + "CustomerTaxExemption", + self._request( + "delete", + "/v1/customers/{customer}/tax_exemptions/{id}".format( + customer=sanitize_id(customer), + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def delete_async( + self, + customer: str, + id: str, + params: Optional["CustomerTaxExemptionDeleteParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "CustomerTaxExemption": + """ + Delete a location specific tax exemption for a customer. + """ + return cast( + "CustomerTaxExemption", + await self._request_async( + "delete", + "/v1/customers/{customer}/tax_exemptions/{id}".format( + customer=sanitize_id(customer), + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + customer: str, + id: str, + params: Optional["CustomerTaxExemptionRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "CustomerTaxExemption": + """ + Retrieve a location specific tax exemption for a customer. + """ + return cast( + "CustomerTaxExemption", + self._request( + "get", + "/v1/customers/{customer}/tax_exemptions/{id}".format( + customer=sanitize_id(customer), + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + customer: str, + id: str, + params: Optional["CustomerTaxExemptionRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "CustomerTaxExemption": + """ + Retrieve a location specific tax exemption for a customer. + """ + return cast( + "CustomerTaxExemption", + await self._request_async( + "get", + "/v1/customers/{customer}/tax_exemptions/{id}".format( + customer=sanitize_id(customer), + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def list( + self, + customer: str, + params: Optional["CustomerTaxExemptionListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[CustomerTaxExemption]": + """ + List all location specific tax exemptions for a customer. + """ + return cast( + "ListObject[CustomerTaxExemption]", + self._request( + "get", + "/v1/customers/{customer}/tax_exemptions".format( + customer=sanitize_id(customer), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + customer: str, + params: Optional["CustomerTaxExemptionListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[CustomerTaxExemption]": + """ + List all location specific tax exemptions for a customer. + """ + return cast( + "ListObject[CustomerTaxExemption]", + await self._request_async( + "get", + "/v1/customers/{customer}/tax_exemptions".format( + customer=sanitize_id(customer), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + customer: str, + params: "CustomerTaxExemptionCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "CustomerTaxExemption": + """ + Create a location specific tax exemption for a customer. + """ + return cast( + "CustomerTaxExemption", + self._request( + "post", + "/v1/customers/{customer}/tax_exemptions".format( + customer=sanitize_id(customer), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + customer: str, + params: "CustomerTaxExemptionCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "CustomerTaxExemption": + """ + Create a location specific tax exemption for a customer. + """ + return cast( + "CustomerTaxExemption", + await self._request_async( + "post", + "/v1/customers/{customer}/tax_exemptions".format( + customer=sanitize_id(customer), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/_dispute.py b/stripe/_dispute.py index 4ad159b06..96a3571ba 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -456,7 +456,7 @@ class Paypal(StripeObject): class SmartDisputes(StripeObject): recommended_evidence: Optional[List[List[str]]] """ - Evidence that could be provided to improve the SmartDisputes packet + Evidence that could be provided to improve the Smart Disputes packet """ status: Literal[ "available", "processing", "requires_evidence", "unavailable" diff --git a/stripe/_ephemeral_key.py b/stripe/_ephemeral_key.py index 2c0564c26..88766347f 100644 --- a/stripe/_ephemeral_key.py +++ b/stripe/_ephemeral_key.py @@ -16,6 +16,13 @@ class EphemeralKey( CreateableAPIResource["EphemeralKey"], DeletableAPIResource["EphemeralKey"], ): + """ + Ephemeral keys give the SDKs (like Stripe's mobile SDKs and Issuing Elements) temporary, scoped access to a specific + resource, such as a Customer, Issuing Card, or Identity VerificationSession, without exposing your secret API key. + + Related guides: [Using Issuing Elements](https://docs.stripe.com/issuing/elements). + """ + OBJECT_NAME: ClassVar[Literal["ephemeral_key"]] = "ephemeral_key" created: int """ diff --git a/stripe/_event.py b/stripe/_event.py index a78ad0959..f50a63b62 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -141,322 +141,319 @@ class Request(StripeObject): """ Information on the API request that triggers the event. """ - type: Union[ - Literal[ - "account.application.authorized", - "account.application.deauthorized", - "account.external_account.created", - "account.external_account.deleted", - "account.external_account.updated", - "account.updated", - "account_notice.created", - "account_notice.updated", - "application_fee.created", - "application_fee.refund.updated", - "application_fee.refunded", - "balance.available", - "balance_settings.updated", - "billing.alert.recovered", - "billing.alert.triggered", - "billing.credit_balance_transaction.created", - "billing.credit_grant.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", - "billing_portal.configuration.created", - "billing_portal.configuration.updated", - "billing_portal.session.created", - "capability.updated", - "capital.financing_offer.accepted", - "capital.financing_offer.accepted_other_offer", - "capital.financing_offer.canceled", - "capital.financing_offer.created", - "capital.financing_offer.expired", - "capital.financing_offer.fully_repaid", - "capital.financing_offer.paid_out", - "capital.financing_offer.rejected", - "capital.financing_offer.replacement_created", - "capital.financing_summary.line_of_credit_update", - "capital.financing_transaction.created", - "cash_balance.funds_available", - "charge.captured", - "charge.dispute.closed", - "charge.dispute.created", - "charge.dispute.funds_reinstated", - "charge.dispute.funds_withdrawn", - "charge.dispute.updated", - "charge.expired", - "charge.failed", - "charge.pending", - "charge.refund.updated", - "charge.refunded", - "charge.succeeded", - "charge.updated", - "checkout.session.async_payment_failed", - "checkout.session.async_payment_succeeded", - "checkout.session.completed", - "checkout.session.expired", - "climate.order.canceled", - "climate.order.created", - "climate.order.delayed", - "climate.order.delivered", - "climate.order.product_substituted", - "climate.product.created", - "climate.product.pricing_updated", - "coupon.created", - "coupon.deleted", - "coupon.updated", - "credit_note.created", - "credit_note.updated", - "credit_note.voided", - "customer.created", - "customer.deleted", - "customer.discount.created", - "customer.discount.deleted", - "customer.discount.updated", - "customer.source.created", - "customer.source.deleted", - "customer.source.expiring", - "customer.source.updated", - "customer.subscription.collection_paused", - "customer.subscription.collection_resumed", - "customer.subscription.created", - "customer.subscription.custom_event", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.pending_update_applied", - "customer.subscription.pending_update_expired", - "customer.subscription.price_migration_failed", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", - "customer.updated", - "customer_cash_balance_transaction.created", - "entitlements.active_entitlement_summary.updated", - "file.created", - "financial_connections.account.account_numbers_updated", - "financial_connections.account.created", - "financial_connections.account.deactivated", - "financial_connections.account.disconnected", - "financial_connections.account.expected_deactivation_date_updated", - "financial_connections.account.reactivated", - "financial_connections.account.refreshed_balance", - "financial_connections.account.refreshed_inferred_balances", - "financial_connections.account.refreshed_ownership", - "financial_connections.account.refreshed_transactions", - "financial_connections.account.supported_payment_method_types_updated", - "financial_connections.account.upcoming_account_number_expiry", - "financial_connections.account.upcoming_deactivation", - "financial_connections.authorization.expected_deactivation_date_updated", - "financial_connections.authorization.upcoming_deactivation", - "financial_connections.session.updated", - "fx_quote.expired", - "identity.verification_session.canceled", - "identity.verification_session.created", - "identity.verification_session.processing", - "identity.verification_session.redacted", - "identity.verification_session.requires_input", - "identity.verification_session.verified", - "invoice.created", - "invoice.deleted", - "invoice.finalization_failed", - "invoice.finalized", - "invoice.marked_uncollectible", - "invoice.overdue", - "invoice.overpaid", - "invoice.paid", - "invoice.payment.overpaid", - "invoice.payment_action_required", - "invoice.payment_attempt_required", - "invoice.payment_failed", - "invoice.payment_succeeded", - "invoice.sent", - "invoice.upcoming", - "invoice.updated", - "invoice.voided", - "invoice.will_be_due", - "invoice_payment.detached", - "invoice_payment.paid", - "invoiceitem.created", - "invoiceitem.deleted", - "issuing_authorization.created", - "issuing_authorization.request", - "issuing_authorization.updated", - "issuing_card.created", - "issuing_card.updated", - "issuing_cardholder.created", - "issuing_cardholder.updated", - "issuing_dispute.closed", - "issuing_dispute.created", - "issuing_dispute.funds_reinstated", - "issuing_dispute.funds_rescinded", - "issuing_dispute.submitted", - "issuing_dispute.updated", - "issuing_dispute_settlement_detail.created", - "issuing_dispute_settlement_detail.updated", - "issuing_fraud_liability_debit.created", - "issuing_personalization_design.activated", - "issuing_personalization_design.deactivated", - "issuing_personalization_design.rejected", - "issuing_personalization_design.updated", - "issuing_settlement.created", - "issuing_settlement.updated", - "issuing_token.created", - "issuing_token.updated", - "issuing_transaction.created", - "issuing_transaction.purchase_details_receipt_updated", - "issuing_transaction.updated", - "mandate.updated", - "payment_intent.amount_capturable_updated", - "payment_intent.canceled", - "payment_intent.created", - "payment_intent.expired", - "payment_intent.partially_funded", - "payment_intent.payment_failed", - "payment_intent.processing", - "payment_intent.requires_action", - "payment_intent.succeeded", - "payment_link.created", - "payment_link.updated", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.detached", - "payment_method.updated", - "payment_plan.created", - "payment_plan.installment_due", - "payment_plan.installment_paid", - "payment_plan.installment_will_be_due", - "payment_plan.updated", - "payout.canceled", - "payout.created", - "payout.failed", - "payout.paid", - "payout.reconciliation_completed", - "payout.updated", - "person.created", - "person.deleted", - "person.updated", - "plan.created", - "plan.deleted", - "plan.updated", - "price.created", - "price.deleted", - "price.updated", - "privacy.redaction_job.canceled", - "privacy.redaction_job.created", - "privacy.redaction_job.ready", - "privacy.redaction_job.succeeded", - "privacy.redaction_job.validation_error", - "product.created", - "product.deleted", - "product.updated", - "promotion_code.created", - "promotion_code.updated", - "quote.accept_failed", - "quote.accepted", - "quote.accepting", - "quote.canceled", - "quote.created", - "quote.draft", - "quote.finalized", - "quote.reestimate_failed", - "quote.reestimated", - "quote.stale", - "radar.early_fraud_warning.created", - "radar.early_fraud_warning.updated", - "refund.created", - "refund.failed", - "refund.updated", - "reporting.report_run.failed", - "reporting.report_run.succeeded", - "reporting.report_type.updated", - "reserve.hold.created", - "reserve.hold.updated", - "reserve.plan.created", - "reserve.plan.disabled", - "reserve.plan.expired", - "reserve.plan.updated", - "reserve.release.created", - "review.closed", - "review.opened", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.setup_failed", - "setup_intent.succeeded", - "sigma.scheduled_query_run.created", - "source.canceled", - "source.chargeable", - "source.failed", - "source.mandate_notification", - "source.refund_attributes_required", - "source.transaction.created", - "source.transaction.updated", - "subscription_schedule.aborted", - "subscription_schedule.canceled", - "subscription_schedule.completed", - "subscription_schedule.created", - "subscription_schedule.expiring", - "subscription_schedule.price_migration_failed", - "subscription_schedule.released", - "subscription_schedule.updated", - "tax.form.updated", - "tax.settings.updated", - "tax_rate.created", - "tax_rate.updated", - "terminal.reader.action_failed", - "terminal.reader.action_succeeded", - "terminal.reader.action_updated", - "test_helpers.test_clock.advancing", - "test_helpers.test_clock.created", - "test_helpers.test_clock.deleted", - "test_helpers.test_clock.internal_failure", - "test_helpers.test_clock.ready", - "topup.canceled", - "topup.created", - "topup.failed", - "topup.reversed", - "topup.succeeded", - "transfer.created", - "transfer.reversed", - "transfer.updated", - "treasury.credit_reversal.created", - "treasury.credit_reversal.posted", - "treasury.debit_reversal.completed", - "treasury.debit_reversal.created", - "treasury.debit_reversal.initial_credit_granted", - "treasury.financial_account.closed", - "treasury.financial_account.created", - "treasury.financial_account.features_status_updated", - "treasury.inbound_transfer.canceled", - "treasury.inbound_transfer.created", - "treasury.inbound_transfer.failed", - "treasury.inbound_transfer.succeeded", - "treasury.outbound_payment.canceled", - "treasury.outbound_payment.created", - "treasury.outbound_payment.expected_arrival_date_updated", - "treasury.outbound_payment.failed", - "treasury.outbound_payment.posted", - "treasury.outbound_payment.returned", - "treasury.outbound_payment.tracking_details_updated", - "treasury.outbound_transfer.canceled", - "treasury.outbound_transfer.created", - "treasury.outbound_transfer.expected_arrival_date_updated", - "treasury.outbound_transfer.failed", - "treasury.outbound_transfer.posted", - "treasury.outbound_transfer.returned", - "treasury.outbound_transfer.tracking_details_updated", - "treasury.received_credit.created", - "treasury.received_credit.failed", - "treasury.received_credit.succeeded", - "treasury.received_debit.created", - ], - str, + type: Literal[ + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "account_notice.created", + "account_notice.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "balance_settings.updated", + "billing.alert.recovered", + "billing.alert.triggered", + "billing.credit_balance_transaction.created", + "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "capital.financing_offer.accepted", + "capital.financing_offer.accepted_other_offer", + "capital.financing_offer.canceled", + "capital.financing_offer.created", + "capital.financing_offer.expired", + "capital.financing_offer.fully_repaid", + "capital.financing_offer.paid_out", + "capital.financing_offer.rejected", + "capital.financing_offer.replacement_created", + "capital.financing_summary.line_of_credit_update", + "capital.financing_transaction.created", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.collection_paused", + "customer.subscription.collection_resumed", + "customer.subscription.created", + "customer.subscription.custom_event", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.price_migration_failed", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "entitlements.active_entitlement_summary.updated", + "file.created", + "financial_connections.account.account_numbers_updated", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.expected_deactivation_date_updated", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "financial_connections.account.refreshed_inferred_balances", + "financial_connections.account.refreshed_ownership", + "financial_connections.account.refreshed_transactions", + "financial_connections.account.supported_payment_method_types_updated", + "financial_connections.account.upcoming_account_number_expiry", + "financial_connections.account.upcoming_deactivation", + "financial_connections.authorization.expected_deactivation_date_updated", + "financial_connections.authorization.upcoming_deactivation", + "financial_connections.session.updated", + "fx_quote.expired", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.overdue", + "invoice.overpaid", + "invoice.paid", + "invoice.payment.overpaid", + "invoice.payment_action_required", + "invoice.payment_attempt_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoice.will_be_due", + "invoice_payment.detached", + "invoice_payment.paid", + "invoiceitem.created", + "invoiceitem.deleted", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.funds_rescinded", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_dispute_settlement_detail.created", + "issuing_dispute_settlement_detail.updated", + "issuing_fraud_liability_debit.created", + "issuing_personalization_design.activated", + "issuing_personalization_design.deactivated", + "issuing_personalization_design.rejected", + "issuing_personalization_design.updated", + "issuing_settlement.created", + "issuing_settlement.updated", + "issuing_token.created", + "issuing_token.updated", + "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", + "issuing_transaction.updated", + "mandate.updated", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.expired", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payment_plan.created", + "payment_plan.installment_due", + "payment_plan.installment_paid", + "payment_plan.installment_will_be_due", + "payment_plan.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.reconciliation_completed", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "privacy.redaction_job.canceled", + "privacy.redaction_job.created", + "privacy.redaction_job.ready", + "privacy.redaction_job.succeeded", + "privacy.redaction_job.validation_error", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accept_failed", + "quote.accepted", + "quote.accepting", + "quote.canceled", + "quote.created", + "quote.draft", + "quote.finalized", + "quote.reestimate_failed", + "quote.reestimated", + "quote.stale", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "refund.created", + "refund.failed", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "reserve.hold.created", + "reserve.hold.updated", + "reserve.plan.created", + "reserve.plan.disabled", + "reserve.plan.expired", + "reserve.plan.updated", + "reserve.release.created", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.price_migration_failed", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax.form.updated", + "tax.settings.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "terminal.reader.action_updated", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_payment.tracking_details_updated", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.outbound_transfer.tracking_details_updated", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created", ] """ Description of the event (for example, `invoice.created` or `charge.refunded`). diff --git a/stripe/_event_notification_handler.py b/stripe/_event_notification_handler.py index 41e4bfb78..acf4b4256 100644 --- a/stripe/_event_notification_handler.py +++ b/stripe/_event_notification_handler.py @@ -1,11 +1,39 @@ -# -*- coding: utf-8 -*- -from dataclasses import dataclass -from typing_extensions import TYPE_CHECKING +""" +We use a combination of generics and inheritance to construct 4 handler classes with perfect type information while reusing as much code as we can. +Each handler has the methods/signatures that will actually work: + +| | verified | unverified | +| ----- | ----------------------------------- | ------------------------------------------------------ | +| sync | StripeEventNotificationHandler | StripeEventNotificationHandlerWithoutVerification | +| async | AsyncStripeEventNotificationHandler | AsyncStripeEventNotificationHandlerWithoutVerification | + +A pair of generic variables gives us the following class hierarchy (names edited for brevity): -from typing import TypeVar, Callable, List +- _BaseHandler(Generic[CallbackReturn, PreHandleReturn]) + - _SyncHandler(_BaseHandler[None, bool]) + - StripeHandler(_SyncHandler) + - StripeHandlerWithoutVerification(_SyncHandler) + - _AsyncHandler(_BaseHandler[None, bool]) + - AsyncStripeHandler(_AsyncHandler) + - AsyncStripeHandlerWithoutVerification(_AsyncHandler) + +Each defines `handle` and `register` methods corresponding to the types it expects +""" + +from dataclasses import dataclass +from typing_extensions import TYPE_CHECKING, Awaitable + +from typing import ( + Callable, + Generic, + List, + Optional, + TypeVar, +) # Import at runtime for isinstance check and type annotations from stripe.v2.core._event import EventNotification, UnknownEventNotification +from stripe._webhook import WebhookPayload if TYPE_CHECKING: from stripe._stripe_client import StripeClient @@ -1354,65 +1382,110 @@ class UnhandledNotificationDetails: """ -FallbackCallback = Callable[ - [EventNotification, "StripeClient", UnhandledNotificationDetails], None +# The handler base class is generic over what its callbacks return, which lets us reuse base classes for both the sync and async handlers. +CallbackReturn = TypeVar("CallbackReturn") +PreHandleReturn = TypeVar("PreHandleReturn") + +_FallbackCallback = Callable[ + [EventNotification, "StripeClient", UnhandledNotificationDetails], + CallbackReturn, +] + +_PreHandleCallback = Callable[ + [EventNotification, "StripeClient"], PreHandleReturn ] + +FallbackCallback = _FallbackCallback[None] +""" +Called when no other callback is registered for a given event notification type. +""" + +AsyncFallbackCallback = _FallbackCallback[Awaitable[None]] +""" +This async function is called when no other callback is registered for a given event notification type. +""" + +PreHandleCallback = _PreHandleCallback[bool] """ -This function is called when no other callback is registered for a given event notification type. +Called before any of your callbacks are run. Useful for filtering. """ +AsyncPreHandleCallback = _PreHandleCallback[Awaitable[bool]] +""" +This async function is called before any of your callbacks are run. Useful for filtering. +""" -class _BaseEventNotificationHandler: + +class _BaseEventNotificationHandler(Generic[CallbackReturn, PreHandleReturn]): """ - Shared internal registration and dispatch machinery for the two user-facing event handlers. + Shared internal registration machinery for the user-facing event handlers. + + Holds everything that doesn't depend on whether callbacks are awaited; the + sync and async subclasses below add only the dispatch loop itself. """ def __init__( self, client: "StripeClient", - fallback_callback: FallbackCallback, + fallback_callback: _FallbackCallback[CallbackReturn], ) -> None: self._registered_handlers = {} self._client = client self.fallback_callback = fallback_callback # once this is true, adding additional handlers results in an error self._has_handled_events = False + self._pre_handle_callback: Optional[ + _PreHandleCallback[PreHandleReturn] + ] = None - def _dispatch(self, event_notif: "EventNotification"): - # Create a new client with the event's context. - # This is thread-safe since we're not modifying the original client. - # The new client reuses the HTTP client to avoid TLS handshake overhead. - client_with_event_context = self._client.with_stripe_context( - event_notif.context - ) - - if event_notif.type in self._registered_handlers: - self._registered_handlers[event_notif.type]( - event_notif, client_with_event_context + def _assert_hasnt_handled(self) -> None: + """ + Callbacks are expected to be registered on startup, so registering anything after handling an event indicates a bug. + """ + if self._has_handled_events: + raise RuntimeError( + "Cannot register new callbacks after an event has been handled. This is indicative of a bug." ) - else: - self.fallback_callback( - event_notif, - client_with_event_context, - UnhandledNotificationDetails( - is_known_event_type=not isinstance( - event_notif, UnknownEventNotification - ) - ), + + def pre_handle( + self, func: _PreHandleCallback[PreHandleReturn] + ) -> _PreHandleCallback[PreHandleReturn]: + """ + Registers a function that will be run before any event-specific callbacks. A useful place to store event-agnostic logic, such as logging or checking for [duplicate event deliveries](https://docs.stripe.com/webhooks#handle-duplicate-events). + + Returning `True` causes handling to continue as normal; returning `False` returns from `.handle()` immediately, so neither the registered callback nor the fallback callback are called. + """ + self._assert_hasnt_handled() + if self._pre_handle_callback: + raise ValueError("A pre_handle callback is already registered") + + self._pre_handle_callback = func + return func + + def _callback_for(self, event_notif: "EventNotification"): + """ + Returns the callback registered for this event's type, if any. + """ + return self._registered_handlers.get(event_notif.type) + + def _unhandled_details( + self, event_notif: "EventNotification" + ) -> UnhandledNotificationDetails: + return UnhandledNotificationDetails( + is_known_event_type=not isinstance( + event_notif, UnknownEventNotification ) + ) def _register( self, event_type: str, - func: "Callable[[EventNotificationChild, StripeClient], None]", + func: "Callable[[EventNotificationChild, StripeClient], CallbackReturn]", ) -> None: - if self._has_handled_events: - raise RuntimeError( - "Cannot register new event handlers after .handle() has been called. This is indicative of a bug." - ) + self._assert_hasnt_handled() if event_type in self._registered_handlers: raise ValueError( - f'Handler for event type "{event_type}" already registered.' + f'Callback for event type "{event_type}" is already registered' ) self._registered_handlers[event_type] = func @@ -1427,7 +1500,7 @@ def registered_event_types(self) -> List[str]: # event-notification-registration-methods: The beginning of the section generated from our OpenAPI spec def on_v1_account_application_authorized( self, - func: "Callable[[V1AccountApplicationAuthorizedEventNotification, StripeClient], None]", + func: "Callable[[V1AccountApplicationAuthorizedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1AccountApplicationAuthorizedEvent` (`v1.account.application.authorized`) event notification. @@ -1440,7 +1513,7 @@ def on_v1_account_application_authorized( def on_v1_account_application_deauthorized( self, - func: "Callable[[V1AccountApplicationDeauthorizedEventNotification, StripeClient], None]", + func: "Callable[[V1AccountApplicationDeauthorizedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1AccountApplicationDeauthorizedEvent` (`v1.account.application.deauthorized`) event notification. @@ -1453,7 +1526,7 @@ def on_v1_account_application_deauthorized( def on_v1_account_external_account_created( self, - func: "Callable[[V1AccountExternalAccountCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1AccountExternalAccountCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1AccountExternalAccountCreatedEvent` (`v1.account.external_account.created`) event notification. @@ -1466,7 +1539,7 @@ def on_v1_account_external_account_created( def on_v1_account_external_account_deleted( self, - func: "Callable[[V1AccountExternalAccountDeletedEventNotification, StripeClient], None]", + func: "Callable[[V1AccountExternalAccountDeletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1AccountExternalAccountDeletedEvent` (`v1.account.external_account.deleted`) event notification. @@ -1479,7 +1552,7 @@ def on_v1_account_external_account_deleted( def on_v1_account_external_account_updated( self, - func: "Callable[[V1AccountExternalAccountUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1AccountExternalAccountUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1AccountExternalAccountUpdatedEvent` (`v1.account.external_account.updated`) event notification. @@ -1492,7 +1565,7 @@ def on_v1_account_external_account_updated( def on_v1_account_signals_including_delinquency_created( self, - func: "Callable[[V1AccountSignalsIncludingDelinquencyCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1AccountSignalsIncludingDelinquencyCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1AccountSignalsIncludingDelinquencyCreatedEvent` (`v1.account_signals[delinquency].created`) event notification. @@ -1505,7 +1578,7 @@ def on_v1_account_signals_including_delinquency_created( def on_v1_account_updated( self, - func: "Callable[[V1AccountUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1AccountUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1AccountUpdatedEvent` (`v1.account.updated`) event notification. @@ -1518,7 +1591,7 @@ def on_v1_account_updated( def on_v1_application_fee_created( self, - func: "Callable[[V1ApplicationFeeCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1ApplicationFeeCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ApplicationFeeCreatedEvent` (`v1.application_fee.created`) event notification. @@ -1531,7 +1604,7 @@ def on_v1_application_fee_created( def on_v1_application_fee_refunded( self, - func: "Callable[[V1ApplicationFeeRefundedEventNotification, StripeClient], None]", + func: "Callable[[V1ApplicationFeeRefundedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ApplicationFeeRefundedEvent` (`v1.application_fee.refunded`) event notification. @@ -1544,7 +1617,7 @@ def on_v1_application_fee_refunded( def on_v1_application_fee_refund_updated( self, - func: "Callable[[V1ApplicationFeeRefundUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1ApplicationFeeRefundUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ApplicationFeeRefundUpdatedEvent` (`v1.application_fee.refund.updated`) event notification. @@ -1557,7 +1630,7 @@ def on_v1_application_fee_refund_updated( def on_v1_balance_available( self, - func: "Callable[[V1BalanceAvailableEventNotification, StripeClient], None]", + func: "Callable[[V1BalanceAvailableEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BalanceAvailableEvent` (`v1.balance.available`) event notification. @@ -1570,7 +1643,7 @@ def on_v1_balance_available( def on_v1_balance_settings_updated( self, - func: "Callable[[V1BalanceSettingsUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1BalanceSettingsUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BalanceSettingsUpdatedEvent` (`v1.balance_settings.updated`) event notification. @@ -1583,7 +1656,7 @@ def on_v1_balance_settings_updated( def on_v1_billing_alert_triggered( self, - func: "Callable[[V1BillingAlertTriggeredEventNotification, StripeClient], None]", + func: "Callable[[V1BillingAlertTriggeredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BillingAlertTriggeredEvent` (`v1.billing.alert.triggered`) event notification. @@ -1596,7 +1669,7 @@ def on_v1_billing_alert_triggered( def on_v1_billing_credit_balance_transaction_created( self, - func: "Callable[[V1BillingCreditBalanceTransactionCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1BillingCreditBalanceTransactionCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BillingCreditBalanceTransactionCreatedEvent` (`v1.billing.credit_balance_transaction.created`) event notification. @@ -1609,7 +1682,7 @@ def on_v1_billing_credit_balance_transaction_created( def on_v1_billing_credit_grant_created( self, - func: "Callable[[V1BillingCreditGrantCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1BillingCreditGrantCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BillingCreditGrantCreatedEvent` (`v1.billing.credit_grant.created`) event notification. @@ -1622,7 +1695,7 @@ def on_v1_billing_credit_grant_created( def on_v1_billing_credit_grant_updated( self, - func: "Callable[[V1BillingCreditGrantUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1BillingCreditGrantUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BillingCreditGrantUpdatedEvent` (`v1.billing.credit_grant.updated`) event notification. @@ -1635,7 +1708,7 @@ def on_v1_billing_credit_grant_updated( def on_v1_billing_meter_created( self, - func: "Callable[[V1BillingMeterCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1BillingMeterCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BillingMeterCreatedEvent` (`v1.billing.meter.created`) event notification. @@ -1648,7 +1721,7 @@ def on_v1_billing_meter_created( def on_v1_billing_meter_deactivated( self, - func: "Callable[[V1BillingMeterDeactivatedEventNotification, StripeClient], None]", + func: "Callable[[V1BillingMeterDeactivatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BillingMeterDeactivatedEvent` (`v1.billing.meter.deactivated`) event notification. @@ -1661,7 +1734,7 @@ def on_v1_billing_meter_deactivated( def on_v1_billing_meter_error_report_triggered( self, - func: "Callable[[V1BillingMeterErrorReportTriggeredEventNotification, StripeClient], None]", + func: "Callable[[V1BillingMeterErrorReportTriggeredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BillingMeterErrorReportTriggeredEvent` (`v1.billing.meter.error_report_triggered`) event notification. @@ -1674,7 +1747,7 @@ def on_v1_billing_meter_error_report_triggered( def on_v1_billing_meter_no_meter_found( self, - func: "Callable[[V1BillingMeterNoMeterFoundEventNotification, StripeClient], None]", + func: "Callable[[V1BillingMeterNoMeterFoundEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BillingMeterNoMeterFoundEvent` (`v1.billing.meter.no_meter_found`) event notification. @@ -1687,7 +1760,7 @@ def on_v1_billing_meter_no_meter_found( def on_v1_billing_meter_reactivated( self, - func: "Callable[[V1BillingMeterReactivatedEventNotification, StripeClient], None]", + func: "Callable[[V1BillingMeterReactivatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BillingMeterReactivatedEvent` (`v1.billing.meter.reactivated`) event notification. @@ -1700,7 +1773,7 @@ def on_v1_billing_meter_reactivated( def on_v1_billing_meter_updated( self, - func: "Callable[[V1BillingMeterUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1BillingMeterUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BillingMeterUpdatedEvent` (`v1.billing.meter.updated`) event notification. @@ -1713,7 +1786,7 @@ def on_v1_billing_meter_updated( def on_v1_billing_portal_configuration_created( self, - func: "Callable[[V1BillingPortalConfigurationCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1BillingPortalConfigurationCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BillingPortalConfigurationCreatedEvent` (`v1.billing_portal.configuration.created`) event notification. @@ -1726,7 +1799,7 @@ def on_v1_billing_portal_configuration_created( def on_v1_billing_portal_configuration_updated( self, - func: "Callable[[V1BillingPortalConfigurationUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1BillingPortalConfigurationUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BillingPortalConfigurationUpdatedEvent` (`v1.billing_portal.configuration.updated`) event notification. @@ -1739,7 +1812,7 @@ def on_v1_billing_portal_configuration_updated( def on_v1_billing_portal_session_created( self, - func: "Callable[[V1BillingPortalSessionCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1BillingPortalSessionCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1BillingPortalSessionCreatedEvent` (`v1.billing_portal.session.created`) event notification. @@ -1752,7 +1825,7 @@ def on_v1_billing_portal_session_created( def on_v1_capability_updated( self, - func: "Callable[[V1CapabilityUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1CapabilityUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CapabilityUpdatedEvent` (`v1.capability.updated`) event notification. @@ -1765,7 +1838,7 @@ def on_v1_capability_updated( def on_v1_cash_balance_funds_available( self, - func: "Callable[[V1CashBalanceFundsAvailableEventNotification, StripeClient], None]", + func: "Callable[[V1CashBalanceFundsAvailableEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CashBalanceFundsAvailableEvent` (`v1.cash_balance.funds_available`) event notification. @@ -1778,7 +1851,7 @@ def on_v1_cash_balance_funds_available( def on_v1_charge_captured( self, - func: "Callable[[V1ChargeCapturedEventNotification, StripeClient], None]", + func: "Callable[[V1ChargeCapturedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ChargeCapturedEvent` (`v1.charge.captured`) event notification. @@ -1791,7 +1864,7 @@ def on_v1_charge_captured( def on_v1_charge_dispute_closed( self, - func: "Callable[[V1ChargeDisputeClosedEventNotification, StripeClient], None]", + func: "Callable[[V1ChargeDisputeClosedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ChargeDisputeClosedEvent` (`v1.charge.dispute.closed`) event notification. @@ -1804,7 +1877,7 @@ def on_v1_charge_dispute_closed( def on_v1_charge_dispute_created( self, - func: "Callable[[V1ChargeDisputeCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1ChargeDisputeCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ChargeDisputeCreatedEvent` (`v1.charge.dispute.created`) event notification. @@ -1817,7 +1890,7 @@ def on_v1_charge_dispute_created( def on_v1_charge_dispute_funds_reinstated( self, - func: "Callable[[V1ChargeDisputeFundsReinstatedEventNotification, StripeClient], None]", + func: "Callable[[V1ChargeDisputeFundsReinstatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ChargeDisputeFundsReinstatedEvent` (`v1.charge.dispute.funds_reinstated`) event notification. @@ -1830,7 +1903,7 @@ def on_v1_charge_dispute_funds_reinstated( def on_v1_charge_dispute_funds_withdrawn( self, - func: "Callable[[V1ChargeDisputeFundsWithdrawnEventNotification, StripeClient], None]", + func: "Callable[[V1ChargeDisputeFundsWithdrawnEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ChargeDisputeFundsWithdrawnEvent` (`v1.charge.dispute.funds_withdrawn`) event notification. @@ -1843,7 +1916,7 @@ def on_v1_charge_dispute_funds_withdrawn( def on_v1_charge_dispute_updated( self, - func: "Callable[[V1ChargeDisputeUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1ChargeDisputeUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ChargeDisputeUpdatedEvent` (`v1.charge.dispute.updated`) event notification. @@ -1856,7 +1929,7 @@ def on_v1_charge_dispute_updated( def on_v1_charge_expired( self, - func: "Callable[[V1ChargeExpiredEventNotification, StripeClient], None]", + func: "Callable[[V1ChargeExpiredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ChargeExpiredEvent` (`v1.charge.expired`) event notification. @@ -1869,7 +1942,7 @@ def on_v1_charge_expired( def on_v1_charge_failed( self, - func: "Callable[[V1ChargeFailedEventNotification, StripeClient], None]", + func: "Callable[[V1ChargeFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ChargeFailedEvent` (`v1.charge.failed`) event notification. @@ -1882,7 +1955,7 @@ def on_v1_charge_failed( def on_v1_charge_pending( self, - func: "Callable[[V1ChargePendingEventNotification, StripeClient], None]", + func: "Callable[[V1ChargePendingEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ChargePendingEvent` (`v1.charge.pending`) event notification. @@ -1895,7 +1968,7 @@ def on_v1_charge_pending( def on_v1_charge_refunded( self, - func: "Callable[[V1ChargeRefundedEventNotification, StripeClient], None]", + func: "Callable[[V1ChargeRefundedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ChargeRefundedEvent` (`v1.charge.refunded`) event notification. @@ -1908,7 +1981,7 @@ def on_v1_charge_refunded( def on_v1_charge_refund_updated( self, - func: "Callable[[V1ChargeRefundUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1ChargeRefundUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ChargeRefundUpdatedEvent` (`v1.charge.refund.updated`) event notification. @@ -1921,7 +1994,7 @@ def on_v1_charge_refund_updated( def on_v1_charge_succeeded( self, - func: "Callable[[V1ChargeSucceededEventNotification, StripeClient], None]", + func: "Callable[[V1ChargeSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ChargeSucceededEvent` (`v1.charge.succeeded`) event notification. @@ -1934,7 +2007,7 @@ def on_v1_charge_succeeded( def on_v1_charge_updated( self, - func: "Callable[[V1ChargeUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1ChargeUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ChargeUpdatedEvent` (`v1.charge.updated`) event notification. @@ -1947,7 +2020,7 @@ def on_v1_charge_updated( def on_v1_checkout_session_async_payment_failed( self, - func: "Callable[[V1CheckoutSessionAsyncPaymentFailedEventNotification, StripeClient], None]", + func: "Callable[[V1CheckoutSessionAsyncPaymentFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CheckoutSessionAsyncPaymentFailedEvent` (`v1.checkout.session.async_payment_failed`) event notification. @@ -1960,7 +2033,7 @@ def on_v1_checkout_session_async_payment_failed( def on_v1_checkout_session_async_payment_succeeded( self, - func: "Callable[[V1CheckoutSessionAsyncPaymentSucceededEventNotification, StripeClient], None]", + func: "Callable[[V1CheckoutSessionAsyncPaymentSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CheckoutSessionAsyncPaymentSucceededEvent` (`v1.checkout.session.async_payment_succeeded`) event notification. @@ -1973,7 +2046,7 @@ def on_v1_checkout_session_async_payment_succeeded( def on_v1_checkout_session_completed( self, - func: "Callable[[V1CheckoutSessionCompletedEventNotification, StripeClient], None]", + func: "Callable[[V1CheckoutSessionCompletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CheckoutSessionCompletedEvent` (`v1.checkout.session.completed`) event notification. @@ -1986,7 +2059,7 @@ def on_v1_checkout_session_completed( def on_v1_checkout_session_expired( self, - func: "Callable[[V1CheckoutSessionExpiredEventNotification, StripeClient], None]", + func: "Callable[[V1CheckoutSessionExpiredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CheckoutSessionExpiredEvent` (`v1.checkout.session.expired`) event notification. @@ -1999,7 +2072,7 @@ def on_v1_checkout_session_expired( def on_v1_climate_order_canceled( self, - func: "Callable[[V1ClimateOrderCanceledEventNotification, StripeClient], None]", + func: "Callable[[V1ClimateOrderCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ClimateOrderCanceledEvent` (`v1.climate.order.canceled`) event notification. @@ -2012,7 +2085,7 @@ def on_v1_climate_order_canceled( def on_v1_climate_order_created( self, - func: "Callable[[V1ClimateOrderCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1ClimateOrderCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ClimateOrderCreatedEvent` (`v1.climate.order.created`) event notification. @@ -2025,7 +2098,7 @@ def on_v1_climate_order_created( def on_v1_climate_order_delayed( self, - func: "Callable[[V1ClimateOrderDelayedEventNotification, StripeClient], None]", + func: "Callable[[V1ClimateOrderDelayedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ClimateOrderDelayedEvent` (`v1.climate.order.delayed`) event notification. @@ -2038,7 +2111,7 @@ def on_v1_climate_order_delayed( def on_v1_climate_order_delivered( self, - func: "Callable[[V1ClimateOrderDeliveredEventNotification, StripeClient], None]", + func: "Callable[[V1ClimateOrderDeliveredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ClimateOrderDeliveredEvent` (`v1.climate.order.delivered`) event notification. @@ -2051,7 +2124,7 @@ def on_v1_climate_order_delivered( def on_v1_climate_order_product_substituted( self, - func: "Callable[[V1ClimateOrderProductSubstitutedEventNotification, StripeClient], None]", + func: "Callable[[V1ClimateOrderProductSubstitutedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ClimateOrderProductSubstitutedEvent` (`v1.climate.order.product_substituted`) event notification. @@ -2064,7 +2137,7 @@ def on_v1_climate_order_product_substituted( def on_v1_climate_product_created( self, - func: "Callable[[V1ClimateProductCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1ClimateProductCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ClimateProductCreatedEvent` (`v1.climate.product.created`) event notification. @@ -2077,7 +2150,7 @@ def on_v1_climate_product_created( def on_v1_climate_product_pricing_updated( self, - func: "Callable[[V1ClimateProductPricingUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1ClimateProductPricingUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ClimateProductPricingUpdatedEvent` (`v1.climate.product.pricing_updated`) event notification. @@ -2090,7 +2163,7 @@ def on_v1_climate_product_pricing_updated( def on_v1_coupon_created( self, - func: "Callable[[V1CouponCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1CouponCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CouponCreatedEvent` (`v1.coupon.created`) event notification. @@ -2103,7 +2176,7 @@ def on_v1_coupon_created( def on_v1_coupon_deleted( self, - func: "Callable[[V1CouponDeletedEventNotification, StripeClient], None]", + func: "Callable[[V1CouponDeletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CouponDeletedEvent` (`v1.coupon.deleted`) event notification. @@ -2116,7 +2189,7 @@ def on_v1_coupon_deleted( def on_v1_coupon_updated( self, - func: "Callable[[V1CouponUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1CouponUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CouponUpdatedEvent` (`v1.coupon.updated`) event notification. @@ -2129,7 +2202,7 @@ def on_v1_coupon_updated( def on_v1_credit_note_created( self, - func: "Callable[[V1CreditNoteCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1CreditNoteCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CreditNoteCreatedEvent` (`v1.credit_note.created`) event notification. @@ -2142,7 +2215,7 @@ def on_v1_credit_note_created( def on_v1_credit_note_updated( self, - func: "Callable[[V1CreditNoteUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1CreditNoteUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CreditNoteUpdatedEvent` (`v1.credit_note.updated`) event notification. @@ -2155,7 +2228,7 @@ def on_v1_credit_note_updated( def on_v1_credit_note_voided( self, - func: "Callable[[V1CreditNoteVoidedEventNotification, StripeClient], None]", + func: "Callable[[V1CreditNoteVoidedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CreditNoteVoidedEvent` (`v1.credit_note.voided`) event notification. @@ -2168,7 +2241,7 @@ def on_v1_credit_note_voided( def on_v1_customer_cash_balance_transaction_created( self, - func: "Callable[[V1CustomerCashBalanceTransactionCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerCashBalanceTransactionCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerCashBalanceTransactionCreatedEvent` (`v1.customer_cash_balance_transaction.created`) event notification. @@ -2181,7 +2254,7 @@ def on_v1_customer_cash_balance_transaction_created( def on_v1_customer_created( self, - func: "Callable[[V1CustomerCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerCreatedEvent` (`v1.customer.created`) event notification. @@ -2194,7 +2267,7 @@ def on_v1_customer_created( def on_v1_customer_deleted( self, - func: "Callable[[V1CustomerDeletedEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerDeletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerDeletedEvent` (`v1.customer.deleted`) event notification. @@ -2207,7 +2280,7 @@ def on_v1_customer_deleted( def on_v1_customer_subscription_created( self, - func: "Callable[[V1CustomerSubscriptionCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerSubscriptionCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerSubscriptionCreatedEvent` (`v1.customer.subscription.created`) event notification. @@ -2220,7 +2293,7 @@ def on_v1_customer_subscription_created( def on_v1_customer_subscription_deleted( self, - func: "Callable[[V1CustomerSubscriptionDeletedEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerSubscriptionDeletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerSubscriptionDeletedEvent` (`v1.customer.subscription.deleted`) event notification. @@ -2233,7 +2306,7 @@ def on_v1_customer_subscription_deleted( def on_v1_customer_subscription_paused( self, - func: "Callable[[V1CustomerSubscriptionPausedEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerSubscriptionPausedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerSubscriptionPausedEvent` (`v1.customer.subscription.paused`) event notification. @@ -2246,7 +2319,7 @@ def on_v1_customer_subscription_paused( def on_v1_customer_subscription_pending_update_applied( self, - func: "Callable[[V1CustomerSubscriptionPendingUpdateAppliedEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerSubscriptionPendingUpdateAppliedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerSubscriptionPendingUpdateAppliedEvent` (`v1.customer.subscription.pending_update_applied`) event notification. @@ -2259,7 +2332,7 @@ def on_v1_customer_subscription_pending_update_applied( def on_v1_customer_subscription_pending_update_expired( self, - func: "Callable[[V1CustomerSubscriptionPendingUpdateExpiredEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerSubscriptionPendingUpdateExpiredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerSubscriptionPendingUpdateExpiredEvent` (`v1.customer.subscription.pending_update_expired`) event notification. @@ -2272,7 +2345,7 @@ def on_v1_customer_subscription_pending_update_expired( def on_v1_customer_subscription_resumed( self, - func: "Callable[[V1CustomerSubscriptionResumedEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerSubscriptionResumedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerSubscriptionResumedEvent` (`v1.customer.subscription.resumed`) event notification. @@ -2285,7 +2358,7 @@ def on_v1_customer_subscription_resumed( def on_v1_customer_subscription_trial_will_end( self, - func: "Callable[[V1CustomerSubscriptionTrialWillEndEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerSubscriptionTrialWillEndEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerSubscriptionTrialWillEndEvent` (`v1.customer.subscription.trial_will_end`) event notification. @@ -2298,7 +2371,7 @@ def on_v1_customer_subscription_trial_will_end( def on_v1_customer_subscription_updated( self, - func: "Callable[[V1CustomerSubscriptionUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerSubscriptionUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerSubscriptionUpdatedEvent` (`v1.customer.subscription.updated`) event notification. @@ -2311,7 +2384,7 @@ def on_v1_customer_subscription_updated( def on_v1_customer_tax_id_created( self, - func: "Callable[[V1CustomerTaxIdCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerTaxIdCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerTaxIdCreatedEvent` (`v1.customer.tax_id.created`) event notification. @@ -2324,7 +2397,7 @@ def on_v1_customer_tax_id_created( def on_v1_customer_tax_id_deleted( self, - func: "Callable[[V1CustomerTaxIdDeletedEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerTaxIdDeletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerTaxIdDeletedEvent` (`v1.customer.tax_id.deleted`) event notification. @@ -2337,7 +2410,7 @@ def on_v1_customer_tax_id_deleted( def on_v1_customer_tax_id_updated( self, - func: "Callable[[V1CustomerTaxIdUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerTaxIdUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerTaxIdUpdatedEvent` (`v1.customer.tax_id.updated`) event notification. @@ -2350,7 +2423,7 @@ def on_v1_customer_tax_id_updated( def on_v1_customer_updated( self, - func: "Callable[[V1CustomerUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1CustomerUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1CustomerUpdatedEvent` (`v1.customer.updated`) event notification. @@ -2363,7 +2436,7 @@ def on_v1_customer_updated( def on_v1_entitlements_active_entitlement_summary_updated( self, - func: "Callable[[V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1EntitlementsActiveEntitlementSummaryUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1EntitlementsActiveEntitlementSummaryUpdatedEvent` (`v1.entitlements.active_entitlement_summary.updated`) event notification. @@ -2376,7 +2449,7 @@ def on_v1_entitlements_active_entitlement_summary_updated( def on_v1_file_created( self, - func: "Callable[[V1FileCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1FileCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1FileCreatedEvent` (`v1.file.created`) event notification. @@ -2389,7 +2462,7 @@ def on_v1_file_created( def on_v1_financial_connections_account_account_numbers_updated( self, - func: "Callable[[V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1FinancialConnectionsAccountAccountNumbersUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1FinancialConnectionsAccountAccountNumbersUpdatedEvent` (`v1.financial_connections.account.account_numbers_updated`) event notification. @@ -2402,7 +2475,7 @@ def on_v1_financial_connections_account_account_numbers_updated( def on_v1_financial_connections_account_created( self, - func: "Callable[[V1FinancialConnectionsAccountCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1FinancialConnectionsAccountCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1FinancialConnectionsAccountCreatedEvent` (`v1.financial_connections.account.created`) event notification. @@ -2415,7 +2488,7 @@ def on_v1_financial_connections_account_created( def on_v1_financial_connections_account_deactivated( self, - func: "Callable[[V1FinancialConnectionsAccountDeactivatedEventNotification, StripeClient], None]", + func: "Callable[[V1FinancialConnectionsAccountDeactivatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1FinancialConnectionsAccountDeactivatedEvent` (`v1.financial_connections.account.deactivated`) event notification. @@ -2428,7 +2501,7 @@ def on_v1_financial_connections_account_deactivated( def on_v1_financial_connections_account_disconnected( self, - func: "Callable[[V1FinancialConnectionsAccountDisconnectedEventNotification, StripeClient], None]", + func: "Callable[[V1FinancialConnectionsAccountDisconnectedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1FinancialConnectionsAccountDisconnectedEvent` (`v1.financial_connections.account.disconnected`) event notification. @@ -2441,7 +2514,7 @@ def on_v1_financial_connections_account_disconnected( def on_v1_financial_connections_account_expected_deactivation_date_updated( self, - func: "Callable[[V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1FinancialConnectionsAccountExpectedDeactivationDateUpdatedEvent` (`v1.financial_connections.account.expected_deactivation_date_updated`) event notification. @@ -2454,7 +2527,7 @@ def on_v1_financial_connections_account_expected_deactivation_date_updated( def on_v1_financial_connections_account_reactivated( self, - func: "Callable[[V1FinancialConnectionsAccountReactivatedEventNotification, StripeClient], None]", + func: "Callable[[V1FinancialConnectionsAccountReactivatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1FinancialConnectionsAccountReactivatedEvent` (`v1.financial_connections.account.reactivated`) event notification. @@ -2467,7 +2540,7 @@ def on_v1_financial_connections_account_reactivated( def on_v1_financial_connections_account_refreshed_balance( self, - func: "Callable[[V1FinancialConnectionsAccountRefreshedBalanceEventNotification, StripeClient], None]", + func: "Callable[[V1FinancialConnectionsAccountRefreshedBalanceEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1FinancialConnectionsAccountRefreshedBalanceEvent` (`v1.financial_connections.account.refreshed_balance`) event notification. @@ -2480,7 +2553,7 @@ def on_v1_financial_connections_account_refreshed_balance( def on_v1_financial_connections_account_refreshed_ownership( self, - func: "Callable[[V1FinancialConnectionsAccountRefreshedOwnershipEventNotification, StripeClient], None]", + func: "Callable[[V1FinancialConnectionsAccountRefreshedOwnershipEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1FinancialConnectionsAccountRefreshedOwnershipEvent` (`v1.financial_connections.account.refreshed_ownership`) event notification. @@ -2493,7 +2566,7 @@ def on_v1_financial_connections_account_refreshed_ownership( def on_v1_financial_connections_account_refreshed_transactions( self, - func: "Callable[[V1FinancialConnectionsAccountRefreshedTransactionsEventNotification, StripeClient], None]", + func: "Callable[[V1FinancialConnectionsAccountRefreshedTransactionsEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1FinancialConnectionsAccountRefreshedTransactionsEvent` (`v1.financial_connections.account.refreshed_transactions`) event notification. @@ -2506,7 +2579,7 @@ def on_v1_financial_connections_account_refreshed_transactions( def on_v1_financial_connections_account_supported_payment_method_types_updated( self, - func: "Callable[[V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1FinancialConnectionsAccountSupportedPaymentMethodTypesUpdatedEvent` (`v1.financial_connections.account.supported_payment_method_types_updated`) event notification. @@ -2519,7 +2592,7 @@ def on_v1_financial_connections_account_supported_payment_method_types_updated( def on_v1_financial_connections_account_upcoming_account_number_expiry( self, - func: "Callable[[V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification, StripeClient], None]", + func: "Callable[[V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1FinancialConnectionsAccountUpcomingAccountNumberExpiryEvent` (`v1.financial_connections.account.upcoming_account_number_expiry`) event notification. @@ -2532,7 +2605,7 @@ def on_v1_financial_connections_account_upcoming_account_number_expiry( def on_v1_financial_connections_account_upcoming_deactivation( self, - func: "Callable[[V1FinancialConnectionsAccountUpcomingDeactivationEventNotification, StripeClient], None]", + func: "Callable[[V1FinancialConnectionsAccountUpcomingDeactivationEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1FinancialConnectionsAccountUpcomingDeactivationEvent` (`v1.financial_connections.account.upcoming_deactivation`) event notification. @@ -2545,7 +2618,7 @@ def on_v1_financial_connections_account_upcoming_deactivation( def on_v1_identity_verification_session_canceled( self, - func: "Callable[[V1IdentityVerificationSessionCanceledEventNotification, StripeClient], None]", + func: "Callable[[V1IdentityVerificationSessionCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IdentityVerificationSessionCanceledEvent` (`v1.identity.verification_session.canceled`) event notification. @@ -2558,7 +2631,7 @@ def on_v1_identity_verification_session_canceled( def on_v1_identity_verification_session_created( self, - func: "Callable[[V1IdentityVerificationSessionCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1IdentityVerificationSessionCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IdentityVerificationSessionCreatedEvent` (`v1.identity.verification_session.created`) event notification. @@ -2571,7 +2644,7 @@ def on_v1_identity_verification_session_created( def on_v1_identity_verification_session_processing( self, - func: "Callable[[V1IdentityVerificationSessionProcessingEventNotification, StripeClient], None]", + func: "Callable[[V1IdentityVerificationSessionProcessingEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IdentityVerificationSessionProcessingEvent` (`v1.identity.verification_session.processing`) event notification. @@ -2584,7 +2657,7 @@ def on_v1_identity_verification_session_processing( def on_v1_identity_verification_session_redacted( self, - func: "Callable[[V1IdentityVerificationSessionRedactedEventNotification, StripeClient], None]", + func: "Callable[[V1IdentityVerificationSessionRedactedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IdentityVerificationSessionRedactedEvent` (`v1.identity.verification_session.redacted`) event notification. @@ -2597,7 +2670,7 @@ def on_v1_identity_verification_session_redacted( def on_v1_identity_verification_session_requires_input( self, - func: "Callable[[V1IdentityVerificationSessionRequiresInputEventNotification, StripeClient], None]", + func: "Callable[[V1IdentityVerificationSessionRequiresInputEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IdentityVerificationSessionRequiresInputEvent` (`v1.identity.verification_session.requires_input`) event notification. @@ -2610,7 +2683,7 @@ def on_v1_identity_verification_session_requires_input( def on_v1_identity_verification_session_verified( self, - func: "Callable[[V1IdentityVerificationSessionVerifiedEventNotification, StripeClient], None]", + func: "Callable[[V1IdentityVerificationSessionVerifiedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IdentityVerificationSessionVerifiedEvent` (`v1.identity.verification_session.verified`) event notification. @@ -2623,7 +2696,7 @@ def on_v1_identity_verification_session_verified( def on_v1_invoice_created( self, - func: "Callable[[V1InvoiceCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceCreatedEvent` (`v1.invoice.created`) event notification. @@ -2636,7 +2709,7 @@ def on_v1_invoice_created( def on_v1_invoice_deleted( self, - func: "Callable[[V1InvoiceDeletedEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceDeletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceDeletedEvent` (`v1.invoice.deleted`) event notification. @@ -2649,7 +2722,7 @@ def on_v1_invoice_deleted( def on_v1_invoice_finalization_failed( self, - func: "Callable[[V1InvoiceFinalizationFailedEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceFinalizationFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceFinalizationFailedEvent` (`v1.invoice.finalization_failed`) event notification. @@ -2662,7 +2735,7 @@ def on_v1_invoice_finalization_failed( def on_v1_invoice_finalized( self, - func: "Callable[[V1InvoiceFinalizedEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceFinalizedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceFinalizedEvent` (`v1.invoice.finalized`) event notification. @@ -2675,7 +2748,7 @@ def on_v1_invoice_finalized( def on_v1_invoiceitem_created( self, - func: "Callable[[V1InvoiceitemCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceitemCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceitemCreatedEvent` (`v1.invoiceitem.created`) event notification. @@ -2688,7 +2761,7 @@ def on_v1_invoiceitem_created( def on_v1_invoiceitem_deleted( self, - func: "Callable[[V1InvoiceitemDeletedEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceitemDeletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceitemDeletedEvent` (`v1.invoiceitem.deleted`) event notification. @@ -2701,7 +2774,7 @@ def on_v1_invoiceitem_deleted( def on_v1_invoice_marked_uncollectible( self, - func: "Callable[[V1InvoiceMarkedUncollectibleEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceMarkedUncollectibleEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceMarkedUncollectibleEvent` (`v1.invoice.marked_uncollectible`) event notification. @@ -2714,7 +2787,7 @@ def on_v1_invoice_marked_uncollectible( def on_v1_invoice_overdue( self, - func: "Callable[[V1InvoiceOverdueEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceOverdueEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceOverdueEvent` (`v1.invoice.overdue`) event notification. @@ -2727,7 +2800,7 @@ def on_v1_invoice_overdue( def on_v1_invoice_overpaid( self, - func: "Callable[[V1InvoiceOverpaidEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceOverpaidEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceOverpaidEvent` (`v1.invoice.overpaid`) event notification. @@ -2740,7 +2813,7 @@ def on_v1_invoice_overpaid( def on_v1_invoice_paid( self, - func: "Callable[[V1InvoicePaidEventNotification, StripeClient], None]", + func: "Callable[[V1InvoicePaidEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoicePaidEvent` (`v1.invoice.paid`) event notification. @@ -2753,7 +2826,7 @@ def on_v1_invoice_paid( def on_v1_invoice_payment_action_required( self, - func: "Callable[[V1InvoicePaymentActionRequiredEventNotification, StripeClient], None]", + func: "Callable[[V1InvoicePaymentActionRequiredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoicePaymentActionRequiredEvent` (`v1.invoice.payment_action_required`) event notification. @@ -2766,7 +2839,7 @@ def on_v1_invoice_payment_action_required( def on_v1_invoice_payment_attempt_required( self, - func: "Callable[[V1InvoicePaymentAttemptRequiredEventNotification, StripeClient], None]", + func: "Callable[[V1InvoicePaymentAttemptRequiredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoicePaymentAttemptRequiredEvent` (`v1.invoice.payment_attempt_required`) event notification. @@ -2779,7 +2852,7 @@ def on_v1_invoice_payment_attempt_required( def on_v1_invoice_payment_failed( self, - func: "Callable[[V1InvoicePaymentFailedEventNotification, StripeClient], None]", + func: "Callable[[V1InvoicePaymentFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoicePaymentFailedEvent` (`v1.invoice.payment_failed`) event notification. @@ -2792,7 +2865,7 @@ def on_v1_invoice_payment_failed( def on_v1_invoice_payment_paid( self, - func: "Callable[[V1InvoicePaymentPaidEventNotification, StripeClient], None]", + func: "Callable[[V1InvoicePaymentPaidEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoicePaymentPaidEvent` (`v1.invoice_payment.paid`) event notification. @@ -2805,7 +2878,7 @@ def on_v1_invoice_payment_paid( def on_v1_invoice_payment_succeeded( self, - func: "Callable[[V1InvoicePaymentSucceededEventNotification, StripeClient], None]", + func: "Callable[[V1InvoicePaymentSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoicePaymentSucceededEvent` (`v1.invoice.payment_succeeded`) event notification. @@ -2818,7 +2891,7 @@ def on_v1_invoice_payment_succeeded( def on_v1_invoice_sent( self, - func: "Callable[[V1InvoiceSentEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceSentEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceSentEvent` (`v1.invoice.sent`) event notification. @@ -2831,7 +2904,7 @@ def on_v1_invoice_sent( def on_v1_invoice_upcoming( self, - func: "Callable[[V1InvoiceUpcomingEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceUpcomingEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceUpcomingEvent` (`v1.invoice.upcoming`) event notification. @@ -2844,7 +2917,7 @@ def on_v1_invoice_upcoming( def on_v1_invoice_updated( self, - func: "Callable[[V1InvoiceUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceUpdatedEvent` (`v1.invoice.updated`) event notification. @@ -2857,7 +2930,7 @@ def on_v1_invoice_updated( def on_v1_invoice_voided( self, - func: "Callable[[V1InvoiceVoidedEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceVoidedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceVoidedEvent` (`v1.invoice.voided`) event notification. @@ -2870,7 +2943,7 @@ def on_v1_invoice_voided( def on_v1_invoice_will_be_due( self, - func: "Callable[[V1InvoiceWillBeDueEventNotification, StripeClient], None]", + func: "Callable[[V1InvoiceWillBeDueEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1InvoiceWillBeDueEvent` (`v1.invoice.will_be_due`) event notification. @@ -2883,7 +2956,7 @@ def on_v1_invoice_will_be_due( def on_v1_issuing_authorization_created( self, - func: "Callable[[V1IssuingAuthorizationCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingAuthorizationCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingAuthorizationCreatedEvent` (`v1.issuing_authorization.created`) event notification. @@ -2896,7 +2969,7 @@ def on_v1_issuing_authorization_created( def on_v1_issuing_authorization_request( self, - func: "Callable[[V1IssuingAuthorizationRequestEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingAuthorizationRequestEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingAuthorizationRequestEvent` (`v1.issuing_authorization.request`) event notification. @@ -2909,7 +2982,7 @@ def on_v1_issuing_authorization_request( def on_v1_issuing_authorization_updated( self, - func: "Callable[[V1IssuingAuthorizationUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingAuthorizationUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingAuthorizationUpdatedEvent` (`v1.issuing_authorization.updated`) event notification. @@ -2922,7 +2995,7 @@ def on_v1_issuing_authorization_updated( def on_v1_issuing_card_created( self, - func: "Callable[[V1IssuingCardCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingCardCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingCardCreatedEvent` (`v1.issuing_card.created`) event notification. @@ -2935,7 +3008,7 @@ def on_v1_issuing_card_created( def on_v1_issuing_cardholder_created( self, - func: "Callable[[V1IssuingCardholderCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingCardholderCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingCardholderCreatedEvent` (`v1.issuing_cardholder.created`) event notification. @@ -2948,7 +3021,7 @@ def on_v1_issuing_cardholder_created( def on_v1_issuing_cardholder_updated( self, - func: "Callable[[V1IssuingCardholderUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingCardholderUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingCardholderUpdatedEvent` (`v1.issuing_cardholder.updated`) event notification. @@ -2961,7 +3034,7 @@ def on_v1_issuing_cardholder_updated( def on_v1_issuing_card_updated( self, - func: "Callable[[V1IssuingCardUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingCardUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingCardUpdatedEvent` (`v1.issuing_card.updated`) event notification. @@ -2974,7 +3047,7 @@ def on_v1_issuing_card_updated( def on_v1_issuing_dispute_closed( self, - func: "Callable[[V1IssuingDisputeClosedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingDisputeClosedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingDisputeClosedEvent` (`v1.issuing_dispute.closed`) event notification. @@ -2987,7 +3060,7 @@ def on_v1_issuing_dispute_closed( def on_v1_issuing_dispute_created( self, - func: "Callable[[V1IssuingDisputeCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingDisputeCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingDisputeCreatedEvent` (`v1.issuing_dispute.created`) event notification. @@ -3000,7 +3073,7 @@ def on_v1_issuing_dispute_created( def on_v1_issuing_dispute_funds_reinstated( self, - func: "Callable[[V1IssuingDisputeFundsReinstatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingDisputeFundsReinstatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingDisputeFundsReinstatedEvent` (`v1.issuing_dispute.funds_reinstated`) event notification. @@ -3013,7 +3086,7 @@ def on_v1_issuing_dispute_funds_reinstated( def on_v1_issuing_dispute_funds_rescinded( self, - func: "Callable[[V1IssuingDisputeFundsRescindedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingDisputeFundsRescindedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingDisputeFundsRescindedEvent` (`v1.issuing_dispute.funds_rescinded`) event notification. @@ -3026,7 +3099,7 @@ def on_v1_issuing_dispute_funds_rescinded( def on_v1_issuing_dispute_submitted( self, - func: "Callable[[V1IssuingDisputeSubmittedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingDisputeSubmittedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingDisputeSubmittedEvent` (`v1.issuing_dispute.submitted`) event notification. @@ -3039,7 +3112,7 @@ def on_v1_issuing_dispute_submitted( def on_v1_issuing_dispute_updated( self, - func: "Callable[[V1IssuingDisputeUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingDisputeUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingDisputeUpdatedEvent` (`v1.issuing_dispute.updated`) event notification. @@ -3052,7 +3125,7 @@ def on_v1_issuing_dispute_updated( def on_v1_issuing_personalization_design_activated( self, - func: "Callable[[V1IssuingPersonalizationDesignActivatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingPersonalizationDesignActivatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingPersonalizationDesignActivatedEvent` (`v1.issuing_personalization_design.activated`) event notification. @@ -3065,7 +3138,7 @@ def on_v1_issuing_personalization_design_activated( def on_v1_issuing_personalization_design_deactivated( self, - func: "Callable[[V1IssuingPersonalizationDesignDeactivatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingPersonalizationDesignDeactivatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingPersonalizationDesignDeactivatedEvent` (`v1.issuing_personalization_design.deactivated`) event notification. @@ -3078,7 +3151,7 @@ def on_v1_issuing_personalization_design_deactivated( def on_v1_issuing_personalization_design_rejected( self, - func: "Callable[[V1IssuingPersonalizationDesignRejectedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingPersonalizationDesignRejectedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingPersonalizationDesignRejectedEvent` (`v1.issuing_personalization_design.rejected`) event notification. @@ -3091,7 +3164,7 @@ def on_v1_issuing_personalization_design_rejected( def on_v1_issuing_personalization_design_updated( self, - func: "Callable[[V1IssuingPersonalizationDesignUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingPersonalizationDesignUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingPersonalizationDesignUpdatedEvent` (`v1.issuing_personalization_design.updated`) event notification. @@ -3104,7 +3177,7 @@ def on_v1_issuing_personalization_design_updated( def on_v1_issuing_token_created( self, - func: "Callable[[V1IssuingTokenCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingTokenCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingTokenCreatedEvent` (`v1.issuing_token.created`) event notification. @@ -3117,7 +3190,7 @@ def on_v1_issuing_token_created( def on_v1_issuing_token_updated( self, - func: "Callable[[V1IssuingTokenUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingTokenUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingTokenUpdatedEvent` (`v1.issuing_token.updated`) event notification. @@ -3130,7 +3203,7 @@ def on_v1_issuing_token_updated( def on_v1_issuing_transaction_created( self, - func: "Callable[[V1IssuingTransactionCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingTransactionCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingTransactionCreatedEvent` (`v1.issuing_transaction.created`) event notification. @@ -3143,7 +3216,7 @@ def on_v1_issuing_transaction_created( def on_v1_issuing_transaction_purchase_details_receipt_updated( self, - func: "Callable[[V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent` (`v1.issuing_transaction.purchase_details_receipt_updated`) event notification. @@ -3156,7 +3229,7 @@ def on_v1_issuing_transaction_purchase_details_receipt_updated( def on_v1_issuing_transaction_updated( self, - func: "Callable[[V1IssuingTransactionUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1IssuingTransactionUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1IssuingTransactionUpdatedEvent` (`v1.issuing_transaction.updated`) event notification. @@ -3169,7 +3242,7 @@ def on_v1_issuing_transaction_updated( def on_v1_mandate_updated( self, - func: "Callable[[V1MandateUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1MandateUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1MandateUpdatedEvent` (`v1.mandate.updated`) event notification. @@ -3182,7 +3255,7 @@ def on_v1_mandate_updated( def on_v1_payment_intent_amount_capturable_updated( self, - func: "Callable[[V1PaymentIntentAmountCapturableUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentIntentAmountCapturableUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentIntentAmountCapturableUpdatedEvent` (`v1.payment_intent.amount_capturable_updated`) event notification. @@ -3195,7 +3268,7 @@ def on_v1_payment_intent_amount_capturable_updated( def on_v1_payment_intent_canceled( self, - func: "Callable[[V1PaymentIntentCanceledEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentIntentCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentIntentCanceledEvent` (`v1.payment_intent.canceled`) event notification. @@ -3208,7 +3281,7 @@ def on_v1_payment_intent_canceled( def on_v1_payment_intent_created( self, - func: "Callable[[V1PaymentIntentCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentIntentCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentIntentCreatedEvent` (`v1.payment_intent.created`) event notification. @@ -3221,7 +3294,7 @@ def on_v1_payment_intent_created( def on_v1_payment_intent_partially_funded( self, - func: "Callable[[V1PaymentIntentPartiallyFundedEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentIntentPartiallyFundedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentIntentPartiallyFundedEvent` (`v1.payment_intent.partially_funded`) event notification. @@ -3234,7 +3307,7 @@ def on_v1_payment_intent_partially_funded( def on_v1_payment_intent_payment_failed( self, - func: "Callable[[V1PaymentIntentPaymentFailedEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentIntentPaymentFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentIntentPaymentFailedEvent` (`v1.payment_intent.payment_failed`) event notification. @@ -3247,7 +3320,7 @@ def on_v1_payment_intent_payment_failed( def on_v1_payment_intent_processing( self, - func: "Callable[[V1PaymentIntentProcessingEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentIntentProcessingEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentIntentProcessingEvent` (`v1.payment_intent.processing`) event notification. @@ -3260,7 +3333,7 @@ def on_v1_payment_intent_processing( def on_v1_payment_intent_requires_action( self, - func: "Callable[[V1PaymentIntentRequiresActionEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentIntentRequiresActionEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentIntentRequiresActionEvent` (`v1.payment_intent.requires_action`) event notification. @@ -3273,7 +3346,7 @@ def on_v1_payment_intent_requires_action( def on_v1_payment_intent_succeeded( self, - func: "Callable[[V1PaymentIntentSucceededEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentIntentSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentIntentSucceededEvent` (`v1.payment_intent.succeeded`) event notification. @@ -3286,7 +3359,7 @@ def on_v1_payment_intent_succeeded( def on_v1_payment_link_created( self, - func: "Callable[[V1PaymentLinkCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentLinkCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentLinkCreatedEvent` (`v1.payment_link.created`) event notification. @@ -3299,7 +3372,7 @@ def on_v1_payment_link_created( def on_v1_payment_link_updated( self, - func: "Callable[[V1PaymentLinkUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentLinkUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentLinkUpdatedEvent` (`v1.payment_link.updated`) event notification. @@ -3312,7 +3385,7 @@ def on_v1_payment_link_updated( def on_v1_payment_method_attached( self, - func: "Callable[[V1PaymentMethodAttachedEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentMethodAttachedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentMethodAttachedEvent` (`v1.payment_method.attached`) event notification. @@ -3325,7 +3398,7 @@ def on_v1_payment_method_attached( def on_v1_payment_method_automatically_updated( self, - func: "Callable[[V1PaymentMethodAutomaticallyUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentMethodAutomaticallyUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentMethodAutomaticallyUpdatedEvent` (`v1.payment_method.automatically_updated`) event notification. @@ -3338,7 +3411,7 @@ def on_v1_payment_method_automatically_updated( def on_v1_payment_method_detached( self, - func: "Callable[[V1PaymentMethodDetachedEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentMethodDetachedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentMethodDetachedEvent` (`v1.payment_method.detached`) event notification. @@ -3351,7 +3424,7 @@ def on_v1_payment_method_detached( def on_v1_payment_method_updated( self, - func: "Callable[[V1PaymentMethodUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1PaymentMethodUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PaymentMethodUpdatedEvent` (`v1.payment_method.updated`) event notification. @@ -3364,7 +3437,7 @@ def on_v1_payment_method_updated( def on_v1_payout_canceled( self, - func: "Callable[[V1PayoutCanceledEventNotification, StripeClient], None]", + func: "Callable[[V1PayoutCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PayoutCanceledEvent` (`v1.payout.canceled`) event notification. @@ -3377,7 +3450,7 @@ def on_v1_payout_canceled( def on_v1_payout_created( self, - func: "Callable[[V1PayoutCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1PayoutCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PayoutCreatedEvent` (`v1.payout.created`) event notification. @@ -3390,7 +3463,7 @@ def on_v1_payout_created( def on_v1_payout_failed( self, - func: "Callable[[V1PayoutFailedEventNotification, StripeClient], None]", + func: "Callable[[V1PayoutFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PayoutFailedEvent` (`v1.payout.failed`) event notification. @@ -3403,7 +3476,7 @@ def on_v1_payout_failed( def on_v1_payout_paid( self, - func: "Callable[[V1PayoutPaidEventNotification, StripeClient], None]", + func: "Callable[[V1PayoutPaidEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PayoutPaidEvent` (`v1.payout.paid`) event notification. @@ -3416,7 +3489,7 @@ def on_v1_payout_paid( def on_v1_payout_reconciliation_completed( self, - func: "Callable[[V1PayoutReconciliationCompletedEventNotification, StripeClient], None]", + func: "Callable[[V1PayoutReconciliationCompletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PayoutReconciliationCompletedEvent` (`v1.payout.reconciliation_completed`) event notification. @@ -3429,7 +3502,7 @@ def on_v1_payout_reconciliation_completed( def on_v1_payout_updated( self, - func: "Callable[[V1PayoutUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1PayoutUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PayoutUpdatedEvent` (`v1.payout.updated`) event notification. @@ -3442,7 +3515,7 @@ def on_v1_payout_updated( def on_v1_person_created( self, - func: "Callable[[V1PersonCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1PersonCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PersonCreatedEvent` (`v1.person.created`) event notification. @@ -3455,7 +3528,7 @@ def on_v1_person_created( def on_v1_person_deleted( self, - func: "Callable[[V1PersonDeletedEventNotification, StripeClient], None]", + func: "Callable[[V1PersonDeletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PersonDeletedEvent` (`v1.person.deleted`) event notification. @@ -3468,7 +3541,7 @@ def on_v1_person_deleted( def on_v1_person_updated( self, - func: "Callable[[V1PersonUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1PersonUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PersonUpdatedEvent` (`v1.person.updated`) event notification. @@ -3481,7 +3554,7 @@ def on_v1_person_updated( def on_v1_plan_created( self, - func: "Callable[[V1PlanCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1PlanCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PlanCreatedEvent` (`v1.plan.created`) event notification. @@ -3494,7 +3567,7 @@ def on_v1_plan_created( def on_v1_plan_deleted( self, - func: "Callable[[V1PlanDeletedEventNotification, StripeClient], None]", + func: "Callable[[V1PlanDeletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PlanDeletedEvent` (`v1.plan.deleted`) event notification. @@ -3507,7 +3580,7 @@ def on_v1_plan_deleted( def on_v1_plan_updated( self, - func: "Callable[[V1PlanUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1PlanUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PlanUpdatedEvent` (`v1.plan.updated`) event notification. @@ -3520,7 +3593,7 @@ def on_v1_plan_updated( def on_v1_price_created( self, - func: "Callable[[V1PriceCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1PriceCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PriceCreatedEvent` (`v1.price.created`) event notification. @@ -3533,7 +3606,7 @@ def on_v1_price_created( def on_v1_price_deleted( self, - func: "Callable[[V1PriceDeletedEventNotification, StripeClient], None]", + func: "Callable[[V1PriceDeletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PriceDeletedEvent` (`v1.price.deleted`) event notification. @@ -3546,7 +3619,7 @@ def on_v1_price_deleted( def on_v1_price_updated( self, - func: "Callable[[V1PriceUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1PriceUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PriceUpdatedEvent` (`v1.price.updated`) event notification. @@ -3559,7 +3632,7 @@ def on_v1_price_updated( def on_v1_product_created( self, - func: "Callable[[V1ProductCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1ProductCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ProductCreatedEvent` (`v1.product.created`) event notification. @@ -3572,7 +3645,7 @@ def on_v1_product_created( def on_v1_product_deleted( self, - func: "Callable[[V1ProductDeletedEventNotification, StripeClient], None]", + func: "Callable[[V1ProductDeletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ProductDeletedEvent` (`v1.product.deleted`) event notification. @@ -3585,7 +3658,7 @@ def on_v1_product_deleted( def on_v1_product_updated( self, - func: "Callable[[V1ProductUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1ProductUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ProductUpdatedEvent` (`v1.product.updated`) event notification. @@ -3598,7 +3671,7 @@ def on_v1_product_updated( def on_v1_promotion_code_created( self, - func: "Callable[[V1PromotionCodeCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1PromotionCodeCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PromotionCodeCreatedEvent` (`v1.promotion_code.created`) event notification. @@ -3611,7 +3684,7 @@ def on_v1_promotion_code_created( def on_v1_promotion_code_updated( self, - func: "Callable[[V1PromotionCodeUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1PromotionCodeUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1PromotionCodeUpdatedEvent` (`v1.promotion_code.updated`) event notification. @@ -3624,7 +3697,7 @@ def on_v1_promotion_code_updated( def on_v1_quote_accepted( self, - func: "Callable[[V1QuoteAcceptedEventNotification, StripeClient], None]", + func: "Callable[[V1QuoteAcceptedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1QuoteAcceptedEvent` (`v1.quote.accepted`) event notification. @@ -3637,7 +3710,7 @@ def on_v1_quote_accepted( def on_v1_quote_canceled( self, - func: "Callable[[V1QuoteCanceledEventNotification, StripeClient], None]", + func: "Callable[[V1QuoteCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1QuoteCanceledEvent` (`v1.quote.canceled`) event notification. @@ -3650,7 +3723,7 @@ def on_v1_quote_canceled( def on_v1_quote_created( self, - func: "Callable[[V1QuoteCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1QuoteCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1QuoteCreatedEvent` (`v1.quote.created`) event notification. @@ -3663,7 +3736,7 @@ def on_v1_quote_created( def on_v1_quote_finalized( self, - func: "Callable[[V1QuoteFinalizedEventNotification, StripeClient], None]", + func: "Callable[[V1QuoteFinalizedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1QuoteFinalizedEvent` (`v1.quote.finalized`) event notification. @@ -3676,7 +3749,7 @@ def on_v1_quote_finalized( def on_v1_radar_early_fraud_warning_created( self, - func: "Callable[[V1RadarEarlyFraudWarningCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1RadarEarlyFraudWarningCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1RadarEarlyFraudWarningCreatedEvent` (`v1.radar.early_fraud_warning.created`) event notification. @@ -3689,7 +3762,7 @@ def on_v1_radar_early_fraud_warning_created( def on_v1_radar_early_fraud_warning_updated( self, - func: "Callable[[V1RadarEarlyFraudWarningUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1RadarEarlyFraudWarningUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1RadarEarlyFraudWarningUpdatedEvent` (`v1.radar.early_fraud_warning.updated`) event notification. @@ -3702,7 +3775,7 @@ def on_v1_radar_early_fraud_warning_updated( def on_v1_refund_created( self, - func: "Callable[[V1RefundCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1RefundCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1RefundCreatedEvent` (`v1.refund.created`) event notification. @@ -3715,7 +3788,7 @@ def on_v1_refund_created( def on_v1_refund_failed( self, - func: "Callable[[V1RefundFailedEventNotification, StripeClient], None]", + func: "Callable[[V1RefundFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1RefundFailedEvent` (`v1.refund.failed`) event notification. @@ -3728,7 +3801,7 @@ def on_v1_refund_failed( def on_v1_refund_updated( self, - func: "Callable[[V1RefundUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1RefundUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1RefundUpdatedEvent` (`v1.refund.updated`) event notification. @@ -3741,7 +3814,7 @@ def on_v1_refund_updated( def on_v1_review_closed( self, - func: "Callable[[V1ReviewClosedEventNotification, StripeClient], None]", + func: "Callable[[V1ReviewClosedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ReviewClosedEvent` (`v1.review.closed`) event notification. @@ -3754,7 +3827,7 @@ def on_v1_review_closed( def on_v1_review_opened( self, - func: "Callable[[V1ReviewOpenedEventNotification, StripeClient], None]", + func: "Callable[[V1ReviewOpenedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1ReviewOpenedEvent` (`v1.review.opened`) event notification. @@ -3767,7 +3840,7 @@ def on_v1_review_opened( def on_v1_setup_intent_canceled( self, - func: "Callable[[V1SetupIntentCanceledEventNotification, StripeClient], None]", + func: "Callable[[V1SetupIntentCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SetupIntentCanceledEvent` (`v1.setup_intent.canceled`) event notification. @@ -3780,7 +3853,7 @@ def on_v1_setup_intent_canceled( def on_v1_setup_intent_created( self, - func: "Callable[[V1SetupIntentCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1SetupIntentCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SetupIntentCreatedEvent` (`v1.setup_intent.created`) event notification. @@ -3793,7 +3866,7 @@ def on_v1_setup_intent_created( def on_v1_setup_intent_requires_action( self, - func: "Callable[[V1SetupIntentRequiresActionEventNotification, StripeClient], None]", + func: "Callable[[V1SetupIntentRequiresActionEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SetupIntentRequiresActionEvent` (`v1.setup_intent.requires_action`) event notification. @@ -3806,7 +3879,7 @@ def on_v1_setup_intent_requires_action( def on_v1_setup_intent_setup_failed( self, - func: "Callable[[V1SetupIntentSetupFailedEventNotification, StripeClient], None]", + func: "Callable[[V1SetupIntentSetupFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SetupIntentSetupFailedEvent` (`v1.setup_intent.setup_failed`) event notification. @@ -3819,7 +3892,7 @@ def on_v1_setup_intent_setup_failed( def on_v1_setup_intent_succeeded( self, - func: "Callable[[V1SetupIntentSucceededEventNotification, StripeClient], None]", + func: "Callable[[V1SetupIntentSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SetupIntentSucceededEvent` (`v1.setup_intent.succeeded`) event notification. @@ -3832,7 +3905,7 @@ def on_v1_setup_intent_succeeded( def on_v1_sigma_scheduled_query_run_created( self, - func: "Callable[[V1SigmaScheduledQueryRunCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1SigmaScheduledQueryRunCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SigmaScheduledQueryRunCreatedEvent` (`v1.sigma.scheduled_query_run.created`) event notification. @@ -3845,7 +3918,7 @@ def on_v1_sigma_scheduled_query_run_created( def on_v1_source_canceled( self, - func: "Callable[[V1SourceCanceledEventNotification, StripeClient], None]", + func: "Callable[[V1SourceCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SourceCanceledEvent` (`v1.source.canceled`) event notification. @@ -3858,7 +3931,7 @@ def on_v1_source_canceled( def on_v1_source_chargeable( self, - func: "Callable[[V1SourceChargeableEventNotification, StripeClient], None]", + func: "Callable[[V1SourceChargeableEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SourceChargeableEvent` (`v1.source.chargeable`) event notification. @@ -3871,7 +3944,7 @@ def on_v1_source_chargeable( def on_v1_source_failed( self, - func: "Callable[[V1SourceFailedEventNotification, StripeClient], None]", + func: "Callable[[V1SourceFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SourceFailedEvent` (`v1.source.failed`) event notification. @@ -3884,7 +3957,7 @@ def on_v1_source_failed( def on_v1_source_refund_attributes_required( self, - func: "Callable[[V1SourceRefundAttributesRequiredEventNotification, StripeClient], None]", + func: "Callable[[V1SourceRefundAttributesRequiredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SourceRefundAttributesRequiredEvent` (`v1.source.refund_attributes_required`) event notification. @@ -3897,7 +3970,7 @@ def on_v1_source_refund_attributes_required( def on_v1_subscription_schedule_aborted( self, - func: "Callable[[V1SubscriptionScheduleAbortedEventNotification, StripeClient], None]", + func: "Callable[[V1SubscriptionScheduleAbortedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SubscriptionScheduleAbortedEvent` (`v1.subscription_schedule.aborted`) event notification. @@ -3910,7 +3983,7 @@ def on_v1_subscription_schedule_aborted( def on_v1_subscription_schedule_canceled( self, - func: "Callable[[V1SubscriptionScheduleCanceledEventNotification, StripeClient], None]", + func: "Callable[[V1SubscriptionScheduleCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SubscriptionScheduleCanceledEvent` (`v1.subscription_schedule.canceled`) event notification. @@ -3923,7 +3996,7 @@ def on_v1_subscription_schedule_canceled( def on_v1_subscription_schedule_completed( self, - func: "Callable[[V1SubscriptionScheduleCompletedEventNotification, StripeClient], None]", + func: "Callable[[V1SubscriptionScheduleCompletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SubscriptionScheduleCompletedEvent` (`v1.subscription_schedule.completed`) event notification. @@ -3936,7 +4009,7 @@ def on_v1_subscription_schedule_completed( def on_v1_subscription_schedule_created( self, - func: "Callable[[V1SubscriptionScheduleCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1SubscriptionScheduleCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SubscriptionScheduleCreatedEvent` (`v1.subscription_schedule.created`) event notification. @@ -3949,7 +4022,7 @@ def on_v1_subscription_schedule_created( def on_v1_subscription_schedule_expiring( self, - func: "Callable[[V1SubscriptionScheduleExpiringEventNotification, StripeClient], None]", + func: "Callable[[V1SubscriptionScheduleExpiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SubscriptionScheduleExpiringEvent` (`v1.subscription_schedule.expiring`) event notification. @@ -3962,7 +4035,7 @@ def on_v1_subscription_schedule_expiring( def on_v1_subscription_schedule_released( self, - func: "Callable[[V1SubscriptionScheduleReleasedEventNotification, StripeClient], None]", + func: "Callable[[V1SubscriptionScheduleReleasedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SubscriptionScheduleReleasedEvent` (`v1.subscription_schedule.released`) event notification. @@ -3975,7 +4048,7 @@ def on_v1_subscription_schedule_released( def on_v1_subscription_schedule_updated( self, - func: "Callable[[V1SubscriptionScheduleUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1SubscriptionScheduleUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1SubscriptionScheduleUpdatedEvent` (`v1.subscription_schedule.updated`) event notification. @@ -3988,7 +4061,7 @@ def on_v1_subscription_schedule_updated( def on_v1_tax_rate_created( self, - func: "Callable[[V1TaxRateCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1TaxRateCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TaxRateCreatedEvent` (`v1.tax_rate.created`) event notification. @@ -4001,7 +4074,7 @@ def on_v1_tax_rate_created( def on_v1_tax_rate_updated( self, - func: "Callable[[V1TaxRateUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1TaxRateUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TaxRateUpdatedEvent` (`v1.tax_rate.updated`) event notification. @@ -4014,7 +4087,7 @@ def on_v1_tax_rate_updated( def on_v1_tax_settings_updated( self, - func: "Callable[[V1TaxSettingsUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1TaxSettingsUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TaxSettingsUpdatedEvent` (`v1.tax.settings.updated`) event notification. @@ -4027,7 +4100,7 @@ def on_v1_tax_settings_updated( def on_v1_terminal_reader_action_failed( self, - func: "Callable[[V1TerminalReaderActionFailedEventNotification, StripeClient], None]", + func: "Callable[[V1TerminalReaderActionFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TerminalReaderActionFailedEvent` (`v1.terminal.reader.action_failed`) event notification. @@ -4040,7 +4113,7 @@ def on_v1_terminal_reader_action_failed( def on_v1_terminal_reader_action_succeeded( self, - func: "Callable[[V1TerminalReaderActionSucceededEventNotification, StripeClient], None]", + func: "Callable[[V1TerminalReaderActionSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TerminalReaderActionSucceededEvent` (`v1.terminal.reader.action_succeeded`) event notification. @@ -4053,7 +4126,7 @@ def on_v1_terminal_reader_action_succeeded( def on_v1_terminal_reader_action_updated( self, - func: "Callable[[V1TerminalReaderActionUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1TerminalReaderActionUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TerminalReaderActionUpdatedEvent` (`v1.terminal.reader.action_updated`) event notification. @@ -4066,7 +4139,7 @@ def on_v1_terminal_reader_action_updated( def on_v1_test_helpers_test_clock_advancing( self, - func: "Callable[[V1TestHelpersTestClockAdvancingEventNotification, StripeClient], None]", + func: "Callable[[V1TestHelpersTestClockAdvancingEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TestHelpersTestClockAdvancingEvent` (`v1.test_helpers.test_clock.advancing`) event notification. @@ -4079,7 +4152,7 @@ def on_v1_test_helpers_test_clock_advancing( def on_v1_test_helpers_test_clock_created( self, - func: "Callable[[V1TestHelpersTestClockCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1TestHelpersTestClockCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TestHelpersTestClockCreatedEvent` (`v1.test_helpers.test_clock.created`) event notification. @@ -4092,7 +4165,7 @@ def on_v1_test_helpers_test_clock_created( def on_v1_test_helpers_test_clock_deleted( self, - func: "Callable[[V1TestHelpersTestClockDeletedEventNotification, StripeClient], None]", + func: "Callable[[V1TestHelpersTestClockDeletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TestHelpersTestClockDeletedEvent` (`v1.test_helpers.test_clock.deleted`) event notification. @@ -4105,7 +4178,7 @@ def on_v1_test_helpers_test_clock_deleted( def on_v1_test_helpers_test_clock_internal_failure( self, - func: "Callable[[V1TestHelpersTestClockInternalFailureEventNotification, StripeClient], None]", + func: "Callable[[V1TestHelpersTestClockInternalFailureEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TestHelpersTestClockInternalFailureEvent` (`v1.test_helpers.test_clock.internal_failure`) event notification. @@ -4118,7 +4191,7 @@ def on_v1_test_helpers_test_clock_internal_failure( def on_v1_test_helpers_test_clock_ready( self, - func: "Callable[[V1TestHelpersTestClockReadyEventNotification, StripeClient], None]", + func: "Callable[[V1TestHelpersTestClockReadyEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TestHelpersTestClockReadyEvent` (`v1.test_helpers.test_clock.ready`) event notification. @@ -4131,7 +4204,7 @@ def on_v1_test_helpers_test_clock_ready( def on_v1_topup_canceled( self, - func: "Callable[[V1TopupCanceledEventNotification, StripeClient], None]", + func: "Callable[[V1TopupCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TopupCanceledEvent` (`v1.topup.canceled`) event notification. @@ -4144,7 +4217,7 @@ def on_v1_topup_canceled( def on_v1_topup_created( self, - func: "Callable[[V1TopupCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1TopupCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TopupCreatedEvent` (`v1.topup.created`) event notification. @@ -4157,7 +4230,7 @@ def on_v1_topup_created( def on_v1_topup_failed( self, - func: "Callable[[V1TopupFailedEventNotification, StripeClient], None]", + func: "Callable[[V1TopupFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TopupFailedEvent` (`v1.topup.failed`) event notification. @@ -4170,7 +4243,7 @@ def on_v1_topup_failed( def on_v1_topup_reversed( self, - func: "Callable[[V1TopupReversedEventNotification, StripeClient], None]", + func: "Callable[[V1TopupReversedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TopupReversedEvent` (`v1.topup.reversed`) event notification. @@ -4183,7 +4256,7 @@ def on_v1_topup_reversed( def on_v1_topup_succeeded( self, - func: "Callable[[V1TopupSucceededEventNotification, StripeClient], None]", + func: "Callable[[V1TopupSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TopupSucceededEvent` (`v1.topup.succeeded`) event notification. @@ -4196,7 +4269,7 @@ def on_v1_topup_succeeded( def on_v1_transfer_created( self, - func: "Callable[[V1TransferCreatedEventNotification, StripeClient], None]", + func: "Callable[[V1TransferCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TransferCreatedEvent` (`v1.transfer.created`) event notification. @@ -4209,7 +4282,7 @@ def on_v1_transfer_created( def on_v1_transfer_reversed( self, - func: "Callable[[V1TransferReversedEventNotification, StripeClient], None]", + func: "Callable[[V1TransferReversedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TransferReversedEvent` (`v1.transfer.reversed`) event notification. @@ -4222,7 +4295,7 @@ def on_v1_transfer_reversed( def on_v1_transfer_updated( self, - func: "Callable[[V1TransferUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V1TransferUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V1TransferUpdatedEvent` (`v1.transfer.updated`) event notification. @@ -4235,7 +4308,7 @@ def on_v1_transfer_updated( def on_v2_billing_cadence_billed( self, - func: "Callable[[V2BillingCadenceBilledEventNotification, StripeClient], None]", + func: "Callable[[V2BillingCadenceBilledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingCadenceBilledEvent` (`v2.billing.cadence.billed`) event notification. @@ -4248,7 +4321,7 @@ def on_v2_billing_cadence_billed( def on_v2_billing_cadence_canceled( self, - func: "Callable[[V2BillingCadenceCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2BillingCadenceCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingCadenceCanceledEvent` (`v2.billing.cadence.canceled`) event notification. @@ -4261,7 +4334,7 @@ def on_v2_billing_cadence_canceled( def on_v2_billing_cadence_created( self, - func: "Callable[[V2BillingCadenceCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingCadenceCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingCadenceCreatedEvent` (`v2.billing.cadence.created`) event notification. @@ -4274,7 +4347,7 @@ def on_v2_billing_cadence_created( def on_v2_billing_contract_activated( self, - func: "Callable[[V2BillingContractActivatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingContractActivatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingContractActivatedEvent` (`v2.billing.contract.activated`) event notification. @@ -4287,7 +4360,7 @@ def on_v2_billing_contract_activated( def on_v2_billing_contract_canceled( self, - func: "Callable[[V2BillingContractCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2BillingContractCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingContractCanceledEvent` (`v2.billing.contract.canceled`) event notification. @@ -4300,7 +4373,7 @@ def on_v2_billing_contract_canceled( def on_v2_billing_contract_created( self, - func: "Callable[[V2BillingContractCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingContractCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingContractCreatedEvent` (`v2.billing.contract.created`) event notification. @@ -4313,7 +4386,7 @@ def on_v2_billing_contract_created( def on_v2_billing_contract_ended( self, - func: "Callable[[V2BillingContractEndedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingContractEndedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingContractEndedEvent` (`v2.billing.contract.ended`) event notification. @@ -4326,7 +4399,7 @@ def on_v2_billing_contract_ended( def on_v2_billing_contract_updated( self, - func: "Callable[[V2BillingContractUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingContractUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingContractUpdatedEvent` (`v2.billing.contract.updated`) event notification. @@ -4339,7 +4412,7 @@ def on_v2_billing_contract_updated( def on_v2_billing_licensed_item_created( self, - func: "Callable[[V2BillingLicensedItemCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingLicensedItemCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingLicensedItemCreatedEvent` (`v2.billing.licensed_item.created`) event notification. @@ -4352,7 +4425,7 @@ def on_v2_billing_licensed_item_created( def on_v2_billing_licensed_item_updated( self, - func: "Callable[[V2BillingLicensedItemUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingLicensedItemUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingLicensedItemUpdatedEvent` (`v2.billing.licensed_item.updated`) event notification. @@ -4365,7 +4438,7 @@ def on_v2_billing_licensed_item_updated( def on_v2_billing_license_fee_created( self, - func: "Callable[[V2BillingLicenseFeeCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingLicenseFeeCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingLicenseFeeCreatedEvent` (`v2.billing.license_fee.created`) event notification. @@ -4378,7 +4451,7 @@ def on_v2_billing_license_fee_created( def on_v2_billing_license_fee_updated( self, - func: "Callable[[V2BillingLicenseFeeUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingLicenseFeeUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingLicenseFeeUpdatedEvent` (`v2.billing.license_fee.updated`) event notification. @@ -4391,7 +4464,7 @@ def on_v2_billing_license_fee_updated( def on_v2_billing_license_fee_version_created( self, - func: "Callable[[V2BillingLicenseFeeVersionCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingLicenseFeeVersionCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingLicenseFeeVersionCreatedEvent` (`v2.billing.license_fee_version.created`) event notification. @@ -4404,7 +4477,7 @@ def on_v2_billing_license_fee_version_created( def on_v2_billing_metered_item_created( self, - func: "Callable[[V2BillingMeteredItemCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingMeteredItemCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingMeteredItemCreatedEvent` (`v2.billing.metered_item.created`) event notification. @@ -4417,7 +4490,7 @@ def on_v2_billing_metered_item_created( def on_v2_billing_metered_item_updated( self, - func: "Callable[[V2BillingMeteredItemUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingMeteredItemUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingMeteredItemUpdatedEvent` (`v2.billing.metered_item.updated`) event notification. @@ -4430,7 +4503,7 @@ def on_v2_billing_metered_item_updated( def on_v2_billing_pricing_plan_component_created( self, - func: "Callable[[V2BillingPricingPlanComponentCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingPricingPlanComponentCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingPricingPlanComponentCreatedEvent` (`v2.billing.pricing_plan_component.created`) event notification. @@ -4443,7 +4516,7 @@ def on_v2_billing_pricing_plan_component_created( def on_v2_billing_pricing_plan_component_updated( self, - func: "Callable[[V2BillingPricingPlanComponentUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingPricingPlanComponentUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingPricingPlanComponentUpdatedEvent` (`v2.billing.pricing_plan_component.updated`) event notification. @@ -4456,7 +4529,7 @@ def on_v2_billing_pricing_plan_component_updated( def on_v2_billing_pricing_plan_created( self, - func: "Callable[[V2BillingPricingPlanCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingPricingPlanCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingPricingPlanCreatedEvent` (`v2.billing.pricing_plan.created`) event notification. @@ -4469,7 +4542,7 @@ def on_v2_billing_pricing_plan_created( def on_v2_billing_pricing_plan_subscription_collection_awaiting_customer_action( self, - func: "Callable[[V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification, StripeClient], None]", + func: "Callable[[V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEvent` (`v2.billing.pricing_plan_subscription.collection_awaiting_customer_action`) event notification. @@ -4482,7 +4555,7 @@ def on_v2_billing_pricing_plan_subscription_collection_awaiting_customer_action( def on_v2_billing_pricing_plan_subscription_collection_current( self, - func: "Callable[[V2BillingPricingPlanSubscriptionCollectionCurrentEventNotification, StripeClient], None]", + func: "Callable[[V2BillingPricingPlanSubscriptionCollectionCurrentEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingPricingPlanSubscriptionCollectionCurrentEvent` (`v2.billing.pricing_plan_subscription.collection_current`) event notification. @@ -4495,7 +4568,7 @@ def on_v2_billing_pricing_plan_subscription_collection_current( def on_v2_billing_pricing_plan_subscription_collection_past_due( self, - func: "Callable[[V2BillingPricingPlanSubscriptionCollectionPastDueEventNotification, StripeClient], None]", + func: "Callable[[V2BillingPricingPlanSubscriptionCollectionPastDueEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingPricingPlanSubscriptionCollectionPastDueEvent` (`v2.billing.pricing_plan_subscription.collection_past_due`) event notification. @@ -4508,7 +4581,7 @@ def on_v2_billing_pricing_plan_subscription_collection_past_due( def on_v2_billing_pricing_plan_subscription_collection_paused( self, - func: "Callable[[V2BillingPricingPlanSubscriptionCollectionPausedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingPricingPlanSubscriptionCollectionPausedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingPricingPlanSubscriptionCollectionPausedEvent` (`v2.billing.pricing_plan_subscription.collection_paused`) event notification. @@ -4521,7 +4594,7 @@ def on_v2_billing_pricing_plan_subscription_collection_paused( def on_v2_billing_pricing_plan_subscription_collection_unpaid( self, - func: "Callable[[V2BillingPricingPlanSubscriptionCollectionUnpaidEventNotification, StripeClient], None]", + func: "Callable[[V2BillingPricingPlanSubscriptionCollectionUnpaidEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingPricingPlanSubscriptionCollectionUnpaidEvent` (`v2.billing.pricing_plan_subscription.collection_unpaid`) event notification. @@ -4534,7 +4607,7 @@ def on_v2_billing_pricing_plan_subscription_collection_unpaid( def on_v2_billing_pricing_plan_subscription_servicing_activated( self, - func: "Callable[[V2BillingPricingPlanSubscriptionServicingActivatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingPricingPlanSubscriptionServicingActivatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingPricingPlanSubscriptionServicingActivatedEvent` (`v2.billing.pricing_plan_subscription.servicing_activated`) event notification. @@ -4547,7 +4620,7 @@ def on_v2_billing_pricing_plan_subscription_servicing_activated( def on_v2_billing_pricing_plan_subscription_servicing_canceled( self, - func: "Callable[[V2BillingPricingPlanSubscriptionServicingCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2BillingPricingPlanSubscriptionServicingCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingPricingPlanSubscriptionServicingCanceledEvent` (`v2.billing.pricing_plan_subscription.servicing_canceled`) event notification. @@ -4560,7 +4633,7 @@ def on_v2_billing_pricing_plan_subscription_servicing_canceled( def on_v2_billing_pricing_plan_subscription_servicing_paused( self, - func: "Callable[[V2BillingPricingPlanSubscriptionServicingPausedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingPricingPlanSubscriptionServicingPausedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingPricingPlanSubscriptionServicingPausedEvent` (`v2.billing.pricing_plan_subscription.servicing_paused`) event notification. @@ -4573,7 +4646,7 @@ def on_v2_billing_pricing_plan_subscription_servicing_paused( def on_v2_billing_pricing_plan_updated( self, - func: "Callable[[V2BillingPricingPlanUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingPricingPlanUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingPricingPlanUpdatedEvent` (`v2.billing.pricing_plan.updated`) event notification. @@ -4586,7 +4659,7 @@ def on_v2_billing_pricing_plan_updated( def on_v2_billing_pricing_plan_version_created( self, - func: "Callable[[V2BillingPricingPlanVersionCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingPricingPlanVersionCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingPricingPlanVersionCreatedEvent` (`v2.billing.pricing_plan_version.created`) event notification. @@ -4599,7 +4672,7 @@ def on_v2_billing_pricing_plan_version_created( def on_v2_billing_rate_card_created( self, - func: "Callable[[V2BillingRateCardCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardCreatedEvent` (`v2.billing.rate_card.created`) event notification. @@ -4612,7 +4685,7 @@ def on_v2_billing_rate_card_created( def on_v2_billing_rate_card_custom_pricing_unit_overage_rate_created( self, - func: "Callable[[V2BillingRateCardCustomPricingUnitOverageRateCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardCustomPricingUnitOverageRateCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardCustomPricingUnitOverageRateCreatedEvent` (`v2.billing.rate_card_custom_pricing_unit_overage_rate.created`) event notification. @@ -4625,7 +4698,7 @@ def on_v2_billing_rate_card_custom_pricing_unit_overage_rate_created( def on_v2_billing_rate_card_rate_created( self, - func: "Callable[[V2BillingRateCardRateCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardRateCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardRateCreatedEvent` (`v2.billing.rate_card_rate.created`) event notification. @@ -4638,7 +4711,7 @@ def on_v2_billing_rate_card_rate_created( def on_v2_billing_rate_card_subscription_activated( self, - func: "Callable[[V2BillingRateCardSubscriptionActivatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardSubscriptionActivatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardSubscriptionActivatedEvent` (`v2.billing.rate_card_subscription.activated`) event notification. @@ -4651,7 +4724,7 @@ def on_v2_billing_rate_card_subscription_activated( def on_v2_billing_rate_card_subscription_canceled( self, - func: "Callable[[V2BillingRateCardSubscriptionCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardSubscriptionCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardSubscriptionCanceledEvent` (`v2.billing.rate_card_subscription.canceled`) event notification. @@ -4664,7 +4737,7 @@ def on_v2_billing_rate_card_subscription_canceled( def on_v2_billing_rate_card_subscription_collection_awaiting_customer_action( self, - func: "Callable[[V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEvent` (`v2.billing.rate_card_subscription.collection_awaiting_customer_action`) event notification. @@ -4677,7 +4750,7 @@ def on_v2_billing_rate_card_subscription_collection_awaiting_customer_action( def on_v2_billing_rate_card_subscription_collection_current( self, - func: "Callable[[V2BillingRateCardSubscriptionCollectionCurrentEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardSubscriptionCollectionCurrentEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardSubscriptionCollectionCurrentEvent` (`v2.billing.rate_card_subscription.collection_current`) event notification. @@ -4690,7 +4763,7 @@ def on_v2_billing_rate_card_subscription_collection_current( def on_v2_billing_rate_card_subscription_collection_past_due( self, - func: "Callable[[V2BillingRateCardSubscriptionCollectionPastDueEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardSubscriptionCollectionPastDueEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardSubscriptionCollectionPastDueEvent` (`v2.billing.rate_card_subscription.collection_past_due`) event notification. @@ -4703,7 +4776,7 @@ def on_v2_billing_rate_card_subscription_collection_past_due( def on_v2_billing_rate_card_subscription_collection_paused( self, - func: "Callable[[V2BillingRateCardSubscriptionCollectionPausedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardSubscriptionCollectionPausedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardSubscriptionCollectionPausedEvent` (`v2.billing.rate_card_subscription.collection_paused`) event notification. @@ -4716,7 +4789,7 @@ def on_v2_billing_rate_card_subscription_collection_paused( def on_v2_billing_rate_card_subscription_collection_unpaid( self, - func: "Callable[[V2BillingRateCardSubscriptionCollectionUnpaidEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardSubscriptionCollectionUnpaidEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardSubscriptionCollectionUnpaidEvent` (`v2.billing.rate_card_subscription.collection_unpaid`) event notification. @@ -4729,7 +4802,7 @@ def on_v2_billing_rate_card_subscription_collection_unpaid( def on_v2_billing_rate_card_subscription_servicing_activated( self, - func: "Callable[[V2BillingRateCardSubscriptionServicingActivatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardSubscriptionServicingActivatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardSubscriptionServicingActivatedEvent` (`v2.billing.rate_card_subscription.servicing_activated`) event notification. @@ -4742,7 +4815,7 @@ def on_v2_billing_rate_card_subscription_servicing_activated( def on_v2_billing_rate_card_subscription_servicing_canceled( self, - func: "Callable[[V2BillingRateCardSubscriptionServicingCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardSubscriptionServicingCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardSubscriptionServicingCanceledEvent` (`v2.billing.rate_card_subscription.servicing_canceled`) event notification. @@ -4755,7 +4828,7 @@ def on_v2_billing_rate_card_subscription_servicing_canceled( def on_v2_billing_rate_card_subscription_servicing_paused( self, - func: "Callable[[V2BillingRateCardSubscriptionServicingPausedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardSubscriptionServicingPausedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardSubscriptionServicingPausedEvent` (`v2.billing.rate_card_subscription.servicing_paused`) event notification. @@ -4768,7 +4841,7 @@ def on_v2_billing_rate_card_subscription_servicing_paused( def on_v2_billing_rate_card_updated( self, - func: "Callable[[V2BillingRateCardUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardUpdatedEvent` (`v2.billing.rate_card.updated`) event notification. @@ -4781,7 +4854,7 @@ def on_v2_billing_rate_card_updated( def on_v2_billing_rate_card_version_created( self, - func: "Callable[[V2BillingRateCardVersionCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2BillingRateCardVersionCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2BillingRateCardVersionCreatedEvent` (`v2.billing.rate_card_version.created`) event notification. @@ -4794,7 +4867,7 @@ def on_v2_billing_rate_card_version_created( def on_v2_commerce_product_catalog_imports_failed( self, - func: "Callable[[V2CommerceProductCatalogImportsFailedEventNotification, StripeClient], None]", + func: "Callable[[V2CommerceProductCatalogImportsFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CommerceProductCatalogImportsFailedEvent` (`v2.commerce.product_catalog.imports.failed`) event notification. @@ -4807,7 +4880,7 @@ def on_v2_commerce_product_catalog_imports_failed( def on_v2_commerce_product_catalog_imports_processing( self, - func: "Callable[[V2CommerceProductCatalogImportsProcessingEventNotification, StripeClient], None]", + func: "Callable[[V2CommerceProductCatalogImportsProcessingEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CommerceProductCatalogImportsProcessingEvent` (`v2.commerce.product_catalog.imports.processing`) event notification. @@ -4820,7 +4893,7 @@ def on_v2_commerce_product_catalog_imports_processing( def on_v2_commerce_product_catalog_imports_succeeded( self, - func: "Callable[[V2CommerceProductCatalogImportsSucceededEventNotification, StripeClient], None]", + func: "Callable[[V2CommerceProductCatalogImportsSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CommerceProductCatalogImportsSucceededEvent` (`v2.commerce.product_catalog.imports.succeeded`) event notification. @@ -4833,7 +4906,7 @@ def on_v2_commerce_product_catalog_imports_succeeded( def on_v2_commerce_product_catalog_imports_succeeded_with_errors( self, - func: "Callable[[V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification, StripeClient], None]", + func: "Callable[[V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CommerceProductCatalogImportsSucceededWithErrorsEvent` (`v2.commerce.product_catalog.imports.succeeded_with_errors`) event notification. @@ -4846,7 +4919,7 @@ def on_v2_commerce_product_catalog_imports_succeeded_with_errors( def on_v2_core_account_closed( self, - func: "Callable[[V2CoreAccountClosedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountClosedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountClosedEvent` (`v2.core.account.closed`) event notification. @@ -4859,7 +4932,7 @@ def on_v2_core_account_closed( def on_v2_core_account_created( self, - func: "Callable[[V2CoreAccountCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountCreatedEvent` (`v2.core.account.created`) event notification. @@ -4872,7 +4945,7 @@ def on_v2_core_account_created( def on_v2_core_account_including_configuration_card_creator_capability_status_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationCardCreatorCapabilityStatusUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationCardCreatorCapabilityStatusUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingConfigurationCardCreatorCapabilityStatusUpdatedEvent` (`v2.core.account[configuration.card_creator].capability_status_updated`) event notification. @@ -4885,7 +4958,7 @@ def on_v2_core_account_including_configuration_card_creator_capability_status_up def on_v2_core_account_including_configuration_card_creator_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationCardCreatorUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationCardCreatorUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingConfigurationCardCreatorUpdatedEvent` (`v2.core.account[configuration.card_creator].updated`) event notification. @@ -4898,7 +4971,7 @@ def on_v2_core_account_including_configuration_card_creator_updated( def on_v2_core_account_including_configuration_customer_capability_status_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent` (`v2.core.account[configuration.customer].capability_status_updated`) event notification. @@ -4911,7 +4984,7 @@ def on_v2_core_account_including_configuration_customer_capability_status_update def on_v2_core_account_including_configuration_customer_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingConfigurationCustomerUpdatedEvent` (`v2.core.account[configuration.customer].updated`) event notification. @@ -4924,7 +4997,7 @@ def on_v2_core_account_including_configuration_customer_updated( def on_v2_core_account_including_configuration_merchant_capability_status_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent` (`v2.core.account[configuration.merchant].capability_status_updated`) event notification. @@ -4937,7 +5010,7 @@ def on_v2_core_account_including_configuration_merchant_capability_status_update def on_v2_core_account_including_configuration_merchant_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingConfigurationMerchantUpdatedEvent` (`v2.core.account[configuration.merchant].updated`) event notification. @@ -4950,7 +5023,7 @@ def on_v2_core_account_including_configuration_merchant_updated( def on_v2_core_account_including_configuration_money_manager_capability_status_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent` (`v2.core.account[configuration.money_manager].capability_status_updated`) event notification. @@ -4963,7 +5036,7 @@ def on_v2_core_account_including_configuration_money_manager_capability_status_u def on_v2_core_account_including_configuration_money_manager_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingConfigurationMoneyManagerUpdatedEvent` (`v2.core.account[configuration.money_manager].updated`) event notification. @@ -4976,7 +5049,7 @@ def on_v2_core_account_including_configuration_money_manager_updated( def on_v2_core_account_including_configuration_recipient_capability_status_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent` (`v2.core.account[configuration.recipient].capability_status_updated`) event notification. @@ -4989,7 +5062,7 @@ def on_v2_core_account_including_configuration_recipient_capability_status_updat def on_v2_core_account_including_configuration_recipient_updated( self, - func: "Callable[[V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingConfigurationRecipientUpdatedEvent` (`v2.core.account[configuration.recipient].updated`) event notification. @@ -5002,7 +5075,7 @@ def on_v2_core_account_including_configuration_recipient_updated( def on_v2_core_account_including_defaults_updated( self, - func: "Callable[[V2CoreAccountIncludingDefaultsUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingDefaultsUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingDefaultsUpdatedEvent` (`v2.core.account[defaults].updated`) event notification. @@ -5015,7 +5088,7 @@ def on_v2_core_account_including_defaults_updated( def on_v2_core_account_including_future_requirements_updated( self, - func: "Callable[[V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingFutureRequirementsUpdatedEvent` (`v2.core.account[future_requirements].updated`) event notification. @@ -5028,7 +5101,7 @@ def on_v2_core_account_including_future_requirements_updated( def on_v2_core_account_including_identity_updated( self, - func: "Callable[[V2CoreAccountIncludingIdentityUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingIdentityUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingIdentityUpdatedEvent` (`v2.core.account[identity].updated`) event notification. @@ -5041,7 +5114,7 @@ def on_v2_core_account_including_identity_updated( def on_v2_core_account_including_requirements_updated( self, - func: "Callable[[V2CoreAccountIncludingRequirementsUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountIncludingRequirementsUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountIncludingRequirementsUpdatedEvent` (`v2.core.account[requirements].updated`) event notification. @@ -5054,7 +5127,7 @@ def on_v2_core_account_including_requirements_updated( def on_v2_core_account_link_returned( self, - func: "Callable[[V2CoreAccountLinkReturnedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountLinkReturnedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountLinkReturnedEvent` (`v2.core.account_link.returned`) event notification. @@ -5067,7 +5140,7 @@ def on_v2_core_account_link_returned( def on_v2_core_account_person_created( self, - func: "Callable[[V2CoreAccountPersonCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountPersonCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountPersonCreatedEvent` (`v2.core.account_person.created`) event notification. @@ -5080,7 +5153,7 @@ def on_v2_core_account_person_created( def on_v2_core_account_person_deleted( self, - func: "Callable[[V2CoreAccountPersonDeletedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountPersonDeletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountPersonDeletedEvent` (`v2.core.account_person.deleted`) event notification. @@ -5093,7 +5166,7 @@ def on_v2_core_account_person_deleted( def on_v2_core_account_person_updated( self, - func: "Callable[[V2CoreAccountPersonUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountPersonUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountPersonUpdatedEvent` (`v2.core.account_person.updated`) event notification. @@ -5106,7 +5179,7 @@ def on_v2_core_account_person_updated( def on_v2_core_account_signals_fraudulent_website_ready( self, - func: "Callable[[V2CoreAccountSignalsFraudulentWebsiteReadyEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountSignalsFraudulentWebsiteReadyEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountSignalsFraudulentWebsiteReadyEvent` (`v2.core.account_signals.fraudulent_website_ready`) event notification. @@ -5119,7 +5192,7 @@ def on_v2_core_account_signals_fraudulent_website_ready( def on_v2_core_account_updated( self, - func: "Callable[[V2CoreAccountUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreAccountUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreAccountUpdatedEvent` (`v2.core.account.updated`) event notification. @@ -5132,7 +5205,7 @@ def on_v2_core_account_updated( def on_v2_core_approval_request_approved( self, - func: "Callable[[V2CoreApprovalRequestApprovedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreApprovalRequestApprovedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreApprovalRequestApprovedEvent` (`v2.core.approval_request.approved`) event notification. @@ -5145,7 +5218,7 @@ def on_v2_core_approval_request_approved( def on_v2_core_approval_request_canceled( self, - func: "Callable[[V2CoreApprovalRequestCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2CoreApprovalRequestCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreApprovalRequestCanceledEvent` (`v2.core.approval_request.canceled`) event notification. @@ -5158,7 +5231,7 @@ def on_v2_core_approval_request_canceled( def on_v2_core_approval_request_created( self, - func: "Callable[[V2CoreApprovalRequestCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreApprovalRequestCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreApprovalRequestCreatedEvent` (`v2.core.approval_request.created`) event notification. @@ -5171,7 +5244,7 @@ def on_v2_core_approval_request_created( def on_v2_core_approval_request_expired( self, - func: "Callable[[V2CoreApprovalRequestExpiredEventNotification, StripeClient], None]", + func: "Callable[[V2CoreApprovalRequestExpiredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreApprovalRequestExpiredEvent` (`v2.core.approval_request.expired`) event notification. @@ -5184,7 +5257,7 @@ def on_v2_core_approval_request_expired( def on_v2_core_approval_request_failed( self, - func: "Callable[[V2CoreApprovalRequestFailedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreApprovalRequestFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreApprovalRequestFailedEvent` (`v2.core.approval_request.failed`) event notification. @@ -5197,7 +5270,7 @@ def on_v2_core_approval_request_failed( def on_v2_core_approval_request_rejected( self, - func: "Callable[[V2CoreApprovalRequestRejectedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreApprovalRequestRejectedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreApprovalRequestRejectedEvent` (`v2.core.approval_request.rejected`) event notification. @@ -5210,7 +5283,7 @@ def on_v2_core_approval_request_rejected( def on_v2_core_approval_request_succeeded( self, - func: "Callable[[V2CoreApprovalRequestSucceededEventNotification, StripeClient], None]", + func: "Callable[[V2CoreApprovalRequestSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreApprovalRequestSucceededEvent` (`v2.core.approval_request.succeeded`) event notification. @@ -5223,7 +5296,7 @@ def on_v2_core_approval_request_succeeded( def on_v2_core_batch_job_batch_failed( self, - func: "Callable[[V2CoreBatchJobBatchFailedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreBatchJobBatchFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreBatchJobBatchFailedEvent` (`v2.core.batch_job.batch_failed`) event notification. @@ -5236,7 +5309,7 @@ def on_v2_core_batch_job_batch_failed( def on_v2_core_batch_job_canceled( self, - func: "Callable[[V2CoreBatchJobCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2CoreBatchJobCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreBatchJobCanceledEvent` (`v2.core.batch_job.canceled`) event notification. @@ -5249,7 +5322,7 @@ def on_v2_core_batch_job_canceled( def on_v2_core_batch_job_completed( self, - func: "Callable[[V2CoreBatchJobCompletedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreBatchJobCompletedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreBatchJobCompletedEvent` (`v2.core.batch_job.completed`) event notification. @@ -5262,7 +5335,7 @@ def on_v2_core_batch_job_completed( def on_v2_core_batch_job_created( self, - func: "Callable[[V2CoreBatchJobCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreBatchJobCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreBatchJobCreatedEvent` (`v2.core.batch_job.created`) event notification. @@ -5275,7 +5348,7 @@ def on_v2_core_batch_job_created( def on_v2_core_batch_job_ready_for_upload( self, - func: "Callable[[V2CoreBatchJobReadyForUploadEventNotification, StripeClient], None]", + func: "Callable[[V2CoreBatchJobReadyForUploadEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreBatchJobReadyForUploadEvent` (`v2.core.batch_job.ready_for_upload`) event notification. @@ -5288,7 +5361,7 @@ def on_v2_core_batch_job_ready_for_upload( def on_v2_core_batch_job_timeout( self, - func: "Callable[[V2CoreBatchJobTimeoutEventNotification, StripeClient], None]", + func: "Callable[[V2CoreBatchJobTimeoutEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreBatchJobTimeoutEvent` (`v2.core.batch_job.timeout`) event notification. @@ -5301,7 +5374,7 @@ def on_v2_core_batch_job_timeout( def on_v2_core_batch_job_updated( self, - func: "Callable[[V2CoreBatchJobUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreBatchJobUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreBatchJobUpdatedEvent` (`v2.core.batch_job.updated`) event notification. @@ -5314,7 +5387,7 @@ def on_v2_core_batch_job_updated( def on_v2_core_batch_job_upload_timeout( self, - func: "Callable[[V2CoreBatchJobUploadTimeoutEventNotification, StripeClient], None]", + func: "Callable[[V2CoreBatchJobUploadTimeoutEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreBatchJobUploadTimeoutEvent` (`v2.core.batch_job.upload_timeout`) event notification. @@ -5327,7 +5400,7 @@ def on_v2_core_batch_job_upload_timeout( def on_v2_core_batch_job_validating( self, - func: "Callable[[V2CoreBatchJobValidatingEventNotification, StripeClient], None]", + func: "Callable[[V2CoreBatchJobValidatingEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreBatchJobValidatingEvent` (`v2.core.batch_job.validating`) event notification. @@ -5340,7 +5413,7 @@ def on_v2_core_batch_job_validating( def on_v2_core_batch_job_validation_failed( self, - func: "Callable[[V2CoreBatchJobValidationFailedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreBatchJobValidationFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreBatchJobValidationFailedEvent` (`v2.core.batch_job.validation_failed`) event notification. @@ -5353,7 +5426,7 @@ def on_v2_core_batch_job_validation_failed( def on_v2_core_claimable_sandbox_claimed( self, - func: "Callable[[V2CoreClaimableSandboxClaimedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreClaimableSandboxClaimedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreClaimableSandboxClaimedEvent` (`v2.core.claimable_sandbox.claimed`) event notification. @@ -5366,7 +5439,7 @@ def on_v2_core_claimable_sandbox_claimed( def on_v2_core_claimable_sandbox_created( self, - func: "Callable[[V2CoreClaimableSandboxCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreClaimableSandboxCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreClaimableSandboxCreatedEvent` (`v2.core.claimable_sandbox.created`) event notification. @@ -5379,7 +5452,7 @@ def on_v2_core_claimable_sandbox_created( def on_v2_core_claimable_sandbox_expired( self, - func: "Callable[[V2CoreClaimableSandboxExpiredEventNotification, StripeClient], None]", + func: "Callable[[V2CoreClaimableSandboxExpiredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreClaimableSandboxExpiredEvent` (`v2.core.claimable_sandbox.expired`) event notification. @@ -5392,7 +5465,7 @@ def on_v2_core_claimable_sandbox_expired( def on_v2_core_claimable_sandbox_expiring( self, - func: "Callable[[V2CoreClaimableSandboxExpiringEventNotification, StripeClient], None]", + func: "Callable[[V2CoreClaimableSandboxExpiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreClaimableSandboxExpiringEvent` (`v2.core.claimable_sandbox.expiring`) event notification. @@ -5405,7 +5478,7 @@ def on_v2_core_claimable_sandbox_expiring( def on_v2_core_claimable_sandbox_updated( self, - func: "Callable[[V2CoreClaimableSandboxUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreClaimableSandboxUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreClaimableSandboxUpdatedEvent` (`v2.core.claimable_sandbox.updated`) event notification. @@ -5418,7 +5491,7 @@ def on_v2_core_claimable_sandbox_updated( def on_v2_core_event_destination_ping( self, - func: "Callable[[V2CoreEventDestinationPingEventNotification, StripeClient], None]", + func: "Callable[[V2CoreEventDestinationPingEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreEventDestinationPingEvent` (`v2.core.event_destination.ping`) event notification. @@ -5431,7 +5504,7 @@ def on_v2_core_event_destination_ping( def on_v2_core_health_api_error_firing( self, - func: "Callable[[V2CoreHealthApiErrorFiringEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthApiErrorFiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthApiErrorFiringEvent` (`v2.core.health.api_error.firing`) event notification. @@ -5444,7 +5517,7 @@ def on_v2_core_health_api_error_firing( def on_v2_core_health_api_error_resolved( self, - func: "Callable[[V2CoreHealthApiErrorResolvedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthApiErrorResolvedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthApiErrorResolvedEvent` (`v2.core.health.api_error.resolved`) event notification. @@ -5457,7 +5530,7 @@ def on_v2_core_health_api_error_resolved( def on_v2_core_health_api_latency_firing( self, - func: "Callable[[V2CoreHealthApiLatencyFiringEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthApiLatencyFiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthApiLatencyFiringEvent` (`v2.core.health.api_latency.firing`) event notification. @@ -5470,7 +5543,7 @@ def on_v2_core_health_api_latency_firing( def on_v2_core_health_api_latency_resolved( self, - func: "Callable[[V2CoreHealthApiLatencyResolvedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthApiLatencyResolvedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthApiLatencyResolvedEvent` (`v2.core.health.api_latency.resolved`) event notification. @@ -5483,7 +5556,7 @@ def on_v2_core_health_api_latency_resolved( def on_v2_core_health_authorization_rate_drop_firing( self, - func: "Callable[[V2CoreHealthAuthorizationRateDropFiringEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthAuthorizationRateDropFiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthAuthorizationRateDropFiringEvent` (`v2.core.health.authorization_rate_drop.firing`) event notification. @@ -5496,7 +5569,7 @@ def on_v2_core_health_authorization_rate_drop_firing( def on_v2_core_health_authorization_rate_drop_resolved( self, - func: "Callable[[V2CoreHealthAuthorizationRateDropResolvedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthAuthorizationRateDropResolvedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthAuthorizationRateDropResolvedEvent` (`v2.core.health.authorization_rate_drop.resolved`) event notification. @@ -5509,7 +5582,7 @@ def on_v2_core_health_authorization_rate_drop_resolved( def on_v2_core_health_elements_error_firing( self, - func: "Callable[[V2CoreHealthElementsErrorFiringEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthElementsErrorFiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthElementsErrorFiringEvent` (`v2.core.health.elements_error.firing`) event notification. @@ -5522,7 +5595,7 @@ def on_v2_core_health_elements_error_firing( def on_v2_core_health_elements_error_resolved( self, - func: "Callable[[V2CoreHealthElementsErrorResolvedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthElementsErrorResolvedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthElementsErrorResolvedEvent` (`v2.core.health.elements_error.resolved`) event notification. @@ -5535,7 +5608,7 @@ def on_v2_core_health_elements_error_resolved( def on_v2_core_health_event_generation_failure_resolved( self, - func: "Callable[[V2CoreHealthEventGenerationFailureResolvedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthEventGenerationFailureResolvedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthEventGenerationFailureResolvedEvent` (`v2.core.health.event_generation_failure.resolved`) event notification. @@ -5548,7 +5621,7 @@ def on_v2_core_health_event_generation_failure_resolved( def on_v2_core_health_fraud_rate_increased( self, - func: "Callable[[V2CoreHealthFraudRateIncreasedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthFraudRateIncreasedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthFraudRateIncreasedEvent` (`v2.core.health.fraud_rate.increased`) event notification. @@ -5561,7 +5634,7 @@ def on_v2_core_health_fraud_rate_increased( def on_v2_core_health_invoice_count_dropped_firing( self, - func: "Callable[[V2CoreHealthInvoiceCountDroppedFiringEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthInvoiceCountDroppedFiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthInvoiceCountDroppedFiringEvent` (`v2.core.health.invoice_count_dropped.firing`) event notification. @@ -5574,7 +5647,7 @@ def on_v2_core_health_invoice_count_dropped_firing( def on_v2_core_health_invoice_count_dropped_resolved( self, - func: "Callable[[V2CoreHealthInvoiceCountDroppedResolvedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthInvoiceCountDroppedResolvedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthInvoiceCountDroppedResolvedEvent` (`v2.core.health.invoice_count_dropped.resolved`) event notification. @@ -5587,7 +5660,7 @@ def on_v2_core_health_invoice_count_dropped_resolved( def on_v2_core_health_issuing_authorization_request_errors_firing( self, - func: "Callable[[V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent` (`v2.core.health.issuing_authorization_request_errors.firing`) event notification. @@ -5600,7 +5673,7 @@ def on_v2_core_health_issuing_authorization_request_errors_firing( def on_v2_core_health_issuing_authorization_request_errors_resolved( self, - func: "Callable[[V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent` (`v2.core.health.issuing_authorization_request_errors.resolved`) event notification. @@ -5613,7 +5686,7 @@ def on_v2_core_health_issuing_authorization_request_errors_resolved( def on_v2_core_health_issuing_authorization_request_timeout_firing( self, - func: "Callable[[V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent` (`v2.core.health.issuing_authorization_request_timeout.firing`) event notification. @@ -5626,7 +5699,7 @@ def on_v2_core_health_issuing_authorization_request_timeout_firing( def on_v2_core_health_issuing_authorization_request_timeout_resolved( self, - func: "Callable[[V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent` (`v2.core.health.issuing_authorization_request_timeout.resolved`) event notification. @@ -5639,7 +5712,7 @@ def on_v2_core_health_issuing_authorization_request_timeout_resolved( def on_v2_core_health_meter_event_summaries_delayed_firing( self, - func: "Callable[[V2CoreHealthMeterEventSummariesDelayedFiringEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthMeterEventSummariesDelayedFiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthMeterEventSummariesDelayedFiringEvent` (`v2.core.health.meter_event_summaries_delayed.firing`) event notification. @@ -5652,7 +5725,7 @@ def on_v2_core_health_meter_event_summaries_delayed_firing( def on_v2_core_health_meter_event_summaries_delayed_resolved( self, - func: "Callable[[V2CoreHealthMeterEventSummariesDelayedResolvedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthMeterEventSummariesDelayedResolvedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthMeterEventSummariesDelayedResolvedEvent` (`v2.core.health.meter_event_summaries_delayed.resolved`) event notification. @@ -5665,7 +5738,7 @@ def on_v2_core_health_meter_event_summaries_delayed_resolved( def on_v2_core_health_payment_method_error_firing( self, - func: "Callable[[V2CoreHealthPaymentMethodErrorFiringEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthPaymentMethodErrorFiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthPaymentMethodErrorFiringEvent` (`v2.core.health.payment_method_error.firing`) event notification. @@ -5678,7 +5751,7 @@ def on_v2_core_health_payment_method_error_firing( def on_v2_core_health_payment_method_error_resolved( self, - func: "Callable[[V2CoreHealthPaymentMethodErrorResolvedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthPaymentMethodErrorResolvedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthPaymentMethodErrorResolvedEvent` (`v2.core.health.payment_method_error.resolved`) event notification. @@ -5691,7 +5764,7 @@ def on_v2_core_health_payment_method_error_resolved( def on_v2_core_health_sepa_debit_delayed_firing( self, - func: "Callable[[V2CoreHealthSepaDebitDelayedFiringEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthSepaDebitDelayedFiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthSepaDebitDelayedFiringEvent` (`v2.core.health.sepa_debit_delayed.firing`) event notification. @@ -5704,7 +5777,7 @@ def on_v2_core_health_sepa_debit_delayed_firing( def on_v2_core_health_sepa_debit_delayed_resolved( self, - func: "Callable[[V2CoreHealthSepaDebitDelayedResolvedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthSepaDebitDelayedResolvedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthSepaDebitDelayedResolvedEvent` (`v2.core.health.sepa_debit_delayed.resolved`) event notification. @@ -5717,7 +5790,7 @@ def on_v2_core_health_sepa_debit_delayed_resolved( def on_v2_core_health_traffic_volume_drop_firing( self, - func: "Callable[[V2CoreHealthTrafficVolumeDropFiringEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthTrafficVolumeDropFiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthTrafficVolumeDropFiringEvent` (`v2.core.health.traffic_volume_drop.firing`) event notification. @@ -5730,7 +5803,7 @@ def on_v2_core_health_traffic_volume_drop_firing( def on_v2_core_health_traffic_volume_drop_resolved( self, - func: "Callable[[V2CoreHealthTrafficVolumeDropResolvedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthTrafficVolumeDropResolvedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthTrafficVolumeDropResolvedEvent` (`v2.core.health.traffic_volume_drop.resolved`) event notification. @@ -5743,7 +5816,7 @@ def on_v2_core_health_traffic_volume_drop_resolved( def on_v2_core_health_webhook_latency_firing( self, - func: "Callable[[V2CoreHealthWebhookLatencyFiringEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthWebhookLatencyFiringEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthWebhookLatencyFiringEvent` (`v2.core.health.webhook_latency.firing`) event notification. @@ -5756,7 +5829,7 @@ def on_v2_core_health_webhook_latency_firing( def on_v2_core_health_webhook_latency_resolved( self, - func: "Callable[[V2CoreHealthWebhookLatencyResolvedEventNotification, StripeClient], None]", + func: "Callable[[V2CoreHealthWebhookLatencyResolvedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2CoreHealthWebhookLatencyResolvedEvent` (`v2.core.health.webhook_latency.resolved`) event notification. @@ -5769,7 +5842,7 @@ def on_v2_core_health_webhook_latency_resolved( def on_v2_data_reporting_query_run_created( self, - func: "Callable[[V2DataReportingQueryRunCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2DataReportingQueryRunCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2DataReportingQueryRunCreatedEvent` (`v2.data.reporting.query_run.created`) event notification. @@ -5782,7 +5855,7 @@ def on_v2_data_reporting_query_run_created( def on_v2_data_reporting_query_run_failed( self, - func: "Callable[[V2DataReportingQueryRunFailedEventNotification, StripeClient], None]", + func: "Callable[[V2DataReportingQueryRunFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2DataReportingQueryRunFailedEvent` (`v2.data.reporting.query_run.failed`) event notification. @@ -5795,7 +5868,7 @@ def on_v2_data_reporting_query_run_failed( def on_v2_data_reporting_query_run_succeeded( self, - func: "Callable[[V2DataReportingQueryRunSucceededEventNotification, StripeClient], None]", + func: "Callable[[V2DataReportingQueryRunSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2DataReportingQueryRunSucceededEvent` (`v2.data.reporting.query_run.succeeded`) event notification. @@ -5808,7 +5881,7 @@ def on_v2_data_reporting_query_run_succeeded( def on_v2_data_reporting_query_run_updated( self, - func: "Callable[[V2DataReportingQueryRunUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2DataReportingQueryRunUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2DataReportingQueryRunUpdatedEvent` (`v2.data.reporting.query_run.updated`) event notification. @@ -5821,7 +5894,7 @@ def on_v2_data_reporting_query_run_updated( def on_v2_extend_extension_run_failed( self, - func: "Callable[[V2ExtendExtensionRunFailedEventNotification, StripeClient], None]", + func: "Callable[[V2ExtendExtensionRunFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2ExtendExtensionRunFailedEvent` (`v2.extend.extension_run.failed`) event notification. @@ -5834,7 +5907,7 @@ def on_v2_extend_extension_run_failed( def on_v2_extend_workflow_run_failed( self, - func: "Callable[[V2ExtendWorkflowRunFailedEventNotification, StripeClient], None]", + func: "Callable[[V2ExtendWorkflowRunFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2ExtendWorkflowRunFailedEvent` (`v2.extend.workflow_run.failed`) event notification. @@ -5847,7 +5920,7 @@ def on_v2_extend_workflow_run_failed( def on_v2_extend_workflow_run_started( self, - func: "Callable[[V2ExtendWorkflowRunStartedEventNotification, StripeClient], None]", + func: "Callable[[V2ExtendWorkflowRunStartedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2ExtendWorkflowRunStartedEvent` (`v2.extend.workflow_run.started`) event notification. @@ -5860,7 +5933,7 @@ def on_v2_extend_workflow_run_started( def on_v2_extend_workflow_run_succeeded( self, - func: "Callable[[V2ExtendWorkflowRunSucceededEventNotification, StripeClient], None]", + func: "Callable[[V2ExtendWorkflowRunSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2ExtendWorkflowRunSucceededEvent` (`v2.extend.workflow_run.succeeded`) event notification. @@ -5873,7 +5946,7 @@ def on_v2_extend_workflow_run_succeeded( def on_v2_iam_api_key_created( self, - func: "Callable[[V2IamApiKeyCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2IamApiKeyCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2IamApiKeyCreatedEvent` (`v2.iam.api_key.created`) event notification. @@ -5886,7 +5959,7 @@ def on_v2_iam_api_key_created( def on_v2_iam_api_key_default_secret_revealed( self, - func: "Callable[[V2IamApiKeyDefaultSecretRevealedEventNotification, StripeClient], None]", + func: "Callable[[V2IamApiKeyDefaultSecretRevealedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2IamApiKeyDefaultSecretRevealedEvent` (`v2.iam.api_key.default_secret_revealed`) event notification. @@ -5899,7 +5972,7 @@ def on_v2_iam_api_key_default_secret_revealed( def on_v2_iam_api_key_expired( self, - func: "Callable[[V2IamApiKeyExpiredEventNotification, StripeClient], None]", + func: "Callable[[V2IamApiKeyExpiredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2IamApiKeyExpiredEvent` (`v2.iam.api_key.expired`) event notification. @@ -5912,7 +5985,7 @@ def on_v2_iam_api_key_expired( def on_v2_iam_api_key_permissions_updated( self, - func: "Callable[[V2IamApiKeyPermissionsUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2IamApiKeyPermissionsUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2IamApiKeyPermissionsUpdatedEvent` (`v2.iam.api_key.permissions_updated`) event notification. @@ -5925,7 +5998,7 @@ def on_v2_iam_api_key_permissions_updated( def on_v2_iam_api_key_rotated( self, - func: "Callable[[V2IamApiKeyRotatedEventNotification, StripeClient], None]", + func: "Callable[[V2IamApiKeyRotatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2IamApiKeyRotatedEvent` (`v2.iam.api_key.rotated`) event notification. @@ -5938,7 +6011,7 @@ def on_v2_iam_api_key_rotated( def on_v2_iam_api_key_updated( self, - func: "Callable[[V2IamApiKeyUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2IamApiKeyUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2IamApiKeyUpdatedEvent` (`v2.iam.api_key.updated`) event notification. @@ -5951,7 +6024,7 @@ def on_v2_iam_api_key_updated( def on_v2_iam_stripe_access_grant_approved( self, - func: "Callable[[V2IamStripeAccessGrantApprovedEventNotification, StripeClient], None]", + func: "Callable[[V2IamStripeAccessGrantApprovedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2IamStripeAccessGrantApprovedEvent` (`v2.iam.stripe_access_grant.approved`) event notification. @@ -5964,7 +6037,7 @@ def on_v2_iam_stripe_access_grant_approved( def on_v2_iam_stripe_access_grant_canceled( self, - func: "Callable[[V2IamStripeAccessGrantCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2IamStripeAccessGrantCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2IamStripeAccessGrantCanceledEvent` (`v2.iam.stripe_access_grant.canceled`) event notification. @@ -5977,7 +6050,7 @@ def on_v2_iam_stripe_access_grant_canceled( def on_v2_iam_stripe_access_grant_denied( self, - func: "Callable[[V2IamStripeAccessGrantDeniedEventNotification, StripeClient], None]", + func: "Callable[[V2IamStripeAccessGrantDeniedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2IamStripeAccessGrantDeniedEvent` (`v2.iam.stripe_access_grant.denied`) event notification. @@ -5990,7 +6063,7 @@ def on_v2_iam_stripe_access_grant_denied( def on_v2_iam_stripe_access_grant_removed( self, - func: "Callable[[V2IamStripeAccessGrantRemovedEventNotification, StripeClient], None]", + func: "Callable[[V2IamStripeAccessGrantRemovedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2IamStripeAccessGrantRemovedEvent` (`v2.iam.stripe_access_grant.removed`) event notification. @@ -6003,7 +6076,7 @@ def on_v2_iam_stripe_access_grant_removed( def on_v2_iam_stripe_access_grant_requested( self, - func: "Callable[[V2IamStripeAccessGrantRequestedEventNotification, StripeClient], None]", + func: "Callable[[V2IamStripeAccessGrantRequestedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2IamStripeAccessGrantRequestedEvent` (`v2.iam.stripe_access_grant.requested`) event notification. @@ -6016,7 +6089,7 @@ def on_v2_iam_stripe_access_grant_requested( def on_v2_iam_stripe_access_grant_updated( self, - func: "Callable[[V2IamStripeAccessGrantUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2IamStripeAccessGrantUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2IamStripeAccessGrantUpdatedEvent` (`v2.iam.stripe_access_grant.updated`) event notification. @@ -6029,7 +6102,7 @@ def on_v2_iam_stripe_access_grant_updated( def on_v2_money_management_adjustment_created( self, - func: "Callable[[V2MoneyManagementAdjustmentCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementAdjustmentCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementAdjustmentCreatedEvent` (`v2.money_management.adjustment.created`) event notification. @@ -6042,7 +6115,7 @@ def on_v2_money_management_adjustment_created( def on_v2_money_management_debit_dispute_failed( self, - func: "Callable[[V2MoneyManagementDebitDisputeFailedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementDebitDisputeFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementDebitDisputeFailedEvent` (`v2.money_management.debit_dispute.failed`) event notification. @@ -6055,7 +6128,7 @@ def on_v2_money_management_debit_dispute_failed( def on_v2_money_management_debit_dispute_submitted( self, - func: "Callable[[V2MoneyManagementDebitDisputeSubmittedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementDebitDisputeSubmittedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementDebitDisputeSubmittedEvent` (`v2.money_management.debit_dispute.submitted`) event notification. @@ -6068,7 +6141,7 @@ def on_v2_money_management_debit_dispute_submitted( def on_v2_money_management_debit_dispute_succeeded( self, - func: "Callable[[V2MoneyManagementDebitDisputeSucceededEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementDebitDisputeSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementDebitDisputeSucceededEvent` (`v2.money_management.debit_dispute.succeeded`) event notification. @@ -6081,7 +6154,7 @@ def on_v2_money_management_debit_dispute_succeeded( def on_v2_money_management_financial_account_created( self, - func: "Callable[[V2MoneyManagementFinancialAccountCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementFinancialAccountCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementFinancialAccountCreatedEvent` (`v2.money_management.financial_account.created`) event notification. @@ -6094,7 +6167,7 @@ def on_v2_money_management_financial_account_created( def on_v2_money_management_financial_account_statement_created( self, - func: "Callable[[V2MoneyManagementFinancialAccountStatementCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementFinancialAccountStatementCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementFinancialAccountStatementCreatedEvent` (`v2.money_management.financial_account_statement.created`) event notification. @@ -6107,7 +6180,7 @@ def on_v2_money_management_financial_account_statement_created( def on_v2_money_management_financial_account_statement_restated( self, - func: "Callable[[V2MoneyManagementFinancialAccountStatementRestatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementFinancialAccountStatementRestatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementFinancialAccountStatementRestatedEvent` (`v2.money_management.financial_account_statement.restated`) event notification. @@ -6120,7 +6193,7 @@ def on_v2_money_management_financial_account_statement_restated( def on_v2_money_management_financial_account_updated( self, - func: "Callable[[V2MoneyManagementFinancialAccountUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementFinancialAccountUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementFinancialAccountUpdatedEvent` (`v2.money_management.financial_account.updated`) event notification. @@ -6133,7 +6206,7 @@ def on_v2_money_management_financial_account_updated( def on_v2_money_management_financial_address_activated( self, - func: "Callable[[V2MoneyManagementFinancialAddressActivatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementFinancialAddressActivatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementFinancialAddressActivatedEvent` (`v2.money_management.financial_address.activated`) event notification. @@ -6146,7 +6219,7 @@ def on_v2_money_management_financial_address_activated( def on_v2_money_management_financial_address_failed( self, - func: "Callable[[V2MoneyManagementFinancialAddressFailedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementFinancialAddressFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementFinancialAddressFailedEvent` (`v2.money_management.financial_address.failed`) event notification. @@ -6159,7 +6232,7 @@ def on_v2_money_management_financial_address_failed( def on_v2_money_management_inbound_transfer_available( self, - func: "Callable[[V2MoneyManagementInboundTransferAvailableEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementInboundTransferAvailableEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementInboundTransferAvailableEvent` (`v2.money_management.inbound_transfer.available`) event notification. @@ -6172,7 +6245,7 @@ def on_v2_money_management_inbound_transfer_available( def on_v2_money_management_inbound_transfer_bank_debit_failed( self, - func: "Callable[[V2MoneyManagementInboundTransferBankDebitFailedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementInboundTransferBankDebitFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementInboundTransferBankDebitFailedEvent` (`v2.money_management.inbound_transfer.bank_debit_failed`) event notification. @@ -6185,7 +6258,7 @@ def on_v2_money_management_inbound_transfer_bank_debit_failed( def on_v2_money_management_inbound_transfer_bank_debit_processing( self, - func: "Callable[[V2MoneyManagementInboundTransferBankDebitProcessingEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementInboundTransferBankDebitProcessingEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementInboundTransferBankDebitProcessingEvent` (`v2.money_management.inbound_transfer.bank_debit_processing`) event notification. @@ -6198,7 +6271,7 @@ def on_v2_money_management_inbound_transfer_bank_debit_processing( def on_v2_money_management_inbound_transfer_bank_debit_queued( self, - func: "Callable[[V2MoneyManagementInboundTransferBankDebitQueuedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementInboundTransferBankDebitQueuedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementInboundTransferBankDebitQueuedEvent` (`v2.money_management.inbound_transfer.bank_debit_queued`) event notification. @@ -6211,7 +6284,7 @@ def on_v2_money_management_inbound_transfer_bank_debit_queued( def on_v2_money_management_inbound_transfer_bank_debit_returned( self, - func: "Callable[[V2MoneyManagementInboundTransferBankDebitReturnedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementInboundTransferBankDebitReturnedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementInboundTransferBankDebitReturnedEvent` (`v2.money_management.inbound_transfer.bank_debit_returned`) event notification. @@ -6224,7 +6297,7 @@ def on_v2_money_management_inbound_transfer_bank_debit_returned( def on_v2_money_management_inbound_transfer_bank_debit_succeeded( self, - func: "Callable[[V2MoneyManagementInboundTransferBankDebitSucceededEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementInboundTransferBankDebitSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementInboundTransferBankDebitSucceededEvent` (`v2.money_management.inbound_transfer.bank_debit_succeeded`) event notification. @@ -6237,7 +6310,7 @@ def on_v2_money_management_inbound_transfer_bank_debit_succeeded( def on_v2_money_management_outbound_payment_canceled( self, - func: "Callable[[V2MoneyManagementOutboundPaymentCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundPaymentCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundPaymentCanceledEvent` (`v2.money_management.outbound_payment.canceled`) event notification. @@ -6250,7 +6323,7 @@ def on_v2_money_management_outbound_payment_canceled( def on_v2_money_management_outbound_payment_created( self, - func: "Callable[[V2MoneyManagementOutboundPaymentCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundPaymentCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundPaymentCreatedEvent` (`v2.money_management.outbound_payment.created`) event notification. @@ -6263,7 +6336,7 @@ def on_v2_money_management_outbound_payment_created( def on_v2_money_management_outbound_payment_failed( self, - func: "Callable[[V2MoneyManagementOutboundPaymentFailedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundPaymentFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundPaymentFailedEvent` (`v2.money_management.outbound_payment.failed`) event notification. @@ -6276,7 +6349,7 @@ def on_v2_money_management_outbound_payment_failed( def on_v2_money_management_outbound_payment_posted( self, - func: "Callable[[V2MoneyManagementOutboundPaymentPostedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundPaymentPostedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundPaymentPostedEvent` (`v2.money_management.outbound_payment.posted`) event notification. @@ -6289,7 +6362,7 @@ def on_v2_money_management_outbound_payment_posted( def on_v2_money_management_outbound_payment_returned( self, - func: "Callable[[V2MoneyManagementOutboundPaymentReturnedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundPaymentReturnedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundPaymentReturnedEvent` (`v2.money_management.outbound_payment.returned`) event notification. @@ -6302,7 +6375,7 @@ def on_v2_money_management_outbound_payment_returned( def on_v2_money_management_outbound_payment_under_review( self, - func: "Callable[[V2MoneyManagementOutboundPaymentUnderReviewEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundPaymentUnderReviewEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundPaymentUnderReviewEvent` (`v2.money_management.outbound_payment.under_review`) event notification. @@ -6315,7 +6388,7 @@ def on_v2_money_management_outbound_payment_under_review( def on_v2_money_management_outbound_payment_updated( self, - func: "Callable[[V2MoneyManagementOutboundPaymentUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundPaymentUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundPaymentUpdatedEvent` (`v2.money_management.outbound_payment.updated`) event notification. @@ -6328,7 +6401,7 @@ def on_v2_money_management_outbound_payment_updated( def on_v2_money_management_outbound_transfer_canceled( self, - func: "Callable[[V2MoneyManagementOutboundTransferCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundTransferCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundTransferCanceledEvent` (`v2.money_management.outbound_transfer.canceled`) event notification. @@ -6341,7 +6414,7 @@ def on_v2_money_management_outbound_transfer_canceled( def on_v2_money_management_outbound_transfer_created( self, - func: "Callable[[V2MoneyManagementOutboundTransferCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundTransferCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundTransferCreatedEvent` (`v2.money_management.outbound_transfer.created`) event notification. @@ -6354,7 +6427,7 @@ def on_v2_money_management_outbound_transfer_created( def on_v2_money_management_outbound_transfer_failed( self, - func: "Callable[[V2MoneyManagementOutboundTransferFailedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundTransferFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundTransferFailedEvent` (`v2.money_management.outbound_transfer.failed`) event notification. @@ -6367,7 +6440,7 @@ def on_v2_money_management_outbound_transfer_failed( def on_v2_money_management_outbound_transfer_posted( self, - func: "Callable[[V2MoneyManagementOutboundTransferPostedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundTransferPostedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundTransferPostedEvent` (`v2.money_management.outbound_transfer.posted`) event notification. @@ -6380,7 +6453,7 @@ def on_v2_money_management_outbound_transfer_posted( def on_v2_money_management_outbound_transfer_returned( self, - func: "Callable[[V2MoneyManagementOutboundTransferReturnedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundTransferReturnedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundTransferReturnedEvent` (`v2.money_management.outbound_transfer.returned`) event notification. @@ -6393,7 +6466,7 @@ def on_v2_money_management_outbound_transfer_returned( def on_v2_money_management_outbound_transfer_under_review( self, - func: "Callable[[V2MoneyManagementOutboundTransferUnderReviewEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundTransferUnderReviewEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundTransferUnderReviewEvent` (`v2.money_management.outbound_transfer.under_review`) event notification. @@ -6406,7 +6479,7 @@ def on_v2_money_management_outbound_transfer_under_review( def on_v2_money_management_outbound_transfer_updated( self, - func: "Callable[[V2MoneyManagementOutboundTransferUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementOutboundTransferUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementOutboundTransferUpdatedEvent` (`v2.money_management.outbound_transfer.updated`) event notification. @@ -6419,7 +6492,7 @@ def on_v2_money_management_outbound_transfer_updated( def on_v2_money_management_payout_method_created( self, - func: "Callable[[V2MoneyManagementPayoutMethodCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementPayoutMethodCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementPayoutMethodCreatedEvent` (`v2.money_management.payout_method.created`) event notification. @@ -6432,7 +6505,7 @@ def on_v2_money_management_payout_method_created( def on_v2_money_management_payout_method_updated( self, - func: "Callable[[V2MoneyManagementPayoutMethodUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementPayoutMethodUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementPayoutMethodUpdatedEvent` (`v2.money_management.payout_method.updated`) event notification. @@ -6445,7 +6518,7 @@ def on_v2_money_management_payout_method_updated( def on_v2_money_management_received_credit_available( self, - func: "Callable[[V2MoneyManagementReceivedCreditAvailableEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedCreditAvailableEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedCreditAvailableEvent` (`v2.money_management.received_credit.available`) event notification. @@ -6458,7 +6531,7 @@ def on_v2_money_management_received_credit_available( def on_v2_money_management_received_credit_failed( self, - func: "Callable[[V2MoneyManagementReceivedCreditFailedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedCreditFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedCreditFailedEvent` (`v2.money_management.received_credit.failed`) event notification. @@ -6471,7 +6544,7 @@ def on_v2_money_management_received_credit_failed( def on_v2_money_management_received_credit_returned( self, - func: "Callable[[V2MoneyManagementReceivedCreditReturnedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedCreditReturnedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedCreditReturnedEvent` (`v2.money_management.received_credit.returned`) event notification. @@ -6484,7 +6557,7 @@ def on_v2_money_management_received_credit_returned( def on_v2_money_management_received_credit_succeeded( self, - func: "Callable[[V2MoneyManagementReceivedCreditSucceededEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedCreditSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedCreditSucceededEvent` (`v2.money_management.received_credit.succeeded`) event notification. @@ -6497,7 +6570,7 @@ def on_v2_money_management_received_credit_succeeded( def on_v2_money_management_received_debit_canceled( self, - func: "Callable[[V2MoneyManagementReceivedDebitCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedDebitCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedDebitCanceledEvent` (`v2.money_management.received_debit.canceled`) event notification. @@ -6510,7 +6583,7 @@ def on_v2_money_management_received_debit_canceled( def on_v2_money_management_received_debit_created( self, - func: "Callable[[V2MoneyManagementReceivedDebitCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedDebitCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedDebitCreatedEvent` (`v2.money_management.received_debit.created`) event notification. @@ -6523,7 +6596,7 @@ def on_v2_money_management_received_debit_created( def on_v2_money_management_received_debit_failed( self, - func: "Callable[[V2MoneyManagementReceivedDebitFailedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedDebitFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedDebitFailedEvent` (`v2.money_management.received_debit.failed`) event notification. @@ -6536,7 +6609,7 @@ def on_v2_money_management_received_debit_failed( def on_v2_money_management_received_debit_mandate_canceled( self, - func: "Callable[[V2MoneyManagementReceivedDebitMandateCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedDebitMandateCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedDebitMandateCanceledEvent` (`v2.money_management.received_debit_mandate.canceled`) event notification. @@ -6549,7 +6622,7 @@ def on_v2_money_management_received_debit_mandate_canceled( def on_v2_money_management_received_debit_mandate_created( self, - func: "Callable[[V2MoneyManagementReceivedDebitMandateCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedDebitMandateCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedDebitMandateCreatedEvent` (`v2.money_management.received_debit_mandate.created`) event notification. @@ -6562,7 +6635,7 @@ def on_v2_money_management_received_debit_mandate_created( def on_v2_money_management_received_debit_mandate_expired( self, - func: "Callable[[V2MoneyManagementReceivedDebitMandateExpiredEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedDebitMandateExpiredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedDebitMandateExpiredEvent` (`v2.money_management.received_debit_mandate.expired`) event notification. @@ -6575,7 +6648,7 @@ def on_v2_money_management_received_debit_mandate_expired( def on_v2_money_management_received_debit_mandate_pending_cancellation( self, - func: "Callable[[V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedDebitMandatePendingCancellationEvent` (`v2.money_management.received_debit_mandate.pending_cancellation`) event notification. @@ -6588,7 +6661,7 @@ def on_v2_money_management_received_debit_mandate_pending_cancellation( def on_v2_money_management_received_debit_mandate_updated( self, - func: "Callable[[V2MoneyManagementReceivedDebitMandateUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedDebitMandateUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedDebitMandateUpdatedEvent` (`v2.money_management.received_debit_mandate.updated`) event notification. @@ -6601,7 +6674,7 @@ def on_v2_money_management_received_debit_mandate_updated( def on_v2_money_management_received_debit_pending( self, - func: "Callable[[V2MoneyManagementReceivedDebitPendingEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedDebitPendingEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedDebitPendingEvent` (`v2.money_management.received_debit.pending`) event notification. @@ -6614,7 +6687,7 @@ def on_v2_money_management_received_debit_pending( def on_v2_money_management_received_debit_scheduled( self, - func: "Callable[[V2MoneyManagementReceivedDebitScheduledEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedDebitScheduledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedDebitScheduledEvent` (`v2.money_management.received_debit.scheduled`) event notification. @@ -6627,7 +6700,7 @@ def on_v2_money_management_received_debit_scheduled( def on_v2_money_management_received_debit_succeeded( self, - func: "Callable[[V2MoneyManagementReceivedDebitSucceededEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedDebitSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedDebitSucceededEvent` (`v2.money_management.received_debit.succeeded`) event notification. @@ -6640,7 +6713,7 @@ def on_v2_money_management_received_debit_succeeded( def on_v2_money_management_received_debit_updated( self, - func: "Callable[[V2MoneyManagementReceivedDebitUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementReceivedDebitUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementReceivedDebitUpdatedEvent` (`v2.money_management.received_debit.updated`) event notification. @@ -6653,7 +6726,7 @@ def on_v2_money_management_received_debit_updated( def on_v2_money_management_recipient_verification_created( self, - func: "Callable[[V2MoneyManagementRecipientVerificationCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementRecipientVerificationCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementRecipientVerificationCreatedEvent` (`v2.money_management.recipient_verification.created`) event notification. @@ -6666,7 +6739,7 @@ def on_v2_money_management_recipient_verification_created( def on_v2_money_management_recipient_verification_updated( self, - func: "Callable[[V2MoneyManagementRecipientVerificationUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementRecipientVerificationUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementRecipientVerificationUpdatedEvent` (`v2.money_management.recipient_verification.updated`) event notification. @@ -6679,7 +6752,7 @@ def on_v2_money_management_recipient_verification_updated( def on_v2_money_management_transaction_created( self, - func: "Callable[[V2MoneyManagementTransactionCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementTransactionCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementTransactionCreatedEvent` (`v2.money_management.transaction.created`) event notification. @@ -6692,7 +6765,7 @@ def on_v2_money_management_transaction_created( def on_v2_money_management_transaction_updated( self, - func: "Callable[[V2MoneyManagementTransactionUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2MoneyManagementTransactionUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2MoneyManagementTransactionUpdatedEvent` (`v2.money_management.transaction.updated`) event notification. @@ -6705,7 +6778,7 @@ def on_v2_money_management_transaction_updated( def on_v2_orchestrated_commerce_agreement_confirmed( self, - func: "Callable[[V2OrchestratedCommerceAgreementConfirmedEventNotification, StripeClient], None]", + func: "Callable[[V2OrchestratedCommerceAgreementConfirmedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2OrchestratedCommerceAgreementConfirmedEvent` (`v2.orchestrated_commerce.agreement.confirmed`) event notification. @@ -6718,7 +6791,7 @@ def on_v2_orchestrated_commerce_agreement_confirmed( def on_v2_orchestrated_commerce_agreement_created( self, - func: "Callable[[V2OrchestratedCommerceAgreementCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2OrchestratedCommerceAgreementCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2OrchestratedCommerceAgreementCreatedEvent` (`v2.orchestrated_commerce.agreement.created`) event notification. @@ -6731,7 +6804,7 @@ def on_v2_orchestrated_commerce_agreement_created( def on_v2_orchestrated_commerce_agreement_partially_confirmed( self, - func: "Callable[[V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification, StripeClient], None]", + func: "Callable[[V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2OrchestratedCommerceAgreementPartiallyConfirmedEvent` (`v2.orchestrated_commerce.agreement.partially_confirmed`) event notification. @@ -6744,7 +6817,7 @@ def on_v2_orchestrated_commerce_agreement_partially_confirmed( def on_v2_orchestrated_commerce_agreement_terminated( self, - func: "Callable[[V2OrchestratedCommerceAgreementTerminatedEventNotification, StripeClient], None]", + func: "Callable[[V2OrchestratedCommerceAgreementTerminatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2OrchestratedCommerceAgreementTerminatedEvent` (`v2.orchestrated_commerce.agreement.terminated`) event notification. @@ -6757,7 +6830,7 @@ def on_v2_orchestrated_commerce_agreement_terminated( def on_v2_payments_off_session_payment_attempt_failed( self, - func: "Callable[[V2PaymentsOffSessionPaymentAttemptFailedEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsOffSessionPaymentAttemptFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsOffSessionPaymentAttemptFailedEvent` (`v2.payments.off_session_payment.attempt_failed`) event notification. @@ -6770,7 +6843,7 @@ def on_v2_payments_off_session_payment_attempt_failed( def on_v2_payments_off_session_payment_attempt_started( self, - func: "Callable[[V2PaymentsOffSessionPaymentAttemptStartedEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsOffSessionPaymentAttemptStartedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsOffSessionPaymentAttemptStartedEvent` (`v2.payments.off_session_payment.attempt_started`) event notification. @@ -6783,7 +6856,7 @@ def on_v2_payments_off_session_payment_attempt_started( def on_v2_payments_off_session_payment_authorization_attempt_failed( self, - func: "Callable[[V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent` (`v2.payments.off_session_payment.authorization_attempt_failed`) event notification. @@ -6796,7 +6869,7 @@ def on_v2_payments_off_session_payment_authorization_attempt_failed( def on_v2_payments_off_session_payment_authorization_attempt_started( self, - func: "Callable[[V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent` (`v2.payments.off_session_payment.authorization_attempt_started`) event notification. @@ -6809,7 +6882,7 @@ def on_v2_payments_off_session_payment_authorization_attempt_started( def on_v2_payments_off_session_payment_canceled( self, - func: "Callable[[V2PaymentsOffSessionPaymentCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsOffSessionPaymentCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsOffSessionPaymentCanceledEvent` (`v2.payments.off_session_payment.canceled`) event notification. @@ -6822,7 +6895,7 @@ def on_v2_payments_off_session_payment_canceled( def on_v2_payments_off_session_payment_created( self, - func: "Callable[[V2PaymentsOffSessionPaymentCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsOffSessionPaymentCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsOffSessionPaymentCreatedEvent` (`v2.payments.off_session_payment.created`) event notification. @@ -6835,7 +6908,7 @@ def on_v2_payments_off_session_payment_created( def on_v2_payments_off_session_payment_failed( self, - func: "Callable[[V2PaymentsOffSessionPaymentFailedEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsOffSessionPaymentFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsOffSessionPaymentFailedEvent` (`v2.payments.off_session_payment.failed`) event notification. @@ -6848,7 +6921,7 @@ def on_v2_payments_off_session_payment_failed( def on_v2_payments_off_session_payment_paused( self, - func: "Callable[[V2PaymentsOffSessionPaymentPausedEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsOffSessionPaymentPausedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsOffSessionPaymentPausedEvent` (`v2.payments.off_session_payment.paused`) event notification. @@ -6861,7 +6934,7 @@ def on_v2_payments_off_session_payment_paused( def on_v2_payments_off_session_payment_requires_capture( self, - func: "Callable[[V2PaymentsOffSessionPaymentRequiresCaptureEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsOffSessionPaymentRequiresCaptureEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsOffSessionPaymentRequiresCaptureEvent` (`v2.payments.off_session_payment.requires_capture`) event notification. @@ -6874,7 +6947,7 @@ def on_v2_payments_off_session_payment_requires_capture( def on_v2_payments_off_session_payment_resumed( self, - func: "Callable[[V2PaymentsOffSessionPaymentResumedEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsOffSessionPaymentResumedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsOffSessionPaymentResumedEvent` (`v2.payments.off_session_payment.resumed`) event notification. @@ -6887,7 +6960,7 @@ def on_v2_payments_off_session_payment_resumed( def on_v2_payments_off_session_payment_succeeded( self, - func: "Callable[[V2PaymentsOffSessionPaymentSucceededEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsOffSessionPaymentSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsOffSessionPaymentSucceededEvent` (`v2.payments.off_session_payment.succeeded`) event notification. @@ -6900,7 +6973,7 @@ def on_v2_payments_off_session_payment_succeeded( def on_v2_payments_settlement_allocation_intent_canceled( self, - func: "Callable[[V2PaymentsSettlementAllocationIntentCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsSettlementAllocationIntentCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsSettlementAllocationIntentCanceledEvent` (`v2.payments.settlement_allocation_intent.canceled`) event notification. @@ -6913,7 +6986,7 @@ def on_v2_payments_settlement_allocation_intent_canceled( def on_v2_payments_settlement_allocation_intent_created( self, - func: "Callable[[V2PaymentsSettlementAllocationIntentCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsSettlementAllocationIntentCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsSettlementAllocationIntentCreatedEvent` (`v2.payments.settlement_allocation_intent.created`) event notification. @@ -6926,7 +6999,7 @@ def on_v2_payments_settlement_allocation_intent_created( def on_v2_payments_settlement_allocation_intent_errored( self, - func: "Callable[[V2PaymentsSettlementAllocationIntentErroredEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsSettlementAllocationIntentErroredEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsSettlementAllocationIntentErroredEvent` (`v2.payments.settlement_allocation_intent.errored`) event notification. @@ -6939,7 +7012,7 @@ def on_v2_payments_settlement_allocation_intent_errored( def on_v2_payments_settlement_allocation_intent_funds_not_received( self, - func: "Callable[[V2PaymentsSettlementAllocationIntentFundsNotReceivedEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsSettlementAllocationIntentFundsNotReceivedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsSettlementAllocationIntentFundsNotReceivedEvent` (`v2.payments.settlement_allocation_intent.funds_not_received`) event notification. @@ -6952,7 +7025,7 @@ def on_v2_payments_settlement_allocation_intent_funds_not_received( def on_v2_payments_settlement_allocation_intent_matched( self, - func: "Callable[[V2PaymentsSettlementAllocationIntentMatchedEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsSettlementAllocationIntentMatchedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsSettlementAllocationIntentMatchedEvent` (`v2.payments.settlement_allocation_intent.matched`) event notification. @@ -6965,7 +7038,7 @@ def on_v2_payments_settlement_allocation_intent_matched( def on_v2_payments_settlement_allocation_intent_not_found( self, - func: "Callable[[V2PaymentsSettlementAllocationIntentNotFoundEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsSettlementAllocationIntentNotFoundEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsSettlementAllocationIntentNotFoundEvent` (`v2.payments.settlement_allocation_intent.not_found`) event notification. @@ -6978,7 +7051,7 @@ def on_v2_payments_settlement_allocation_intent_not_found( def on_v2_payments_settlement_allocation_intent_settled( self, - func: "Callable[[V2PaymentsSettlementAllocationIntentSettledEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsSettlementAllocationIntentSettledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsSettlementAllocationIntentSettledEvent` (`v2.payments.settlement_allocation_intent.settled`) event notification. @@ -6991,7 +7064,7 @@ def on_v2_payments_settlement_allocation_intent_settled( def on_v2_payments_settlement_allocation_intent_split_canceled( self, - func: "Callable[[V2PaymentsSettlementAllocationIntentSplitCanceledEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsSettlementAllocationIntentSplitCanceledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsSettlementAllocationIntentSplitCanceledEvent` (`v2.payments.settlement_allocation_intent_split.canceled`) event notification. @@ -7004,7 +7077,7 @@ def on_v2_payments_settlement_allocation_intent_split_canceled( def on_v2_payments_settlement_allocation_intent_split_created( self, - func: "Callable[[V2PaymentsSettlementAllocationIntentSplitCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsSettlementAllocationIntentSplitCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsSettlementAllocationIntentSplitCreatedEvent` (`v2.payments.settlement_allocation_intent_split.created`) event notification. @@ -7017,7 +7090,7 @@ def on_v2_payments_settlement_allocation_intent_split_created( def on_v2_payments_settlement_allocation_intent_split_settled( self, - func: "Callable[[V2PaymentsSettlementAllocationIntentSplitSettledEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsSettlementAllocationIntentSplitSettledEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsSettlementAllocationIntentSplitSettledEvent` (`v2.payments.settlement_allocation_intent_split.settled`) event notification. @@ -7030,7 +7103,7 @@ def on_v2_payments_settlement_allocation_intent_split_settled( def on_v2_payments_settlement_allocation_intent_submitted( self, - func: "Callable[[V2PaymentsSettlementAllocationIntentSubmittedEventNotification, StripeClient], None]", + func: "Callable[[V2PaymentsSettlementAllocationIntentSubmittedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2PaymentsSettlementAllocationIntentSubmittedEvent` (`v2.payments.settlement_allocation_intent.submitted`) event notification. @@ -7043,7 +7116,7 @@ def on_v2_payments_settlement_allocation_intent_submitted( def on_v2_reporting_report_run_created( self, - func: "Callable[[V2ReportingReportRunCreatedEventNotification, StripeClient], None]", + func: "Callable[[V2ReportingReportRunCreatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2ReportingReportRunCreatedEvent` (`v2.reporting.report_run.created`) event notification. @@ -7056,7 +7129,7 @@ def on_v2_reporting_report_run_created( def on_v2_reporting_report_run_failed( self, - func: "Callable[[V2ReportingReportRunFailedEventNotification, StripeClient], None]", + func: "Callable[[V2ReportingReportRunFailedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2ReportingReportRunFailedEvent` (`v2.reporting.report_run.failed`) event notification. @@ -7069,7 +7142,7 @@ def on_v2_reporting_report_run_failed( def on_v2_reporting_report_run_succeeded( self, - func: "Callable[[V2ReportingReportRunSucceededEventNotification, StripeClient], None]", + func: "Callable[[V2ReportingReportRunSucceededEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2ReportingReportRunSucceededEvent` (`v2.reporting.report_run.succeeded`) event notification. @@ -7082,7 +7155,7 @@ def on_v2_reporting_report_run_succeeded( def on_v2_reporting_report_run_updated( self, - func: "Callable[[V2ReportingReportRunUpdatedEventNotification, StripeClient], None]", + func: "Callable[[V2ReportingReportRunUpdatedEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2ReportingReportRunUpdatedEvent` (`v2.reporting.report_run.updated`) event notification. @@ -7095,7 +7168,7 @@ def on_v2_reporting_report_run_updated( def on_v2_signals_account_evaluation_complete( self, - func: "Callable[[V2SignalsAccountEvaluationCompleteEventNotification, StripeClient], None]", + func: "Callable[[V2SignalsAccountEvaluationCompleteEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2SignalsAccountEvaluationCompleteEvent` (`v2.signals.account_evaluation.complete`) event notification. @@ -7108,7 +7181,7 @@ def on_v2_signals_account_evaluation_complete( def on_v2_signals_account_signal_fraudulent_merchant_ready( self, - func: "Callable[[V2SignalsAccountSignalFraudulentMerchantReadyEventNotification, StripeClient], None]", + func: "Callable[[V2SignalsAccountSignalFraudulentMerchantReadyEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2SignalsAccountSignalFraudulentMerchantReadyEvent` (`v2.signals.account_signal.fraudulent_merchant_ready`) event notification. @@ -7121,7 +7194,7 @@ def on_v2_signals_account_signal_fraudulent_merchant_ready( def on_v2_signals_account_signal_fraudulent_website_ready( self, - func: "Callable[[V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification, StripeClient], None]", + func: "Callable[[V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2SignalsAccountSignalFraudulentWebsiteReadyEvent` (`v2.signals.account_signal.fraudulent_website_ready`) event notification. @@ -7134,7 +7207,7 @@ def on_v2_signals_account_signal_fraudulent_website_ready( def on_v2_signals_account_signal_merchant_delinquency_ready( self, - func: "Callable[[V2SignalsAccountSignalMerchantDelinquencyReadyEventNotification, StripeClient], None]", + func: "Callable[[V2SignalsAccountSignalMerchantDelinquencyReadyEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2SignalsAccountSignalMerchantDelinquencyReadyEvent` (`v2.signals.account_signal.merchant_delinquency_ready`) event notification. @@ -7147,7 +7220,7 @@ def on_v2_signals_account_signal_merchant_delinquency_ready( def on_v2_signals_account_signal_payment_delinquency_exposure_ready( self, - func: "Callable[[V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification, StripeClient], None]", + func: "Callable[[V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification, StripeClient], CallbackReturn]", ): """ Registers a callback for the `V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent` (`v2.signals.account_signal.payment_delinquency_exposure_ready`) event notification. @@ -7161,7 +7234,54 @@ def on_v2_signals_account_signal_payment_delinquency_exposure_ready( # event-notification-registration-methods: The end of the section generated from our OpenAPI spec -class StripeEventNotificationHandler(_BaseEventNotificationHandler): +class _SyncEventNotificationHandler(_BaseEventNotificationHandler[None, bool]): + """ + Adds synchronous dispatch. Shared by the verifying and non-verifying sync + handlers, which differ only in how they parse the incoming payload. + """ + + def _dispatch(self, event_notif: "EventNotification") -> None: + client = self._client.with_stripe_context(event_notif.context) + + if self._pre_handle_callback and not self._pre_handle_callback( + event_notif, client + ): + return + + if callback := self._callback_for(event_notif): + callback(event_notif, client) + else: + self.fallback_callback( + event_notif, client, self._unhandled_details(event_notif) + ) + + +class _AsyncEventNotificationHandler( + _BaseEventNotificationHandler[Awaitable[None], Awaitable[bool]] +): + """ + Adds asynchronous dispatch. Only the callbacks are awaited: verifying a + signature and parsing the payload are pure CPU work, so they stay + synchronous even here. + """ + + async def _dispatch_async(self, event_notif: "EventNotification") -> None: + client = self._client.with_stripe_context(event_notif.context) + + if self._pre_handle_callback and not await self._pre_handle_callback( + event_notif, client + ): + return + + if callback := self._callback_for(event_notif): + await callback(event_notif, client) + else: + await self.fallback_callback( + event_notif, client, self._unhandled_details(event_notif) + ) + + +class StripeEventNotificationHandler(_SyncEventNotificationHandler): """ An on-rails experience for handling Stripe event notifications. Define callbacks for individual event types and an instance of this class will be responsible for verifying and routing the event. """ @@ -7169,15 +7289,21 @@ class StripeEventNotificationHandler(_BaseEventNotificationHandler): def __init__( self, client: "StripeClient", - webhook_secret: str, + webhook_secret: Optional[str], fallback_callback: FallbackCallback, ) -> None: + """`webhook_secret` is only marked as `Optional` so it plays nicely with the types commonly returned from web frameworks. This raises a `ValueError` if a secret is not provided.""" super().__init__(client, fallback_callback) if not webhook_secret: raise ValueError("webhook_secret must be a non-empty string") self._webhook_secret = webhook_secret - def handle(self, webhook_body: str, sig_header: str): + def handle(self, webhook_body: WebhookPayload, sig_header: Optional[str]): + """ + Process an incoming webhook, routing it to the correct registered callback (or your fallback). + + `sig_header` is only marked as `Optional` so it plays nicely with the types commonly returned from web frameworks. This raises a `SignatureVerificationError` if a signature is not provided. + """ # set before parsing, so that even a failed parse locks out registration. # modification isn't thread-safe, but we expect callbacks to get registered synchronously at startup # making a race condition here unlikely @@ -7200,7 +7326,7 @@ def without_verification( class StripeEventNotificationHandlerWithoutVerification( - _BaseEventNotificationHandler + _SyncEventNotificationHandler ): """ A variant of StripeEventNotificationHandler that parses events without verifying webhook signatures. Intended for pre-authenticated channels like AWS EventBridge, Azure Event Grid, or your own pre-authenticated queuing system. @@ -7208,7 +7334,10 @@ class StripeEventNotificationHandlerWithoutVerification( Prefer `StripeEventNotificationHandler.without_verification()` or `client.notification_handler_without_verification()` instead of constructing it directly. """ - def handle(self, webhook_body: str): + def handle(self, webhook_body: WebhookPayload): + """ + Process an incoming webhook, routing it to the correct registered callback (or your fallback) without signature verification. + """ self._has_handled_events = True event_notif = ( @@ -7218,3 +7347,70 @@ def handle(self, webhook_body: str): ) self._dispatch(event_notif) + + +class AsyncStripeEventNotificationHandler(_AsyncEventNotificationHandler): + """ + The async equivalent of `StripeEventNotificationHandler`, for use from async web frameworks. Register `async def` callbacks and await `.handle_async()`. + """ + + def __init__( + self, + client: "StripeClient", + webhook_secret: Optional[str], + fallback_callback: AsyncFallbackCallback, + ) -> None: + """`webhook_secret` is only marked as `Optional` so it plays nicely with the types commonly returned from web frameworks. This raises a `ValueError` if a secret is not provided.""" + super().__init__(client, fallback_callback) + if not webhook_secret: + raise ValueError("webhook_secret must be a non-empty string") + self._webhook_secret = webhook_secret + + async def handle_async( + self, webhook_body: WebhookPayload, sig_header: Optional[str] + ): + """ + Process an incoming webhook, routing it to the correct registered callback (or your fallback). + + `sig_header` is only marked as `Optional` so it plays nicely with the types commonly returned from web frameworks. This raises a `SignatureVerificationError` if a signature is not provided. + """ + self._has_handled_events = True + + event_notif = self._client.parse_event_notification( + webhook_body, sig_header, self._webhook_secret + ) + + await self._dispatch_async(event_notif) + + @staticmethod + def without_verification( + client: "StripeClient", + fallback_callback: AsyncFallbackCallback, + ) -> "AsyncStripeEventNotificationHandlerWithoutVerification": + return AsyncStripeEventNotificationHandlerWithoutVerification( + client, fallback_callback + ) + + +class AsyncStripeEventNotificationHandlerWithoutVerification( + _AsyncEventNotificationHandler +): + """ + A variant of AsyncStripeEventNotificationHandler that parses events without verifying webhook signatures. Intended for pre-authenticated channels like AWS EventBridge, Azure Event Grid, or your own pre-authenticated queuing system. + + Prefer `AsyncStripeEventNotificationHandler.without_verification()` or `client.async_notification_handler_without_verification()` instead of constructing it directly. + """ + + async def handle_async(self, webhook_body: WebhookPayload): + """ + Process an incoming webhook, routing it to the correct registered callback (or your fallback) without signature verification. + """ + self._has_handled_events = True + + event_notif = ( + self._client.parse_event_notification_without_verification( + webhook_body + ) + ) + + await self._dispatch_async(event_notif) diff --git a/stripe/_invoice.py b/stripe/_invoice.py index bc851cf1b..2c7480d94 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -913,7 +913,77 @@ class Bancontact(StripeObject): """ class Billie(StripeObject): - pass + class CompanyDetails(StripeObject): + class RegisteredAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code. + """ + line1: Optional[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + registered_address: Optional[RegisteredAddress] + registered_name: Optional[str] + """ + Company or entity name. + """ + registration_number: Optional[str] + """ + The official registration number for the given registration type. + """ + registration_type: Optional[ + Literal[ + "ch_ein", + "de_hrb", + "dk_cvr", + "es_cif", + "fi_tunnus", + "fr_siren", + "fr_siret", + "it_rea", + "nl_kvk", + "no_org_number", + "no_pno", + "se_org_number", + "se_pno", + "uk_crn", + ] + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: Optional[str] + """ + VAT ID number. + """ + _inner_class_types = { + "registered_address": RegisteredAddress, + } + + company_details: Optional[CompanyDetails] + reference: Optional[str] + """ + An identifier or reference that this payment corresponds to. + """ + _inner_class_types = {"company_details": CompanyDetails} class Bizum(StripeObject): pass diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index 342f4c446..3f519ff6c 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -146,6 +146,10 @@ "CustomerCashBalanceTransaction", ), "customer_session": ("stripe._customer_session", "CustomerSession"), + "customer_tax_exemption": ( + "stripe._customer_tax_exemption", + "CustomerTaxExemption", + ), "delegated_checkout.order": ("stripe.delegated_checkout._order", "Order"), "delegated_checkout.order_event": ( "stripe.delegated_checkout._order_event", diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 896d19241..3bebc49c6 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -2020,12 +2020,6 @@ class SepaDebit(StripeObject): Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://docs.stripe.com/api/mandates/retrieve). """ - class Sequra(StripeObject): - transaction_id: Optional[str] - """ - The SeQura transaction ID associated with this payment. - """ - class Shopeepay(StripeObject): pass @@ -2254,7 +2248,6 @@ class Zip(StripeObject): scalapay: Optional[Scalapay] sepa_credit_transfer: Optional[SepaCreditTransfer] sepa_debit: Optional[SepaDebit] - sequra: Optional[Sequra] shopeepay: Optional[Shopeepay] sofort: Optional[Sofort] stripe_account: Optional[StripeAccount] @@ -2334,7 +2327,6 @@ class Zip(StripeObject): "scalapay": Scalapay, "sepa_credit_transfer": SepaCreditTransfer, "sepa_debit": SepaDebit, - "sequra": Sequra, "shopeepay": Shopeepay, "sofort": Sofort, "stripe_account": StripeAccount, diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index e52135113..561161eca 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -3599,10 +3599,82 @@ class Bancontact(StripeObject): """ class Billie(StripeObject): + class CompanyDetails(StripeObject): + class RegisteredAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code. + """ + line1: Optional[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + registered_address: Optional[RegisteredAddress] + registered_name: Optional[str] + """ + Company or entity name. + """ + registration_number: Optional[str] + """ + The official registration number for the given registration type. + """ + registration_type: Optional[ + Union[ + Literal[ + "ch_ein", + "de_hrb", + "dk_cvr", + "es_cif", + "fi_tunnus", + "fr_siren", + "fr_siret", + "it_rea", + "nl_kvk", + "no_org_number", + "no_pno", + "se_org_number", + "se_pno", + "uk_crn", + ], + str, + ] + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: Optional[str] + """ + VAT id number + """ + _inner_class_types = {"registered_address": RegisteredAddress} + capture_method: Optional[Literal["manual"]] """ Controls when the funds will be captured from the customer's account. """ + company_details: Optional[CompanyDetails] + reference: Optional[str] + """ + An identifier or reference that this payment corresponds to. + """ + _inner_class_types = {"company_details": CompanyDetails} class Bizum(StripeObject): pass @@ -4882,22 +4954,6 @@ class MandateOptions(StripeObject): """ _inner_class_types = {"mandate_options": MandateOptions} - class Sequra(StripeObject): - capture_method: Optional[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: Optional[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - class Shopeepay(StripeObject): setup_future_usage: Optional[Literal["none"]] """ @@ -5252,7 +5308,6 @@ class Zip(StripeObject): satispay: Optional[Satispay] scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] - sequra: Optional[Sequra] shopeepay: Optional[Shopeepay] sofort: Optional[Sofort] stripe_balance: Optional[StripeBalance] @@ -5319,7 +5374,6 @@ class Zip(StripeObject): "satispay": Satispay, "scalapay": Scalapay, "sepa_debit": SepaDebit, - "sequra": Sequra, "shopeepay": Shopeepay, "sofort": Sofort, "stripe_balance": StripeBalance, @@ -5723,7 +5777,6 @@ class PaymentData(StripeObject): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index ddd777682..5230f5b57 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -1811,7 +1811,6 @@ class Zip(StripeObject): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 6593a7425..d71c658e3 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe._createable_api_resource import CreateableAPIResource from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource @@ -23,12 +22,12 @@ if TYPE_CHECKING: from stripe._mandate import Mandate from stripe._payment_method import PaymentMethod - from stripe.params._payment_record_create_params import ( - PaymentRecordCreateParams, - ) from stripe.params._payment_record_list_params import ( PaymentRecordListParams, ) + from stripe.params._payment_record_report_dispute_params import ( + PaymentRecordReportDisputeParams, + ) from stripe.params._payment_record_report_payment_attempt_canceled_params import ( PaymentRecordReportPaymentAttemptCanceledParams, ) @@ -59,7 +58,6 @@ class PaymentRecord( - CreateableAPIResource["PaymentRecord"], ListableAPIResource["PaymentRecord"], SearchableAPIResource["PaymentRecord"], ): @@ -2037,12 +2035,6 @@ class SepaDebit(StripeObject): Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://docs.stripe.com/api/mandates/retrieve). """ - class Sequra(StripeObject): - transaction_id: Optional[str] - """ - The SeQura transaction ID associated with this payment. - """ - class Shopeepay(StripeObject): pass @@ -2271,7 +2263,6 @@ class Zip(StripeObject): scalapay: Optional[Scalapay] sepa_credit_transfer: Optional[SepaCreditTransfer] sepa_debit: Optional[SepaDebit] - sequra: Optional[Sequra] shopeepay: Optional[Shopeepay] sofort: Optional[Sofort] stripe_account: Optional[StripeAccount] @@ -2351,7 +2342,6 @@ class Zip(StripeObject): "scalapay": Scalapay, "sepa_credit_transfer": SepaCreditTransfer, "sepa_debit": SepaDebit, - "sequra": Sequra, "shopeepay": Shopeepay, "sofort": Sofort, "stripe_account": StripeAccount, @@ -2549,40 +2539,6 @@ class Address(StripeObject): Shipping information for this payment. """ - @classmethod - def create( - cls, **params: Unpack["PaymentRecordCreateParams"] - ) -> "PaymentRecord": - """ - Report that the most recent payment attempt on the specified Payment Record - was disputed. - """ - return cast( - "PaymentRecord", - cls._static_request( - "post", - cls.class_url(), - params=params, - ), - ) - - @classmethod - async def create_async( - cls, **params: Unpack["PaymentRecordCreateParams"] - ) -> "PaymentRecord": - """ - Report that the most recent payment attempt on the specified Payment Record - was disputed. - """ - return cast( - "PaymentRecord", - await cls._static_request_async( - "post", - cls.class_url(), - params=params, - ), - ) - @classmethod def list( cls, **params: Unpack["PaymentRecordListParams"] @@ -2623,6 +2579,124 @@ async def list_async( return result + @classmethod + def _cls_report_dispute( + cls, id: str, **params: Unpack["PaymentRecordReportDisputeParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was disputed. + """ + return cast( + "PaymentRecord", + cls._static_request( + "post", + "/v1/payment_records/{id}/report_dispute".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + def report_dispute( + id: str, **params: Unpack["PaymentRecordReportDisputeParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was disputed. + """ + ... + + @overload + def report_dispute( + self, **params: Unpack["PaymentRecordReportDisputeParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was disputed. + """ + ... + + @class_method_variant("_cls_report_dispute") + def report_dispute( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["PaymentRecordReportDisputeParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was disputed. + """ + return cast( + "PaymentRecord", + self._request( + "post", + "/v1/payment_records/{id}/report_dispute".format( + id=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + + @classmethod + async def _cls_report_dispute_async( + cls, id: str, **params: Unpack["PaymentRecordReportDisputeParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was disputed. + """ + return cast( + "PaymentRecord", + await cls._static_request_async( + "post", + "/v1/payment_records/{id}/report_dispute".format( + id=sanitize_id(id) + ), + params=params, + ), + ) + + @overload + @staticmethod + async def report_dispute_async( + id: str, **params: Unpack["PaymentRecordReportDisputeParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was disputed. + """ + ... + + @overload + async def report_dispute_async( + self, **params: Unpack["PaymentRecordReportDisputeParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was disputed. + """ + ... + + @class_method_variant("_cls_report_dispute_async") + async def report_dispute_async( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["PaymentRecordReportDisputeParams"] + ) -> "PaymentRecord": + """ + Report that the most recent payment attempt on the specified Payment Record + was disputed. + """ + return cast( + "PaymentRecord", + await self._request_async( + "post", + "/v1/payment_records/{id}/report_dispute".format( + id=sanitize_id(self._data.get("id")) + ), + params=params, + ), + ) + @classmethod def report_payment( cls, **params: Unpack["PaymentRecordReportPaymentParams"] diff --git a/stripe/_payment_record_service.py b/stripe/_payment_record_service.py index 7420e3433..3ca94b536 100644 --- a/stripe/_payment_record_service.py +++ b/stripe/_payment_record_service.py @@ -10,12 +10,12 @@ from stripe._payment_record import PaymentRecord from stripe._request_options import RequestOptions from stripe._search_result_object import SearchResultObject - from stripe.params._payment_record_create_params import ( - PaymentRecordCreateParams, - ) from stripe.params._payment_record_list_params import ( PaymentRecordListParams, ) + from stripe.params._payment_record_report_dispute_params import ( + PaymentRecordReportDisputeParams, + ) from stripe.params._payment_record_report_payment_attempt_canceled_params import ( PaymentRecordReportPaymentAttemptCanceledParams, ) @@ -168,10 +168,10 @@ async def search_async( ), ) - def create( + def report_dispute( self, id: str, - params: "PaymentRecordCreateParams", + params: "PaymentRecordReportDisputeParams", options: Optional["RequestOptions"] = None, ) -> "PaymentRecord": """ @@ -191,10 +191,10 @@ def create( ), ) - async def create_async( + async def report_dispute_async( self, id: str, - params: "PaymentRecordCreateParams", + params: "PaymentRecordReportDisputeParams", options: Optional["RequestOptions"] = None, ) -> "PaymentRecord": """ diff --git a/stripe/_person.py b/stripe/_person.py index c163cee48..19e8f9bdb 100644 --- a/stripe/_person.py +++ b/stripe/_person.py @@ -182,6 +182,12 @@ class Alternative(StripeObject): """ class Error(StripeObject): + class Details(StripeObject): + partner_rejection_code: Optional[str] + """ + The rejection code as received from our payment method partner. + """ + code: Literal[ "external_request", "information_missing", @@ -286,6 +292,7 @@ class Error(StripeObject): """ The code for the type of error. """ + details: Optional[Details] reason: str """ An informative message that indicates the error type and provides additional details about the error. @@ -294,6 +301,7 @@ class Error(StripeObject): """ The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. """ + _inner_class_types = {"details": Details} alternatives: Optional[List[Alternative]] """ @@ -393,6 +401,12 @@ class Alternative(StripeObject): """ class Error(StripeObject): + class Details(StripeObject): + partner_rejection_code: Optional[str] + """ + The rejection code as received from our payment method partner. + """ + code: Literal[ "external_request", "information_missing", @@ -497,6 +511,7 @@ class Error(StripeObject): """ The code for the type of error. """ + details: Optional[Details] reason: str """ An informative message that indicates the error type and provides additional details about the error. @@ -505,6 +520,7 @@ class Error(StripeObject): """ The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. """ + _inner_class_types = {"details": Details} alternatives: Optional[List[Alternative]] """ diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py index 6e390400b..1ddd446e0 100644 --- a/stripe/_quote_preview_invoice.py +++ b/stripe/_quote_preview_invoice.py @@ -868,7 +868,77 @@ class Bancontact(StripeObject): """ class Billie(StripeObject): - pass + class CompanyDetails(StripeObject): + class RegisteredAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code. + """ + line1: Optional[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + registered_address: Optional[RegisteredAddress] + registered_name: Optional[str] + """ + Company or entity name. + """ + registration_number: Optional[str] + """ + The official registration number for the given registration type. + """ + registration_type: Optional[ + Literal[ + "ch_ein", + "de_hrb", + "dk_cvr", + "es_cif", + "fi_tunnus", + "fr_siren", + "fr_siret", + "it_rea", + "nl_kvk", + "no_org_number", + "no_pno", + "se_org_number", + "se_pno", + "uk_crn", + ] + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: Optional[str] + """ + VAT ID number. + """ + _inner_class_types = { + "registered_address": RegisteredAddress, + } + + company_details: Optional[CompanyDetails] + reference: Optional[str] + """ + An identifier or reference that this payment corresponds to. + """ + _inner_class_types = {"company_details": CompanyDetails} class Bizum(StripeObject): pass diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 618c41484..433f800ab 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -1241,7 +1241,6 @@ class FrMealVoucher(StripeObject): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", diff --git a/stripe/_stripe_client.py b/stripe/_stripe_client.py index 1f5ad2e70..476405d03 100644 --- a/stripe/_stripe_client.py +++ b/stripe/_stripe_client.py @@ -10,6 +10,9 @@ from stripe._api_mode import ApiMode from stripe._error import AuthenticationError from stripe._event_notification_handler import ( + AsyncFallbackCallback, + AsyncStripeEventNotificationHandler, + AsyncStripeEventNotificationHandlerWithoutVerification, StripeEventNotificationHandler, StripeEventNotificationHandlerWithoutVerification, FallbackCallback, @@ -27,6 +30,7 @@ from stripe._util import _convert_to_stripe_object, get_api_mode from stripe._webhook import ( Webhook, + WebhookPayload, WebhookSignature, maybe_extract_from_cloud_provider_envelope, ) @@ -243,12 +247,14 @@ def __init__( def construct_event( self, - payload: Union[bytes, str], - sig_header: str, - secret: str, + payload: WebhookPayload, + sig_header: Optional[str], + secret: Optional[str], tolerance: int = Webhook.DEFAULT_TOLERANCE, ) -> Event: - """Constructs a [snapshot event](https://docs.stripe.com/event-destinations#snapshot-payload) from an incoming webhook after verifying its authenticity. To work with a webhook that has already been verified (i.e. one from a cloud provider, an asynchronous queue, or during testing), see `construct_event_without_verification`.""" + """Constructs a [snapshot event](https://docs.stripe.com/event-destinations#snapshot-payload) from an incoming webhook after verifying its authenticity. To work with a webhook that has already been verified (i.e. one from a cloud provider, an asynchronous queue, or during testing), see `construct_event_without_verification`. + + `sig_header` and `secret` are only marked as `Optional` so they play nicely with the types commonly returned from web frameworks. This raises a `SignatureVerificationError` if either is missing.""" return Webhook.construct_event( payload, sig_header, @@ -259,7 +265,7 @@ def construct_event( def construct_event_without_verification( self, - payload: Union[bytes, str], + payload: WebhookPayload, ) -> Event: """Constructs a [snapshot event](https://docs.stripe.com/event-destinations#snapshot-payload) from an incoming webhook without first verifying its authenticity. Should be used after calling `Webhook.verify_header(...)` or with input from a trusted source (such as [AWS EventBridge](https://docs.stripe.com/event-destinations/eventbridge), or [Azure Event Grid](https://docs.stripe.com/event-destinations/eventgrid) payload). Or, to verify & construct in a single call, use `Webhook.construct_event(...)` instead.""" return Webhook.construct_event_without_verification( @@ -268,28 +274,24 @@ def construct_event_without_verification( def parse_event_notification( self, - raw: Union[bytes, str, bytearray], - sig_header: str, - secret: str, + raw: WebhookPayload, + sig_header: Optional[str], + secret: Optional[str], tolerance: int = Webhook.DEFAULT_TOLERANCE, ) -> "ALL_EVENT_NOTIFICATIONS": - """Constructs a [thin event notification](https://docs.stripe.com/event-destinations#thin-payload) from an incoming webhook after verifying its authenticity. To work with a webhook that has already been verified (i.e. one from a cloud provider, an asynchronous queue, or during testing), see `parse_event_notification_without_verification`.""" - payload = ( - cast(Union[bytes, bytearray], raw).decode("utf-8") - if hasattr(raw, "decode") - else cast(str, raw) - ) + """Constructs a [thin event notification](https://docs.stripe.com/event-destinations#thin-payload) from an incoming webhook after verifying its authenticity. To work with a webhook that has already been verified (i.e. one from a cloud provider, an asynchronous queue, or during testing), see `parse_event_notification_without_verification`. - WebhookSignature.verify_header(payload, sig_header, secret, tolerance) + `sig_header` and `secret` are only marked as `Optional` so they play nicely with the types commonly returned from web frameworks. This raises a `SignatureVerificationError` if either is missing.""" + WebhookSignature.verify_header(raw, sig_header, secret, tolerance) return cast( "ALL_EVENT_NOTIFICATIONS", - EventNotification.from_json(payload, self), + EventNotification.from_json(raw, self), ) def parse_event_notification_without_verification( self, - payload: Union[bytes, str], + payload: WebhookPayload, ) -> "ALL_EVENT_NOTIFICATIONS": """Constructs a [thin event notification](https://docs.stripe.com/event-destinations#thin-payload) from an incoming webhook without first verifying its authenticity. Should be used after calling `Webhook.verify_header(...)` or with input from a trusted source (such as [AWS EventBridge](https://docs.stripe.com/event-destinations/eventbridge), or [Azure Event Grid](https://docs.stripe.com/event-destinations/eventgrid) payload). Or, to verify & parse in a single call, use `parse_event_notification(...)` instead.""" @@ -383,10 +385,14 @@ def with_stripe_context( ) def notification_handler( - self, webhook_secret: str, fallback_callback: FallbackCallback + self, + webhook_secret: Optional[str], + fallback_callback: FallbackCallback, ) -> StripeEventNotificationHandler: """ Returns an StripeEventNotificationHandler instance tied to this client. + + `webhook_secret` is only marked as `Optional` so it plays nicely with the types commonly returned from web frameworks. This raises a `ValueError` if a secret is not provided. """ return StripeEventNotificationHandler( self, webhook_secret, fallback_callback @@ -405,6 +411,34 @@ def notification_handler_without_verification( self, fallback_callback ) + def async_notification_handler( + self, + webhook_secret: Optional[str], + fallback_callback: AsyncFallbackCallback, + ) -> AsyncStripeEventNotificationHandler: + """ + Returns an AsyncStripeEventNotificationHandler instance tied to this client. + Register `async def` callbacks on it and run them using `await handler.handle_async()`. + + `webhook_secret` is only marked as `Optional` so it plays nicely with the types commonly returned from web frameworks. This raises a `ValueError` if a secret is not provided. + """ + return AsyncStripeEventNotificationHandler( + self, webhook_secret, fallback_callback + ) + + def async_notification_handler_without_verification( + self, fallback_callback: AsyncFallbackCallback + ) -> AsyncStripeEventNotificationHandlerWithoutVerification: + """ + A variant of AsyncStripeEventNotificationHandler that parses events without + verifying webhook signatures. Intended for pre-authenticated channels + like AWS EventBridge, Azure Event Grid, or your own queue system that + verifies payloads before storage. + """ + return AsyncStripeEventNotificationHandler.without_verification( + self, fallback_callback + ) + # deprecated v1 services: The beginning of the section generated from our OpenAPI spec @property @deprecated( diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 9c0a1924c..4be4a66f9 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -376,7 +376,73 @@ class Bancontact(StripeObject): """ class Billie(StripeObject): - pass + class CompanyDetails(StripeObject): + class RegisteredAddress(StripeObject): + city: Optional[str] + """ + City, district, suburb, town, or village. + """ + country: Optional[str] + """ + Two-letter country code. + """ + line1: Optional[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: Optional[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: Optional[str] + """ + ZIP or postal code. + """ + state: Optional[str] + """ + State, county, province, or region. + """ + + registered_address: Optional[RegisteredAddress] + registered_name: Optional[str] + """ + Company or entity name. + """ + registration_number: Optional[str] + """ + The official registration number for the given registration type. + """ + registration_type: Optional[ + Literal[ + "ch_ein", + "de_hrb", + "dk_cvr", + "es_cif", + "fi_tunnus", + "fr_siren", + "fr_siret", + "it_rea", + "nl_kvk", + "no_org_number", + "no_pno", + "se_org_number", + "se_pno", + "uk_crn", + ] + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: Optional[str] + """ + VAT ID number. + """ + _inner_class_types = { + "registered_address": RegisteredAddress, + } + + company_details: Optional[CompanyDetails] + _inner_class_types = {"company_details": CompanyDetails} class Bizum(StripeObject): class MandateOptions(StripeObject): @@ -841,10 +907,6 @@ class PendingUpdate(StripeObject): """ If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. """ - cancel_at_period_end: Optional[bool] - """ - Indicates whether this subscription should cancel at the end of the current period if the update is applied. - """ discount: Optional["Discount"] """ The pending subscription-level discount that will be applied when the pending update is applied. diff --git a/stripe/_webhook.py b/stripe/_webhook.py index 592ee512e..9fc269e69 100644 --- a/stripe/_webhook.py +++ b/stripe/_webhook.py @@ -12,6 +12,12 @@ from stripe._error import SignatureVerificationError from stripe._api_requestor import _APIRequestor +WebhookPayload = Union[str, bytes, bytearray] +""" +The raw body of an incoming webhook, as read off the request body. +Intentionally wide to work nicely with existing types from Django/Flask/FastAPI . +""" + def build_v1_event(values: Dict[str, Any], requestor: _APIRequestor) -> Event: """ @@ -26,14 +32,12 @@ def build_v1_event(values: Dict[str, Any], requestor: _APIRequestor) -> Event: ) -def maybe_extract_from_cloud_provider_envelope( - payload: Union[bytes, str], -): +def maybe_extract_from_cloud_provider_envelope(payload: WebhookPayload): """ Internal helper to extract the inner type from a cloud provider envelope (regardless of what's in there). If the payload is already a raw Stripe event (object is 'event' or 'v2.core.event'), returns the parsed dict as-is. """ - if isinstance(payload, bytes): + if isinstance(payload, (bytes, bytearray)): payload = payload.decode("utf-8") data = json.loads(payload, object_pairs_hook=OrderedDict) @@ -61,17 +65,16 @@ class Webhook(object): @staticmethod def construct_event( - payload: Union[bytes, str], - sig_header: str, - secret: str, + payload: WebhookPayload, + sig_header: Optional[str], + secret: Optional[str], tolerance: int = DEFAULT_TOLERANCE, api_key: Optional[str] = None, api_requestor: Optional[_APIRequestor] = None, ): - """Constructs a [snapshot event](https://docs.stripe.com/event-destinations#snapshot-payload) from an incoming webhook after verifying its authenticity. To work with a webhook that has already been verified (i.e. one from a cloud provider, an asynchronous queue, or during testing), see `construct_event_without_verification`.""" - if isinstance(payload, (bytes, bytearray)): - payload = payload.decode("utf-8") + """Constructs a [snapshot event](https://docs.stripe.com/event-destinations#snapshot-payload) from an incoming webhook after verifying its authenticity. To work with a webhook that has already been verified (i.e. one from a cloud provider, an asynchronous queue, or during testing), see `construct_event_without_verification`. + `sig_header` is only marked as `Optional` so it plays nicely with the types commonly returned from web frameworks. This raises a `SignatureVerificationError` if a signature is not provided.""" WebhookSignature.verify_header(payload, sig_header, secret, tolerance) return build_v1_event( @@ -84,8 +87,7 @@ def construct_event( @staticmethod def construct_event_without_verification( - payload: Union[bytes, str], - api_requestor: Optional[_APIRequestor] = None, + payload: WebhookPayload, api_requestor: Optional[_APIRequestor] = None ): """Constructs a [snapshot event](https://docs.stripe.com/event-destinations#snapshot-payload) from an incoming webhook without first verifying its authenticity. Should be used after calling `WebhookSignature.verify_header(...)` or with input from a trusted source (such as [AWS EventBridge](https://docs.stripe.com/event-destinations/eventbridge), or [Azure Event Grid](https://docs.stripe.com/event-destinations/eventgrid) payload). Or, to verify & construct in a single call, use `Webhook.construct_event(...)` instead.""" return build_v1_event( @@ -129,12 +131,32 @@ def generate_signature_header( @classmethod def verify_header( cls, - payload: Union[bytes, str], - header: str, - secret: str, + payload: WebhookPayload, + header: Optional[str], + secret: Optional[str], tolerance=None, ): - """Verifies the authenticity (and recency) of a webhook, throwing a `SignatureVerificationError` if there's a mismatch. Useful for quickly validating incoming webhooks before storing them for later processing (at which time you can use the `*_without_verification` methods for parsing).""" + """Verifies the authenticity (and recency) of a webhook, throwing a `SignatureVerificationError` if there's a mismatch. Useful for quickly validating incoming webhooks before storing them for later processing (at which time you can use the `*_without_verification` methods for parsing). + + `sig_header` and `secret` are only marked as `Optional` so they play nicely with the types commonly returned from web frameworks. This raises a `SignatureVerificationError` if either is missing.""" + # the signature is computed over the string form of the body, so binary + # input has to be decoded before it's interpolated below + if isinstance(payload, (bytes, bytearray)): + payload = payload.decode("utf-8") + + if not header: + raise SignatureVerificationError( + "No Stripe-Signature header value was provided. Read it from the incoming request's headers and pass it in; if this webhook has already been verified (or came from a trusted source), use one of the `*_without_verification` methods instead.", + header, + payload, + ) + if not secret: + raise SignatureVerificationError( + "No webhook secret value was provided. It should start with `whsec_`", + header, + payload, + ) + try: timestamp, signatures = cls._get_timestamp_and_signatures( header, cls.EXPECTED_SCHEME diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index ee1f9d71d..103003589 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -137,6 +137,29 @@ class AutomaticSurcharge(StripeObject): """ class AutomaticTax(StripeObject): + class EnablementDetails(StripeObject): + class IntegrationConfigurationDisabledReason(StripeObject): + conflicting_field: str + """ + The parameter that prevented `automatic_tax` from being enabled (e.g. `line_items[][tax_rates]`). + """ + + integration_configuration_disabled_reason: Optional[ + IntegrationConfigurationDisabledReason + ] + """ + Present when `source=tax_integration_configuration` and `automatic_tax[enabled]=false`. + """ + source: Literal[ + "explicit", "managed_payments", "tax_integration_configuration" + ] + """ + How `automatic_tax` was set: `explicit`, `managed_payments`, or `tax_integration_configuration`. + """ + _inner_class_types = { + "integration_configuration_disabled_reason": IntegrationConfigurationDisabledReason, + } + class Liability(StripeObject): account: Optional[ExpandableField["Account"]] """ @@ -155,6 +178,10 @@ class Liability(StripeObject): """ Indicates whether automatic tax is enabled for the session """ + enablement_details: Optional[EnablementDetails] + """ + How `automatic_tax` was set (`explicit`, `managed_payments`, or `tax_integration_configuration`) and why it may have been disabled. + """ liability: Optional[Liability] """ The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. @@ -171,7 +198,10 @@ class Liability(StripeObject): """ The status of the most recent automated tax calculation for this session. """ - _inner_class_types = {"liability": Liability} + _inner_class_types = { + "enablement_details": EnablementDetails, + "liability": Liability, + } class BrandingSettings(StripeObject): class Icon(StripeObject): @@ -2227,12 +2257,6 @@ class MandateOptions(StripeObject): """ _inner_class_types = {"mandate_options": MandateOptions} - class Sequra(StripeObject): - capture_method: Optional[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - class Sofort(StripeObject): setup_future_usage: Optional[Literal["none"]] """ @@ -2465,7 +2489,6 @@ class WechatPay(StripeObject): satispay: Optional[Satispay] scalapay: Optional[Scalapay] sepa_debit: Optional[SepaDebit] - sequra: Optional[Sequra] sofort: Optional[Sofort] sunbit: Optional[Sunbit] swish: Optional[Swish] @@ -2514,7 +2537,6 @@ class WechatPay(StripeObject): "satispay": Satispay, "scalapay": Scalapay, "sepa_debit": SepaDebit, - "sequra": Sequra, "sofort": Sofort, "sunbit": Sunbit, "swish": Swish, @@ -2544,7 +2566,7 @@ class Update(StripeObject): Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. - When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + This parameter is only supported when `ui_mode=elements`. """ update: Optional[Update] @@ -2569,7 +2591,7 @@ class Update(StripeObject): Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. - When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + This parameter is only supported when `ui_mode=elements`. """ _inner_class_types = {"update": Update} diff --git a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py index fd81f96a2..efd769bd1 100644 --- a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py @@ -110,6 +110,7 @@ class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventDat "bacs_debit_payments", "bancontact_payments", "blik_payments", + "blik_recurring_payments", "boleto_payments", "card_payments", "cartes_bancaires_payments", diff --git a/stripe/financial_connections/_transaction.py b/stripe/financial_connections/_transaction.py index de40ca3bc..384294772 100644 --- a/stripe/financial_connections/_transaction.py +++ b/stripe/financial_connections/_transaction.py @@ -25,6 +25,22 @@ class Transaction(ListableAPIResource["Transaction"]): ) class Classification(StripeObject): + class Credit(StripeObject): + confidence_level: Optional[ + Literal["high", "low", "medium", "very_high"] + ] + """ + Stripe's confidence in this classification. + """ + detailed_label: Optional[str] + """ + The detailed category label for this transaction. + """ + primary_label: Optional[str] + """ + The primary category label for this transaction. + """ + class MoneyMovement(StripeObject): confidence_level: Optional[ Literal["high", "low", "medium", "very_high"] @@ -57,19 +73,15 @@ class PersonalFinance(StripeObject): The primary category label for this transaction. """ + credit: Optional[Credit] money_movement: Optional[MoneyMovement] - """ - Money movement classification labels for this transaction. - """ personal_finance: Optional[PersonalFinance] - """ - Personal finance classification labels for this transaction. - """ type: str """ The taxonomy type for this classification entry. """ _inner_class_types = { + "credit": Credit, "money_movement": MoneyMovement, "personal_finance": PersonalFinance, } diff --git a/stripe/issuing/_authorization.py b/stripe/issuing/_authorization.py index ebe6e646d..363b08f9f 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -1930,6 +1930,21 @@ class ThreeDSecure(StripeObject): """ The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. """ + pos_condition: Optional[ + Literal[ + "account_verification", + "card_not_present", + "card_present", + "e_commerce", + "key_entered_pos", + "other", + "pin_entered", + "recurring_or_moto", + ] + ] + """ + The point-of-sale initiation condition. This is null when the card network did not provide one. + """ redaction: Optional[Redaction] """ Redaction status of this authorization. If the authorization is not redacted, this field will be null. diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index 95c63a6a4..33f06709c 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -42,6 +42,24 @@ class Card( OBJECT_NAME: ClassVar[Literal["issuing.card"]] = "issuing.card" + class CryptoWallet(StripeObject): + address: Optional[str] + """ + The public address of the wallet. + """ + chain: str + """ + The blockchain network the wallet is on. + """ + currency: str + """ + The cryptocurrency held in the wallet. + """ + type: Optional[Union[Literal["bridge_wallet", "standard"], str]] + """ + The type of wallet (standard or bridge_wallet). + """ + class LatestFraudWarning(StripeObject): started_at: Optional[int] """ @@ -1301,6 +1319,7 @@ class GooglePay(StripeObject): """ Time at which the object was created. Measured in seconds since the Unix epoch. """ + crypto_wallet: Optional[CryptoWallet] currency: str """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. @@ -2085,6 +2104,7 @@ def test_helpers(self): return self.TestHelpers(self) _inner_class_types = { + "crypto_wallet": CryptoWallet, "latest_fraud_warning": LatestFraudWarning, "lifecycle_controls": LifecycleControls, "product_graduation_state": ProductGraduationState, diff --git a/stripe/issuing/_cardholder.py b/stripe/issuing/_cardholder.py index 17ed7d679..6481d3ec1 100644 --- a/stripe/issuing/_cardholder.py +++ b/stripe/issuing/_cardholder.py @@ -93,7 +93,7 @@ class UserTermsAcceptance(StripeObject): user_terms_acceptance: Optional[UserTermsAcceptance] """ - Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + Information about cardholder acceptance of Celtic [Authorized User Terms](https://docs.stripe.com/issuing/compliance-us#issuing-terms). Required for cards backed by a Celtic program. """ _inner_class_types = {"user_terms_acceptance": UserTermsAcceptance} diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index 667ae914e..07ab1581c 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -1229,6 +1229,11 @@ from stripe.params._customer_create_source_params import ( CustomerCreateSourceParams as CustomerCreateSourceParams, ) + from stripe.params._customer_create_tax_exemption_params import ( + CustomerCreateTaxExemptionParams as CustomerCreateTaxExemptionParams, + CustomerCreateTaxExemptionParamsCa as CustomerCreateTaxExemptionParamsCa, + CustomerCreateTaxExemptionParamsUs as CustomerCreateTaxExemptionParamsUs, + ) from stripe.params._customer_create_tax_id_params import ( CustomerCreateTaxIdParams as CustomerCreateTaxIdParams, ) @@ -1241,6 +1246,9 @@ from stripe.params._customer_delete_source_params import ( CustomerDeleteSourceParams as CustomerDeleteSourceParams, ) + from stripe.params._customer_delete_tax_exemption_params import ( + CustomerDeleteTaxExemptionParams as CustomerDeleteTaxExemptionParams, + ) from stripe.params._customer_delete_tax_id_params import ( CustomerDeleteTaxIdParams as CustomerDeleteTaxIdParams, ) @@ -1269,6 +1277,9 @@ from stripe.params._customer_list_sources_params import ( CustomerListSourcesParams as CustomerListSourcesParams, ) + from stripe.params._customer_list_tax_exemptions_params import ( + CustomerListTaxExemptionsParams as CustomerListTaxExemptionsParams, + ) from stripe.params._customer_list_tax_ids_params import ( CustomerListTaxIdsParams as CustomerListTaxIdsParams, ) @@ -1340,6 +1351,9 @@ from stripe.params._customer_retrieve_source_params import ( CustomerRetrieveSourceParams as CustomerRetrieveSourceParams, ) + from stripe.params._customer_retrieve_tax_exemption_params import ( + CustomerRetrieveTaxExemptionParams as CustomerRetrieveTaxExemptionParams, + ) from stripe.params._customer_retrieve_tax_id_params import ( CustomerRetrieveTaxIdParams as CustomerRetrieveTaxIdParams, ) @@ -1360,6 +1374,20 @@ CustomerSessionCreateParamsComponentsTaxIdElement as CustomerSessionCreateParamsComponentsTaxIdElement, CustomerSessionCreateParamsComponentsTaxIdElementFeatures as CustomerSessionCreateParamsComponentsTaxIdElementFeatures, ) + from stripe.params._customer_tax_exemption_create_params import ( + CustomerTaxExemptionCreateParams as CustomerTaxExemptionCreateParams, + CustomerTaxExemptionCreateParamsCa as CustomerTaxExemptionCreateParamsCa, + CustomerTaxExemptionCreateParamsUs as CustomerTaxExemptionCreateParamsUs, + ) + from stripe.params._customer_tax_exemption_delete_params import ( + CustomerTaxExemptionDeleteParams as CustomerTaxExemptionDeleteParams, + ) + from stripe.params._customer_tax_exemption_list_params import ( + CustomerTaxExemptionListParams as CustomerTaxExemptionListParams, + ) + from stripe.params._customer_tax_exemption_retrieve_params import ( + CustomerTaxExemptionRetrieveParams as CustomerTaxExemptionRetrieveParams, + ) from stripe.params._customer_tax_id_create_params import ( CustomerTaxIdCreateParams as CustomerTaxIdCreateParams, ) @@ -1556,6 +1584,9 @@ InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact, + InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillie as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillie, + InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, + InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBizum as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBizum, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBlik as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBlik, InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCard as InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCard, @@ -1817,6 +1848,9 @@ InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact, + InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillie as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillie, + InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, + InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBizum as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBizum, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBlik as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBlik, InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCard as InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCard, @@ -1916,6 +1950,9 @@ InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact, + InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillie as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillie, + InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, + InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBizum as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBizum, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBlik as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBlik, InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCard as InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCard, @@ -2255,6 +2292,9 @@ ) from stripe.params._payment_attempt_record_report_authorized_params import ( PaymentAttemptRecordReportAuthorizedParams as PaymentAttemptRecordReportAuthorizedParams, + PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetails as PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetails, + PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetailsCard as PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetailsCard, + PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetailsCardChecks as PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetailsCardChecks, PaymentAttemptRecordReportAuthorizedParamsProcessorDetails as PaymentAttemptRecordReportAuthorizedParamsProcessorDetails, PaymentAttemptRecordReportAuthorizedParamsProcessorDetailsCustom as PaymentAttemptRecordReportAuthorizedParamsProcessorDetailsCustom, ) @@ -2593,6 +2633,8 @@ PaymentIntentConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions as PaymentIntentConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions, PaymentIntentConfirmParamsPaymentMethodOptionsBancontact as PaymentIntentConfirmParamsPaymentMethodOptionsBancontact, PaymentIntentConfirmParamsPaymentMethodOptionsBillie as PaymentIntentConfirmParamsPaymentMethodOptionsBillie, + PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetails as PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetails, + PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, PaymentIntentConfirmParamsPaymentMethodOptionsBizum as PaymentIntentConfirmParamsPaymentMethodOptionsBizum, PaymentIntentConfirmParamsPaymentMethodOptionsBlik as PaymentIntentConfirmParamsPaymentMethodOptionsBlik, PaymentIntentConfirmParamsPaymentMethodOptionsBoleto as PaymentIntentConfirmParamsPaymentMethodOptionsBoleto, @@ -2605,6 +2647,7 @@ PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices as PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices, PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding as PaymentIntentConfirmParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent, + PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentAadeData as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentAadeData, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentCaptureDelay as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentCaptureDelay, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetails as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetails, PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices as PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices, @@ -2921,6 +2964,8 @@ PaymentIntentCreateParamsPaymentMethodOptionsBacsDebitMandateOptions as PaymentIntentCreateParamsPaymentMethodOptionsBacsDebitMandateOptions, PaymentIntentCreateParamsPaymentMethodOptionsBancontact as PaymentIntentCreateParamsPaymentMethodOptionsBancontact, PaymentIntentCreateParamsPaymentMethodOptionsBillie as PaymentIntentCreateParamsPaymentMethodOptionsBillie, + PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetails as PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetails, + PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, PaymentIntentCreateParamsPaymentMethodOptionsBizum as PaymentIntentCreateParamsPaymentMethodOptionsBizum, PaymentIntentCreateParamsPaymentMethodOptionsBlik as PaymentIntentCreateParamsPaymentMethodOptionsBlik, PaymentIntentCreateParamsPaymentMethodOptionsBoleto as PaymentIntentCreateParamsPaymentMethodOptionsBoleto, @@ -2933,6 +2978,7 @@ PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices as PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices, PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding as PaymentIntentCreateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding, PaymentIntentCreateParamsPaymentMethodOptionsCardPresent as PaymentIntentCreateParamsPaymentMethodOptionsCardPresent, + PaymentIntentCreateParamsPaymentMethodOptionsCardPresentAadeData as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentAadeData, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentCaptureDelay as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentCaptureDelay, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetails as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetails, PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices as PaymentIntentCreateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices, @@ -3303,6 +3349,8 @@ PaymentIntentModifyParamsPaymentMethodOptionsBacsDebitMandateOptions as PaymentIntentModifyParamsPaymentMethodOptionsBacsDebitMandateOptions, PaymentIntentModifyParamsPaymentMethodOptionsBancontact as PaymentIntentModifyParamsPaymentMethodOptionsBancontact, PaymentIntentModifyParamsPaymentMethodOptionsBillie as PaymentIntentModifyParamsPaymentMethodOptionsBillie, + PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetails as PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetails, + PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, PaymentIntentModifyParamsPaymentMethodOptionsBizum as PaymentIntentModifyParamsPaymentMethodOptionsBizum, PaymentIntentModifyParamsPaymentMethodOptionsBlik as PaymentIntentModifyParamsPaymentMethodOptionsBlik, PaymentIntentModifyParamsPaymentMethodOptionsBoleto as PaymentIntentModifyParamsPaymentMethodOptionsBoleto, @@ -3315,6 +3363,7 @@ PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices as PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices, PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding as PaymentIntentModifyParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding, PaymentIntentModifyParamsPaymentMethodOptionsCardPresent as PaymentIntentModifyParamsPaymentMethodOptionsCardPresent, + PaymentIntentModifyParamsPaymentMethodOptionsCardPresentAadeData as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentAadeData, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentCaptureDelay as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentCaptureDelay, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetails as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetails, PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices as PaymentIntentModifyParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices, @@ -3649,6 +3698,8 @@ PaymentIntentUpdateParamsPaymentMethodOptionsBacsDebitMandateOptions as PaymentIntentUpdateParamsPaymentMethodOptionsBacsDebitMandateOptions, PaymentIntentUpdateParamsPaymentMethodOptionsBancontact as PaymentIntentUpdateParamsPaymentMethodOptionsBancontact, PaymentIntentUpdateParamsPaymentMethodOptionsBillie as PaymentIntentUpdateParamsPaymentMethodOptionsBillie, + PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetails as PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetails, + PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, PaymentIntentUpdateParamsPaymentMethodOptionsBizum as PaymentIntentUpdateParamsPaymentMethodOptionsBizum, PaymentIntentUpdateParamsPaymentMethodOptionsBlik as PaymentIntentUpdateParamsPaymentMethodOptionsBlik, PaymentIntentUpdateParamsPaymentMethodOptionsBoleto as PaymentIntentUpdateParamsPaymentMethodOptionsBoleto, @@ -3661,6 +3712,7 @@ PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices as PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServices, PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding as PaymentIntentUpdateParamsPaymentMethodOptionsCardPaymentDetailsMoneyServicesAccountFunding, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent, + PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentAadeData as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentAadeData, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentCaptureDelay as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentCaptureDelay, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetails as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetails, PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices as PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentPaymentDetailsMoneyServices, @@ -4562,18 +4614,18 @@ PaymentPlanUpdateParamsScheduleAmountsDueAmountDueDateRelative as PaymentPlanUpdateParamsScheduleAmountsDueAmountDueDateRelative, PaymentPlanUpdateParamsScheduleAmountsDueAmountFixedAmount as PaymentPlanUpdateParamsScheduleAmountsDueAmountFixedAmount, ) - from stripe.params._payment_record_create_params import ( - PaymentRecordCreateParams as PaymentRecordCreateParams, - PaymentRecordCreateParamsAmount as PaymentRecordCreateParamsAmount, - PaymentRecordCreateParamsClosed as PaymentRecordCreateParamsClosed, - PaymentRecordCreateParamsFunded as PaymentRecordCreateParamsFunded, - PaymentRecordCreateParamsFundedAmount as PaymentRecordCreateParamsFundedAmount, - PaymentRecordCreateParamsProcessorDetails as PaymentRecordCreateParamsProcessorDetails, - PaymentRecordCreateParamsProcessorDetailsCustom as PaymentRecordCreateParamsProcessorDetailsCustom, - ) from stripe.params._payment_record_list_params import ( PaymentRecordListParams as PaymentRecordListParams, ) + from stripe.params._payment_record_report_dispute_params import ( + PaymentRecordReportDisputeParams as PaymentRecordReportDisputeParams, + PaymentRecordReportDisputeParamsAmount as PaymentRecordReportDisputeParamsAmount, + PaymentRecordReportDisputeParamsClosed as PaymentRecordReportDisputeParamsClosed, + PaymentRecordReportDisputeParamsFunded as PaymentRecordReportDisputeParamsFunded, + PaymentRecordReportDisputeParamsFundedAmount as PaymentRecordReportDisputeParamsFundedAmount, + PaymentRecordReportDisputeParamsProcessorDetails as PaymentRecordReportDisputeParamsProcessorDetails, + PaymentRecordReportDisputeParamsProcessorDetailsCustom as PaymentRecordReportDisputeParamsProcessorDetailsCustom, + ) from stripe.params._payment_record_report_payment_attempt_canceled_params import ( PaymentRecordReportPaymentAttemptCanceledParams as PaymentRecordReportPaymentAttemptCanceledParams, ) @@ -5792,6 +5844,9 @@ SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact, + SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillie as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillie, + SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, + SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBizum as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBizum, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBizumMandateOptions as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBizumMandateOptions, SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlik as SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBlik, @@ -5929,6 +5984,9 @@ SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact, + SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillie as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillie, + SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, + SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBizum as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBizum, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBizumMandateOptions as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBizumMandateOptions, SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlik as SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBlik, @@ -6280,6 +6338,9 @@ SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact, + SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillie as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillie, + SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails, + SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBizum as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBizum, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBizumMandateOptions as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBizumMandateOptions, SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlik as SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBlik, @@ -10330,6 +10391,18 @@ "stripe.params._customer_create_source_params", False, ), + "CustomerCreateTaxExemptionParams": ( + "stripe.params._customer_create_tax_exemption_params", + False, + ), + "CustomerCreateTaxExemptionParamsCa": ( + "stripe.params._customer_create_tax_exemption_params", + False, + ), + "CustomerCreateTaxExemptionParamsUs": ( + "stripe.params._customer_create_tax_exemption_params", + False, + ), "CustomerCreateTaxIdParams": ( "stripe.params._customer_create_tax_id_params", False, @@ -10343,6 +10416,10 @@ "stripe.params._customer_delete_source_params", False, ), + "CustomerDeleteTaxExemptionParams": ( + "stripe.params._customer_delete_tax_exemption_params", + False, + ), "CustomerDeleteTaxIdParams": ( "stripe.params._customer_delete_tax_id_params", False, @@ -10388,6 +10465,10 @@ "stripe.params._customer_list_sources_params", False, ), + "CustomerListTaxExemptionsParams": ( + "stripe.params._customer_list_tax_exemptions_params", + False, + ), "CustomerListTaxIdsParams": ( "stripe.params._customer_list_tax_ids_params", False, @@ -10517,6 +10598,10 @@ "stripe.params._customer_retrieve_source_params", False, ), + "CustomerRetrieveTaxExemptionParams": ( + "stripe.params._customer_retrieve_tax_exemption_params", + False, + ), "CustomerRetrieveTaxIdParams": ( "stripe.params._customer_retrieve_tax_id_params", False, @@ -10570,6 +10655,30 @@ "stripe.params._customer_session_create_params", False, ), + "CustomerTaxExemptionCreateParams": ( + "stripe.params._customer_tax_exemption_create_params", + False, + ), + "CustomerTaxExemptionCreateParamsCa": ( + "stripe.params._customer_tax_exemption_create_params", + False, + ), + "CustomerTaxExemptionCreateParamsUs": ( + "stripe.params._customer_tax_exemption_create_params", + False, + ), + "CustomerTaxExemptionDeleteParams": ( + "stripe.params._customer_tax_exemption_delete_params", + False, + ), + "CustomerTaxExemptionListParams": ( + "stripe.params._customer_tax_exemption_list_params", + False, + ), + "CustomerTaxExemptionRetrieveParams": ( + "stripe.params._customer_tax_exemption_retrieve_params", + False, + ), "CustomerTaxIdCreateParams": ( "stripe.params._customer_tax_id_create_params", False, @@ -10945,6 +11054,18 @@ "stripe.params._invoice_create_params", False, ), + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillie": ( + "stripe.params._invoice_create_params", + False, + ), + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._invoice_create_params", + False, + ), + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._invoice_create_params", + False, + ), "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBizum": ( "stripe.params._invoice_create_params", False, @@ -11846,6 +11967,18 @@ "stripe.params._invoice_modify_params", False, ), + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillie": ( + "stripe.params._invoice_modify_params", + False, + ), + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._invoice_modify_params", + False, + ), + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._invoice_modify_params", + False, + ), "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBizum": ( "stripe.params._invoice_modify_params", False, @@ -12126,6 +12259,18 @@ "stripe.params._invoice_update_params", False, ), + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillie": ( + "stripe.params._invoice_update_params", + False, + ), + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._invoice_update_params", + False, + ), + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._invoice_update_params", + False, + ), "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBizum": ( "stripe.params._invoice_update_params", False, @@ -13280,6 +13425,18 @@ "stripe.params._payment_attempt_record_report_authorized_params", False, ), + "PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetails": ( + "stripe.params._payment_attempt_record_report_authorized_params", + False, + ), + "PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetailsCard": ( + "stripe.params._payment_attempt_record_report_authorized_params", + False, + ), + "PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetailsCardChecks": ( + "stripe.params._payment_attempt_record_report_authorized_params", + False, + ), "PaymentAttemptRecordReportAuthorizedParamsProcessorDetails": ( "stripe.params._payment_attempt_record_report_authorized_params", False, @@ -14536,6 +14693,14 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._payment_intent_confirm_params", + False, + ), + "PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsBizum": ( "stripe.params._payment_intent_confirm_params", False, @@ -14584,6 +14749,10 @@ "stripe.params._payment_intent_confirm_params", False, ), + "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentAadeData": ( + "stripe.params._payment_intent_confirm_params", + False, + ), "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentCaptureDelay": ( "stripe.params._payment_intent_confirm_params", False, @@ -15840,6 +16009,14 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._payment_intent_create_params", + False, + ), + "PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsBizum": ( "stripe.params._payment_intent_create_params", False, @@ -15888,6 +16065,10 @@ "stripe.params._payment_intent_create_params", False, ), + "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentAadeData": ( + "stripe.params._payment_intent_create_params", + False, + ), "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentCaptureDelay": ( "stripe.params._payment_intent_create_params", False, @@ -17328,6 +17509,14 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._payment_intent_modify_params", + False, + ), + "PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsBizum": ( "stripe.params._payment_intent_modify_params", False, @@ -17376,6 +17565,10 @@ "stripe.params._payment_intent_modify_params", False, ), + "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentAadeData": ( + "stripe.params._payment_intent_modify_params", + False, + ), "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentCaptureDelay": ( "stripe.params._payment_intent_modify_params", False, @@ -18656,6 +18849,14 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._payment_intent_update_params", + False, + ), + "PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsBizum": ( "stripe.params._payment_intent_update_params", False, @@ -18704,6 +18905,10 @@ "stripe.params._payment_intent_update_params", False, ), + "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentAadeData": ( + "stripe.params._payment_intent_update_params", + False, + ), "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentCaptureDelay": ( "stripe.params._payment_intent_update_params", False, @@ -21968,36 +22173,36 @@ "stripe.params._payment_plan_update_params", False, ), - "PaymentRecordCreateParams": ( - "stripe.params._payment_record_create_params", + "PaymentRecordListParams": ( + "stripe.params._payment_record_list_params", False, ), - "PaymentRecordCreateParamsAmount": ( - "stripe.params._payment_record_create_params", + "PaymentRecordReportDisputeParams": ( + "stripe.params._payment_record_report_dispute_params", False, ), - "PaymentRecordCreateParamsClosed": ( - "stripe.params._payment_record_create_params", + "PaymentRecordReportDisputeParamsAmount": ( + "stripe.params._payment_record_report_dispute_params", False, ), - "PaymentRecordCreateParamsFunded": ( - "stripe.params._payment_record_create_params", + "PaymentRecordReportDisputeParamsClosed": ( + "stripe.params._payment_record_report_dispute_params", False, ), - "PaymentRecordCreateParamsFundedAmount": ( - "stripe.params._payment_record_create_params", + "PaymentRecordReportDisputeParamsFunded": ( + "stripe.params._payment_record_report_dispute_params", False, ), - "PaymentRecordCreateParamsProcessorDetails": ( - "stripe.params._payment_record_create_params", + "PaymentRecordReportDisputeParamsFundedAmount": ( + "stripe.params._payment_record_report_dispute_params", False, ), - "PaymentRecordCreateParamsProcessorDetailsCustom": ( - "stripe.params._payment_record_create_params", + "PaymentRecordReportDisputeParamsProcessorDetails": ( + "stripe.params._payment_record_report_dispute_params", False, ), - "PaymentRecordListParams": ( - "stripe.params._payment_record_list_params", + "PaymentRecordReportDisputeParamsProcessorDetailsCustom": ( + "stripe.params._payment_record_report_dispute_params", False, ), "PaymentRecordReportPaymentAttemptCanceledParams": ( @@ -25797,6 +26002,18 @@ "stripe.params._subscription_create_params", False, ), + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillie": ( + "stripe.params._subscription_create_params", + False, + ), + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._subscription_create_params", + False, + ), + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._subscription_create_params", + False, + ), "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBizum": ( "stripe.params._subscription_create_params", False, @@ -26265,6 +26482,18 @@ "stripe.params._subscription_modify_params", False, ), + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillie": ( + "stripe.params._subscription_modify_params", + False, + ), + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._subscription_modify_params", + False, + ), + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._subscription_modify_params", + False, + ), "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBizum": ( "stripe.params._subscription_modify_params", False, @@ -27565,6 +27794,18 @@ "stripe.params._subscription_update_params", False, ), + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillie": ( + "stripe.params._subscription_update_params", + False, + ), + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails": ( + "stripe.params._subscription_update_params", + False, + ), + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress": ( + "stripe.params._subscription_update_params", + False, + ), "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBizum": ( "stripe.params._subscription_update_params", False, diff --git a/stripe/params/_account_session_create_params.py b/stripe/params/_account_session_create_params.py index 62203dfae..9bc1bbb7e 100644 --- a/stripe/params/_account_session_create_params.py +++ b/stripe/params/_account_session_create_params.py @@ -813,7 +813,7 @@ class AccountSessionCreateParamsComponentsPaymentMethodSettings(TypedDict): "AccountSessionCreateParamsComponentsPaymentMethodSettingsFeatures" ] """ - An empty list, because this embedded component has no features. + The list of features enabled in the embedded component. """ diff --git a/stripe/params/_confirmation_token_create_params.py b/stripe/params/_confirmation_token_create_params.py index d281929f9..df8c78f8d 100644 --- a/stripe/params/_confirmation_token_create_params.py +++ b/stripe/params/_confirmation_token_create_params.py @@ -419,7 +419,6 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", diff --git a/stripe/params/_customer_create_tax_exemption_params.py b/stripe/params/_customer_create_tax_exemption_params.py new file mode 100644 index 000000000..9a8bcb749 --- /dev/null +++ b/stripe/params/_customer_create_tax_exemption_params.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class CustomerCreateTaxExemptionParams(RequestOptions): + ca: NotRequired["CustomerCreateTaxExemptionParamsCa"] + """ + Canada-specific exemption details. Required when country is CA; must be absent otherwise. + """ + country: str + """ + Two-letter ISO country code for the exemption location. + """ + effective_date: str + """ + ISO 8601 date (YYYY-MM-DD) when the exemption becomes effective. Must be no more than one year after today's UTC date (inclusive). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expiration_date: NotRequired[str] + """ + ISO 8601 date (YYYY-MM-DD) when the exemption expires. + """ + us: NotRequired["CustomerCreateTaxExemptionParamsUs"] + """ + US-specific exemption details. Required when country is US; must be absent otherwise. + """ + + +class CustomerCreateTaxExemptionParamsCa(TypedDict): + state: NotRequired[str] + """ + Two-letter Canadian province code (ISO 3166-2). Required when tax_type is pst, qst, or rst. + """ + tax_type: Union[Literal["gst_hst", "pst", "qst", "rst"], str] + """ + The type of Canadian tax (gst_hst, PST, QST, RST). + """ + + +class CustomerCreateTaxExemptionParamsUs(TypedDict): + state: str + """ + Two-letter US state code (ISO 3166-2). + """ diff --git a/stripe/params/_customer_delete_tax_exemption_params.py b/stripe/params/_customer_delete_tax_exemption_params.py new file mode 100644 index 000000000..bc78af23f --- /dev/null +++ b/stripe/params/_customer_delete_tax_exemption_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class CustomerDeleteTaxExemptionParams(RequestOptions): + pass diff --git a/stripe/params/_customer_list_payment_methods_params.py b/stripe/params/_customer_list_payment_methods_params.py index c9c017593..f4ab10b8f 100644 --- a/stripe/params/_customer_list_payment_methods_params.py +++ b/stripe/params/_customer_list_payment_methods_params.py @@ -29,7 +29,7 @@ class CustomerListPaymentMethodsParams(RequestOptions): 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. """ type: NotRequired[ - "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip']|str" + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip']|str" ] """ An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. diff --git a/stripe/params/_customer_list_tax_exemptions_params.py b/stripe/params/_customer_list_tax_exemptions_params.py new file mode 100644 index 000000000..41a62a3bb --- /dev/null +++ b/stripe/params/_customer_list_tax_exemptions_params.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class CustomerListTaxExemptionsParams(RequestOptions): + country: NotRequired[str] + """ + Filter by two-letter ISO country code (ISO 3166-1 alpha-2). + """ + 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. + """ diff --git a/stripe/params/_customer_payment_method_list_params.py b/stripe/params/_customer_payment_method_list_params.py index f8140a3e0..ce95b1089 100644 --- a/stripe/params/_customer_payment_method_list_params.py +++ b/stripe/params/_customer_payment_method_list_params.py @@ -28,7 +28,7 @@ class CustomerPaymentMethodListParams(TypedDict): 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. """ type: NotRequired[ - "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip']|str" + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip']|str" ] """ An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. diff --git a/stripe/params/_customer_retrieve_tax_exemption_params.py b/stripe/params/_customer_retrieve_tax_exemption_params.py new file mode 100644 index 000000000..00c207989 --- /dev/null +++ b/stripe/params/_customer_retrieve_tax_exemption_params.py @@ -0,0 +1,12 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List +from typing_extensions import NotRequired + + +class CustomerRetrieveTaxExemptionParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_tax_exemption_create_params.py b/stripe/params/_customer_tax_exemption_create_params.py new file mode 100644 index 000000000..2cfbbd7e8 --- /dev/null +++ b/stripe/params/_customer_tax_exemption_create_params.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class CustomerTaxExemptionCreateParams(TypedDict): + ca: NotRequired["CustomerTaxExemptionCreateParamsCa"] + """ + Canada-specific exemption details. Required when country is CA; must be absent otherwise. + """ + country: str + """ + Two-letter ISO country code for the exemption location. + """ + effective_date: str + """ + ISO 8601 date (YYYY-MM-DD) when the exemption becomes effective. Must be no more than one year after today's UTC date (inclusive). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expiration_date: NotRequired[str] + """ + ISO 8601 date (YYYY-MM-DD) when the exemption expires. + """ + us: NotRequired["CustomerTaxExemptionCreateParamsUs"] + """ + US-specific exemption details. Required when country is US; must be absent otherwise. + """ + + +class CustomerTaxExemptionCreateParamsCa(TypedDict): + state: NotRequired[str] + """ + Two-letter Canadian province code (ISO 3166-2). Required when tax_type is pst, qst, or rst. + """ + tax_type: Union[Literal["gst_hst", "pst", "qst", "rst"], str] + """ + The type of Canadian tax (gst_hst, PST, QST, RST). + """ + + +class CustomerTaxExemptionCreateParamsUs(TypedDict): + state: str + """ + Two-letter US state code (ISO 3166-2). + """ diff --git a/stripe/params/_customer_tax_exemption_delete_params.py b/stripe/params/_customer_tax_exemption_delete_params.py new file mode 100644 index 000000000..6cac7cc86 --- /dev/null +++ b/stripe/params/_customer_tax_exemption_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class CustomerTaxExemptionDeleteParams(TypedDict): + pass diff --git a/stripe/params/_customer_tax_exemption_list_params.py b/stripe/params/_customer_tax_exemption_list_params.py new file mode 100644 index 000000000..8fafd0df1 --- /dev/null +++ b/stripe/params/_customer_tax_exemption_list_params.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerTaxExemptionListParams(TypedDict): + country: NotRequired[str] + """ + Filter by two-letter ISO country code (ISO 3166-1 alpha-2). + """ + 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. + """ diff --git a/stripe/params/_customer_tax_exemption_retrieve_params.py b/stripe/params/_customer_tax_exemption_retrieve_params.py new file mode 100644 index 000000000..275aa0779 --- /dev/null +++ b/stripe/params/_customer_tax_exemption_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerTaxExemptionRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_invoice_create_params.py b/stripe/params/_invoice_create_params.py index 942f6c8af..06c08b129 100644 --- a/stripe/params/_invoice_create_params.py +++ b/stripe/params/_invoice_create_params.py @@ -319,6 +319,12 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. """ + billie: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillie" + ] + """ + If paying by `billie`, this sub-hash contains details about the Billie payment method options to pass to the invoice's PaymentIntent. + """ bizum: NotRequired[ "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBizum" ] @@ -434,6 +440,77 @@ class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact( """ +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillie(TypedDict): + company_details: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT ID number. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBizum(TypedDict): pass diff --git a/stripe/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index c74da4d7b..9a0c4492c 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -1596,7 +1596,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsBillingSchedule(TypedDict): "InvoiceCreatePreviewParamsScheduleDetailsBillingScheduleBillUntil" ] """ - The end date for the billing schedule. + The end date for the billing schedule. You must not set this earlier than current period end for every applicable subscription item. """ key: NotRequired[str] """ @@ -2604,7 +2604,7 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsBillingSchedule(TypedDict): "InvoiceCreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntil" ] """ - The end date for the billing schedule. + The end date for the billing schedule. You must not set this earlier than current period end for every applicable subscription item. """ key: NotRequired[str] """ diff --git a/stripe/params/_invoice_modify_params.py b/stripe/params/_invoice_modify_params.py index e59238d0e..75b95bbbf 100644 --- a/stripe/params/_invoice_modify_params.py +++ b/stripe/params/_invoice_modify_params.py @@ -273,6 +273,12 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. """ + billie: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillie" + ] + """ + If paying by `billie`, this sub-hash contains details about the Billie payment method options to pass to the invoice's PaymentIntent. + """ bizum: NotRequired[ "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBizum" ] @@ -388,6 +394,77 @@ class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( """ +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillie(TypedDict): + company_details: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT ID number. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBizum(TypedDict): pass diff --git a/stripe/params/_invoice_update_params.py b/stripe/params/_invoice_update_params.py index ff59ec95c..dad5d805a 100644 --- a/stripe/params/_invoice_update_params.py +++ b/stripe/params/_invoice_update_params.py @@ -272,6 +272,12 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. """ + billie: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillie" + ] + """ + If paying by `billie`, this sub-hash contains details about the Billie payment method options to pass to the invoice's PaymentIntent. + """ bizum: NotRequired[ "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBizum" ] @@ -387,6 +393,77 @@ class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact( """ +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillie(TypedDict): + company_details: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT ID number. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBizum(TypedDict): pass diff --git a/stripe/params/_payment_attempt_record_report_authorized_params.py b/stripe/params/_payment_attempt_record_report_authorized_params.py index 8b28dcc37..3f1f4df6f 100644 --- a/stripe/params/_payment_attempt_record_report_authorized_params.py +++ b/stripe/params/_payment_attempt_record_report_authorized_params.py @@ -21,6 +21,16 @@ class PaymentAttemptRecordReportAuthorizedParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ + payment_evaluations: NotRequired[List[str]] + """ + Payment evaluations associated with this reported payment. + """ + payment_method_details: NotRequired[ + "PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetails" + ] + """ + Information about the Payment Method debited for this payment. + """ processor_details: NotRequired[ "PaymentAttemptRecordReportAuthorizedParamsProcessorDetails" ] @@ -29,6 +39,55 @@ class PaymentAttemptRecordReportAuthorizedParams(RequestOptions): """ +class PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetails( + TypedDict +): + card: NotRequired[ + "PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetailsCard" + ] + """ + Information about the card payment method used to make this payment. + """ + type: Literal["card"] + """ + The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. + """ + + +class PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetailsCard( + TypedDict, +): + checks: NotRequired[ + "PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetailsCardChecks" + ] + """ + Verification checks performed on the card. + """ + + +class PaymentAttemptRecordReportAuthorizedParamsPaymentMethodDetailsCardChecks( + TypedDict, +): + address_line1_check: NotRequired[ + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" + ] + """ + The result of the check on the cardholder's address line 1. + """ + address_postal_code_check: NotRequired[ + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" + ] + """ + The result of the check on the cardholder's postal code. + """ + cvc_check: NotRequired[ + "Literal['fail', 'pass', 'unavailable', 'unchecked']|str" + ] + """ + The result of the check on the card's CVC. + """ + + class PaymentAttemptRecordReportAuthorizedParamsProcessorDetails(TypedDict): custom: NotRequired[ "PaymentAttemptRecordReportAuthorizedParamsProcessorDetailsCustom" diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py index 7aa0d13af..9511bcc2c 100644 --- a/stripe/params/_payment_intent_confirm_params.py +++ b/stripe/params/_payment_intent_confirm_params.py @@ -150,7 +150,7 @@ class PaymentIntentConfirmParams(RequestOptions): Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://docs.stripe.com/payments/save-card-without-authentication). """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip'], str]]" + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this payment. @@ -3164,7 +3164,6 @@ class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", @@ -4379,6 +4378,74 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsBillie(TypedDict): 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. """ + company_details: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT id number + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ class PaymentIntentConfirmParamsPaymentMethodOptionsBizum(TypedDict): @@ -4820,6 +4887,12 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptio class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): + aade_data: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentAadeData" + ] + """ + Greek e-invoicing data required for card-present transactions processed by merchants subject to AADE's myDATA POS compliance mandate (Governor's Decision A.1155/2023). + """ capture_by: NotRequired[ "Literal['auth_expiry', 'end_of_day', 'target_delay']|str" ] @@ -4878,6 +4951,33 @@ class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): """ +class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentAadeData( + TypedDict, +): + mark_data: NotRequired[str] + """ + The canonical string that was signed by the e-invoicing provider to produce `signed_mark`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. + """ + mode: Literal["autonomous", "standard"] + """ + The e-invoicing mode under which the mark was generated. + """ + provider_id: NotRequired[int] + """ + The AADE-assigned approval number of the e-invoicing provider that generated the mark. Required when `mode` is `standard`. + """ + signed_mark: NotRequired[str] + """ + The cryptographic signature returned by the e-invoicing provider for this transaction, hex-encoded. Required when `mode` is `standard`. + """ + unbound_pos: NotRequired[ + Literal["interconnection_loss", "lock", "replacement_cash_system"] + ] + """ + The reason for entering autonomous mode. Required when `mode` is `autonomous`. + """ + + class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentCaptureDelay( TypedDict, ): diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py index 8b2379a9c..4ec62e352 100644 --- a/stripe/params/_payment_intent_create_params.py +++ b/stripe/params/_payment_intent_create_params.py @@ -240,7 +240,6 @@ class PaymentIntentCreateParams(RequestOptions): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", @@ -3300,7 +3299,6 @@ class PaymentIntentCreateParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", @@ -4513,6 +4511,74 @@ class PaymentIntentCreateParamsPaymentMethodOptionsBillie(TypedDict): 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. """ + company_details: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT id number + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ class PaymentIntentCreateParamsPaymentMethodOptionsBizum(TypedDict): @@ -4948,6 +5014,12 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOption class PaymentIntentCreateParamsPaymentMethodOptionsCardPresent(TypedDict): + aade_data: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentAadeData" + ] + """ + Greek e-invoicing data required for card-present transactions processed by merchants subject to AADE's myDATA POS compliance mandate (Governor's Decision A.1155/2023). + """ capture_by: NotRequired[ "Literal['auth_expiry', 'end_of_day', 'target_delay']|str" ] @@ -5006,6 +5078,33 @@ class PaymentIntentCreateParamsPaymentMethodOptionsCardPresent(TypedDict): """ +class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentAadeData( + TypedDict, +): + mark_data: NotRequired[str] + """ + The canonical string that was signed by the e-invoicing provider to produce `signed_mark`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. + """ + mode: Literal["autonomous", "standard"] + """ + The e-invoicing mode under which the mark was generated. + """ + provider_id: NotRequired[int] + """ + The AADE-assigned approval number of the e-invoicing provider that generated the mark. Required when `mode` is `standard`. + """ + signed_mark: NotRequired[str] + """ + The cryptographic signature returned by the e-invoicing provider for this transaction, hex-encoded. Required when `mode` is `standard`. + """ + unbound_pos: NotRequired[ + Literal["interconnection_loss", "lock", "replacement_cash_system"] + ] + """ + The reason for entering autonomous mode. Required when `mode` is `autonomous`. + """ + + class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentCaptureDelay( TypedDict, ): diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py index 8858e4270..dcbd0d75c 100644 --- a/stripe/params/_payment_intent_modify_params.py +++ b/stripe/params/_payment_intent_modify_params.py @@ -164,7 +164,7 @@ class PaymentIntentModifyParams(RequestOptions): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip'], str]]" + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this payment. @@ -3143,7 +3143,6 @@ class PaymentIntentModifyParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", @@ -4356,6 +4355,74 @@ class PaymentIntentModifyParamsPaymentMethodOptionsBillie(TypedDict): 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. """ + company_details: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT id number + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ class PaymentIntentModifyParamsPaymentMethodOptionsBizum(TypedDict): @@ -4791,6 +4858,12 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOption class PaymentIntentModifyParamsPaymentMethodOptionsCardPresent(TypedDict): + aade_data: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentAadeData" + ] + """ + Greek e-invoicing data required for card-present transactions processed by merchants subject to AADE's myDATA POS compliance mandate (Governor's Decision A.1155/2023). + """ capture_by: NotRequired[ "Literal['auth_expiry', 'end_of_day', 'target_delay']|str" ] @@ -4849,6 +4922,33 @@ class PaymentIntentModifyParamsPaymentMethodOptionsCardPresent(TypedDict): """ +class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentAadeData( + TypedDict, +): + mark_data: NotRequired[str] + """ + The canonical string that was signed by the e-invoicing provider to produce `signed_mark`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. + """ + mode: Literal["autonomous", "standard"] + """ + The e-invoicing mode under which the mark was generated. + """ + provider_id: NotRequired[int] + """ + The AADE-assigned approval number of the e-invoicing provider that generated the mark. Required when `mode` is `standard`. + """ + signed_mark: NotRequired[str] + """ + The cryptographic signature returned by the e-invoicing provider for this transaction, hex-encoded. Required when `mode` is `standard`. + """ + unbound_pos: NotRequired[ + Literal["interconnection_loss", "lock", "replacement_cash_system"] + ] + """ + The reason for entering autonomous mode. Required when `mode` is `autonomous`. + """ + + class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentCaptureDelay( TypedDict, ): diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py index 4622feca4..1370f0fff 100644 --- a/stripe/params/_payment_intent_update_params.py +++ b/stripe/params/_payment_intent_update_params.py @@ -163,7 +163,7 @@ class PaymentIntentUpdateParams(TypedDict): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip'], str]]" + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this payment. @@ -3142,7 +3142,6 @@ class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", @@ -4355,6 +4354,74 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsBillie(TypedDict): 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. """ + company_details: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + reference: NotRequired[str] + """ + An identifier or reference that this payment corresponds to. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT id number + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ class PaymentIntentUpdateParamsPaymentMethodOptionsBizum(TypedDict): @@ -4790,6 +4857,12 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOption class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent(TypedDict): + aade_data: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentAadeData" + ] + """ + Greek e-invoicing data required for card-present transactions processed by merchants subject to AADE's myDATA POS compliance mandate (Governor's Decision A.1155/2023). + """ capture_by: NotRequired[ "Literal['auth_expiry', 'end_of_day', 'target_delay']|str" ] @@ -4848,6 +4921,33 @@ class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent(TypedDict): """ +class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentAadeData( + TypedDict, +): + mark_data: NotRequired[str] + """ + The canonical string that was signed by the e-invoicing provider to produce `signed_mark`, formatted per Appendix A of A.1155/2023. Required when `mode` is `standard`. + """ + mode: Literal["autonomous", "standard"] + """ + The e-invoicing mode under which the mark was generated. + """ + provider_id: NotRequired[int] + """ + The AADE-assigned approval number of the e-invoicing provider that generated the mark. Required when `mode` is `standard`. + """ + signed_mark: NotRequired[str] + """ + The cryptographic signature returned by the e-invoicing provider for this transaction, hex-encoded. Required when `mode` is `standard`. + """ + unbound_pos: NotRequired[ + Literal["interconnection_loss", "lock", "replacement_cash_system"] + ] + """ + The reason for entering autonomous mode. Required when `mode` is `autonomous`. + """ + + class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentCaptureDelay( TypedDict, ): diff --git a/stripe/params/_payment_method_create_params.py b/stripe/params/_payment_method_create_params.py index 58a622ae8..b6d741d4e 100644 --- a/stripe/params/_payment_method_create_params.py +++ b/stripe/params/_payment_method_create_params.py @@ -282,7 +282,7 @@ class PaymentMethodCreateParams(RequestOptions): If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. """ type: NotRequired[ - "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip']|str" + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip']|str" ] """ The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. diff --git a/stripe/params/_payment_method_list_params.py b/stripe/params/_payment_method_list_params.py index 718e073ac..ad6d0cb70 100644 --- a/stripe/params/_payment_method_list_params.py +++ b/stripe/params/_payment_method_list_params.py @@ -37,7 +37,7 @@ class PaymentMethodListParams(RequestOptions): 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. """ type: NotRequired[ - "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip']|str" + "Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip']|str" ] """ Filters the list by the object `type` field. Unfiltered, the list returns all payment method types except `custom`. If your integration expects only one type of payment method in the response, specify that type value in the request to reduce your payload. diff --git a/stripe/params/_payment_record_create_params.py b/stripe/params/_payment_record_report_dispute_params.py similarity index 79% rename from stripe/params/_payment_record_create_params.py rename to stripe/params/_payment_record_report_dispute_params.py index ef422feb4..22406cce2 100644 --- a/stripe/params/_payment_record_create_params.py +++ b/stripe/params/_payment_record_report_dispute_params.py @@ -6,12 +6,12 @@ from typing_extensions import Literal, NotRequired, TypedDict -class PaymentRecordCreateParams(RequestOptions): - amount: "PaymentRecordCreateParamsAmount" +class PaymentRecordReportDisputeParams(RequestOptions): + amount: "PaymentRecordReportDisputeParamsAmount" """ The amount that has been lost to the customer due to disputes on this payment. """ - closed: NotRequired["PaymentRecordCreateParamsClosed"] + closed: NotRequired["PaymentRecordReportDisputeParamsClosed"] """ Information about the dispute closing. """ @@ -19,7 +19,7 @@ class PaymentRecordCreateParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - funded: NotRequired["PaymentRecordCreateParamsFunded"] + funded: NotRequired["PaymentRecordReportDisputeParamsFunded"] """ Information about the dispute funding event. """ @@ -33,7 +33,7 @@ class PaymentRecordCreateParams(RequestOptions): """ Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. """ - processor_details: "PaymentRecordCreateParamsProcessorDetails" + processor_details: "PaymentRecordReportDisputeParamsProcessorDetails" """ Processor information for this payment. """ @@ -45,7 +45,7 @@ class PaymentRecordCreateParams(RequestOptions): """ -class PaymentRecordCreateParamsAmount(TypedDict): +class PaymentRecordReportDisputeParamsAmount(TypedDict): currency: str """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -56,15 +56,15 @@ class PaymentRecordCreateParamsAmount(TypedDict): """ -class PaymentRecordCreateParamsClosed(TypedDict): +class PaymentRecordReportDisputeParamsClosed(TypedDict): closed_at: int """ When the dispute was closed. Measured in seconds since the Unix epoch. """ -class PaymentRecordCreateParamsFunded(TypedDict): - amount: "PaymentRecordCreateParamsFundedAmount" +class PaymentRecordReportDisputeParamsFunded(TypedDict): + amount: "PaymentRecordReportDisputeParamsFundedAmount" """ The amount that has been lost to the customer due to disputes on this payment. """ @@ -78,7 +78,7 @@ class PaymentRecordCreateParamsFunded(TypedDict): """ -class PaymentRecordCreateParamsFundedAmount(TypedDict): +class PaymentRecordReportDisputeParamsFundedAmount(TypedDict): currency: str """ Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -89,8 +89,10 @@ class PaymentRecordCreateParamsFundedAmount(TypedDict): """ -class PaymentRecordCreateParamsProcessorDetails(TypedDict): - custom: NotRequired["PaymentRecordCreateParamsProcessorDetailsCustom"] +class PaymentRecordReportDisputeParamsProcessorDetails(TypedDict): + custom: NotRequired[ + "PaymentRecordReportDisputeParamsProcessorDetailsCustom" + ] """ Information about the custom processor used to make this payment. """ @@ -100,7 +102,7 @@ class PaymentRecordCreateParamsProcessorDetails(TypedDict): """ -class PaymentRecordCreateParamsProcessorDetailsCustom(TypedDict): +class PaymentRecordReportDisputeParamsProcessorDetailsCustom(TypedDict): dispute_reference: str """ A reference to the external dispute. This field must be unique across all disputes. diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py index dcf04c86d..62ad4a6d7 100644 --- a/stripe/params/_setup_intent_confirm_params.py +++ b/stripe/params/_setup_intent_confirm_params.py @@ -562,7 +562,6 @@ class SetupIntentConfirmParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py index 48c931280..424200bf4 100644 --- a/stripe/params/_setup_intent_create_params.py +++ b/stripe/params/_setup_intent_create_params.py @@ -208,7 +208,6 @@ class SetupIntentCreateParams(RequestOptions): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", @@ -708,7 +707,6 @@ class SetupIntentCreateParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", diff --git a/stripe/params/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py index fd404ed37..38c2eb91a 100644 --- a/stripe/params/_setup_intent_modify_params.py +++ b/stripe/params/_setup_intent_modify_params.py @@ -36,7 +36,7 @@ class SetupIntentModifyParams(RequestOptions): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip'], str]]" + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this SetupIntent. @@ -438,7 +438,6 @@ class SetupIntentModifyParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py index b1104abcf..f359c3f96 100644 --- a/stripe/params/_setup_intent_update_params.py +++ b/stripe/params/_setup_intent_update_params.py @@ -35,7 +35,7 @@ class SetupIntentUpdateParams(TypedDict): An arbitrary string attached to the object. Often useful for displaying to users. """ excluded_payment_method_types: NotRequired[ - "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'sequra', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip'], str]]" + "Literal['']|List[Union[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'bizum', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'gift_card', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'scalapay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'sunbit', 'swish', 'tamara', 'twint', 'upi', 'us_bank_account', 'vipps', 'wechat_pay', 'zip'], str]]" ] """ The list of payment method types to exclude from use with this SetupIntent. @@ -437,7 +437,6 @@ class SetupIntentUpdateParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", diff --git a/stripe/params/_subscription_create_params.py b/stripe/params/_subscription_create_params.py index 08156cc82..53ac6dc27 100644 --- a/stripe/params/_subscription_create_params.py +++ b/stripe/params/_subscription_create_params.py @@ -48,7 +48,7 @@ class SubscriptionCreateParams(RequestOptions): List["SubscriptionCreateParamsBillingSchedule"] ] """ - Sets the billing schedules for the subscription. + An array of billing schedules, which allow you to bill customers in advance for multiple service periods. Requires flexible billing mode and API version 2026-05-27.dahlia or later. Learn more about [prebilling](https://docs.stripe.com/billing/subscriptions/prebilling). """ billing_thresholds: NotRequired[ "Literal['']|SubscriptionCreateParamsBillingThresholds" @@ -402,7 +402,7 @@ class SubscriptionCreateParamsBillingSchedule(TypedDict): """ bill_until: "SubscriptionCreateParamsBillingScheduleBillUntil" """ - The end date for the billing schedule. + The end date for the billing schedule. You must not set this earlier than current period end for every applicable subscription item. """ key: NotRequired[str] """ @@ -875,6 +875,12 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. """ + billie: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillie" + ] + """ + This sub-hash contains details about the Billie payment method options to pass to the invoice's PaymentIntent. + """ bizum: NotRequired[ "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBizum" ] @@ -990,6 +996,75 @@ class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact( """ +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillie( + TypedDict, +): + company_details: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT ID number. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBizum( TypedDict, ): diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py index b7ab37798..cffdf2b45 100644 --- a/stripe/params/_subscription_modify_params.py +++ b/stripe/params/_subscription_modify_params.py @@ -34,7 +34,7 @@ class SubscriptionModifyParams(RequestOptions): "Literal['']|List[SubscriptionModifyParamsBillingSchedule]" ] """ - Sets the billing schedules for the subscription. + An array of billing schedules, which allow you to bill customers in advance for multiple service periods. Requires flexible billing mode and API version 2026-05-27.dahlia or later. Learn more about [prebilling](https://docs.stripe.com/billing/subscriptions/prebilling). """ billing_thresholds: NotRequired[ "Literal['']|SubscriptionModifyParamsBillingThresholds" @@ -349,7 +349,7 @@ class SubscriptionModifyParamsBillingSchedule(TypedDict): """ bill_until: NotRequired["SubscriptionModifyParamsBillingScheduleBillUntil"] """ - The end date for the billing schedule. + The end date for the billing schedule. You must not set this earlier than current period end for every applicable subscription item. """ key: NotRequired[str] """ @@ -847,6 +847,12 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. """ + billie: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillie" + ] + """ + This sub-hash contains details about the Billie payment method options to pass to the invoice's PaymentIntent. + """ bizum: NotRequired[ "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBizum" ] @@ -962,6 +968,75 @@ class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( """ +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillie( + TypedDict, +): + company_details: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT ID number. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBizum( TypedDict, ): diff --git a/stripe/params/_subscription_schedule_create_params.py b/stripe/params/_subscription_schedule_create_params.py index 2800827ad..ca234f333 100644 --- a/stripe/params/_subscription_schedule_create_params.py +++ b/stripe/params/_subscription_schedule_create_params.py @@ -107,7 +107,7 @@ class SubscriptionScheduleCreateParamsBillingSchedule(TypedDict): """ bill_until: "SubscriptionScheduleCreateParamsBillingScheduleBillUntil" """ - The end date for the billing schedule. + The end date for the billing schedule. You must not set this earlier than current period end for every applicable subscription item. """ key: NotRequired[str] """ diff --git a/stripe/params/_subscription_schedule_modify_params.py b/stripe/params/_subscription_schedule_modify_params.py index 3887cfaf6..60ef3e566 100644 --- a/stripe/params/_subscription_schedule_modify_params.py +++ b/stripe/params/_subscription_schedule_modify_params.py @@ -75,7 +75,7 @@ class SubscriptionScheduleModifyParamsBillingSchedule(TypedDict): "SubscriptionScheduleModifyParamsBillingScheduleBillUntil" ] """ - The end date for the billing schedule. + The end date for the billing schedule. You must not set this earlier than current period end for every applicable subscription item. """ key: NotRequired[str] """ diff --git a/stripe/params/_subscription_schedule_update_params.py b/stripe/params/_subscription_schedule_update_params.py index 396b4d81e..62b266ac2 100644 --- a/stripe/params/_subscription_schedule_update_params.py +++ b/stripe/params/_subscription_schedule_update_params.py @@ -74,7 +74,7 @@ class SubscriptionScheduleUpdateParamsBillingSchedule(TypedDict): "SubscriptionScheduleUpdateParamsBillingScheduleBillUntil" ] """ - The end date for the billing schedule. + The end date for the billing schedule. You must not set this earlier than current period end for every applicable subscription item. """ key: NotRequired[str] """ diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py index 273e86dbe..378574821 100644 --- a/stripe/params/_subscription_update_params.py +++ b/stripe/params/_subscription_update_params.py @@ -33,7 +33,7 @@ class SubscriptionUpdateParams(TypedDict): "Literal['']|List[SubscriptionUpdateParamsBillingSchedule]" ] """ - Sets the billing schedules for the subscription. + An array of billing schedules, which allow you to bill customers in advance for multiple service periods. Requires flexible billing mode and API version 2026-05-27.dahlia or later. Learn more about [prebilling](https://docs.stripe.com/billing/subscriptions/prebilling). """ billing_thresholds: NotRequired[ "Literal['']|SubscriptionUpdateParamsBillingThresholds" @@ -348,7 +348,7 @@ class SubscriptionUpdateParamsBillingSchedule(TypedDict): """ bill_until: NotRequired["SubscriptionUpdateParamsBillingScheduleBillUntil"] """ - The end date for the billing schedule. + The end date for the billing schedule. You must not set this earlier than current period end for every applicable subscription item. """ key: NotRequired[str] """ @@ -846,6 +846,12 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. """ + billie: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillie" + ] + """ + This sub-hash contains details about the Billie payment method options to pass to the invoice's PaymentIntent. + """ bizum: NotRequired[ "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBizum" ] @@ -961,6 +967,75 @@ class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact( """ +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillie( + TypedDict, +): + company_details: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails" + ] + """ + Registration details about the buyer's organization. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetails( + TypedDict, +): + registered_address: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress" + ] + """ + The address the company or entity is registered with. + """ + registered_name: NotRequired[str] + """ + Company or entity name. + """ + registration_number: NotRequired[str] + """ + The official registration number for the given registration type. + """ + registration_type: NotRequired[ + "Literal['']|Literal['ch_ein', 'de_hrb', 'dk_cvr', 'es_cif', 'fi_tunnus', 'fr_siren', 'fr_siret', 'it_rea', 'nl_kvk', 'no_org_number', 'no_pno', 'se_org_number', 'se_pno', 'uk_crn']|str" + ] + """ + Type of registration the company or entity holds in their registered country. + """ + vat: NotRequired[str] + """ + VAT ID number. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBillieCompanyDetailsRegisteredAddress( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code. + """ + line1: NotRequired[str] + """ + Address line 1 (for example, street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (for example, apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBizum( TypedDict, ): diff --git a/stripe/params/_webhook_endpoint_create_params.py b/stripe/params/_webhook_endpoint_create_params.py index 7a587179c..19356f3d2 100644 --- a/stripe/params/_webhook_endpoint_create_params.py +++ b/stripe/params/_webhook_endpoint_create_params.py @@ -2,13 +2,140 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List, Union +from typing import Dict, List from typing_extensions import Literal, NotRequired class WebhookEndpointCreateParams(RequestOptions): api_version: NotRequired[ - "Literal['2011-01-01', '2011-06-21', '2011-06-28', '2011-08-01', '2011-09-15', '2011-11-17', '2012-02-23', '2012-03-25', '2012-06-18', '2012-06-28', '2012-07-09', '2012-09-24', '2012-10-26', '2012-11-07', '2013-02-11', '2013-02-13', '2013-07-05', '2013-08-12', '2013-08-13', '2013-10-29', '2013-12-03', '2014-01-31', '2014-03-13', '2014-03-28', '2014-05-19', '2014-06-13', '2014-06-17', '2014-07-22', '2014-07-26', '2014-08-04', '2014-08-20', '2014-09-08', '2014-10-07', '2014-11-05', '2014-11-20', '2014-12-08', '2014-12-17', '2014-12-22', '2015-01-11', '2015-01-26', '2015-02-10', '2015-02-16', '2015-02-18', '2015-03-24', '2015-04-07', '2015-06-15', '2015-07-07', '2015-07-13', '2015-07-28', '2015-08-07', '2015-08-19', '2015-09-03', '2015-09-08', '2015-09-23', '2015-10-01', '2015-10-12', '2015-10-16', '2016-02-03', '2016-02-19', '2016-02-22', '2016-02-23', '2016-02-29', '2016-03-07', '2016-06-15', '2016-07-06', '2016-10-19', '2017-01-27', '2017-02-14', '2017-04-06', '2017-05-25', '2017-06-05', '2017-08-15', '2017-12-14', '2018-01-23', '2018-02-05', '2018-02-06', '2018-02-28', '2018-05-21', '2018-07-27', '2018-08-23', '2018-09-06', '2018-09-24', '2018-10-31', '2018-11-08', '2019-02-11', '2019-02-19', '2019-03-14', '2019-05-16', '2019-08-14', '2019-09-09', '2019-10-08', '2019-10-17', '2019-11-05', '2019-12-03', '2020-03-02', '2020-08-27', '2022-08-01', '2022-11-15', '2023-08-16', '2023-10-16', '2024-04-10', '2024-06-20', '2024-09-30.acacia', '2024-10-28.acacia', '2024-11-20.acacia', '2024-12-18.acacia', '2025-01-27.acacia', '2025-02-24.acacia', '2025-03-01.dashboard', '2025-03-31.basil', '2025-04-30.basil', '2025-05-28.basil', '2025-06-30.basil', '2025-07-30.basil', '2025-08-27.basil', '2025-09-30.clover', '2025-10-29.clover', '2025-11-17.clover', '2025-12-15.clover', '2026-01-28.clover', '2026-02-25.clover', '2026-03-25.dahlia', '2026-04-22.dahlia', '2026-05-27.dahlia', '2026-06-24.dahlia', '2026-07-29.dahlia']|str" + Literal[ + "2011-01-01", + "2011-06-21", + "2011-06-28", + "2011-08-01", + "2011-09-15", + "2011-11-17", + "2012-02-23", + "2012-03-25", + "2012-06-18", + "2012-06-28", + "2012-07-09", + "2012-09-24", + "2012-10-26", + "2012-11-07", + "2013-02-11", + "2013-02-13", + "2013-07-05", + "2013-08-12", + "2013-08-13", + "2013-10-29", + "2013-12-03", + "2014-01-31", + "2014-03-13", + "2014-03-28", + "2014-05-19", + "2014-06-13", + "2014-06-17", + "2014-07-22", + "2014-07-26", + "2014-08-04", + "2014-08-20", + "2014-09-08", + "2014-10-07", + "2014-11-05", + "2014-11-20", + "2014-12-08", + "2014-12-17", + "2014-12-22", + "2015-01-11", + "2015-01-26", + "2015-02-10", + "2015-02-16", + "2015-02-18", + "2015-03-24", + "2015-04-07", + "2015-06-15", + "2015-07-07", + "2015-07-13", + "2015-07-28", + "2015-08-07", + "2015-08-19", + "2015-09-03", + "2015-09-08", + "2015-09-23", + "2015-10-01", + "2015-10-12", + "2015-10-16", + "2016-02-03", + "2016-02-19", + "2016-02-22", + "2016-02-23", + "2016-02-29", + "2016-03-07", + "2016-06-15", + "2016-07-06", + "2016-10-19", + "2017-01-27", + "2017-02-14", + "2017-04-06", + "2017-05-25", + "2017-06-05", + "2017-08-15", + "2017-12-14", + "2018-01-23", + "2018-02-05", + "2018-02-06", + "2018-02-28", + "2018-05-21", + "2018-07-27", + "2018-08-23", + "2018-09-06", + "2018-09-24", + "2018-10-31", + "2018-11-08", + "2019-02-11", + "2019-02-19", + "2019-03-14", + "2019-05-16", + "2019-08-14", + "2019-09-09", + "2019-10-08", + "2019-10-17", + "2019-11-05", + "2019-12-03", + "2020-03-02", + "2020-08-27", + "2022-08-01", + "2022-11-15", + "2023-08-16", + "2023-10-16", + "2024-04-10", + "2024-06-20", + "2024-09-30.acacia", + "2024-10-28.acacia", + "2024-11-20.acacia", + "2024-12-18.acacia", + "2025-01-27.acacia", + "2025-02-24.acacia", + "2025-03-01.dashboard", + "2025-03-31.basil", + "2025-04-30.basil", + "2025-05-28.basil", + "2025-06-30.basil", + "2025-07-30.basil", + "2025-08-27.basil", + "2025-09-30.clover", + "2025-10-29.clover", + "2025-11-17.clover", + "2025-12-15.clover", + "2026-01-28.clover", + "2026-02-25.clover", + "2026-03-25.dahlia", + "2026-04-22.dahlia", + "2026-05-27.dahlia", + "2026-06-24.dahlia", + "2026-07-29.dahlia", + ] ] """ Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. @@ -22,315 +149,312 @@ class WebhookEndpointCreateParams(RequestOptions): An optional description of what the webhook is used for. """ enabled_events: List[ - Union[ - Literal[ - "*", - "account.application.authorized", - "account.application.deauthorized", - "account.external_account.created", - "account.external_account.deleted", - "account.external_account.updated", - "account.updated", - "account_notice.created", - "account_notice.updated", - "application_fee.created", - "application_fee.refund.updated", - "application_fee.refunded", - "balance.available", - "balance_settings.updated", - "billing.alert.triggered", - "billing.credit_balance_transaction.created", - "billing.credit_grant.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", - "billing_portal.configuration.created", - "billing_portal.configuration.updated", - "billing_portal.session.created", - "capability.updated", - "capital.financing_offer.accepted", - "capital.financing_offer.accepted_other_offer", - "capital.financing_offer.canceled", - "capital.financing_offer.created", - "capital.financing_offer.expired", - "capital.financing_offer.fully_repaid", - "capital.financing_offer.paid_out", - "capital.financing_offer.rejected", - "capital.financing_offer.replacement_created", - "capital.financing_summary.line_of_credit_update", - "capital.financing_transaction.created", - "cash_balance.funds_available", - "charge.captured", - "charge.dispute.closed", - "charge.dispute.created", - "charge.dispute.funds_reinstated", - "charge.dispute.funds_withdrawn", - "charge.dispute.updated", - "charge.expired", - "charge.failed", - "charge.pending", - "charge.refund.updated", - "charge.refunded", - "charge.succeeded", - "charge.updated", - "checkout.session.async_payment_failed", - "checkout.session.async_payment_succeeded", - "checkout.session.completed", - "checkout.session.expired", - "climate.order.canceled", - "climate.order.created", - "climate.order.delayed", - "climate.order.delivered", - "climate.order.product_substituted", - "climate.product.created", - "climate.product.pricing_updated", - "coupon.created", - "coupon.deleted", - "coupon.updated", - "credit_note.created", - "credit_note.updated", - "credit_note.voided", - "customer.created", - "customer.deleted", - "customer.discount.created", - "customer.discount.deleted", - "customer.discount.updated", - "customer.source.created", - "customer.source.deleted", - "customer.source.expiring", - "customer.source.updated", - "customer.subscription.collection_paused", - "customer.subscription.collection_resumed", - "customer.subscription.created", - "customer.subscription.custom_event", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.pending_update_applied", - "customer.subscription.pending_update_expired", - "customer.subscription.price_migration_failed", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", - "customer.updated", - "customer_cash_balance_transaction.created", - "entitlements.active_entitlement_summary.updated", - "file.created", - "financial_connections.account.account_numbers_updated", - "financial_connections.account.created", - "financial_connections.account.deactivated", - "financial_connections.account.disconnected", - "financial_connections.account.expected_deactivation_date_updated", - "financial_connections.account.reactivated", - "financial_connections.account.refreshed_balance", - "financial_connections.account.refreshed_inferred_balances", - "financial_connections.account.refreshed_ownership", - "financial_connections.account.refreshed_transactions", - "financial_connections.account.supported_payment_method_types_updated", - "financial_connections.account.upcoming_account_number_expiry", - "financial_connections.account.upcoming_deactivation", - "financial_connections.authorization.expected_deactivation_date_updated", - "financial_connections.authorization.upcoming_deactivation", - "financial_connections.session.updated", - "fx_quote.expired", - "identity.verification_session.canceled", - "identity.verification_session.created", - "identity.verification_session.processing", - "identity.verification_session.redacted", - "identity.verification_session.requires_input", - "identity.verification_session.verified", - "invoice.created", - "invoice.deleted", - "invoice.finalization_failed", - "invoice.finalized", - "invoice.marked_uncollectible", - "invoice.overdue", - "invoice.overpaid", - "invoice.paid", - "invoice.payment.overpaid", - "invoice.payment_action_required", - "invoice.payment_attempt_required", - "invoice.payment_failed", - "invoice.payment_succeeded", - "invoice.sent", - "invoice.upcoming", - "invoice.updated", - "invoice.voided", - "invoice.will_be_due", - "invoice_payment.paid", - "invoiceitem.created", - "invoiceitem.deleted", - "issuing_authorization.created", - "issuing_authorization.request", - "issuing_authorization.updated", - "issuing_card.created", - "issuing_card.updated", - "issuing_cardholder.created", - "issuing_cardholder.updated", - "issuing_dispute.closed", - "issuing_dispute.created", - "issuing_dispute.funds_reinstated", - "issuing_dispute.funds_rescinded", - "issuing_dispute.submitted", - "issuing_dispute.updated", - "issuing_dispute_settlement_detail.created", - "issuing_dispute_settlement_detail.updated", - "issuing_fraud_liability_debit.created", - "issuing_personalization_design.activated", - "issuing_personalization_design.deactivated", - "issuing_personalization_design.rejected", - "issuing_personalization_design.updated", - "issuing_settlement.created", - "issuing_settlement.updated", - "issuing_token.created", - "issuing_token.updated", - "issuing_transaction.created", - "issuing_transaction.purchase_details_receipt_updated", - "issuing_transaction.updated", - "mandate.updated", - "payment_intent.amount_capturable_updated", - "payment_intent.canceled", - "payment_intent.created", - "payment_intent.partially_funded", - "payment_intent.payment_failed", - "payment_intent.processing", - "payment_intent.requires_action", - "payment_intent.succeeded", - "payment_link.created", - "payment_link.updated", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.detached", - "payment_method.updated", - "payout.canceled", - "payout.created", - "payout.failed", - "payout.paid", - "payout.reconciliation_completed", - "payout.updated", - "person.created", - "person.deleted", - "person.updated", - "plan.created", - "plan.deleted", - "plan.updated", - "price.created", - "price.deleted", - "price.updated", - "privacy.redaction_job.canceled", - "privacy.redaction_job.created", - "privacy.redaction_job.ready", - "privacy.redaction_job.succeeded", - "privacy.redaction_job.validation_error", - "product.created", - "product.deleted", - "product.updated", - "promotion_code.created", - "promotion_code.updated", - "quote.accept_failed", - "quote.accepted", - "quote.accepting", - "quote.canceled", - "quote.created", - "quote.draft", - "quote.finalized", - "quote.reestimate_failed", - "quote.reestimated", - "quote.stale", - "radar.early_fraud_warning.created", - "radar.early_fraud_warning.updated", - "refund.created", - "refund.failed", - "refund.updated", - "reporting.report_run.failed", - "reporting.report_run.succeeded", - "reporting.report_type.updated", - "reserve.hold.created", - "reserve.hold.updated", - "reserve.plan.created", - "reserve.plan.disabled", - "reserve.plan.expired", - "reserve.plan.updated", - "reserve.release.created", - "review.closed", - "review.opened", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.setup_failed", - "setup_intent.succeeded", - "sigma.scheduled_query_run.created", - "source.canceled", - "source.chargeable", - "source.failed", - "source.mandate_notification", - "source.refund_attributes_required", - "source.transaction.created", - "source.transaction.updated", - "subscription_schedule.aborted", - "subscription_schedule.canceled", - "subscription_schedule.completed", - "subscription_schedule.created", - "subscription_schedule.expiring", - "subscription_schedule.price_migration_failed", - "subscription_schedule.released", - "subscription_schedule.updated", - "tax.form.updated", - "tax.settings.updated", - "tax_rate.created", - "tax_rate.updated", - "terminal.reader.action_failed", - "terminal.reader.action_succeeded", - "terminal.reader.action_updated", - "test_helpers.test_clock.advancing", - "test_helpers.test_clock.created", - "test_helpers.test_clock.deleted", - "test_helpers.test_clock.internal_failure", - "test_helpers.test_clock.ready", - "topup.canceled", - "topup.created", - "topup.failed", - "topup.reversed", - "topup.succeeded", - "transfer.created", - "transfer.reversed", - "transfer.updated", - "treasury.credit_reversal.created", - "treasury.credit_reversal.posted", - "treasury.debit_reversal.completed", - "treasury.debit_reversal.created", - "treasury.debit_reversal.initial_credit_granted", - "treasury.financial_account.closed", - "treasury.financial_account.created", - "treasury.financial_account.features_status_updated", - "treasury.inbound_transfer.canceled", - "treasury.inbound_transfer.created", - "treasury.inbound_transfer.failed", - "treasury.inbound_transfer.succeeded", - "treasury.outbound_payment.canceled", - "treasury.outbound_payment.created", - "treasury.outbound_payment.expected_arrival_date_updated", - "treasury.outbound_payment.failed", - "treasury.outbound_payment.posted", - "treasury.outbound_payment.returned", - "treasury.outbound_payment.tracking_details_updated", - "treasury.outbound_transfer.canceled", - "treasury.outbound_transfer.created", - "treasury.outbound_transfer.expected_arrival_date_updated", - "treasury.outbound_transfer.failed", - "treasury.outbound_transfer.posted", - "treasury.outbound_transfer.returned", - "treasury.outbound_transfer.tracking_details_updated", - "treasury.received_credit.created", - "treasury.received_credit.failed", - "treasury.received_credit.succeeded", - "treasury.received_debit.created", - ], - str, + Literal[ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "account_notice.created", + "account_notice.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "balance_settings.updated", + "billing.alert.triggered", + "billing.credit_balance_transaction.created", + "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "capital.financing_offer.accepted", + "capital.financing_offer.accepted_other_offer", + "capital.financing_offer.canceled", + "capital.financing_offer.created", + "capital.financing_offer.expired", + "capital.financing_offer.fully_repaid", + "capital.financing_offer.paid_out", + "capital.financing_offer.rejected", + "capital.financing_offer.replacement_created", + "capital.financing_summary.line_of_credit_update", + "capital.financing_transaction.created", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.collection_paused", + "customer.subscription.collection_resumed", + "customer.subscription.created", + "customer.subscription.custom_event", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.price_migration_failed", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "entitlements.active_entitlement_summary.updated", + "file.created", + "financial_connections.account.account_numbers_updated", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.expected_deactivation_date_updated", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "financial_connections.account.refreshed_inferred_balances", + "financial_connections.account.refreshed_ownership", + "financial_connections.account.refreshed_transactions", + "financial_connections.account.supported_payment_method_types_updated", + "financial_connections.account.upcoming_account_number_expiry", + "financial_connections.account.upcoming_deactivation", + "financial_connections.authorization.expected_deactivation_date_updated", + "financial_connections.authorization.upcoming_deactivation", + "financial_connections.session.updated", + "fx_quote.expired", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.overdue", + "invoice.overpaid", + "invoice.paid", + "invoice.payment.overpaid", + "invoice.payment_action_required", + "invoice.payment_attempt_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoice.will_be_due", + "invoice_payment.paid", + "invoiceitem.created", + "invoiceitem.deleted", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.funds_rescinded", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_dispute_settlement_detail.created", + "issuing_dispute_settlement_detail.updated", + "issuing_fraud_liability_debit.created", + "issuing_personalization_design.activated", + "issuing_personalization_design.deactivated", + "issuing_personalization_design.rejected", + "issuing_personalization_design.updated", + "issuing_settlement.created", + "issuing_settlement.updated", + "issuing_token.created", + "issuing_token.updated", + "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", + "issuing_transaction.updated", + "mandate.updated", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.reconciliation_completed", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "privacy.redaction_job.canceled", + "privacy.redaction_job.created", + "privacy.redaction_job.ready", + "privacy.redaction_job.succeeded", + "privacy.redaction_job.validation_error", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accept_failed", + "quote.accepted", + "quote.accepting", + "quote.canceled", + "quote.created", + "quote.draft", + "quote.finalized", + "quote.reestimate_failed", + "quote.reestimated", + "quote.stale", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "refund.created", + "refund.failed", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "reserve.hold.created", + "reserve.hold.updated", + "reserve.plan.created", + "reserve.plan.disabled", + "reserve.plan.expired", + "reserve.plan.updated", + "reserve.release.created", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.price_migration_failed", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax.form.updated", + "tax.settings.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "terminal.reader.action_updated", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_payment.tracking_details_updated", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.outbound_transfer.tracking_details_updated", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created", ] ] """ diff --git a/stripe/params/_webhook_endpoint_modify_params.py b/stripe/params/_webhook_endpoint_modify_params.py index 33c503cd5..717613716 100644 --- a/stripe/params/_webhook_endpoint_modify_params.py +++ b/stripe/params/_webhook_endpoint_modify_params.py @@ -2,7 +2,7 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List, Union +from typing import Dict, List from typing_extensions import Literal, NotRequired @@ -17,315 +17,312 @@ class WebhookEndpointModifyParams(RequestOptions): """ enabled_events: NotRequired[ List[ - Union[ - Literal[ - "*", - "account.application.authorized", - "account.application.deauthorized", - "account.external_account.created", - "account.external_account.deleted", - "account.external_account.updated", - "account.updated", - "account_notice.created", - "account_notice.updated", - "application_fee.created", - "application_fee.refund.updated", - "application_fee.refunded", - "balance.available", - "balance_settings.updated", - "billing.alert.triggered", - "billing.credit_balance_transaction.created", - "billing.credit_grant.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", - "billing_portal.configuration.created", - "billing_portal.configuration.updated", - "billing_portal.session.created", - "capability.updated", - "capital.financing_offer.accepted", - "capital.financing_offer.accepted_other_offer", - "capital.financing_offer.canceled", - "capital.financing_offer.created", - "capital.financing_offer.expired", - "capital.financing_offer.fully_repaid", - "capital.financing_offer.paid_out", - "capital.financing_offer.rejected", - "capital.financing_offer.replacement_created", - "capital.financing_summary.line_of_credit_update", - "capital.financing_transaction.created", - "cash_balance.funds_available", - "charge.captured", - "charge.dispute.closed", - "charge.dispute.created", - "charge.dispute.funds_reinstated", - "charge.dispute.funds_withdrawn", - "charge.dispute.updated", - "charge.expired", - "charge.failed", - "charge.pending", - "charge.refund.updated", - "charge.refunded", - "charge.succeeded", - "charge.updated", - "checkout.session.async_payment_failed", - "checkout.session.async_payment_succeeded", - "checkout.session.completed", - "checkout.session.expired", - "climate.order.canceled", - "climate.order.created", - "climate.order.delayed", - "climate.order.delivered", - "climate.order.product_substituted", - "climate.product.created", - "climate.product.pricing_updated", - "coupon.created", - "coupon.deleted", - "coupon.updated", - "credit_note.created", - "credit_note.updated", - "credit_note.voided", - "customer.created", - "customer.deleted", - "customer.discount.created", - "customer.discount.deleted", - "customer.discount.updated", - "customer.source.created", - "customer.source.deleted", - "customer.source.expiring", - "customer.source.updated", - "customer.subscription.collection_paused", - "customer.subscription.collection_resumed", - "customer.subscription.created", - "customer.subscription.custom_event", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.pending_update_applied", - "customer.subscription.pending_update_expired", - "customer.subscription.price_migration_failed", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", - "customer.updated", - "customer_cash_balance_transaction.created", - "entitlements.active_entitlement_summary.updated", - "file.created", - "financial_connections.account.account_numbers_updated", - "financial_connections.account.created", - "financial_connections.account.deactivated", - "financial_connections.account.disconnected", - "financial_connections.account.expected_deactivation_date_updated", - "financial_connections.account.reactivated", - "financial_connections.account.refreshed_balance", - "financial_connections.account.refreshed_inferred_balances", - "financial_connections.account.refreshed_ownership", - "financial_connections.account.refreshed_transactions", - "financial_connections.account.supported_payment_method_types_updated", - "financial_connections.account.upcoming_account_number_expiry", - "financial_connections.account.upcoming_deactivation", - "financial_connections.authorization.expected_deactivation_date_updated", - "financial_connections.authorization.upcoming_deactivation", - "financial_connections.session.updated", - "fx_quote.expired", - "identity.verification_session.canceled", - "identity.verification_session.created", - "identity.verification_session.processing", - "identity.verification_session.redacted", - "identity.verification_session.requires_input", - "identity.verification_session.verified", - "invoice.created", - "invoice.deleted", - "invoice.finalization_failed", - "invoice.finalized", - "invoice.marked_uncollectible", - "invoice.overdue", - "invoice.overpaid", - "invoice.paid", - "invoice.payment.overpaid", - "invoice.payment_action_required", - "invoice.payment_attempt_required", - "invoice.payment_failed", - "invoice.payment_succeeded", - "invoice.sent", - "invoice.upcoming", - "invoice.updated", - "invoice.voided", - "invoice.will_be_due", - "invoice_payment.paid", - "invoiceitem.created", - "invoiceitem.deleted", - "issuing_authorization.created", - "issuing_authorization.request", - "issuing_authorization.updated", - "issuing_card.created", - "issuing_card.updated", - "issuing_cardholder.created", - "issuing_cardholder.updated", - "issuing_dispute.closed", - "issuing_dispute.created", - "issuing_dispute.funds_reinstated", - "issuing_dispute.funds_rescinded", - "issuing_dispute.submitted", - "issuing_dispute.updated", - "issuing_dispute_settlement_detail.created", - "issuing_dispute_settlement_detail.updated", - "issuing_fraud_liability_debit.created", - "issuing_personalization_design.activated", - "issuing_personalization_design.deactivated", - "issuing_personalization_design.rejected", - "issuing_personalization_design.updated", - "issuing_settlement.created", - "issuing_settlement.updated", - "issuing_token.created", - "issuing_token.updated", - "issuing_transaction.created", - "issuing_transaction.purchase_details_receipt_updated", - "issuing_transaction.updated", - "mandate.updated", - "payment_intent.amount_capturable_updated", - "payment_intent.canceled", - "payment_intent.created", - "payment_intent.partially_funded", - "payment_intent.payment_failed", - "payment_intent.processing", - "payment_intent.requires_action", - "payment_intent.succeeded", - "payment_link.created", - "payment_link.updated", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.detached", - "payment_method.updated", - "payout.canceled", - "payout.created", - "payout.failed", - "payout.paid", - "payout.reconciliation_completed", - "payout.updated", - "person.created", - "person.deleted", - "person.updated", - "plan.created", - "plan.deleted", - "plan.updated", - "price.created", - "price.deleted", - "price.updated", - "privacy.redaction_job.canceled", - "privacy.redaction_job.created", - "privacy.redaction_job.ready", - "privacy.redaction_job.succeeded", - "privacy.redaction_job.validation_error", - "product.created", - "product.deleted", - "product.updated", - "promotion_code.created", - "promotion_code.updated", - "quote.accept_failed", - "quote.accepted", - "quote.accepting", - "quote.canceled", - "quote.created", - "quote.draft", - "quote.finalized", - "quote.reestimate_failed", - "quote.reestimated", - "quote.stale", - "radar.early_fraud_warning.created", - "radar.early_fraud_warning.updated", - "refund.created", - "refund.failed", - "refund.updated", - "reporting.report_run.failed", - "reporting.report_run.succeeded", - "reporting.report_type.updated", - "reserve.hold.created", - "reserve.hold.updated", - "reserve.plan.created", - "reserve.plan.disabled", - "reserve.plan.expired", - "reserve.plan.updated", - "reserve.release.created", - "review.closed", - "review.opened", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.setup_failed", - "setup_intent.succeeded", - "sigma.scheduled_query_run.created", - "source.canceled", - "source.chargeable", - "source.failed", - "source.mandate_notification", - "source.refund_attributes_required", - "source.transaction.created", - "source.transaction.updated", - "subscription_schedule.aborted", - "subscription_schedule.canceled", - "subscription_schedule.completed", - "subscription_schedule.created", - "subscription_schedule.expiring", - "subscription_schedule.price_migration_failed", - "subscription_schedule.released", - "subscription_schedule.updated", - "tax.form.updated", - "tax.settings.updated", - "tax_rate.created", - "tax_rate.updated", - "terminal.reader.action_failed", - "terminal.reader.action_succeeded", - "terminal.reader.action_updated", - "test_helpers.test_clock.advancing", - "test_helpers.test_clock.created", - "test_helpers.test_clock.deleted", - "test_helpers.test_clock.internal_failure", - "test_helpers.test_clock.ready", - "topup.canceled", - "topup.created", - "topup.failed", - "topup.reversed", - "topup.succeeded", - "transfer.created", - "transfer.reversed", - "transfer.updated", - "treasury.credit_reversal.created", - "treasury.credit_reversal.posted", - "treasury.debit_reversal.completed", - "treasury.debit_reversal.created", - "treasury.debit_reversal.initial_credit_granted", - "treasury.financial_account.closed", - "treasury.financial_account.created", - "treasury.financial_account.features_status_updated", - "treasury.inbound_transfer.canceled", - "treasury.inbound_transfer.created", - "treasury.inbound_transfer.failed", - "treasury.inbound_transfer.succeeded", - "treasury.outbound_payment.canceled", - "treasury.outbound_payment.created", - "treasury.outbound_payment.expected_arrival_date_updated", - "treasury.outbound_payment.failed", - "treasury.outbound_payment.posted", - "treasury.outbound_payment.returned", - "treasury.outbound_payment.tracking_details_updated", - "treasury.outbound_transfer.canceled", - "treasury.outbound_transfer.created", - "treasury.outbound_transfer.expected_arrival_date_updated", - "treasury.outbound_transfer.failed", - "treasury.outbound_transfer.posted", - "treasury.outbound_transfer.returned", - "treasury.outbound_transfer.tracking_details_updated", - "treasury.received_credit.created", - "treasury.received_credit.failed", - "treasury.received_credit.succeeded", - "treasury.received_debit.created", - ], - str, + Literal[ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "account_notice.created", + "account_notice.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "balance_settings.updated", + "billing.alert.triggered", + "billing.credit_balance_transaction.created", + "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "capital.financing_offer.accepted", + "capital.financing_offer.accepted_other_offer", + "capital.financing_offer.canceled", + "capital.financing_offer.created", + "capital.financing_offer.expired", + "capital.financing_offer.fully_repaid", + "capital.financing_offer.paid_out", + "capital.financing_offer.rejected", + "capital.financing_offer.replacement_created", + "capital.financing_summary.line_of_credit_update", + "capital.financing_transaction.created", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.collection_paused", + "customer.subscription.collection_resumed", + "customer.subscription.created", + "customer.subscription.custom_event", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.price_migration_failed", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "entitlements.active_entitlement_summary.updated", + "file.created", + "financial_connections.account.account_numbers_updated", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.expected_deactivation_date_updated", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "financial_connections.account.refreshed_inferred_balances", + "financial_connections.account.refreshed_ownership", + "financial_connections.account.refreshed_transactions", + "financial_connections.account.supported_payment_method_types_updated", + "financial_connections.account.upcoming_account_number_expiry", + "financial_connections.account.upcoming_deactivation", + "financial_connections.authorization.expected_deactivation_date_updated", + "financial_connections.authorization.upcoming_deactivation", + "financial_connections.session.updated", + "fx_quote.expired", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.overdue", + "invoice.overpaid", + "invoice.paid", + "invoice.payment.overpaid", + "invoice.payment_action_required", + "invoice.payment_attempt_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoice.will_be_due", + "invoice_payment.paid", + "invoiceitem.created", + "invoiceitem.deleted", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.funds_rescinded", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_dispute_settlement_detail.created", + "issuing_dispute_settlement_detail.updated", + "issuing_fraud_liability_debit.created", + "issuing_personalization_design.activated", + "issuing_personalization_design.deactivated", + "issuing_personalization_design.rejected", + "issuing_personalization_design.updated", + "issuing_settlement.created", + "issuing_settlement.updated", + "issuing_token.created", + "issuing_token.updated", + "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", + "issuing_transaction.updated", + "mandate.updated", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.reconciliation_completed", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "privacy.redaction_job.canceled", + "privacy.redaction_job.created", + "privacy.redaction_job.ready", + "privacy.redaction_job.succeeded", + "privacy.redaction_job.validation_error", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accept_failed", + "quote.accepted", + "quote.accepting", + "quote.canceled", + "quote.created", + "quote.draft", + "quote.finalized", + "quote.reestimate_failed", + "quote.reestimated", + "quote.stale", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "refund.created", + "refund.failed", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "reserve.hold.created", + "reserve.hold.updated", + "reserve.plan.created", + "reserve.plan.disabled", + "reserve.plan.expired", + "reserve.plan.updated", + "reserve.release.created", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.price_migration_failed", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax.form.updated", + "tax.settings.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "terminal.reader.action_updated", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_payment.tracking_details_updated", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.outbound_transfer.tracking_details_updated", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created", ] ] ] diff --git a/stripe/params/_webhook_endpoint_update_params.py b/stripe/params/_webhook_endpoint_update_params.py index 4b1c7966a..20731ac5b 100644 --- a/stripe/params/_webhook_endpoint_update_params.py +++ b/stripe/params/_webhook_endpoint_update_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, List, Union +from typing import Dict, List from typing_extensions import Literal, NotRequired, TypedDict @@ -16,315 +16,312 @@ class WebhookEndpointUpdateParams(TypedDict): """ enabled_events: NotRequired[ List[ - Union[ - Literal[ - "*", - "account.application.authorized", - "account.application.deauthorized", - "account.external_account.created", - "account.external_account.deleted", - "account.external_account.updated", - "account.updated", - "account_notice.created", - "account_notice.updated", - "application_fee.created", - "application_fee.refund.updated", - "application_fee.refunded", - "balance.available", - "balance_settings.updated", - "billing.alert.triggered", - "billing.credit_balance_transaction.created", - "billing.credit_grant.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", - "billing_portal.configuration.created", - "billing_portal.configuration.updated", - "billing_portal.session.created", - "capability.updated", - "capital.financing_offer.accepted", - "capital.financing_offer.accepted_other_offer", - "capital.financing_offer.canceled", - "capital.financing_offer.created", - "capital.financing_offer.expired", - "capital.financing_offer.fully_repaid", - "capital.financing_offer.paid_out", - "capital.financing_offer.rejected", - "capital.financing_offer.replacement_created", - "capital.financing_summary.line_of_credit_update", - "capital.financing_transaction.created", - "cash_balance.funds_available", - "charge.captured", - "charge.dispute.closed", - "charge.dispute.created", - "charge.dispute.funds_reinstated", - "charge.dispute.funds_withdrawn", - "charge.dispute.updated", - "charge.expired", - "charge.failed", - "charge.pending", - "charge.refund.updated", - "charge.refunded", - "charge.succeeded", - "charge.updated", - "checkout.session.async_payment_failed", - "checkout.session.async_payment_succeeded", - "checkout.session.completed", - "checkout.session.expired", - "climate.order.canceled", - "climate.order.created", - "climate.order.delayed", - "climate.order.delivered", - "climate.order.product_substituted", - "climate.product.created", - "climate.product.pricing_updated", - "coupon.created", - "coupon.deleted", - "coupon.updated", - "credit_note.created", - "credit_note.updated", - "credit_note.voided", - "customer.created", - "customer.deleted", - "customer.discount.created", - "customer.discount.deleted", - "customer.discount.updated", - "customer.source.created", - "customer.source.deleted", - "customer.source.expiring", - "customer.source.updated", - "customer.subscription.collection_paused", - "customer.subscription.collection_resumed", - "customer.subscription.created", - "customer.subscription.custom_event", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.pending_update_applied", - "customer.subscription.pending_update_expired", - "customer.subscription.price_migration_failed", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", - "customer.updated", - "customer_cash_balance_transaction.created", - "entitlements.active_entitlement_summary.updated", - "file.created", - "financial_connections.account.account_numbers_updated", - "financial_connections.account.created", - "financial_connections.account.deactivated", - "financial_connections.account.disconnected", - "financial_connections.account.expected_deactivation_date_updated", - "financial_connections.account.reactivated", - "financial_connections.account.refreshed_balance", - "financial_connections.account.refreshed_inferred_balances", - "financial_connections.account.refreshed_ownership", - "financial_connections.account.refreshed_transactions", - "financial_connections.account.supported_payment_method_types_updated", - "financial_connections.account.upcoming_account_number_expiry", - "financial_connections.account.upcoming_deactivation", - "financial_connections.authorization.expected_deactivation_date_updated", - "financial_connections.authorization.upcoming_deactivation", - "financial_connections.session.updated", - "fx_quote.expired", - "identity.verification_session.canceled", - "identity.verification_session.created", - "identity.verification_session.processing", - "identity.verification_session.redacted", - "identity.verification_session.requires_input", - "identity.verification_session.verified", - "invoice.created", - "invoice.deleted", - "invoice.finalization_failed", - "invoice.finalized", - "invoice.marked_uncollectible", - "invoice.overdue", - "invoice.overpaid", - "invoice.paid", - "invoice.payment.overpaid", - "invoice.payment_action_required", - "invoice.payment_attempt_required", - "invoice.payment_failed", - "invoice.payment_succeeded", - "invoice.sent", - "invoice.upcoming", - "invoice.updated", - "invoice.voided", - "invoice.will_be_due", - "invoice_payment.paid", - "invoiceitem.created", - "invoiceitem.deleted", - "issuing_authorization.created", - "issuing_authorization.request", - "issuing_authorization.updated", - "issuing_card.created", - "issuing_card.updated", - "issuing_cardholder.created", - "issuing_cardholder.updated", - "issuing_dispute.closed", - "issuing_dispute.created", - "issuing_dispute.funds_reinstated", - "issuing_dispute.funds_rescinded", - "issuing_dispute.submitted", - "issuing_dispute.updated", - "issuing_dispute_settlement_detail.created", - "issuing_dispute_settlement_detail.updated", - "issuing_fraud_liability_debit.created", - "issuing_personalization_design.activated", - "issuing_personalization_design.deactivated", - "issuing_personalization_design.rejected", - "issuing_personalization_design.updated", - "issuing_settlement.created", - "issuing_settlement.updated", - "issuing_token.created", - "issuing_token.updated", - "issuing_transaction.created", - "issuing_transaction.purchase_details_receipt_updated", - "issuing_transaction.updated", - "mandate.updated", - "payment_intent.amount_capturable_updated", - "payment_intent.canceled", - "payment_intent.created", - "payment_intent.partially_funded", - "payment_intent.payment_failed", - "payment_intent.processing", - "payment_intent.requires_action", - "payment_intent.succeeded", - "payment_link.created", - "payment_link.updated", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.detached", - "payment_method.updated", - "payout.canceled", - "payout.created", - "payout.failed", - "payout.paid", - "payout.reconciliation_completed", - "payout.updated", - "person.created", - "person.deleted", - "person.updated", - "plan.created", - "plan.deleted", - "plan.updated", - "price.created", - "price.deleted", - "price.updated", - "privacy.redaction_job.canceled", - "privacy.redaction_job.created", - "privacy.redaction_job.ready", - "privacy.redaction_job.succeeded", - "privacy.redaction_job.validation_error", - "product.created", - "product.deleted", - "product.updated", - "promotion_code.created", - "promotion_code.updated", - "quote.accept_failed", - "quote.accepted", - "quote.accepting", - "quote.canceled", - "quote.created", - "quote.draft", - "quote.finalized", - "quote.reestimate_failed", - "quote.reestimated", - "quote.stale", - "radar.early_fraud_warning.created", - "radar.early_fraud_warning.updated", - "refund.created", - "refund.failed", - "refund.updated", - "reporting.report_run.failed", - "reporting.report_run.succeeded", - "reporting.report_type.updated", - "reserve.hold.created", - "reserve.hold.updated", - "reserve.plan.created", - "reserve.plan.disabled", - "reserve.plan.expired", - "reserve.plan.updated", - "reserve.release.created", - "review.closed", - "review.opened", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.setup_failed", - "setup_intent.succeeded", - "sigma.scheduled_query_run.created", - "source.canceled", - "source.chargeable", - "source.failed", - "source.mandate_notification", - "source.refund_attributes_required", - "source.transaction.created", - "source.transaction.updated", - "subscription_schedule.aborted", - "subscription_schedule.canceled", - "subscription_schedule.completed", - "subscription_schedule.created", - "subscription_schedule.expiring", - "subscription_schedule.price_migration_failed", - "subscription_schedule.released", - "subscription_schedule.updated", - "tax.form.updated", - "tax.settings.updated", - "tax_rate.created", - "tax_rate.updated", - "terminal.reader.action_failed", - "terminal.reader.action_succeeded", - "terminal.reader.action_updated", - "test_helpers.test_clock.advancing", - "test_helpers.test_clock.created", - "test_helpers.test_clock.deleted", - "test_helpers.test_clock.internal_failure", - "test_helpers.test_clock.ready", - "topup.canceled", - "topup.created", - "topup.failed", - "topup.reversed", - "topup.succeeded", - "transfer.created", - "transfer.reversed", - "transfer.updated", - "treasury.credit_reversal.created", - "treasury.credit_reversal.posted", - "treasury.debit_reversal.completed", - "treasury.debit_reversal.created", - "treasury.debit_reversal.initial_credit_granted", - "treasury.financial_account.closed", - "treasury.financial_account.created", - "treasury.financial_account.features_status_updated", - "treasury.inbound_transfer.canceled", - "treasury.inbound_transfer.created", - "treasury.inbound_transfer.failed", - "treasury.inbound_transfer.succeeded", - "treasury.outbound_payment.canceled", - "treasury.outbound_payment.created", - "treasury.outbound_payment.expected_arrival_date_updated", - "treasury.outbound_payment.failed", - "treasury.outbound_payment.posted", - "treasury.outbound_payment.returned", - "treasury.outbound_payment.tracking_details_updated", - "treasury.outbound_transfer.canceled", - "treasury.outbound_transfer.created", - "treasury.outbound_transfer.expected_arrival_date_updated", - "treasury.outbound_transfer.failed", - "treasury.outbound_transfer.posted", - "treasury.outbound_transfer.returned", - "treasury.outbound_transfer.tracking_details_updated", - "treasury.received_credit.created", - "treasury.received_credit.failed", - "treasury.received_credit.succeeded", - "treasury.received_debit.created", - ], - str, + Literal[ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "account_notice.created", + "account_notice.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "balance_settings.updated", + "billing.alert.triggered", + "billing.credit_balance_transaction.created", + "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "capital.financing_offer.accepted", + "capital.financing_offer.accepted_other_offer", + "capital.financing_offer.canceled", + "capital.financing_offer.created", + "capital.financing_offer.expired", + "capital.financing_offer.fully_repaid", + "capital.financing_offer.paid_out", + "capital.financing_offer.rejected", + "capital.financing_offer.replacement_created", + "capital.financing_summary.line_of_credit_update", + "capital.financing_transaction.created", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.collection_paused", + "customer.subscription.collection_resumed", + "customer.subscription.created", + "customer.subscription.custom_event", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.price_migration_failed", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "entitlements.active_entitlement_summary.updated", + "file.created", + "financial_connections.account.account_numbers_updated", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.expected_deactivation_date_updated", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "financial_connections.account.refreshed_inferred_balances", + "financial_connections.account.refreshed_ownership", + "financial_connections.account.refreshed_transactions", + "financial_connections.account.supported_payment_method_types_updated", + "financial_connections.account.upcoming_account_number_expiry", + "financial_connections.account.upcoming_deactivation", + "financial_connections.authorization.expected_deactivation_date_updated", + "financial_connections.authorization.upcoming_deactivation", + "financial_connections.session.updated", + "fx_quote.expired", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.overdue", + "invoice.overpaid", + "invoice.paid", + "invoice.payment.overpaid", + "invoice.payment_action_required", + "invoice.payment_attempt_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoice.will_be_due", + "invoice_payment.paid", + "invoiceitem.created", + "invoiceitem.deleted", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.funds_rescinded", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_dispute_settlement_detail.created", + "issuing_dispute_settlement_detail.updated", + "issuing_fraud_liability_debit.created", + "issuing_personalization_design.activated", + "issuing_personalization_design.deactivated", + "issuing_personalization_design.rejected", + "issuing_personalization_design.updated", + "issuing_settlement.created", + "issuing_settlement.updated", + "issuing_token.created", + "issuing_token.updated", + "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", + "issuing_transaction.updated", + "mandate.updated", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.reconciliation_completed", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "privacy.redaction_job.canceled", + "privacy.redaction_job.created", + "privacy.redaction_job.ready", + "privacy.redaction_job.succeeded", + "privacy.redaction_job.validation_error", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accept_failed", + "quote.accepted", + "quote.accepting", + "quote.canceled", + "quote.created", + "quote.draft", + "quote.finalized", + "quote.reestimate_failed", + "quote.reestimated", + "quote.stale", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "refund.created", + "refund.failed", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "reserve.hold.created", + "reserve.hold.updated", + "reserve.plan.created", + "reserve.plan.disabled", + "reserve.plan.expired", + "reserve.plan.updated", + "reserve.release.created", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.price_migration_failed", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax.form.updated", + "tax.settings.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "terminal.reader.action_updated", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_payment.tracking_details_updated", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.outbound_transfer.tracking_details_updated", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created", ] ] ] diff --git a/stripe/params/billing_portal/__init__.py b/stripe/params/billing_portal/__init__.py index 1fe2f4e00..aa6f1c82f 100644 --- a/stripe/params/billing_portal/__init__.py +++ b/stripe/params/billing_portal/__init__.py @@ -67,6 +67,7 @@ SessionCreateParamsFlowDataSubscriptionCancel as SessionCreateParamsFlowDataSubscriptionCancel, SessionCreateParamsFlowDataSubscriptionCancelRetention as SessionCreateParamsFlowDataSubscriptionCancelRetention, SessionCreateParamsFlowDataSubscriptionCancelRetentionCouponOffer as SessionCreateParamsFlowDataSubscriptionCancelRetentionCouponOffer, + SessionCreateParamsFlowDataSubscriptionPause as SessionCreateParamsFlowDataSubscriptionPause, SessionCreateParamsFlowDataSubscriptionUpdate as SessionCreateParamsFlowDataSubscriptionUpdate, SessionCreateParamsFlowDataSubscriptionUpdateConfirm as SessionCreateParamsFlowDataSubscriptionUpdateConfirm, SessionCreateParamsFlowDataSubscriptionUpdateConfirmDiscount as SessionCreateParamsFlowDataSubscriptionUpdateConfirmDiscount, @@ -283,6 +284,10 @@ "stripe.params.billing_portal._session_create_params", False, ), + "SessionCreateParamsFlowDataSubscriptionPause": ( + "stripe.params.billing_portal._session_create_params", + False, + ), "SessionCreateParamsFlowDataSubscriptionUpdate": ( "stripe.params.billing_portal._session_create_params", False, diff --git a/stripe/params/billing_portal/_session_create_params.py b/stripe/params/billing_portal/_session_create_params.py index 3d35c999a..b1fe9177c 100644 --- a/stripe/params/billing_portal/_session_create_params.py +++ b/stripe/params/billing_portal/_session_create_params.py @@ -53,6 +53,12 @@ class SessionCreateParamsFlowData(TypedDict): """ Configuration when `flow_data.type=subscription_cancel`. """ + subscription_pause: NotRequired[ + "SessionCreateParamsFlowDataSubscriptionPause" + ] + """ + Configuration when `flow_data.type=subscription_pause`. + """ subscription_update: NotRequired[ "SessionCreateParamsFlowDataSubscriptionUpdate" ] @@ -67,8 +73,10 @@ class SessionCreateParamsFlowData(TypedDict): """ type: Union[ Literal[ + "customer_update", "payment_method_update", "subscription_cancel", + "subscription_pause", "subscription_update", "subscription_update_confirm", ], @@ -147,6 +155,13 @@ class SessionCreateParamsFlowDataSubscriptionCancelRetentionCouponOffer( """ +class SessionCreateParamsFlowDataSubscriptionPause(TypedDict): + subscription: str + """ + The ID of the subscription to be paused. + """ + + class SessionCreateParamsFlowDataSubscriptionUpdate(TypedDict): subscription: str """ diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py index cb81e5d98..88dcabafb 100644 --- a/stripe/params/checkout/_session_create_params.py +++ b/stripe/params/checkout/_session_create_params.py @@ -1400,26 +1400,17 @@ class SessionCreateParamsPaymentIntentData(TypedDict): """ setup_future_usage: NotRequired["Literal['off_session', 'on_session']|str"] """ - Indicates that you intend to [make future payments](https://docs.stripe.com/payments/payment-intents#future-usage) with the payment - method collected by this Checkout Session. + Indicates that you intend to [make future payments](https://docs.stripe.com/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. - When setting this to `on_session`, Checkout will show a notice to the - customer that their payment details will be saved. + When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. - When setting this to `off_session`, Checkout will show a notice to the - customer that their payment details will be saved and used for future - payments. + When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. - If a Customer has been provided or Checkout creates a new Customer, - Checkout will attach the payment method to the Customer. + If a Customer has been provided or Checkout creates a new Customer, Checkout will attach the payment method to the Customer. - If Checkout does not create a Customer, the payment method is not attached - to a Customer. To reuse the payment method, you can retrieve it from the - Checkout Session's PaymentIntent. + If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. - When processing card payments, Checkout also uses `setup_future_usage` - to dynamically optimize your payment flow and comply with regional - legislation and network rules, such as SCA. + When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. """ shipping: NotRequired["SessionCreateParamsPaymentIntentDataShipping"] """ @@ -2967,7 +2958,7 @@ class SessionCreateParamsPermissions(TypedDict): Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. - When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + This parameter is only supported when `ui_mode=elements`. """ @@ -2986,7 +2977,7 @@ class SessionCreateParamsPermissionsUpdate(TypedDict): Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. - When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + This parameter is only supported when `ui_mode=elements`. """ diff --git a/stripe/params/identity/__init__.py b/stripe/params/identity/__init__.py index ada0c3dde..8e100c67d 100644 --- a/stripe/params/identity/__init__.py +++ b/stripe/params/identity/__init__.py @@ -33,6 +33,7 @@ VerificationSessionCreateParamsOptionsDocument as VerificationSessionCreateParamsOptionsDocument, VerificationSessionCreateParamsProvidedDetails as VerificationSessionCreateParamsProvidedDetails, VerificationSessionCreateParamsRelatedPerson as VerificationSessionCreateParamsRelatedPerson, + VerificationSessionCreateParamsUserConsent as VerificationSessionCreateParamsUserConsent, ) from stripe.params.identity._verification_session_list_params import ( VerificationSessionListParams as VerificationSessionListParams, @@ -43,6 +44,7 @@ VerificationSessionModifyParamsOptions as VerificationSessionModifyParamsOptions, VerificationSessionModifyParamsOptionsDocument as VerificationSessionModifyParamsOptionsDocument, VerificationSessionModifyParamsProvidedDetails as VerificationSessionModifyParamsProvidedDetails, + VerificationSessionModifyParamsUserConsent as VerificationSessionModifyParamsUserConsent, ) from stripe.params.identity._verification_session_redact_params import ( VerificationSessionRedactParams as VerificationSessionRedactParams, @@ -55,6 +57,7 @@ VerificationSessionUpdateParamsOptions as VerificationSessionUpdateParamsOptions, VerificationSessionUpdateParamsOptionsDocument as VerificationSessionUpdateParamsOptionsDocument, VerificationSessionUpdateParamsProvidedDetails as VerificationSessionUpdateParamsProvidedDetails, + VerificationSessionUpdateParamsUserConsent as VerificationSessionUpdateParamsUserConsent, ) # name -> (import_target, is_submodule) @@ -115,6 +118,10 @@ "stripe.params.identity._verification_session_create_params", False, ), + "VerificationSessionCreateParamsUserConsent": ( + "stripe.params.identity._verification_session_create_params", + False, + ), "VerificationSessionListParams": ( "stripe.params.identity._verification_session_list_params", False, @@ -139,6 +146,10 @@ "stripe.params.identity._verification_session_modify_params", False, ), + "VerificationSessionModifyParamsUserConsent": ( + "stripe.params.identity._verification_session_modify_params", + False, + ), "VerificationSessionRedactParams": ( "stripe.params.identity._verification_session_redact_params", False, @@ -163,6 +174,10 @@ "stripe.params.identity._verification_session_update_params", False, ), + "VerificationSessionUpdateParamsUserConsent": ( + "stripe.params.identity._verification_session_update_params", + False, + ), } if not TYPE_CHECKING: diff --git a/stripe/params/identity/_verification_session_create_params.py b/stripe/params/identity/_verification_session_create_params.py index 6696b26d2..369afd9c6 100644 --- a/stripe/params/identity/_verification_session_create_params.py +++ b/stripe/params/identity/_verification_session_create_params.py @@ -53,6 +53,10 @@ class VerificationSessionCreateParams(RequestOptions): """ The type of [verification check](https://docs.stripe.com/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`. """ + user_consent: NotRequired["VerificationSessionCreateParamsUserConsent"] + """ + Details on the user's consent to Stripe Terms of Service and Privacy Policy. + """ verification_flow: NotRequired[str] """ The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. @@ -109,3 +113,18 @@ class VerificationSessionCreateParamsRelatedPerson(TypedDict): """ A token referencing a Person resource that this verification is being used to verify. """ + + +class VerificationSessionCreateParamsUserConsent(TypedDict): + date: int + """ + The time at which the user gave consent, as a Unix timestamp. + """ + ip: str + """ + The IP address of the user when they gave consent. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser or device the user used to give consent. + """ diff --git a/stripe/params/identity/_verification_session_modify_params.py b/stripe/params/identity/_verification_session_modify_params.py index 7c1f919ed..97493e092 100644 --- a/stripe/params/identity/_verification_session_modify_params.py +++ b/stripe/params/identity/_verification_session_modify_params.py @@ -33,6 +33,10 @@ class VerificationSessionModifyParams(RequestOptions): """ The type of [verification check](https://docs.stripe.com/identity/verification-checks) to be performed. """ + user_consent: NotRequired["VerificationSessionModifyParamsUserConsent"] + """ + Details on the user's consent to Stripe Terms of Service and Privacy Policy. + """ class VerificationSessionModifyParamsOptions(TypedDict): @@ -74,3 +78,18 @@ class VerificationSessionModifyParamsProvidedDetails(TypedDict): """ Phone number of user being verified """ + + +class VerificationSessionModifyParamsUserConsent(TypedDict): + date: int + """ + The time at which the user gave consent, as a Unix timestamp. + """ + ip: str + """ + The IP address of the user when they gave consent. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser or device the user used to give consent. + """ diff --git a/stripe/params/identity/_verification_session_update_params.py b/stripe/params/identity/_verification_session_update_params.py index 25fdd341f..db66cdcb5 100644 --- a/stripe/params/identity/_verification_session_update_params.py +++ b/stripe/params/identity/_verification_session_update_params.py @@ -32,6 +32,10 @@ class VerificationSessionUpdateParams(TypedDict): """ The type of [verification check](https://docs.stripe.com/identity/verification-checks) to be performed. """ + user_consent: NotRequired["VerificationSessionUpdateParamsUserConsent"] + """ + Details on the user's consent to Stripe Terms of Service and Privacy Policy. + """ class VerificationSessionUpdateParamsOptions(TypedDict): @@ -73,3 +77,18 @@ class VerificationSessionUpdateParamsProvidedDetails(TypedDict): """ Phone number of user being verified """ + + +class VerificationSessionUpdateParamsUserConsent(TypedDict): + date: int + """ + The time at which the user gave consent, as a Unix timestamp. + """ + ip: str + """ + The IP address of the user when they gave consent. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser or device the user used to give consent. + """ diff --git a/stripe/params/issuing/__init__.py b/stripe/params/issuing/__init__.py index b688620ec..25fa80a7e 100644 --- a/stripe/params/issuing/__init__.py +++ b/stripe/params/issuing/__init__.py @@ -85,6 +85,7 @@ ) from stripe.params.issuing._card_create_params import ( CardCreateParams as CardCreateParams, + CardCreateParamsCryptoWallet as CardCreateParamsCryptoWallet, CardCreateParamsLifecycleControls as CardCreateParamsLifecycleControls, CardCreateParamsLifecycleControlsCancelAfter as CardCreateParamsLifecycleControlsCancelAfter, CardCreateParamsPin as CardCreateParamsPin, @@ -110,6 +111,7 @@ ) from stripe.params.issuing._card_modify_params import ( CardModifyParams as CardModifyParams, + CardModifyParamsCryptoWallet as CardModifyParamsCryptoWallet, CardModifyParamsPin as CardModifyParamsPin, CardModifyParamsShipping as CardModifyParamsShipping, CardModifyParamsShippingAddress as CardModifyParamsShippingAddress, @@ -132,6 +134,7 @@ ) from stripe.params.issuing._card_update_params import ( CardUpdateParams as CardUpdateParams, + CardUpdateParamsCryptoWallet as CardUpdateParamsCryptoWallet, CardUpdateParamsPin as CardUpdateParamsPin, CardUpdateParamsShipping as CardUpdateParamsShipping, CardUpdateParamsShippingAddress as CardUpdateParamsShippingAddress, @@ -643,6 +646,10 @@ False, ), "CardCreateParams": ("stripe.params.issuing._card_create_params", False), + "CardCreateParamsCryptoWallet": ( + "stripe.params.issuing._card_create_params", + False, + ), "CardCreateParamsLifecycleControls": ( "stripe.params.issuing._card_create_params", False, @@ -705,6 +712,10 @@ False, ), "CardModifyParams": ("stripe.params.issuing._card_modify_params", False), + "CardModifyParamsCryptoWallet": ( + "stripe.params.issuing._card_modify_params", + False, + ), "CardModifyParamsPin": ( "stripe.params.issuing._card_modify_params", False, @@ -750,6 +761,10 @@ False, ), "CardUpdateParams": ("stripe.params.issuing._card_update_params", False), + "CardUpdateParamsCryptoWallet": ( + "stripe.params.issuing._card_update_params", + False, + ), "CardUpdateParamsPin": ( "stripe.params.issuing._card_update_params", False, diff --git a/stripe/params/issuing/_authorization_create_params.py b/stripe/params/issuing/_authorization_create_params.py index b6a7b25c0..4d957dec7 100644 --- a/stripe/params/issuing/_authorization_create_params.py +++ b/stripe/params/issuing/_authorization_create_params.py @@ -71,6 +71,21 @@ class AuthorizationCreateParams(RequestOptions): """ Details about the authorization, such as identifiers, set by the card network. """ + pos_condition: NotRequired[ + Literal[ + "account_verification", + "card_not_present", + "card_present", + "e_commerce", + "key_entered_pos", + "other", + "pin_entered", + "recurring_or_moto", + ] + ] + """ + The point-of-sale initiation condition for this test authorization. + """ risk_assessment: NotRequired["AuthorizationCreateParamsRiskAssessment"] """ Stripe's assessment of the fraud risk for this authorization. diff --git a/stripe/params/issuing/_card_create_params.py b/stripe/params/issuing/_card_create_params.py index c39bf49b8..554e93074 100644 --- a/stripe/params/issuing/_card_create_params.py +++ b/stripe/params/issuing/_card_create_params.py @@ -11,6 +11,10 @@ class CardCreateParams(RequestOptions): """ The [Cardholder](https://docs.stripe.com/api#issuing_cardholder_object) object with which the card will be associated. """ + crypto_wallet: NotRequired["CardCreateParamsCryptoWallet"] + """ + The crypto wallet to attach this card to for Bridge integration. + """ currency: str """ The currency for the card. @@ -83,6 +87,25 @@ class CardCreateParams(RequestOptions): """ +class CardCreateParamsCryptoWallet(TypedDict): + address: NotRequired[str] + """ + The public address of the crypto wallet. + """ + chain: str + """ + The blockchain network the wallet is on. + """ + currency: str + """ + The cryptocurrency held in the wallet. + """ + type: NotRequired["Literal['bridge_wallet', 'standard']|str"] + """ + The type of wallet (standard or bridge_wallet). + """ + + class CardCreateParamsLifecycleControls(TypedDict): cancel_after: "CardCreateParamsLifecycleControlsCancelAfter" """ diff --git a/stripe/params/issuing/_card_modify_params.py b/stripe/params/issuing/_card_modify_params.py index b182debf3..9a7f1fa66 100644 --- a/stripe/params/issuing/_card_modify_params.py +++ b/stripe/params/issuing/_card_modify_params.py @@ -11,6 +11,10 @@ class CardModifyParams(RequestOptions): """ Reason why the `status` of this card is `canceled`. """ + crypto_wallet: NotRequired["CardModifyParamsCryptoWallet"] + """ + Updates the cryptocurrency used to fund this card's existing crypto wallet. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. @@ -44,6 +48,13 @@ class CardModifyParams(RequestOptions): """ +class CardModifyParamsCryptoWallet(TypedDict): + currency: str + """ + Updates the crypto wallet's funding currency for subsequent card movements. This doesn't convert existing balances or change the wallet's address, chain, or type. + """ + + class CardModifyParamsPin(TypedDict): encrypted_number: NotRequired[str] """ diff --git a/stripe/params/issuing/_card_update_params.py b/stripe/params/issuing/_card_update_params.py index cabb908df..cef8d9328 100644 --- a/stripe/params/issuing/_card_update_params.py +++ b/stripe/params/issuing/_card_update_params.py @@ -10,6 +10,10 @@ class CardUpdateParams(TypedDict): """ Reason why the `status` of this card is `canceled`. """ + crypto_wallet: NotRequired["CardUpdateParamsCryptoWallet"] + """ + Updates the cryptocurrency used to fund this card's existing crypto wallet. + """ expand: NotRequired[List[str]] """ Specifies which fields in the response should be expanded. @@ -43,6 +47,13 @@ class CardUpdateParams(TypedDict): """ +class CardUpdateParamsCryptoWallet(TypedDict): + currency: str + """ + Updates the crypto wallet's funding currency for subsequent card movements. This doesn't convert existing balances or change the wallet's address, chain, or type. + """ + + class CardUpdateParamsPin(TypedDict): encrypted_number: NotRequired[str] """ diff --git a/stripe/params/issuing/_cardholder_create_params.py b/stripe/params/issuing/_cardholder_create_params.py index 1fa8fa867..05ae4a146 100644 --- a/stripe/params/issuing/_cardholder_create_params.py +++ b/stripe/params/issuing/_cardholder_create_params.py @@ -137,7 +137,7 @@ class CardholderCreateParamsIndividualCardIssuing(TypedDict): "CardholderCreateParamsIndividualCardIssuingUserTermsAcceptance" ] """ - Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + Information about cardholder acceptance of Celtic [Authorized User Terms](https://docs.stripe.com/issuing/compliance-us#issuing-terms). Required for cards backed by a Celtic program. """ diff --git a/stripe/params/issuing/_cardholder_modify_params.py b/stripe/params/issuing/_cardholder_modify_params.py index 4cbbc0ad5..d1d510fdb 100644 --- a/stripe/params/issuing/_cardholder_modify_params.py +++ b/stripe/params/issuing/_cardholder_modify_params.py @@ -132,7 +132,7 @@ class CardholderModifyParamsIndividualCardIssuing(TypedDict): "CardholderModifyParamsIndividualCardIssuingUserTermsAcceptance" ] """ - Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + Information about cardholder acceptance of Celtic [Authorized User Terms](https://docs.stripe.com/issuing/compliance-us#issuing-terms). Required for cards backed by a Celtic program. """ diff --git a/stripe/params/issuing/_cardholder_update_params.py b/stripe/params/issuing/_cardholder_update_params.py index de224f69e..eb837e4da 100644 --- a/stripe/params/issuing/_cardholder_update_params.py +++ b/stripe/params/issuing/_cardholder_update_params.py @@ -131,7 +131,7 @@ class CardholderUpdateParamsIndividualCardIssuing(TypedDict): "CardholderUpdateParamsIndividualCardIssuingUserTermsAcceptance" ] """ - Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + Information about cardholder acceptance of Celtic [Authorized User Terms](https://docs.stripe.com/issuing/compliance-us#issuing-terms). Required for cards backed by a Celtic program. """ diff --git a/stripe/params/test_helpers/_confirmation_token_create_params.py b/stripe/params/test_helpers/_confirmation_token_create_params.py index 51aa98c3e..a8f41d81b 100644 --- a/stripe/params/test_helpers/_confirmation_token_create_params.py +++ b/stripe/params/test_helpers/_confirmation_token_create_params.py @@ -418,7 +418,6 @@ class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): "satispay", "scalapay", "sepa_debit", - "sequra", "shopeepay", "sofort", "stripe_balance", diff --git a/stripe/params/test_helpers/issuing/_authorization_create_params.py b/stripe/params/test_helpers/issuing/_authorization_create_params.py index f14fd77b8..f16215e50 100644 --- a/stripe/params/test_helpers/issuing/_authorization_create_params.py +++ b/stripe/params/test_helpers/issuing/_authorization_create_params.py @@ -70,6 +70,21 @@ class AuthorizationCreateParams(TypedDict): """ Details about the authorization, such as identifiers, set by the card network. """ + pos_condition: NotRequired[ + Literal[ + "account_verification", + "card_not_present", + "card_present", + "e_commerce", + "key_entered_pos", + "other", + "pin_entered", + "recurring_or_moto", + ] + ] + """ + The point-of-sale initiation condition for this test authorization. + """ risk_assessment: NotRequired["AuthorizationCreateParamsRiskAssessment"] """ Stripe's assessment of the fraud risk for this authorization. diff --git a/stripe/params/v2/core/__init__.py b/stripe/params/v2/core/__init__.py index be8ee081b..1f1401820 100644 --- a/stripe/params/v2/core/__init__.py +++ b/stripe/params/v2/core/__init__.py @@ -115,6 +115,9 @@ AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments, AccountCreateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration, + AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments, + AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtections, + AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtectionsPspMigration, AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments, AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPaymentsProtections as AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPaymentsProtections, AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigration as AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigration, @@ -724,6 +727,9 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtectionsPspMigration, + AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments, + AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtections, + AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtectionsPspMigration, AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments, AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPaymentsProtections as AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPaymentsProtections, AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigration as AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPaymentsProtectionsPspMigration, @@ -1628,6 +1634,18 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtections": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments": ( "stripe.params.v2.core._account_create_params", False, @@ -4005,6 +4023,18 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtections": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtectionsPspMigration": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments": ( "stripe.params.v2.core._account_update_params", False, diff --git a/stripe/params/v2/core/_account_create_params.py b/stripe/params/v2/core/_account_create_params.py index 459b31bcf..3649ff988 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -1106,6 +1106,12 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process BLIK payments. """ + blik_recurring_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments" + ] + """ + Allow the merchant to process recurring BLIK payments. + """ boleto_payments: NotRequired[ "AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments" ] @@ -1648,6 +1654,39 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtection """ +class AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments( + TypedDict, +): + protections: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtections( + TypedDict, +): + psp_migration: "AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments( TypedDict, ): diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py index ecceac555..a842afbc5 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -1128,6 +1128,12 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict): """ Allow the merchant to process BLIK payments. """ + blik_recurring_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments" + ] + """ + Allow the merchant to process recurring BLIK payments. + """ boleto_payments: NotRequired[ "AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments" ] @@ -1670,6 +1676,39 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPaymentsProtection """ +class AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments( + TypedDict, +): + protections: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtections" + ] + """ + Protection types to request for this capability (e.g. "psp_migration"). + """ + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtections( + TypedDict, +): + psp_migration: "AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtectionsPspMigration" + """ + Parameter to request psp_migration protection. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPaymentsProtectionsPspMigration( + TypedDict, +): + requested: bool + """ + To request a protection, pass true. + """ + + class AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments( TypedDict, ): diff --git a/stripe/params/v2/core/_batch_job_create_params.py b/stripe/params/v2/core/_batch_job_create_params.py index 61545e98e..67e38f2c0 100644 --- a/stripe/params/v2/core/_batch_job_create_params.py +++ b/stripe/params/v2/core/_batch_job_create_params.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import UntypedStripeObject -from typing import Dict, Union +from typing import Dict from typing_extensions import Literal, NotRequired, TypedDict @@ -31,97 +31,94 @@ class BatchJobCreateParamsEndpoint(TypedDict): """ The HTTP method to use when calling the endpoint. """ - path: Union[ - Literal[ - "/v1/accounts/:account", - "/v1/accounts", - "/v1/accounts/:account", - "/v1/coupons", - "/v1/coupons/:coupon", - "/v1/coupons/:coupon", - "/v1/credit_notes", - "/v1/customers/:customer", - "/v1/customers/:customer", - "/v1/customers", - "/v1/customers/:customer/discount", - "/v1/customers/:customer/funding_instructions", - "/v1/customers/:customer/subscriptions", - "/v1/customers/:customer/subscriptions", - "/v1/customers/:customer/subscriptions/:subscription_exposed_id", - "/v1/customers/:customer/subscriptions/:subscription_exposed_id/discount", - "/v1/customers/:customer/bank_accounts", - "/v1/customers/:customer/bank_accounts/:id", - "/v1/customers/:customer/bank_accounts/:id", - "/v1/customers/:customer/bank_accounts/:id/verify", - "/v1/customers/:customer/cards", - "/v1/customers/:customer/cards/:id", - "/v1/customers/:customer/cards/:id", - "/v1/customers/:customer/tax_ids", - "/v1/customers/:customer/sources", - "/v1/customers/:customer/sources/:id", - "/v1/customers/:customer/sources/:id", - "/v1/customers/:customer/sources/:id/verify", - "/v1/customers/:customer/balance_transactions", - "/v1/customers/:customer/balance_transactions/:transaction", - "/v1/customers/:customer/cash_balance", - "/v1/customer_sessions", - "/v1/disputes/:dispute/close", - "/v1/invoices", - "/v1/invoices/:invoice", - "/v1/invoices/:invoice", - "/v1/invoices/:invoice/pay", - "/v1/invoices/:invoice/send", - "/v1/invoices/:invoice/void", - "/v1/invoices/:invoice/finalize", - "/v1/invoices/:invoice/mark_uncollectible", - "/v1/invoices/:invoice/update_lines", - "/v1/invoices/:invoice/add_lines", - "/v1/invoices/:invoice/remove_lines", - "/v1/invoices/create_preview", - "/v1/invoices/:invoice/lines/:line_item_id", - "/v1/invoiceitems", - "/v1/invoiceitems/:invoiceitem", - "/v1/invoiceitems/:invoiceitem", - "/v1/invoice_rendering_templates/:template/archive", - "/v1/invoice_rendering_templates/:template/unarchive", - "/v1/payment_methods/:payment_method/attach", - "/v1/prices", - "/v1/prices/:price", - "/v1/products", - "/v1/products/:id", - "/v1/products/:id", - "/v1/products/:product/features", - "/v1/products/:product/features/:id", - "/v1/promotion_codes", - "/v1/promotion_codes/:promotion_code", - "/v1/radar/value_list_items", - "/v1/refunds", - "/v1/refunds/:refund/cancel", - "/v1/subscriptions/:subscription_exposed_id", - "/v1/subscriptions/:subscription_exposed_id", - "/v1/subscriptions/:subscription/migrate", - "/v1/subscriptions", - "/v1/subscriptions/:subscription/resume", - "/v1/subscriptions/:subscription/pause", - "/v1/subscription_items", - "/v1/subscription_items/:item", - "/v1/subscription_items/:item", - "/v1/subscription_schedules", - "/v1/subscription_schedules/:schedule", - "/v1/subscription_schedules/:schedule/cancel", - "/v1/subscription_schedules/:schedule/release", - "/v1/tax/registrations", - "/v1/tax/registrations/:id", - "/v1/tax/settings", - "/v1/tax/transactions/create_reversal", - "/v1/tax_ids", - "/v1/tax_ids/:id", - "/v1/customers/:customer/tax_ids", - "/v1/customers/:customer/tax_ids/:id", - "/v1/tax_rates", - "/v1/tax_rates/:tax_rate", - ], - str, + path: Literal[ + "/v1/accounts/:account", + "/v1/accounts", + "/v1/accounts/:account", + "/v1/coupons", + "/v1/coupons/:coupon", + "/v1/coupons/:coupon", + "/v1/credit_notes", + "/v1/customers/:customer", + "/v1/customers/:customer", + "/v1/customers", + "/v1/customers/:customer/discount", + "/v1/customers/:customer/funding_instructions", + "/v1/customers/:customer/subscriptions", + "/v1/customers/:customer/subscriptions", + "/v1/customers/:customer/subscriptions/:subscription_exposed_id", + "/v1/customers/:customer/subscriptions/:subscription_exposed_id/discount", + "/v1/customers/:customer/bank_accounts", + "/v1/customers/:customer/bank_accounts/:id", + "/v1/customers/:customer/bank_accounts/:id", + "/v1/customers/:customer/bank_accounts/:id/verify", + "/v1/customers/:customer/cards", + "/v1/customers/:customer/cards/:id", + "/v1/customers/:customer/cards/:id", + "/v1/customers/:customer/tax_ids", + "/v1/customers/:customer/sources", + "/v1/customers/:customer/sources/:id", + "/v1/customers/:customer/sources/:id", + "/v1/customers/:customer/sources/:id/verify", + "/v1/customers/:customer/balance_transactions", + "/v1/customers/:customer/balance_transactions/:transaction", + "/v1/customers/:customer/cash_balance", + "/v1/customer_sessions", + "/v1/disputes/:dispute/close", + "/v1/invoices", + "/v1/invoices/:invoice", + "/v1/invoices/:invoice", + "/v1/invoices/:invoice/pay", + "/v1/invoices/:invoice/send", + "/v1/invoices/:invoice/void", + "/v1/invoices/:invoice/finalize", + "/v1/invoices/:invoice/mark_uncollectible", + "/v1/invoices/:invoice/update_lines", + "/v1/invoices/:invoice/add_lines", + "/v1/invoices/:invoice/remove_lines", + "/v1/invoices/create_preview", + "/v1/invoices/:invoice/lines/:line_item_id", + "/v1/invoiceitems", + "/v1/invoiceitems/:invoiceitem", + "/v1/invoiceitems/:invoiceitem", + "/v1/invoice_rendering_templates/:template/archive", + "/v1/invoice_rendering_templates/:template/unarchive", + "/v1/payment_methods/:payment_method/attach", + "/v1/prices", + "/v1/prices/:price", + "/v1/products", + "/v1/products/:id", + "/v1/products/:id", + "/v1/products/:product/features", + "/v1/products/:product/features/:id", + "/v1/promotion_codes", + "/v1/promotion_codes/:promotion_code", + "/v1/radar/value_list_items", + "/v1/refunds", + "/v1/refunds/:refund/cancel", + "/v1/subscriptions/:subscription_exposed_id", + "/v1/subscriptions/:subscription_exposed_id", + "/v1/subscriptions/:subscription/migrate", + "/v1/subscriptions", + "/v1/subscriptions/:subscription/resume", + "/v1/subscriptions/:subscription/pause", + "/v1/subscription_items", + "/v1/subscription_items/:item", + "/v1/subscription_items/:item", + "/v1/subscription_schedules", + "/v1/subscription_schedules/:schedule", + "/v1/subscription_schedules/:schedule/cancel", + "/v1/subscription_schedules/:schedule/release", + "/v1/tax/registrations", + "/v1/tax/registrations/:id", + "/v1/tax/settings", + "/v1/tax/transactions/create_reversal", + "/v1/tax_ids", + "/v1/tax_ids/:id", + "/v1/customers/:customer/tax_ids", + "/v1/customers/:customer/tax_ids/:id", + "/v1/tax_rates", + "/v1/tax_rates/:tax_rate", ] """ The path of the endpoint to run this batch job against. diff --git a/stripe/params/v2/iam/_activity_log_list_params.py b/stripe/params/v2/iam/_activity_log_list_params.py index 5c0f39a72..6d05526f7 100644 --- a/stripe/params/v2/iam/_activity_log_list_params.py +++ b/stripe/params/v2/iam/_activity_log_list_params.py @@ -6,7 +6,12 @@ class ActivityLogListParams(TypedDict): action_groups: NotRequired[ - List[Union[Literal["api_key", "user_invite", "user_roles"], str]] + List[ + Union[ + Literal["api_key", "user_access", "user_invite", "user_roles"], + str, + ] + ] ] """ Filter results to only include activity logs for the specified action group types. @@ -19,6 +24,7 @@ class ActivityLogListParams(TypedDict): "api_key_deleted", "api_key_updated", "api_key_viewed", + "user_access_started", "user_invite_accepted", "user_invite_created", "user_invite_deleted", diff --git a/stripe/treasury/_financial_account.py b/stripe/treasury/_financial_account.py index 3b4959aa3..d0eeb343f 100644 --- a/stripe/treasury/_financial_account.py +++ b/stripe/treasury/_financial_account.py @@ -42,8 +42,8 @@ class FinancialAccount( UpdateableAPIResource["FinancialAccount"], ): """ - Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. - FinancialAccounts serve as the source and destination of Treasury's money movement APIs. + Stripe Treasury for Platforms provides users with a container for money called a FinancialAccount that is separate from their Payments balance. + FinancialAccounts serve as the source and destination of Treasury for Platform's money movement APIs. """ OBJECT_NAME: ClassVar[Literal["treasury.financial_account"]] = ( diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index ed06586b7..78d8e2d85 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -2207,6 +2207,73 @@ class StatusDetail(StripeObject): "status_details": StatusDetail, } + class BlikRecurringPayments(StripeObject): + class Protections(StripeObject): + class PspMigration(StripeObject): + expires_at: Optional[int] + """ + The time until which the protection will expire, as a Unix timestamp. + """ + requested_at: int + """ + The time at which the protection was requested, as a Unix timestamp. + """ + status: Literal[ + "active", "disrupted", "expired", "inactive" + ] + """ + The current status of the protection. + """ + _field_encodings = { + "expires_at": "int64_string", + "requested_at": "int64_string", + } + + psp_migration: PspMigration + """ + Protection details for PSP migration. + """ + _inner_class_types = {"psp_migration": PspMigration} + + class StatusDetail(StripeObject): + code: Literal[ + "determining_status", + "requirements_past_due", + "requirements_pending_verification", + "restricted_other", + "unsupported_business", + "unsupported_country", + "unsupported_entity_type", + ] + """ + Machine-readable code explaining the reason for the Capability to be in its current status. + """ + resolution: Literal[ + "contact_stripe", "no_resolution", "provide_info" + ] + """ + Machine-readable code explaining how to make the Capability active. + """ + + protections: Protections + """ + Protections applied to this capability, keyed by protection type (e.g. "psp_migration"). + """ + status: Literal[ + "active", "pending", "restricted", "unsupported" + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details about the capability's status. This value is empty when `status` is `active`. + """ + _inner_class_types = { + "protections": Protections, + "status_details": StatusDetail, + } + class BoletoPayments(StripeObject): class Protections(StripeObject): class PspMigration(StripeObject): @@ -4673,6 +4740,10 @@ class StatusDetail(StripeObject): """ Allow the merchant to process BLIK payments. """ + blik_recurring_payments: Optional[BlikRecurringPayments] + """ + Allow the merchant to process recurring BLIK payments. + """ boleto_payments: Optional[BoletoPayments] """ Allow the merchant to process Boleto payments. @@ -4828,6 +4899,7 @@ class StatusDetail(StripeObject): "bacs_debit_payments": BacsDebitPayments, "bancontact_payments": BancontactPayments, "blik_payments": BlikPayments, + "blik_recurring_payments": BlikRecurringPayments, "boleto_payments": BoletoPayments, "card_payments": CardPayments, "cartes_bancaires_payments": CartesBancairesPayments, diff --git a/stripe/v2/core/_event.py b/stripe/v2/core/_event.py index 34d74aa8c..e53f33f80 100644 --- a/stripe/v2/core/_event.py +++ b/stripe/v2/core/_event.py @@ -12,6 +12,7 @@ from stripe._stripe_object import StripeObject, UntypedStripeObject from stripe._util import get_api_mode from stripe._stripe_context import StripeContext +from stripe._webhook import WebhookPayload if TYPE_CHECKING: from stripe._stripe_client import StripeClient @@ -234,16 +235,22 @@ def __init__( @staticmethod def from_json( - payload: Union[str, Dict[str, Any]], client: "StripeClient" + payload: Union[WebhookPayload, Dict[str, Any]], client: "StripeClient" ) -> "EventNotification": """ Helper for constructing an Event Notification. Doesn't perform signature validation, so you should use StripeClient.parse_event_notification() instead for initial handling. This is useful in unit tests and working with EventNotifications whose authenticity you've already validated. """ - parsed_body = ( - json.loads(payload) if isinstance(payload, str) else payload - ) + if isinstance(payload, dict): + parsed_body = payload + else: + parsed_body = json.loads( + payload.decode("utf-8") + if isinstance(payload, (bytes, bytearray)) + else payload + ) + if parsed_body.get("object") == "event": raise ValueError( "You passed a webhook payload to StripeClient.parse_event_notification, which expects a thin event notification. Use StripeClient.construct_event instead." diff --git a/stripe/v2/iam/_activity_log.py b/stripe/v2/iam/_activity_log.py index f400b6d85..23866eb63 100644 --- a/stripe/v2/iam/_activity_log.py +++ b/stripe/v2/iam/_activity_log.py @@ -98,6 +98,169 @@ class Application(StripeObject): """ _inner_class_types = {"managed_by": ManagedBy} + class UserAccess(StripeObject): + class Authentication(StripeObject): + class PrimaryFactor(StripeObject): + sso_provider: Optional[str] + """ + SSO provider for the authentication factor. + """ + type: Union[ + Literal[ + "backup_code", + "email_code", + "oauth", + "passkey", + "password", + "phone_code", + "saml", + "sms", + "totp", + "web_authn", + ], + str, + ] + """ + Type of authentication factor. + """ + + class SecondaryFactor(StripeObject): + sso_provider: Optional[str] + """ + SSO provider for the authentication factor. + """ + type: Union[ + Literal[ + "backup_code", + "email_code", + "oauth", + "passkey", + "password", + "phone_code", + "saml", + "sms", + "totp", + "web_authn", + ], + str, + ] + """ + Type of authentication factor. + """ + + primary_factor: PrimaryFactor + """ + Primary authentication factor. + """ + secondary_factors: List[SecondaryFactor] + """ + Secondary authentication factors. + """ + _inner_class_types = { + "primary_factor": PrimaryFactor, + "secondary_factors": SecondaryFactor, + } + + class DashboardClient(StripeObject): + browser: str + """ + Browser used for the user access action. + """ + browser_version: str + """ + Browser version used for the user access action. + """ + device_type: str + """ + Device type used for the user access action. + """ + os: str + """ + Operating system used for the user access action. + """ + + class Network(StripeObject): + city: str + """ + City for the user access action. + """ + country: str + """ + Country for the user access action. + """ + ip_address: str + """ + IP address for the user access action. + """ + region: str + """ + Region for the user access action. + """ + + class Risk(StripeObject): + class Signal(StripeObject): + class NovelDevice(StripeObject): + pass + + novel_device: Optional[NovelDevice] + """ + The user access action used a novel device. + """ + type: Literal["novel_device"] + """ + Type of risk signal. + """ + _inner_class_types = {"novel_device": NovelDevice} + + level: Union[Literal["high", "low", "medium"], str] + """ + Risk level for the user access action. + """ + signals: List[Signal] + """ + Risk signals for the user access action. + """ + _inner_class_types = {"signals": Signal} + + authentication: Authentication + """ + Authentication details for the user access action. + """ + dashboard_client: Optional[DashboardClient] + """ + Dashboard client details for the user access action. + """ + expires_at: str + """ + Timestamp when the user access expires. + """ + network: Network + """ + Network details for the user access action. + """ + risk: Risk + """ + Risk details for the user access action. + """ + roles: List[str] + """ + Roles associated with the user access action. + """ + session_fingerprint: str + """ + Session fingerprint for the user access action. + """ + surface: Union[Literal["dashboard", "express"], str] + """ + Surface where the user access action started. + """ + _inner_class_types = { + "authentication": Authentication, + "dashboard_client": DashboardClient, + "network": Network, + "risk": Risk, + } + class UserInvite(StripeObject): invited_user_email: str """ @@ -130,10 +293,16 @@ class UserRoles(StripeObject): """ Details of an API key action. """ - type: Union[Literal["api_key", "user_invite", "user_roles"], str] + type: Union[ + Literal["api_key", "user_access", "user_invite", "user_roles"], str + ] """ The action group type of the activity log entry. """ + user_access: Optional[UserAccess] + """ + Details of a user access action. + """ user_invite: Optional[UserInvite] """ Details of a user invite action. @@ -144,6 +313,7 @@ class UserRoles(StripeObject): """ _inner_class_types = { "api_key": ApiKey, + "user_access": UserAccess, "user_invite": UserInvite, "user_roles": UserRoles, } @@ -182,6 +352,7 @@ class UserRoles(StripeObject): "api_key_deleted", "api_key_updated", "api_key_viewed", + "user_access_started", "user_invite_accepted", "user_invite_created", "user_invite_deleted", diff --git a/tests/test_cloud_provider.py b/tests/test_cloud_provider.py index 858cdd006..3ef98c910 100644 --- a/tests/test_cloud_provider.py +++ b/tests/test_cloud_provider.py @@ -6,6 +6,11 @@ from stripe._webhook import Webhook from stripe.v2.core._event import EventNotification +BINARY_ENCODERS = [ + lambda p: p.encode("utf-8"), + lambda p: bytearray(p, "utf-8"), +] + @pytest.fixture def client(): @@ -178,6 +183,21 @@ def test_azure_envelope_missing_data_field(self, client): with pytest.raises(ValueError, match="Unrecognized event format"): client.construct_event_without_verification(payload) + @pytest.mark.parametrize( + "payload_fixture", ["eventbridge_payload", "eventgrid_payload"] + ) + @pytest.mark.parametrize( + "encode", BINARY_ENCODERS, ids=["bytes", "bytearray"] + ) + def test_binary_envelope(self, request, client, payload_fixture, encode): + """An envelope can arrive as bytes or a bytearray, which is how many frameworks expose it""" + payload = request.getfixturevalue(payload_fixture) + + result = client.construct_event_without_verification(encode(payload)) + + assert isinstance(result, stripe.Event) + assert result.type == "customer.created" + def test_webhook_static_method_eventbridge(self, eventbridge_payload): result = Webhook.construct_event_without_verification( eventbridge_payload @@ -202,6 +222,27 @@ def test_eventgrid(self, client, eventgrid_notification_payload): assert result.id == "evt_test_790" assert result.type == "v2.core.event_destination.ping" + @pytest.mark.parametrize( + "payload_fixture", + [ + "eventbridge_notification_payload", + "eventgrid_notification_payload", + ], + ) + @pytest.mark.parametrize( + "encode", BINARY_ENCODERS, ids=["bytes", "bytearray"] + ) + def test_binary_envelope(self, request, client, payload_fixture, encode): + """An envelope can arrive as bytes or a bytearray, which is how many frameworks expose it""" + payload = request.getfixturevalue(payload_fixture) + + result = client.parse_event_notification_without_verification( + encode(payload) + ) + + assert isinstance(result, EventNotification) + assert result.type == "v2.core.event_destination.ping" + def test_v1_event_suggests_construct_event_without_verification( self, client, eventbridge_payload ): diff --git a/tests/test_event_notification_handler.py b/tests/test_event_notification_handler.py index 9ad872843..c47460589 100644 --- a/tests/test_event_notification_handler.py +++ b/tests/test_event_notification_handler.py @@ -1,10 +1,13 @@ +import anyio import json import pytest from typing import Optional -from unittest.mock import Mock +from unittest.mock import AsyncMock, Mock from stripe import SignatureVerificationError, StripeClient from stripe._event_notification_handler import ( + AsyncStripeEventNotificationHandler, + AsyncStripeEventNotificationHandlerWithoutVerification, StripeEventNotificationHandler, StripeEventNotificationHandlerWithoutVerification, UnhandledNotificationDetails, @@ -204,7 +207,7 @@ def test_cannot_register_handler_after_handling( with pytest.raises( RuntimeError, - match="Cannot register new event handlers after .handle\\(\\) has been called", + match="Cannot register new callbacks after an event has been handled", ): event_handler.on_v2_core_account_created(Mock()) @@ -219,7 +222,7 @@ def test_failed_parse_still_prevents_registration( with pytest.raises( RuntimeError, - match="Cannot register new event handlers after .handle\\(\\) has been called", + match="Cannot register new callbacks after an event has been handled", ): event_handler.on_v2_core_account_created(Mock()) @@ -234,7 +237,7 @@ def test_cannot_register_duplicate_handler( with pytest.raises( ValueError, - match='Handler for event type "v1.billing.meter.error_report_triggered" already registered', + match='Callback for event type "v1.billing.meter.error_report_triggered" is already registered', ): event_handler.on_v1_billing_meter_error_report_triggered(handler2) @@ -524,6 +527,40 @@ def test_validates_webhook_signature( with pytest.raises(SignatureVerificationError): event_handler.handle(v1_billing_meter_payload, "invalid_signature") + @pytest.mark.parametrize( + "encode", + [lambda p: p.encode("utf-8"), lambda p: bytearray(p, "utf-8")], + ids=["bytes", "bytearray"], + ) + def test_handles_binary_webhook_body( + self, + event_handler: StripeEventNotificationHandler, + v1_billing_meter_payload: str, + encode, + ) -> None: + """The body can arrive as bytes or a bytearray, which is how many frameworks expose it""" + callback = Mock() + event_handler.on_v1_billing_meter_error_report_triggered(callback) + + sig_header = generate_header(payload=v1_billing_meter_payload) + event_handler.handle(encode(v1_billing_meter_payload), sig_header) + + callback.assert_called_once() + + @pytest.mark.parametrize("sig_header", [None, ""]) + def test_rejects_missing_sig_header( + self, + event_handler: StripeEventNotificationHandler, + v1_billing_meter_payload: str, + sig_header: Optional[str], + ) -> None: + """A missing header (a common integration mistake) gets its own error message""" + with pytest.raises( + SignatureVerificationError, + match="No Stripe-Signature header value was provided", + ): + event_handler.handle(v1_billing_meter_payload, sig_header) + def test_registered_event_types_empty( self, event_handler: StripeEventNotificationHandler ) -> None: @@ -570,32 +607,196 @@ def rand_int(notif, client): assert rand_int(None, None) == 4 # type: ignore - def test_rejects_empty_webhook_secret( - self, stripe_client: StripeClient, fallback_callback: Mock + @pytest.mark.parametrize("webhook_secret", [None, ""]) + def test_rejects_missing_webhook_secret( + self, + stripe_client: StripeClient, + fallback_callback: Mock, + webhook_secret: Optional[str], ) -> None: - """Test that the constructor rejects an empty webhook secret""" + """`webhook_secret` is typed as optional for web framework ergonomics, but a missing one is still an error""" with pytest.raises( ValueError, match="webhook_secret must be a non-empty string" ): StripeEventNotificationHandler( client=stripe_client, - webhook_secret="", + webhook_secret=webhook_secret, fallback_callback=fallback_callback, ) - def test_rejects_none_webhook_secret( - self, stripe_client: StripeClient, fallback_callback: Mock + @pytest.mark.parametrize("webhook_secret", [None, ""]) + def test_client_factory_rejects_missing_webhook_secret( + self, + stripe_client: StripeClient, + fallback_callback: Mock, + webhook_secret: Optional[str], ) -> None: - """Test that the constructor rejects a None webhook secret""" with pytest.raises( ValueError, match="webhook_secret must be a non-empty string" ): - StripeEventNotificationHandler( - client=stripe_client, - webhook_secret=None, # type: ignore - fallback_callback=fallback_callback, + stripe_client.notification_handler( + webhook_secret, fallback_callback ) + def test_no_pre_handle_hook_registered_handler_still_runs( + self, + event_handler: StripeEventNotificationHandler, + v1_billing_meter_payload: str, + fallback_callback: Mock, + ) -> None: + """Regression: with no pre_handle hook registered, behavior is unchanged""" + handler = Mock() + event_handler.on_v1_billing_meter_error_report_triggered(handler) + + sig_header = generate_header(payload=v1_billing_meter_payload) + event_handler.handle(v1_billing_meter_payload, sig_header) + + handler.assert_called_once() + fallback_callback.assert_not_called() + + def test_pre_handle_returning_true_runs_before_handler( + self, + event_handler: StripeEventNotificationHandler, + v1_billing_meter_payload: str, + ) -> None: + """A pre_handle hook that returns True runs first, then the handler runs""" + call_order: list[str] = [] + + @event_handler.pre_handle + def pre_handle(event, client) -> bool: + call_order.append("pre_handle") + return True + + @event_handler.on_v1_billing_meter_error_report_triggered + def handler(event, client) -> None: + call_order.append("handler") + + sig_header = generate_header(payload=v1_billing_meter_payload) + event_handler.handle(v1_billing_meter_payload, sig_header) + + assert call_order == ["pre_handle", "handler"] + + def test_pre_handle_returning_false_skips_registered_handler( + self, + event_handler: StripeEventNotificationHandler, + v1_billing_meter_payload: str, + fallback_callback: Mock, + ) -> None: + """A pre_handle hook that returns False prevents the registered handler from running""" + handler = Mock() + event_handler.on_v1_billing_meter_error_report_triggered(handler) + event_handler.pre_handle(lambda event, client: False) + + sig_header = generate_header(payload=v1_billing_meter_payload) + event_handler.handle(v1_billing_meter_payload, sig_header) + + handler.assert_not_called() + fallback_callback.assert_not_called() + + def test_pre_handle_returning_false_skips_fallback_for_unregistered_event( + self, + event_handler: StripeEventNotificationHandler, + v1_billing_meter_payload: str, + fallback_callback: Mock, + ) -> None: + """A pre_handle hook that returns False also prevents the fallback callback + from running for an unregistered (or unknown) event type""" + event_handler.pre_handle(lambda event, client: False) + + sig_header = generate_header(payload=v1_billing_meter_payload) + event_handler.handle(v1_billing_meter_payload, sig_header) + + fallback_callback.assert_not_called() + + def test_pre_handle_receives_context_scoped_client( + self, + event_handler: StripeEventNotificationHandler, + v1_billing_meter_payload: str, + stripe_client: StripeClient, + ) -> None: + """The client passed to pre_handle has the event's context, and the + handler's own client is left unmutated""" + received_context: Optional[StripeContext | str] = None + + @event_handler.pre_handle + def pre_handle(event, client) -> bool: + nonlocal received_context + received_context = client._requestor._options.stripe_context + return True + + assert ( + str(stripe_client._requestor._options.stripe_context) + == "original_context_123" + ) + + sig_header = generate_header(payload=v1_billing_meter_payload) + event_handler.handle(v1_billing_meter_payload, sig_header) + + assert str(received_context) == "event_context_456" + assert ( + str(stripe_client._requestor._options.stripe_context) + == "original_context_123" + ) + + def test_pre_handle_raising_propagates_and_prevents_callbacks( + self, + event_handler: StripeEventNotificationHandler, + v1_billing_meter_payload: str, + fallback_callback: Mock, + ) -> None: + """An exception raised from pre_handle propagates out of handle() and + no callback runs""" + handler = Mock() + event_handler.on_v1_billing_meter_error_report_triggered(handler) + + def pre_handle(event, client) -> bool: + raise RuntimeError("pre_handle blew up!") + + event_handler.pre_handle(pre_handle) + + sig_header = generate_header(payload=v1_billing_meter_payload) + with pytest.raises(RuntimeError, match="pre_handle blew up!"): + event_handler.handle(v1_billing_meter_payload, sig_header) + + handler.assert_not_called() + fallback_callback.assert_not_called() + + def test_cannot_register_pre_handle_after_handling( + self, + event_handler: StripeEventNotificationHandler, + v1_billing_meter_payload: str, + ) -> None: + """Registering pre_handle after .handle() has been called raises RuntimeError""" + sig_header = generate_header(payload=v1_billing_meter_payload) + event_handler.handle(v1_billing_meter_payload, sig_header) + + with pytest.raises( + RuntimeError, + match="Cannot register new callbacks after an event has been handled", + ): + event_handler.pre_handle(lambda event, client: True) + + def test_cannot_register_duplicate_pre_handle( + self, event_handler: StripeEventNotificationHandler + ) -> None: + """Registering a second pre_handle hook raises ValueError""" + event_handler.pre_handle(lambda event, client: True) + + with pytest.raises( + ValueError, match="A pre_handle callback is already registered" + ): + event_handler.pre_handle(lambda event, client: True) + + def test_pre_handle_works_as_a_decorator( + self, event_handler: StripeEventNotificationHandler + ): + @event_handler.pre_handle # type: ignore + def rand_int(notif, client): + """cool docstring""" + return 4 + + assert rand_int(None, None) == 4 # type: ignore + class TestEventNotificationHandlerWithoutVerification: @pytest.fixture(scope="function") @@ -690,6 +891,26 @@ def test_handle_takes_single_argument( handler.assert_called_once() + @pytest.mark.parametrize( + "encode", + [lambda p: p.encode("utf-8"), lambda p: bytearray(p, "utf-8")], + ids=["bytes", "bytearray"], + ) + def test_handles_binary_webhook_body( + self, + handler_without_verification, + v1_billing_meter_payload: str, + encode, + ) -> None: + handler = Mock() + handler_without_verification.on_v1_billing_meter_error_report_triggered( + handler + ) + + handler_without_verification.handle(encode(v1_billing_meter_payload)) + + handler.assert_called_once() + def test_fallback_receives_unregistered_events( self, handler_without_verification, @@ -758,7 +979,7 @@ def test_failed_parse_still_prevents_registration( with pytest.raises( RuntimeError, - match="Cannot register new event handlers after .handle\\(\\) has been called", + match="Cannot register new callbacks after an event has been handled", ): handler_without_verification.on_v2_core_account_created(Mock()) @@ -825,3 +1046,481 @@ def test_handles_cloud_provider_envelope( assert isinstance( call_args[0], V1BillingMeterErrorReportTriggeredEventNotification ) + + def test_pre_handle_gates_registered_handler( + self, + handler_without_verification: StripeEventNotificationHandlerWithoutVerification, + v1_billing_meter_payload: str, + fallback_callback: Mock, + ) -> None: + """A pre_handle hook returning False also gates the without-verification + handler, preventing the registered handler from running""" + handler = Mock() + handler_without_verification.on_v1_billing_meter_error_report_triggered( + handler + ) + handler_without_verification.pre_handle(lambda event, client: False) + + handler_without_verification.handle(v1_billing_meter_payload) + + handler.assert_not_called() + fallback_callback.assert_not_called() + + def test_pre_handle_gates_fallback( + self, + handler_without_verification: StripeEventNotificationHandlerWithoutVerification, + v1_billing_meter_payload: str, + fallback_callback: Mock, + ) -> None: + """A pre_handle hook returning False also prevents the fallback + callback from running on the without-verification handler""" + handler_without_verification.pre_handle(lambda event, client: False) + + handler_without_verification.handle(v1_billing_meter_payload) + + fallback_callback.assert_not_called() + + +class TestAsyncEventNotificationHandler: + @pytest.fixture(scope="function") + def stripe_client(self, http_client_mock: HTTPClientMock) -> StripeClient: + return StripeClient( + api_key="sk_test_1234", + stripe_context=StripeContext.parse("original_context_123"), + http_client=http_client_mock.get_mock_http_client(), + ) + + @pytest.fixture(scope="function") + def fallback_callback(self) -> AsyncMock: + return AsyncMock() + + @pytest.fixture(scope="function") + def event_handler( + self, stripe_client: StripeClient, fallback_callback: AsyncMock + ) -> AsyncStripeEventNotificationHandler: + return AsyncStripeEventNotificationHandler( + client=stripe_client, + webhook_secret=DUMMY_WEBHOOK_SECRET, + fallback_callback=fallback_callback, + ) + + @pytest.fixture(scope="function") + def v1_billing_meter_payload(self) -> str: + return json.dumps( + { + "id": "evt_123", + "object": "v2.core.event", + "type": "v1.billing.meter.error_report_triggered", + "livemode": False, + "created": "2022-02-15T00:27:45.330Z", + "context": "event_context_456", + "related_object": { + "id": "mtr_123", + "type": "billing.meter", + "url": "/v1/billing/meters/mtr_123", + }, + } + ) + + @pytest.fixture(scope="function") + def unknown_event_payload(self) -> str: + return json.dumps( + { + "id": "evt_unknown", + "object": "v2.core.event", + "type": "llama.created", + "livemode": False, + "created": "2022-02-15T00:27:45.330Z", + "context": "event_context_unknown", + "related_object": { + "id": "llama_123", + "type": "llama", + "url": "/v1/llamas/llama_123", + }, + } + ) + + @pytest.mark.anyio + async def test_routes_event_to_registered_async_callback( + self, + event_handler: AsyncStripeEventNotificationHandler, + v1_billing_meter_payload: str, + fallback_callback: AsyncMock, + ) -> None: + """An `async def` callback is actually awaited, not discarded""" + received: Optional[EventNotification] = None + + async def callback( + notif: V1BillingMeterErrorReportTriggeredEventNotification, + client: StripeClient, + ) -> None: + nonlocal received + received = notif + + event_handler.on_v1_billing_meter_error_report_triggered(callback) + + sig_header = generate_header(payload=v1_billing_meter_payload) + await event_handler.handle_async(v1_billing_meter_payload, sig_header) + + assert isinstance( + received, V1BillingMeterErrorReportTriggeredEventNotification + ) + assert received.id == "evt_123" + fallback_callback.assert_not_called() + + @pytest.mark.anyio + async def test_handle_async_awaits_callback_across_a_yield( + self, + event_handler: AsyncStripeEventNotificationHandler, + v1_billing_meter_payload: str, + ) -> None: + """A callback that yields to the event loop still completes before handle_async returns""" + finished = False + + async def callback(notif, client) -> None: + nonlocal finished + await anyio.sleep(0) + finished = True + + event_handler.on_v1_billing_meter_error_report_triggered(callback) + + sig_header = generate_header(payload=v1_billing_meter_payload) + await event_handler.handle_async(v1_billing_meter_payload, sig_header) + + assert finished + + @pytest.mark.anyio + async def test_async_pre_handle_runs_before_callback( + self, + event_handler: AsyncStripeEventNotificationHandler, + v1_billing_meter_payload: str, + ) -> None: + order = [] + + async def hook(notif, client) -> bool: + await anyio.sleep(0) + order.append("pre_handle") + return True + + async def callback(notif, client) -> None: + order.append("callback") + + event_handler.pre_handle(hook) + event_handler.on_v1_billing_meter_error_report_triggered(callback) + + sig_header = generate_header(payload=v1_billing_meter_payload) + await event_handler.handle_async(v1_billing_meter_payload, sig_header) + + assert order == ["pre_handle", "callback"] + + @pytest.mark.anyio + async def test_async_pre_handle_returning_false_stops_callback( + self, + event_handler: AsyncStripeEventNotificationHandler, + v1_billing_meter_payload: str, + ) -> None: + callback = AsyncMock() + + async def hook(notif, client) -> bool: + await anyio.sleep(0) + return False + + event_handler.pre_handle(hook) + event_handler.on_v1_billing_meter_error_report_triggered(callback) + + sig_header = generate_header(payload=v1_billing_meter_payload) + await event_handler.handle_async(v1_billing_meter_payload, sig_header) + + callback.assert_not_called() + + @pytest.mark.anyio + async def test_async_pre_handle_returning_false_stops_fallback( + self, + event_handler: AsyncStripeEventNotificationHandler, + unknown_event_payload: str, + fallback_callback: AsyncMock, + ) -> None: + """Returning False gates the fallback too, not just registered callbacks""" + + async def hook(notif, client) -> bool: + return False + + event_handler.pre_handle(hook) + + sig_header = generate_header(payload=unknown_event_payload) + await event_handler.handle_async(unknown_event_payload, sig_header) + + fallback_callback.assert_not_called() + + @pytest.mark.anyio + async def test_fallback_is_awaited_for_unknown_event( + self, + event_handler: AsyncStripeEventNotificationHandler, + unknown_event_payload: str, + fallback_callback: AsyncMock, + ) -> None: + sig_header = generate_header(payload=unknown_event_payload) + await event_handler.handle_async(unknown_event_payload, sig_header) + + fallback_callback.assert_awaited_once() + notif, _client, details = fallback_callback.call_args[0] + assert isinstance(notif, UnknownEventNotification) + assert isinstance(details, UnhandledNotificationDetails) + assert details.is_known_event_type is False + + @pytest.mark.anyio + async def test_callback_receives_event_scoped_client( + self, + event_handler: AsyncStripeEventNotificationHandler, + stripe_client: StripeClient, + v1_billing_meter_payload: str, + ) -> None: + received_context = None + + async def callback(notif, client: StripeClient) -> None: + nonlocal received_context + received_context = client._requestor._options.stripe_context + + event_handler.on_v1_billing_meter_error_report_triggered(callback) + + sig_header = generate_header(payload=v1_billing_meter_payload) + await event_handler.handle_async(v1_billing_meter_payload, sig_header) + + assert str(received_context) == "event_context_456" + # the handler's own client is untouched + assert ( + str(stripe_client._requestor._options.stripe_context) + == "original_context_123" + ) + + @pytest.mark.anyio + async def test_raising_callback_propagates( + self, + event_handler: AsyncStripeEventNotificationHandler, + v1_billing_meter_payload: str, + ) -> None: + async def callback(notif, client) -> None: + raise RuntimeError("boom") + + event_handler.on_v1_billing_meter_error_report_triggered(callback) + + sig_header = generate_header(payload=v1_billing_meter_payload) + with pytest.raises(RuntimeError, match="boom"): + await event_handler.handle_async( + v1_billing_meter_payload, sig_header + ) + + @pytest.mark.anyio + async def test_cannot_register_after_handling( + self, + event_handler: AsyncStripeEventNotificationHandler, + v1_billing_meter_payload: str, + ) -> None: + sig_header = generate_header(payload=v1_billing_meter_payload) + await event_handler.handle_async(v1_billing_meter_payload, sig_header) + + with pytest.raises( + RuntimeError, + match="Cannot register new callbacks after an event has been handled", + ): + event_handler.on_v2_core_account_created(AsyncMock()) + + def test_cannot_register_duplicate_callback( + self, event_handler: AsyncStripeEventNotificationHandler + ) -> None: + event_handler.on_v1_billing_meter_error_report_triggered(AsyncMock()) + + with pytest.raises( + ValueError, + match='Callback for event type "v1.billing.meter.error_report_triggered" is already registered', + ): + event_handler.on_v1_billing_meter_error_report_triggered( + AsyncMock() + ) + + @pytest.mark.parametrize("webhook_secret", [None, ""]) + def test_rejects_missing_webhook_secret( + self, + stripe_client: StripeClient, + fallback_callback: AsyncMock, + webhook_secret: Optional[str], + ) -> None: + with pytest.raises( + ValueError, match="webhook_secret must be a non-empty string" + ): + AsyncStripeEventNotificationHandler( + client=stripe_client, + webhook_secret=webhook_secret, + fallback_callback=fallback_callback, + ) + + @pytest.mark.parametrize("webhook_secret", [None, ""]) + def test_client_factory_rejects_missing_webhook_secret( + self, + stripe_client: StripeClient, + fallback_callback: AsyncMock, + webhook_secret: Optional[str], + ) -> None: + with pytest.raises( + ValueError, match="webhook_secret must be a non-empty string" + ): + stripe_client.async_notification_handler( + webhook_secret, fallback_callback + ) + + @pytest.mark.anyio + async def test_validates_webhook_signature( + self, + event_handler: AsyncStripeEventNotificationHandler, + v1_billing_meter_payload: str, + ) -> None: + with pytest.raises(SignatureVerificationError): + await event_handler.handle_async( + v1_billing_meter_payload, "t=1,v1=not-a-sig" + ) + + @pytest.mark.anyio + @pytest.mark.parametrize( + "encode", + [lambda p: p.encode("utf-8"), lambda p: bytearray(p, "utf-8")], + ids=["bytes", "bytearray"], + ) + async def test_handles_binary_webhook_body( + self, + event_handler: AsyncStripeEventNotificationHandler, + v1_billing_meter_payload: str, + encode, + ) -> None: + callback = AsyncMock() + event_handler.on_v1_billing_meter_error_report_triggered(callback) + + sig_header = generate_header(payload=v1_billing_meter_payload) + await event_handler.handle_async( + encode(v1_billing_meter_payload), sig_header + ) + + callback.assert_called_once() + + @pytest.mark.anyio + @pytest.mark.parametrize("sig_header", [None, ""]) + async def test_rejects_missing_sig_header( + self, + event_handler: AsyncStripeEventNotificationHandler, + v1_billing_meter_payload: str, + sig_header: Optional[str], + ) -> None: + with pytest.raises( + SignatureVerificationError, + match="No Stripe-Signature header value was provided", + ): + await event_handler.handle_async( + v1_billing_meter_payload, sig_header + ) + + +class TestAsyncEventNotificationHandlerWithoutVerification: + @pytest.fixture(scope="function") + def stripe_client(self, http_client_mock: HTTPClientMock) -> StripeClient: + return StripeClient( + api_key="sk_test_1234", + stripe_context=StripeContext.parse("original_context_123"), + http_client=http_client_mock.get_mock_http_client(), + ) + + @pytest.fixture(scope="function") + def fallback_callback(self) -> AsyncMock: + return AsyncMock() + + @pytest.fixture(scope="function") + def handler( + self, stripe_client: StripeClient, fallback_callback: AsyncMock + ) -> AsyncStripeEventNotificationHandlerWithoutVerification: + return AsyncStripeEventNotificationHandler.without_verification( + client=stripe_client, + fallback_callback=fallback_callback, + ) + + @pytest.fixture(scope="function") + def v1_billing_meter_payload(self) -> str: + return json.dumps( + { + "id": "evt_123", + "object": "v2.core.event", + "type": "v1.billing.meter.error_report_triggered", + "livemode": False, + "created": "2022-02-15T00:27:45.330Z", + "context": "event_context_456", + "related_object": { + "id": "mtr_123", + "type": "billing.meter", + "url": "/v1/billing/meters/mtr_123", + }, + } + ) + + def test_is_not_a_subclass_of_the_verifying_handler(self) -> None: + """The two are siblings, so neither exposes the other's handle signature""" + assert not issubclass( + AsyncStripeEventNotificationHandlerWithoutVerification, + AsyncStripeEventNotificationHandler, + ) + + @pytest.mark.anyio + async def test_handles_without_a_signature( + self, + handler: AsyncStripeEventNotificationHandlerWithoutVerification, + v1_billing_meter_payload: str, + ) -> None: + received = None + + async def callback(notif, client) -> None: + nonlocal received + await anyio.sleep(0) + received = notif + + handler.on_v1_billing_meter_error_report_triggered(callback) + + await handler.handle_async(v1_billing_meter_payload) + + assert isinstance( + received, V1BillingMeterErrorReportTriggeredEventNotification + ) + + @pytest.mark.anyio + @pytest.mark.parametrize( + "encode", + [lambda p: p.encode("utf-8"), lambda p: bytearray(p, "utf-8")], + ids=["bytes", "bytearray"], + ) + async def test_handles_binary_webhook_body( + self, + handler: AsyncStripeEventNotificationHandlerWithoutVerification, + v1_billing_meter_payload: str, + encode, + ) -> None: + callback = AsyncMock() + handler.on_v1_billing_meter_error_report_triggered(callback) + + await handler.handle_async(encode(v1_billing_meter_payload)) + + callback.assert_called_once() + + @pytest.mark.anyio + async def test_pre_handle_gates_handling( + self, + handler: AsyncStripeEventNotificationHandlerWithoutVerification, + v1_billing_meter_payload: str, + fallback_callback: AsyncMock, + ) -> None: + callback = AsyncMock() + + async def hook(notif, client) -> bool: + return False + + handler.pre_handle(hook) + handler.on_v1_billing_meter_error_report_triggered(callback) + + await handler.handle_async(v1_billing_meter_payload) + + callback.assert_not_called() + fallback_callback.assert_not_called() diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 79ca5ba4a..25a81d0e1 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -26921,24 +26921,24 @@ def test_setup_intents_post_service_non_namespaced( http_client=http_client_mock.get_mock_http_client(), ) - client.setup_intents.create({"payment_method_types": ["card"]}) + client.setup_intents.create({"allowed_payment_method_types": ["card"]}) http_client_mock.assert_requested( "post", path="/v1/setup_intents", query_string="", api_base="https://api.stripe.com", - post_data="payment_method_types[0]=card", + post_data="allowed_payment_method_types[0]=card", ) def test_setup_intents_post( self, http_client_mock: HTTPClientMock ) -> None: - stripe.SetupIntent.create(payment_method_types=["card"]) + stripe.SetupIntent.create(allowed_payment_method_types=["card"]) http_client_mock.assert_requested( "post", path="/v1/setup_intents", query_string="", - post_data="payment_method_types[0]=card", + post_data="allowed_payment_method_types[0]=card", ) def test_setup_intents_post_service( @@ -26953,25 +26953,31 @@ def test_setup_intents_post_service( http_client=http_client_mock.get_mock_http_client(), ) - client.v1.setup_intents.create({"payment_method_types": ["card"]}) + client.v1.setup_intents.create( + { + "allowed_payment_method_types": ["card"], + } + ) http_client_mock.assert_requested( "post", path="/v1/setup_intents", query_string="", api_base="https://api.stripe.com", - post_data="payment_method_types[0]=card", + post_data="allowed_payment_method_types[0]=card", ) @pytest.mark.anyio async def test_setup_intents_post_async( self, http_client_mock: HTTPClientMock ) -> None: - await stripe.SetupIntent.create_async(payment_method_types=["card"]) + await stripe.SetupIntent.create_async( + allowed_payment_method_types=["card"], + ) http_client_mock.assert_requested( "post", path="/v1/setup_intents", query_string="", - post_data="payment_method_types[0]=card", + post_data="allowed_payment_method_types[0]=card", ) @pytest.mark.anyio @@ -26989,7 +26995,7 @@ async def test_setup_intents_post_service_async( await client.v1.setup_intents.create_async( { - "payment_method_types": ["card"], + "allowed_payment_method_types": ["card"], } ) http_client_mock.assert_requested( @@ -26997,7 +27003,7 @@ async def test_setup_intents_post_service_async( path="/v1/setup_intents", query_string="", api_base="https://api.stripe.com", - post_data="payment_method_types[0]=card", + post_data="allowed_payment_method_types[0]=card", ) def test_setup_intents_post_2_service_non_namespaced( diff --git a/tests/test_v2_event.py b/tests/test_v2_event.py index 8ac40e40f..f2d545706 100644 --- a/tests/test_v2_event.py +++ b/tests/test_v2_event.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # File copied from our code generator; changes here will be overwritten. import json -from typing import Callable +from typing import Any, Callable, Dict, Optional, Union from typing_extensions import assert_type import pytest @@ -16,13 +16,18 @@ V1BillingMeterErrorReportTriggeredEventNotification, V1BillingMeterErrorReportTriggeredEvent, ) -from stripe.v2.core._event import UnknownEventNotification +from stripe.v2.core._event import EventNotification, UnknownEventNotification from stripe.events._event_classes import ALL_EVENT_NOTIFICATIONS -from stripe._webhook import WebhookSignature +from stripe._webhook import WebhookPayload, WebhookSignature from tests.test_webhook import DUMMY_WEBHOOK_SECRET EventParser = Callable[[str], ALL_EVENT_NOTIFICATIONS] +BINARY_ENCODERS = [ + lambda p: p.encode("utf-8"), + lambda p: bytearray(p, "utf-8"), +] + class TestV2Event(object): @pytest.fixture(scope="function") @@ -127,6 +132,52 @@ def test_parses_event_notif_with_data( assert not hasattr(notif, "data") assert notif.reason is None + @pytest.mark.parametrize( + "encode", BINARY_ENCODERS, ids=["bytes", "bytearray"] + ) + def test_parses_binary_event_notif( + self, + stripe_client: StripeClient, + v2_payload_no_data: str, + encode: Callable[[str], WebhookPayload], + ): + """The body can arrive as bytes or a bytearray, which is how many frameworks expose it""" + notif = stripe_client.parse_event_notification( + encode(v2_payload_no_data), + WebhookSignature.generate_signature_header( + v2_payload_no_data, DUMMY_WEBHOOK_SECRET + ), + DUMMY_WEBHOOK_SECRET, + ) + + assert isinstance( + notif, V1BillingMeterErrorReportTriggeredEventNotification + ) + assert notif.id == "evt_234" + + @pytest.mark.parametrize( + "to_payload", + [lambda p: p, *BINARY_ENCODERS, json.loads], + ids=["str", "bytes", "bytearray", "dict"], + ) + def test_from_json_accepts_every_payload_shape( + self, + stripe_client: StripeClient, + v2_payload_no_data: str, + to_payload: Callable[[str], Union[WebhookPayload, Dict[str, Any]]], + ): + """`from_json` is public (for pre-verified payloads & tests), so it takes the same shapes the parse methods do""" + notif = EventNotification.from_json( + to_payload(v2_payload_no_data), stripe_client + ) + + assert isinstance( + notif, V1BillingMeterErrorReportTriggeredEventNotification + ) + assert notif.id == "evt_234" + assert notif.related_object + assert notif.related_object.id == "mtr_123" + def test_parses_unknown_event_notif(self, parse_event_notif: EventParser): event = parse_event_notif( json.dumps( @@ -171,6 +222,26 @@ def test_validates_signature( v2_payload_no_data, "bad header", DUMMY_WEBHOOK_SECRET ) + @pytest.mark.parametrize("secret", [None, ""]) + def test_rejects_missing_secret( + self, + stripe_client: StripeClient, + v2_payload_no_data: str, + secret: Optional[str], + ): + """`secret` is typed as optional for web framework ergonomics, but a missing one is still an error""" + with pytest.raises( + SignatureVerificationError, + match="No webhook secret value was provided", + ): + stripe_client.parse_event_notification( + v2_payload_no_data, + WebhookSignature.generate_signature_header( + v2_payload_no_data, DUMMY_WEBHOOK_SECRET + ), + secret, + ) + def test_v2_events_data_type(self, http_client_mock, v2_payload_with_data): method = "get" path = "/v2/core/events/evt_123" diff --git a/tests/test_webhook.py b/tests/test_webhook.py index fade53a01..9b1420a8d 100644 --- a/tests/test_webhook.py +++ b/tests/test_webhook.py @@ -99,6 +99,16 @@ def test_construct_event_from_bytes(self): ) assert isinstance(event, stripe.Event) + @pytest.mark.parametrize("secret", [None, ""]) + def test_raise_on_missing_secret(self, secret): + with pytest.raises( + SignatureVerificationError, + match="No webhook secret value was provided", + ): + stripe.Webhook.construct_event( + DUMMY_WEBHOOK_PAYLOAD, generate_header(), secret + ) + def test_raise_on_v2_payload(self): header = generate_header(payload=DUMMY_V2_WEBHOOK_PAYLOAD) with pytest.raises(ValueError) as e: @@ -109,6 +119,37 @@ def test_raise_on_v2_payload(self): class TestWebhookSignature(object): + @pytest.mark.parametrize("header", [None, ""]) + def test_raise_on_missing_header(self, header): + with pytest.raises( + SignatureVerificationError, + match="No Stripe-Signature header value was provided", + ): + stripe.WebhookSignature.verify_header( + DUMMY_WEBHOOK_PAYLOAD, header, DUMMY_WEBHOOK_SECRET + ) + + @pytest.mark.parametrize("secret", [None, ""]) + def test_raise_on_missing_secret(self, secret): + with pytest.raises( + SignatureVerificationError, + match="No webhook secret value was provided", + ): + stripe.WebhookSignature.verify_header( + DUMMY_WEBHOOK_PAYLOAD, generate_header(), secret + ) + + @pytest.mark.parametrize( + "encode", + [lambda p: p.encode("utf-8"), lambda p: bytearray(p, "utf-8")], + ids=["bytes", "bytearray"], + ) + def test_verifies_binary_payload(self, encode): + header = generate_header() + assert stripe.WebhookSignature.verify_header( + encode(DUMMY_WEBHOOK_PAYLOAD), header, DUMMY_WEBHOOK_SECRET + ) + def test_raise_on_malformed_header(self): header = "i'm not even a real signature header" with pytest.raises(