From 4699c83d15074e45af657e72244213f16f2a6e3b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 18 Nov 2025 20:14:15 +0000 Subject: [PATCH 1/4] Update generated code for v2126 and --- OPENAPI_VERSION | 2 +- stripe/_quote_preview_subscription_schedule.py | 4 ++++ stripe/_subscription_schedule.py | 4 ++++ stripe/params/_invoice_create_preview_params.py | 4 ++++ stripe/params/_subscription_schedule_create_params.py | 4 ++++ stripe/params/_subscription_schedule_modify_params.py | 4 ++++ stripe/params/_subscription_schedule_update_params.py | 4 ++++ 7 files changed, 25 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 927a37ae7..62acd5981 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2125 \ No newline at end of file +v2126 \ No newline at end of file diff --git a/stripe/_quote_preview_subscription_schedule.py b/stripe/_quote_preview_subscription_schedule.py index 473f0582c..2e592e5c8 100644 --- a/stripe/_quote_preview_subscription_schedule.py +++ b/stripe/_quote_preview_subscription_schedule.py @@ -696,6 +696,10 @@ class EndBehavior(StripeObject): """ The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. """ + effective_at: Optional[Literal["billing_period_start", "phase_start"]] + """ + Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + """ end_date: int """ The end of this phase of the subscription schedule. diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index 5dc04746d..de474a240 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -718,6 +718,10 @@ class EndBehavior(StripeObject): """ The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. """ + effective_at: Optional[Literal["billing_period_start", "phase_start"]] + """ + Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + """ end_date: int """ The end of this phase of the subscription schedule. diff --git a/stripe/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index 5fc585dc2..330dc2eec 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -1337,6 +1337,10 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhase(TypedDict): """ Settings related to subscription trials. """ + effective_at: NotRequired[Literal["billing_period_start", "phase_start"]] + """ + Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + """ class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItem(TypedDict): diff --git a/stripe/params/_subscription_schedule_create_params.py b/stripe/params/_subscription_schedule_create_params.py index f894d83df..33e07aaa0 100644 --- a/stripe/params/_subscription_schedule_create_params.py +++ b/stripe/params/_subscription_schedule_create_params.py @@ -344,6 +344,10 @@ class SubscriptionScheduleCreateParamsPhase(TypedDict): """ Settings related to subscription trials. """ + effective_at: NotRequired[Literal["billing_period_start", "phase_start"]] + """ + Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + """ class SubscriptionScheduleCreateParamsPhaseAddInvoiceItem(TypedDict): diff --git a/stripe/params/_subscription_schedule_modify_params.py b/stripe/params/_subscription_schedule_modify_params.py index df83a3c41..7d3360cfc 100644 --- a/stripe/params/_subscription_schedule_modify_params.py +++ b/stripe/params/_subscription_schedule_modify_params.py @@ -314,6 +314,10 @@ class SubscriptionScheduleModifyParamsPhase(TypedDict): """ Settings related to subscription trials. """ + effective_at: NotRequired[Literal["billing_period_start", "phase_start"]] + """ + Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + """ class SubscriptionScheduleModifyParamsPhaseAddInvoiceItem(TypedDict): diff --git a/stripe/params/_subscription_schedule_update_params.py b/stripe/params/_subscription_schedule_update_params.py index 2500dce55..d070dcbbd 100644 --- a/stripe/params/_subscription_schedule_update_params.py +++ b/stripe/params/_subscription_schedule_update_params.py @@ -313,6 +313,10 @@ class SubscriptionScheduleUpdateParamsPhase(TypedDict): """ Settings related to subscription trials. """ + effective_at: NotRequired[Literal["billing_period_start", "phase_start"]] + """ + Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + """ class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItem(TypedDict): From 00db39516dba0fc95c1fe5bc5e06bd2c64e3cea5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 19 Nov 2025 17:46:44 +0000 Subject: [PATCH 2/4] Update generated code for v2127 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- stripe/_api_version.py | 2 +- stripe/_payment_method.py | 16 +-- stripe/_payment_method_service.py | 4 +- stripe/_quote.py | 108 ++---------------- stripe/_quote_line.py | 12 ++ .../_quote_preview_subscription_schedule.py | 92 ++------------- stripe/_subscription.py | 88 +------------- stripe/_subscription_item.py | 10 ++ stripe/_subscription_schedule.py | 92 ++------------- .../delegated_checkout/_requested_session.py | 30 ++++- stripe/params/__init__.py | 35 ++++++ .../params/_invoice_create_preview_params.py | 55 ++++++--- stripe/params/_quote_create_params.py | 20 +++- stripe/params/_quote_modify_params.py | 16 ++- stripe/params/_quote_update_params.py | 16 ++- stripe/params/_subscription_create_params.py | 24 ++-- .../_subscription_item_create_params.py | 15 +++ .../_subscription_item_modify_params.py | 15 +++ .../_subscription_item_update_params.py | 15 +++ stripe/params/_subscription_modify_params.py | 24 ++-- .../_subscription_schedule_amend_params.py | 14 +++ .../_subscription_schedule_create_params.py | 13 +-- .../_subscription_schedule_modify_params.py | 13 +-- .../_subscription_schedule_update_params.py | 13 +-- stripe/params/_subscription_update_params.py | 24 ++-- 27 files changed, 334 insertions(+), 436 deletions(-) diff --git a/API_VERSION b/API_VERSION index e91c9d844..a49631fe1 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -91ef4c6abe8dcdab3a855d81aa624693a6a4da9f \ No newline at end of file +0dd134c7389483bd3510fb0bdfca6eef85688924 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 62acd5981..114ac0579 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2126 \ No newline at end of file +v2127 \ No newline at end of file diff --git a/stripe/_api_version.py b/stripe/_api_version.py index fa105a51e..da2f6b5bd 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2025-11-17.preview" + CURRENT = "2025-10-29.preview" diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 73825b0d5..0f40fb3b4 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -1855,7 +1855,7 @@ def _cls_check_balance( **params: Unpack["PaymentMethodCheckBalanceParams"], ) -> "PaymentMethodBalance": """ - Retrieves a payment method's balance. + Retrieves a PaymentMethod's Balance. """ return cast( "PaymentMethodBalance", @@ -1875,7 +1875,7 @@ def check_balance( **params: Unpack["PaymentMethodCheckBalanceParams"], ) -> "PaymentMethodBalance": """ - Retrieves a payment method's balance. + Retrieves a PaymentMethod's Balance. """ ... @@ -1884,7 +1884,7 @@ def check_balance( self, **params: Unpack["PaymentMethodCheckBalanceParams"] ) -> "PaymentMethodBalance": """ - Retrieves a payment method's balance. + Retrieves a PaymentMethod's Balance. """ ... @@ -1893,7 +1893,7 @@ def check_balance( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["PaymentMethodCheckBalanceParams"] ) -> "PaymentMethodBalance": """ - Retrieves a payment method's balance. + Retrieves a PaymentMethod's Balance. """ return cast( "PaymentMethodBalance", @@ -1913,7 +1913,7 @@ async def _cls_check_balance_async( **params: Unpack["PaymentMethodCheckBalanceParams"], ) -> "PaymentMethodBalance": """ - Retrieves a payment method's balance. + Retrieves a PaymentMethod's Balance. """ return cast( "PaymentMethodBalance", @@ -1933,7 +1933,7 @@ async def check_balance_async( **params: Unpack["PaymentMethodCheckBalanceParams"], ) -> "PaymentMethodBalance": """ - Retrieves a payment method's balance. + Retrieves a PaymentMethod's Balance. """ ... @@ -1942,7 +1942,7 @@ async def check_balance_async( self, **params: Unpack["PaymentMethodCheckBalanceParams"] ) -> "PaymentMethodBalance": """ - Retrieves a payment method's balance. + Retrieves a PaymentMethod's Balance. """ ... @@ -1951,7 +1951,7 @@ async def check_balance_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack["PaymentMethodCheckBalanceParams"] ) -> "PaymentMethodBalance": """ - Retrieves a payment method's balance. + Retrieves a PaymentMethod's Balance. """ return cast( "PaymentMethodBalance", diff --git a/stripe/_payment_method_service.py b/stripe/_payment_method_service.py index a73d47c3f..df2de1653 100644 --- a/stripe/_payment_method_service.py +++ b/stripe/_payment_method_service.py @@ -277,7 +277,7 @@ def check_balance( options: Optional["RequestOptions"] = None, ) -> "PaymentMethodBalance": """ - Retrieves a payment method's balance. + Retrieves a PaymentMethod's Balance. """ return cast( "PaymentMethodBalance", @@ -299,7 +299,7 @@ async def check_balance_async( options: Optional["RequestOptions"] = None, ) -> "PaymentMethodBalance": """ - Retrieves a payment method's balance. + Retrieves a PaymentMethod's Balance. """ return cast( "PaymentMethodBalance", diff --git a/stripe/_quote.py b/stripe/_quote.py index 7d6b631ac..af7f88c95 100644 --- a/stripe/_quote.py +++ b/stripe/_quote.py @@ -629,32 +629,12 @@ class AppliesTo(StripeObject): """ class BillFrom(StripeObject): - class AmendmentStart(StripeObject): - index: int - """ - Use an index to specify the position of an amendment to start prebilling with. - """ - class LineStartsAt(StripeObject): id: str """ Unique identifier for the object. """ - class Relative(StripeObject): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`. - """ - interval_count: Optional[int] - """ - The multiplier applied to the interval. - """ - - amendment_start: Optional[AmendmentStart] - """ - Use an index to specify the position of an amendment to start prebilling with. - """ computed_timestamp: Optional[int] """ The time the billing schedule applies from. @@ -663,39 +643,22 @@ class Relative(StripeObject): """ Lets you bill the period starting from a particular Quote line. """ - relative: Optional[Relative] - """ - Timestamp is calculated from the request time. - """ timestamp: Optional[int] """ Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`. """ type: Literal[ - "amendment_start", "line_starts_at", - "now", "pause_collection_start", "quote_acceptance_date", - "relative", "timestamp", ] """ Describes how the billing schedule determines the start date. Possible values are `timestamp`, `relative`, `amendment_start`, `now`, `quote_acceptance_date`, `line_starts_at`, or `pause_collection_start`. """ - _inner_class_types = { - "amendment_start": AmendmentStart, - "line_starts_at": LineStartsAt, - "relative": Relative, - } + _inner_class_types = {"line_starts_at": LineStartsAt} class BillUntil(StripeObject): - class AmendmentEnd(StripeObject): - index: int - """ - Use an index to specify the position of an amendment to end prebilling with. - """ - class Duration(StripeObject): interval: Literal["day", "month", "week", "year"] """ @@ -712,11 +675,7 @@ class LineEndsAt(StripeObject): Unique identifier for the object. """ - amendment_end: Optional[AmendmentEnd] - """ - Use an index to specify the position of an amendment to end prebilling with. - """ - computed_timestamp: int + computed_timestamp: Optional[int] """ The timestamp the billing schedule will apply until. """ @@ -733,7 +692,6 @@ class LineEndsAt(StripeObject): If specified, the billing schedule will apply until the specified timestamp. """ type: Literal[ - "amendment_end", "duration", "line_ends_at", "schedule_end", @@ -744,7 +702,6 @@ class LineEndsAt(StripeObject): Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ _inner_class_types = { - "amendment_end": AmendmentEnd, "duration": Duration, "line_ends_at": LineEndsAt, } @@ -758,9 +715,6 @@ class LineEndsAt(StripeObject): Specifies the start of the billing period. """ bill_until: BillUntil - """ - Specifies the end of billing period. - """ key: str """ Unique identifier for the billing schedule. @@ -817,10 +771,10 @@ class Prebilling(StripeObject): Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. """ phase_effective_at: Optional[ - Literal["billing_period_start", "phase_start"] + Literal["billing_period_start", "line_start"] ] """ - Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + Configures how the quote handles billing for line transitions. Possible values are `line_start` (default) or `billing_period_start`. `line_start` bills based on the current state of the line, ignoring changes scheduled for future lines. `billing_period_start` bills predictively for upcoming line transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. """ prebilling: Optional[Prebilling] """ @@ -963,32 +917,12 @@ class AppliesTo(StripeObject): """ class BillFrom(StripeObject): - class AmendmentStart(StripeObject): - index: int - """ - Use an index to specify the position of an amendment to start prebilling with. - """ - class LineStartsAt(StripeObject): id: str """ Unique identifier for the object. """ - class Relative(StripeObject): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`. - """ - interval_count: Optional[int] - """ - The multiplier applied to the interval. - """ - - amendment_start: Optional[AmendmentStart] - """ - Use an index to specify the position of an amendment to start prebilling with. - """ computed_timestamp: Optional[int] """ The time the billing schedule applies from. @@ -997,39 +931,22 @@ class Relative(StripeObject): """ Lets you bill the period starting from a particular Quote line. """ - relative: Optional[Relative] - """ - Timestamp is calculated from the request time. - """ timestamp: Optional[int] """ Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`. """ type: Literal[ - "amendment_start", "line_starts_at", - "now", "pause_collection_start", "quote_acceptance_date", - "relative", "timestamp", ] """ Describes how the billing schedule determines the start date. Possible values are `timestamp`, `relative`, `amendment_start`, `now`, `quote_acceptance_date`, `line_starts_at`, or `pause_collection_start`. """ - _inner_class_types = { - "amendment_start": AmendmentStart, - "line_starts_at": LineStartsAt, - "relative": Relative, - } + _inner_class_types = {"line_starts_at": LineStartsAt} class BillUntil(StripeObject): - class AmendmentEnd(StripeObject): - index: int - """ - Use an index to specify the position of an amendment to end prebilling with. - """ - class Duration(StripeObject): interval: Literal["day", "month", "week", "year"] """ @@ -1046,11 +963,7 @@ class LineEndsAt(StripeObject): Unique identifier for the object. """ - amendment_end: Optional[AmendmentEnd] - """ - Use an index to specify the position of an amendment to end prebilling with. - """ - computed_timestamp: int + computed_timestamp: Optional[int] """ The timestamp the billing schedule will apply until. """ @@ -1067,7 +980,6 @@ class LineEndsAt(StripeObject): If specified, the billing schedule will apply until the specified timestamp. """ type: Literal[ - "amendment_end", "duration", "line_ends_at", "schedule_end", @@ -1078,7 +990,6 @@ class LineEndsAt(StripeObject): Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ _inner_class_types = { - "amendment_end": AmendmentEnd, "duration": Duration, "line_ends_at": LineEndsAt, } @@ -1092,9 +1003,6 @@ class LineEndsAt(StripeObject): Specifies the start of the billing period. """ bill_until: BillUntil - """ - Specifies the end of billing period. - """ key: str """ Unique identifier for the billing schedule. @@ -1133,10 +1041,10 @@ class LineEndsAt(StripeObject): Behavior of the subscription schedule and underlying subscription when it ends. """ phase_effective_at: Optional[ - Literal["billing_period_start", "phase_start"] + Literal["billing_period_start", "line_start"] ] """ - Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + Configures how the quote handles billing for line transitions. Possible values are `line_start` (default) or `billing_period_start`. `line_start` bills based on the current state of the line, ignoring changes scheduled for future lines. `billing_period_start` bills predictively for upcoming line transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. """ proration_behavior: Optional[ Literal["always_invoice", "create_prorations", "none"] diff --git a/stripe/_quote_line.py b/stripe/_quote_line.py index 4f236c1cc..d77caeb06 100644 --- a/stripe/_quote_line.py +++ b/stripe/_quote_line.py @@ -114,6 +114,10 @@ class Trial(StripeObject): """ Options that configure the trial on the subscription item. """ + trial_offer: Optional[str] + """ + The ID of the trial offer to apply to the configuration item. + """ _inner_class_types = {"discounts": Discount, "trial": Trial} class RemoveDiscount(StripeObject): @@ -244,6 +248,10 @@ class Trial(StripeObject): """ Options that configure the trial on the subscription item. """ + trial_offer: Optional[str] + """ + The ID of the trial offer to apply to the configuration item. + """ _inner_class_types = {"discounts": Discount, "trial": Trial} add_discount: Optional[AddDiscount] @@ -477,6 +485,10 @@ class EndBehavior(StripeObject): """ A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. """ + effective_at: Optional[Literal["billing_period_start", "line_start"]] + """ + Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + """ ends_at: Optional[EndsAt] """ Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. diff --git a/stripe/_quote_preview_subscription_schedule.py b/stripe/_quote_preview_subscription_schedule.py index 2e592e5c8..25823ef5e 100644 --- a/stripe/_quote_preview_subscription_schedule.py +++ b/stripe/_quote_preview_subscription_schedule.py @@ -74,73 +74,20 @@ class AppliesTo(StripeObject): """ class BillFrom(StripeObject): - class AmendmentStart(StripeObject): - index: int - """ - Use an index to specify the position of an amendment to start prebilling with. - """ - - class LineStartsAt(StripeObject): - id: str - """ - Unique identifier for the object. - """ - - class Relative(StripeObject): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`. - """ - interval_count: Optional[int] - """ - The multiplier applied to the interval. - """ - - amendment_start: Optional[AmendmentStart] - """ - Use an index to specify the position of an amendment to start prebilling with. - """ - computed_timestamp: Optional[int] + computed_timestamp: int """ The time the billing schedule applies from. """ - line_starts_at: Optional[LineStartsAt] - """ - Lets you bill the period starting from a particular Quote line. - """ - relative: Optional[Relative] - """ - Timestamp is calculated from the request time. - """ timestamp: Optional[int] """ Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`. """ - type: Literal[ - "amendment_start", - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "relative", - "timestamp", - ] + type: Literal["timestamp"] """ - Describes how the billing schedule determines the start date. Possible values are `timestamp`, `relative`, `amendment_start`, `now`, `quote_acceptance_date`, `line_starts_at`, or `pause_collection_start`. + Describes how the billing schedule determines the start date. Possible values are `timestamp`. """ - _inner_class_types = { - "amendment_start": AmendmentStart, - "line_starts_at": LineStartsAt, - "relative": Relative, - } class BillUntil(StripeObject): - class AmendmentEnd(StripeObject): - index: int - """ - Use an index to specify the position of an amendment to end prebilling with. - """ - class Duration(StripeObject): interval: Literal["day", "month", "week", "year"] """ @@ -151,16 +98,6 @@ class Duration(StripeObject): The multiplier applied to the interval. """ - class LineEndsAt(StripeObject): - id: str - """ - Unique identifier for the object. - """ - - amendment_end: Optional[AmendmentEnd] - """ - Use an index to specify the position of an amendment to end prebilling with. - """ computed_timestamp: int """ The timestamp the billing schedule will apply until. @@ -169,30 +106,15 @@ class LineEndsAt(StripeObject): """ Specifies the billing period. """ - line_ends_at: Optional[LineEndsAt] - """ - Lets you bill the period ending at a particular Quote line. - """ timestamp: Optional[int] """ If specified, the billing schedule will apply until the specified timestamp. """ - type: Literal[ - "amendment_end", - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] + type: Literal["duration", "timestamp"] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ - _inner_class_types = { - "amendment_end": AmendmentEnd, - "duration": Duration, - "line_ends_at": LineEndsAt, - } + _inner_class_types = {"duration": Duration} applies_to: Optional[List[AppliesTo]] """ @@ -618,6 +540,10 @@ class Trial(StripeObject): """ Options that configure the trial on the subscription item. """ + trial_offer: Optional[str] + """ + The ID of the trial offer to apply to the configuration item. + """ _inner_class_types = { "billing_thresholds": BillingThresholds, "discounts": Discount, diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 85b3e3b87..3e20d0e70 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -165,73 +165,20 @@ class AppliesTo(StripeObject): """ class BillFrom(StripeObject): - class AmendmentStart(StripeObject): - index: int - """ - Use an index to specify the position of an amendment to start prebilling with. - """ - - class LineStartsAt(StripeObject): - id: str - """ - Unique identifier for the object. - """ - - class Relative(StripeObject): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`. - """ - interval_count: Optional[int] - """ - The multiplier applied to the interval. - """ - - amendment_start: Optional[AmendmentStart] - """ - Use an index to specify the position of an amendment to start prebilling with. - """ - computed_timestamp: Optional[int] + computed_timestamp: int """ The time the billing schedule applies from. """ - line_starts_at: Optional[LineStartsAt] - """ - Lets you bill the period starting from a particular Quote line. - """ - relative: Optional[Relative] - """ - Timestamp is calculated from the request time. - """ timestamp: Optional[int] """ Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`. """ - type: Literal[ - "amendment_start", - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "relative", - "timestamp", - ] + type: Literal["timestamp"] """ - Describes how the billing schedule determines the start date. Possible values are `timestamp`, `relative`, `amendment_start`, `now`, `quote_acceptance_date`, `line_starts_at`, or `pause_collection_start`. + Describes how the billing schedule determines the start date. Possible values are `timestamp`. """ - _inner_class_types = { - "amendment_start": AmendmentStart, - "line_starts_at": LineStartsAt, - "relative": Relative, - } class BillUntil(StripeObject): - class AmendmentEnd(StripeObject): - index: int - """ - Use an index to specify the position of an amendment to end prebilling with. - """ - class Duration(StripeObject): interval: Literal["day", "month", "week", "year"] """ @@ -242,16 +189,6 @@ class Duration(StripeObject): The multiplier applied to the interval. """ - class LineEndsAt(StripeObject): - id: str - """ - Unique identifier for the object. - """ - - amendment_end: Optional[AmendmentEnd] - """ - Use an index to specify the position of an amendment to end prebilling with. - """ computed_timestamp: int """ The timestamp the billing schedule will apply until. @@ -260,30 +197,15 @@ class LineEndsAt(StripeObject): """ Specifies the billing period. """ - line_ends_at: Optional[LineEndsAt] - """ - Lets you bill the period ending at a particular Quote line. - """ timestamp: Optional[int] """ If specified, the billing schedule will apply until the specified timestamp. """ - type: Literal[ - "amendment_end", - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] + type: Literal["duration", "timestamp"] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ - _inner_class_types = { - "amendment_end": AmendmentEnd, - "duration": Duration, - "line_ends_at": LineEndsAt, - } + _inner_class_types = {"duration": Duration} applies_to: Optional[List[AppliesTo]] """ diff --git a/stripe/_subscription_item.py b/stripe/_subscription_item.py index b080673ff..c0cf167b6 100644 --- a/stripe/_subscription_item.py +++ b/stripe/_subscription_item.py @@ -52,6 +52,11 @@ class BillingThresholds(StripeObject): Usage threshold that triggers the subscription to create an invoice """ + class CurrentTrial(StripeObject): + end_date: int + start_date: int + trial_offer: str + class Trial(StripeObject): converts_to: Optional[List[str]] """ @@ -82,6 +87,10 @@ class Trial(StripeObject): """ The start time of this subscription item's current billing period. """ + current_trial: Optional[CurrentTrial] + """ + The current trial that is applied to this subscription item. + """ deleted: Optional[Literal[True]] """ Always true for a deleted object @@ -367,5 +376,6 @@ async def retrieve_async( _inner_class_types = { "billing_thresholds": BillingThresholds, + "current_trial": CurrentTrial, "trial": Trial, } diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index de474a240..acc34b12d 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -96,73 +96,20 @@ class AppliesTo(StripeObject): """ class BillFrom(StripeObject): - class AmendmentStart(StripeObject): - index: int - """ - Use an index to specify the position of an amendment to start prebilling with. - """ - - class LineStartsAt(StripeObject): - id: str - """ - Unique identifier for the object. - """ - - class Relative(StripeObject): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing duration. Possible values are `day`, `week`, `month`, or `year`. - """ - interval_count: Optional[int] - """ - The multiplier applied to the interval. - """ - - amendment_start: Optional[AmendmentStart] - """ - Use an index to specify the position of an amendment to start prebilling with. - """ - computed_timestamp: Optional[int] + computed_timestamp: int """ The time the billing schedule applies from. """ - line_starts_at: Optional[LineStartsAt] - """ - Lets you bill the period starting from a particular Quote line. - """ - relative: Optional[Relative] - """ - Timestamp is calculated from the request time. - """ timestamp: Optional[int] """ Use a precise Unix timestamp for prebilling to start. Must be earlier than `bill_until`. """ - type: Literal[ - "amendment_start", - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "relative", - "timestamp", - ] + type: Literal["timestamp"] """ - Describes how the billing schedule determines the start date. Possible values are `timestamp`, `relative`, `amendment_start`, `now`, `quote_acceptance_date`, `line_starts_at`, or `pause_collection_start`. + Describes how the billing schedule determines the start date. Possible values are `timestamp`. """ - _inner_class_types = { - "amendment_start": AmendmentStart, - "line_starts_at": LineStartsAt, - "relative": Relative, - } class BillUntil(StripeObject): - class AmendmentEnd(StripeObject): - index: int - """ - Use an index to specify the position of an amendment to end prebilling with. - """ - class Duration(StripeObject): interval: Literal["day", "month", "week", "year"] """ @@ -173,16 +120,6 @@ class Duration(StripeObject): The multiplier applied to the interval. """ - class LineEndsAt(StripeObject): - id: str - """ - Unique identifier for the object. - """ - - amendment_end: Optional[AmendmentEnd] - """ - Use an index to specify the position of an amendment to end prebilling with. - """ computed_timestamp: int """ The timestamp the billing schedule will apply until. @@ -191,30 +128,15 @@ class LineEndsAt(StripeObject): """ Specifies the billing period. """ - line_ends_at: Optional[LineEndsAt] - """ - Lets you bill the period ending at a particular Quote line. - """ timestamp: Optional[int] """ If specified, the billing schedule will apply until the specified timestamp. """ - type: Literal[ - "amendment_end", - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] + type: Literal["duration", "timestamp"] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ - _inner_class_types = { - "amendment_end": AmendmentEnd, - "duration": Duration, - "line_ends_at": LineEndsAt, - } + _inner_class_types = {"duration": Duration} applies_to: Optional[List[AppliesTo]] """ @@ -640,6 +562,10 @@ class Trial(StripeObject): """ Options that configure the trial on the subscription item. """ + trial_offer: Optional[str] + """ + The ID of the trial offer to apply to the configuration item. + """ _inner_class_types = { "billing_thresholds": BillingThresholds, "discounts": Discount, diff --git a/stripe/delegated_checkout/_requested_session.py b/stripe/delegated_checkout/_requested_session.py index 5f4bb4af7..6c5daff3c 100644 --- a/stripe/delegated_checkout/_requested_session.py +++ b/stripe/delegated_checkout/_requested_session.py @@ -156,6 +156,22 @@ class Shipping(StripeObject): } class LineItemDetail(StripeObject): + amount_discount: int + """ + The total discount for this line item. If no discount were applied, defaults to 0. + """ + amount_subtotal: int + """ + The total before any discounts or taxes are applied. + """ + amount_subtotal_after_discount: int + """ + The total after discounts but before taxes are applied. + """ + amount_total: int + """ + The total after discounts and taxes. + """ description: Optional[str] """ The description of the line item. @@ -182,7 +198,15 @@ class LineItemDetail(StripeObject): """ unit_amount: int """ - The unit amount of the line item. + The per-unit amount of the item before any discounts or taxes are applied. + """ + unit_amount_after_discount: int + """ + The per-unit amount of the item after discounts but before taxes are applied. + """ + unit_discount: int + """ + The per-unit discount amount. If no discount were applied, defaults to 0. """ class OrderDetails(StripeObject): @@ -295,6 +319,10 @@ class ApplicableFee(StripeObject): """ The amount fulfillment of the total details. """ + amount_subtotal_after_discount: Optional[int] + """ + Total of all items after discounts but before taxes are applied. + """ amount_tax: Optional[int] """ The amount tax of the total details. diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py index 020dcfb88..cbdbc6be0 100644 --- a/stripe/params/__init__.py +++ b/stripe/params/__init__.py @@ -1558,6 +1558,7 @@ InvoiceCreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntilDuration as InvoiceCreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntilDuration, InvoiceCreatePreviewParamsSubscriptionDetailsItem as InvoiceCreatePreviewParamsSubscriptionDetailsItem, InvoiceCreatePreviewParamsSubscriptionDetailsItemBillingThresholds as InvoiceCreatePreviewParamsSubscriptionDetailsItemBillingThresholds, + InvoiceCreatePreviewParamsSubscriptionDetailsItemCurrentTrial as InvoiceCreatePreviewParamsSubscriptionDetailsItemCurrentTrial, InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscount as InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscount, InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEnd as InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEnd, InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEndDuration as InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEndDuration, @@ -5058,6 +5059,7 @@ SubscriptionCreateParamsInvoiceSettingsIssuer as SubscriptionCreateParamsInvoiceSettingsIssuer, SubscriptionCreateParamsItem as SubscriptionCreateParamsItem, SubscriptionCreateParamsItemBillingThresholds as SubscriptionCreateParamsItemBillingThresholds, + SubscriptionCreateParamsItemCurrentTrial as SubscriptionCreateParamsItemCurrentTrial, SubscriptionCreateParamsItemDiscount as SubscriptionCreateParamsItemDiscount, SubscriptionCreateParamsItemDiscountDiscountEnd as SubscriptionCreateParamsItemDiscountDiscountEnd, SubscriptionCreateParamsItemDiscountDiscountEndDuration as SubscriptionCreateParamsItemDiscountDiscountEndDuration, @@ -5096,6 +5098,7 @@ from stripe.params._subscription_item_create_params import ( SubscriptionItemCreateParams as SubscriptionItemCreateParams, SubscriptionItemCreateParamsBillingThresholds as SubscriptionItemCreateParamsBillingThresholds, + SubscriptionItemCreateParamsCurrentTrial as SubscriptionItemCreateParamsCurrentTrial, SubscriptionItemCreateParamsDiscount as SubscriptionItemCreateParamsDiscount, SubscriptionItemCreateParamsDiscountDiscountEnd as SubscriptionItemCreateParamsDiscountDiscountEnd, SubscriptionItemCreateParamsDiscountDiscountEndDuration as SubscriptionItemCreateParamsDiscountDiscountEndDuration, @@ -5112,6 +5115,7 @@ from stripe.params._subscription_item_modify_params import ( SubscriptionItemModifyParams as SubscriptionItemModifyParams, SubscriptionItemModifyParamsBillingThresholds as SubscriptionItemModifyParamsBillingThresholds, + SubscriptionItemModifyParamsCurrentTrial as SubscriptionItemModifyParamsCurrentTrial, SubscriptionItemModifyParamsDiscount as SubscriptionItemModifyParamsDiscount, SubscriptionItemModifyParamsDiscountDiscountEnd as SubscriptionItemModifyParamsDiscountDiscountEnd, SubscriptionItemModifyParamsDiscountDiscountEndDuration as SubscriptionItemModifyParamsDiscountDiscountEndDuration, @@ -5124,6 +5128,7 @@ from stripe.params._subscription_item_update_params import ( SubscriptionItemUpdateParams as SubscriptionItemUpdateParams, SubscriptionItemUpdateParamsBillingThresholds as SubscriptionItemUpdateParamsBillingThresholds, + SubscriptionItemUpdateParamsCurrentTrial as SubscriptionItemUpdateParamsCurrentTrial, SubscriptionItemUpdateParamsDiscount as SubscriptionItemUpdateParamsDiscount, SubscriptionItemUpdateParamsDiscountDiscountEnd as SubscriptionItemUpdateParamsDiscountDiscountEnd, SubscriptionItemUpdateParamsDiscountDiscountEndDuration as SubscriptionItemUpdateParamsDiscountDiscountEndDuration, @@ -5167,6 +5172,7 @@ SubscriptionModifyParamsInvoiceSettingsIssuer as SubscriptionModifyParamsInvoiceSettingsIssuer, SubscriptionModifyParamsItem as SubscriptionModifyParamsItem, SubscriptionModifyParamsItemBillingThresholds as SubscriptionModifyParamsItemBillingThresholds, + SubscriptionModifyParamsItemCurrentTrial as SubscriptionModifyParamsItemCurrentTrial, SubscriptionModifyParamsItemDiscount as SubscriptionModifyParamsItemDiscount, SubscriptionModifyParamsItemDiscountDiscountEnd as SubscriptionModifyParamsItemDiscountDiscountEnd, SubscriptionModifyParamsItemDiscountDiscountEndDuration as SubscriptionModifyParamsItemDiscountDiscountEndDuration, @@ -5427,6 +5433,7 @@ SubscriptionUpdateParamsInvoiceSettingsIssuer as SubscriptionUpdateParamsInvoiceSettingsIssuer, SubscriptionUpdateParamsItem as SubscriptionUpdateParamsItem, SubscriptionUpdateParamsItemBillingThresholds as SubscriptionUpdateParamsItemBillingThresholds, + SubscriptionUpdateParamsItemCurrentTrial as SubscriptionUpdateParamsItemCurrentTrial, SubscriptionUpdateParamsItemDiscount as SubscriptionUpdateParamsItemDiscount, SubscriptionUpdateParamsItemDiscountDiscountEnd as SubscriptionUpdateParamsItemDiscountDiscountEnd, SubscriptionUpdateParamsItemDiscountDiscountEndDuration as SubscriptionUpdateParamsItemDiscountDiscountEndDuration, @@ -10194,6 +10201,10 @@ "stripe.params._invoice_create_preview_params", False, ), + "InvoiceCreatePreviewParamsSubscriptionDetailsItemCurrentTrial": ( + "stripe.params._invoice_create_preview_params", + False, + ), "InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscount": ( "stripe.params._invoice_create_preview_params", False, @@ -22312,6 +22323,10 @@ "stripe.params._subscription_create_params", False, ), + "SubscriptionCreateParamsItemCurrentTrial": ( + "stripe.params._subscription_create_params", + False, + ), "SubscriptionCreateParamsItemDiscount": ( "stripe.params._subscription_create_params", False, @@ -22448,6 +22463,10 @@ "stripe.params._subscription_item_create_params", False, ), + "SubscriptionItemCreateParamsCurrentTrial": ( + "stripe.params._subscription_item_create_params", + False, + ), "SubscriptionItemCreateParamsDiscount": ( "stripe.params._subscription_item_create_params", False, @@ -22488,6 +22507,10 @@ "stripe.params._subscription_item_modify_params", False, ), + "SubscriptionItemModifyParamsCurrentTrial": ( + "stripe.params._subscription_item_modify_params", + False, + ), "SubscriptionItemModifyParamsDiscount": ( "stripe.params._subscription_item_modify_params", False, @@ -22520,6 +22543,10 @@ "stripe.params._subscription_item_update_params", False, ), + "SubscriptionItemUpdateParamsCurrentTrial": ( + "stripe.params._subscription_item_update_params", + False, + ), "SubscriptionItemUpdateParamsDiscount": ( "stripe.params._subscription_item_update_params", False, @@ -22668,6 +22695,10 @@ "stripe.params._subscription_modify_params", False, ), + "SubscriptionModifyParamsItemCurrentTrial": ( + "stripe.params._subscription_modify_params", + False, + ), "SubscriptionModifyParamsItemDiscount": ( "stripe.params._subscription_modify_params", False, @@ -23612,6 +23643,10 @@ "stripe.params._subscription_update_params", False, ), + "SubscriptionUpdateParamsItemCurrentTrial": ( + "stripe.params._subscription_update_params", + False, + ), "SubscriptionUpdateParamsItemDiscount": ( "stripe.params._subscription_update_params", False, diff --git a/stripe/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py index 330dc2eec..7b2cdb531 100644 --- a/stripe/params/_invoice_create_preview_params.py +++ b/stripe/params/_invoice_create_preview_params.py @@ -577,7 +577,7 @@ class InvoiceCreatePreviewParamsScheduleDetails(TypedDict): In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. """ billing_schedules: NotRequired[ - List["InvoiceCreatePreviewParamsScheduleDetailsBillingSchedule"] + "Literal['']|List[InvoiceCreatePreviewParamsScheduleDetailsBillingSchedule]" ] """ Sets the billing schedules for the subscription schedule. @@ -653,6 +653,12 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendment(TypedDict): """ Actions to apply to the billing schedules. """ + effective_at: NotRequired[ + Literal["amendment_start", "billing_period_start"] + ] + """ + Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + """ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentEnd( @@ -917,6 +923,10 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAdd( """ Options that configure the trial on the subscription item. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscount( @@ -1029,6 +1039,10 @@ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSet( """ If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscount( @@ -1681,6 +1695,10 @@ class InvoiceCreatePreviewParamsScheduleDetailsPhaseItem(TypedDict): """ Options that configure the trial on the subscription item. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemBillingThresholds( @@ -1939,14 +1957,7 @@ class InvoiceCreatePreviewParamsScheduleDetailsBillingScheduleBillUntil( """ The end date of the billing schedule. """ - type: Literal[ - "amendment_end", - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] + type: Literal["duration", "timestamp"] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -2105,14 +2116,7 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntil( """ The end date of the billing schedule. """ - type: Literal[ - "amendment_end", - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] + type: Literal["duration", "timestamp"] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -2182,6 +2186,12 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItem(TypedDict): """ A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. """ + current_trial: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsItemCurrentTrial" + ] + """ + The trial offer to apply to this subscription item. + """ class InvoiceCreatePreviewParamsSubscriptionDetailsItemBillingThresholds( @@ -2288,6 +2298,17 @@ class InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring( """ +class InvoiceCreatePreviewParamsSubscriptionDetailsItemCurrentTrial(TypedDict): + trial_end: NotRequired[int] + """ + Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`. + """ + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ + + class InvoiceCreatePreviewParamsSubscriptionDetailsPrebilling(TypedDict): iterations: int """ diff --git a/stripe/params/_quote_create_params.py b/stripe/params/_quote_create_params.py index db7365bb1..c12a01d6c 100644 --- a/stripe/params/_quote_create_params.py +++ b/stripe/params/_quote_create_params.py @@ -365,6 +365,10 @@ class QuoteCreateParamsLine(TypedDict): """ Settings related to subscription trials. """ + effective_at: NotRequired[Literal["billing_period_start", "line_start"]] + """ + Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + """ class QuoteCreateParamsLineAction(TypedDict): @@ -479,6 +483,10 @@ class QuoteCreateParamsLineActionAddItem(TypedDict): """ Options that configure the trial on the subscription item. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class QuoteCreateParamsLineActionAddItemDiscount(TypedDict): @@ -603,6 +611,10 @@ class QuoteCreateParamsLineActionSetItem(TypedDict): """ If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class QuoteCreateParamsLineActionSetItemDiscount(TypedDict): @@ -835,7 +847,7 @@ class QuoteCreateParamsSubscriptionData(TypedDict): Controls how prorations and invoices for subscriptions are calculated and orchestrated. """ billing_schedules: NotRequired[ - "Literal['']|List[QuoteCreateParamsSubscriptionDataBillingSchedule]" + List["QuoteCreateParamsSubscriptionDataBillingSchedule"] ] """ Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted. @@ -863,7 +875,7 @@ class QuoteCreateParamsSubscriptionData(TypedDict): Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. """ phase_effective_at: NotRequired[ - Literal["billing_period_start", "phase_start"] + Literal["billing_period_start", "line_start"] ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. @@ -1166,7 +1178,7 @@ class QuoteCreateParamsSubscriptionDataOverride(TypedDict): Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. """ billing_schedules: NotRequired[ - "Literal['']|List[QuoteCreateParamsSubscriptionDataOverrideBillingSchedule]" + List["QuoteCreateParamsSubscriptionDataOverrideBillingSchedule"] ] """ Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted. @@ -1184,7 +1196,7 @@ class QuoteCreateParamsSubscriptionDataOverride(TypedDict): Behavior of the subscription schedule and underlying subscription when it ends. """ phase_effective_at: NotRequired[ - Literal["billing_period_start", "phase_start"] + Literal["billing_period_start", "line_start"] ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. diff --git a/stripe/params/_quote_modify_params.py b/stripe/params/_quote_modify_params.py index 533ca175e..7489815b6 100644 --- a/stripe/params/_quote_modify_params.py +++ b/stripe/params/_quote_modify_params.py @@ -354,6 +354,10 @@ class QuoteModifyParamsLine(TypedDict): """ Settings related to subscription trials. """ + effective_at: NotRequired[Literal["billing_period_start", "line_start"]] + """ + Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + """ class QuoteModifyParamsLineAction(TypedDict): @@ -468,6 +472,10 @@ class QuoteModifyParamsLineActionAddItem(TypedDict): """ Options that configure the trial on the subscription item. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class QuoteModifyParamsLineActionAddItemDiscount(TypedDict): @@ -592,6 +600,10 @@ class QuoteModifyParamsLineActionSetItem(TypedDict): """ If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class QuoteModifyParamsLineActionSetItemDiscount(TypedDict): @@ -848,7 +860,7 @@ class QuoteModifyParamsSubscriptionData(TypedDict): Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. """ phase_effective_at: NotRequired[ - Literal["billing_period_start", "phase_start"] + Literal["billing_period_start", "line_start"] ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. @@ -1153,7 +1165,7 @@ class QuoteModifyParamsSubscriptionDataOverride(TypedDict): Behavior of the subscription schedule and underlying subscription when it ends. """ phase_effective_at: NotRequired[ - Literal["billing_period_start", "phase_start"] + Literal["billing_period_start", "line_start"] ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. diff --git a/stripe/params/_quote_update_params.py b/stripe/params/_quote_update_params.py index 1184a7b1f..21b698c5c 100644 --- a/stripe/params/_quote_update_params.py +++ b/stripe/params/_quote_update_params.py @@ -353,6 +353,10 @@ class QuoteUpdateParamsLine(TypedDict): """ Settings related to subscription trials. """ + effective_at: NotRequired[Literal["billing_period_start", "line_start"]] + """ + Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + """ class QuoteUpdateParamsLineAction(TypedDict): @@ -467,6 +471,10 @@ class QuoteUpdateParamsLineActionAddItem(TypedDict): """ Options that configure the trial on the subscription item. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class QuoteUpdateParamsLineActionAddItemDiscount(TypedDict): @@ -591,6 +599,10 @@ class QuoteUpdateParamsLineActionSetItem(TypedDict): """ If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class QuoteUpdateParamsLineActionSetItemDiscount(TypedDict): @@ -847,7 +859,7 @@ class QuoteUpdateParamsSubscriptionData(TypedDict): Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. """ phase_effective_at: NotRequired[ - Literal["billing_period_start", "phase_start"] + Literal["billing_period_start", "line_start"] ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. @@ -1152,7 +1164,7 @@ class QuoteUpdateParamsSubscriptionDataOverride(TypedDict): Behavior of the subscription schedule and underlying subscription when it ends. """ phase_effective_at: NotRequired[ - Literal["billing_period_start", "phase_start"] + Literal["billing_period_start", "line_start"] ] """ Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. diff --git a/stripe/params/_subscription_create_params.py b/stripe/params/_subscription_create_params.py index 18709de87..691a0477a 100644 --- a/stripe/params/_subscription_create_params.py +++ b/stripe/params/_subscription_create_params.py @@ -435,14 +435,7 @@ class SubscriptionCreateParamsBillingScheduleBillUntil(TypedDict): """ The end date of the billing schedule. """ - type: Literal[ - "amendment_end", - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] + type: Literal["duration", "timestamp"] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -580,6 +573,10 @@ class SubscriptionCreateParamsItem(TypedDict): """ Define options to configure the trial on the subscription item. """ + current_trial: NotRequired["SubscriptionCreateParamsItemCurrentTrial"] + """ + The trial offer to apply to this subscription item. + """ class SubscriptionCreateParamsItemBillingThresholds(TypedDict): @@ -687,6 +684,17 @@ class SubscriptionCreateParamsItemTrial(TypedDict): """ +class SubscriptionCreateParamsItemCurrentTrial(TypedDict): + trial_end: NotRequired[int] + """ + Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`. + """ + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ + + class SubscriptionCreateParamsPaymentSettings(TypedDict): payment_method_options: NotRequired[ "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptions" diff --git a/stripe/params/_subscription_item_create_params.py b/stripe/params/_subscription_item_create_params.py index 918473a4c..68d65a4a6 100644 --- a/stripe/params/_subscription_item_create_params.py +++ b/stripe/params/_subscription_item_create_params.py @@ -81,6 +81,10 @@ class SubscriptionItemCreateParams(RequestOptions): """ Options that configure the trial on the subscription item. """ + current_trial: NotRequired["SubscriptionItemCreateParamsCurrentTrial"] + """ + The trial offer to apply to this subscription item. + """ class SubscriptionItemCreateParamsBillingThresholds(TypedDict): @@ -186,3 +190,14 @@ class SubscriptionItemCreateParamsTrial(TypedDict): """ Determines the type of trial for this item. """ + + +class SubscriptionItemCreateParamsCurrentTrial(TypedDict): + trial_end: NotRequired[int] + """ + Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`. + """ + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ diff --git a/stripe/params/_subscription_item_modify_params.py b/stripe/params/_subscription_item_modify_params.py index a4e987f86..d00776e26 100644 --- a/stripe/params/_subscription_item_modify_params.py +++ b/stripe/params/_subscription_item_modify_params.py @@ -77,6 +77,10 @@ class SubscriptionItemModifyParams(RequestOptions): """ A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. """ + current_trial: NotRequired["SubscriptionItemModifyParamsCurrentTrial"] + """ + The trial offer to apply to this subscription item. + """ class SubscriptionItemModifyParamsBillingThresholds(TypedDict): @@ -171,3 +175,14 @@ class SubscriptionItemModifyParamsPriceDataRecurring(TypedDict): """ The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). """ + + +class SubscriptionItemModifyParamsCurrentTrial(TypedDict): + trial_end: NotRequired[int] + """ + Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`. + """ + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ diff --git a/stripe/params/_subscription_item_update_params.py b/stripe/params/_subscription_item_update_params.py index 056611b4a..3394231f0 100644 --- a/stripe/params/_subscription_item_update_params.py +++ b/stripe/params/_subscription_item_update_params.py @@ -76,6 +76,10 @@ class SubscriptionItemUpdateParams(TypedDict): """ A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. """ + current_trial: NotRequired["SubscriptionItemUpdateParamsCurrentTrial"] + """ + The trial offer to apply to this subscription item. + """ class SubscriptionItemUpdateParamsBillingThresholds(TypedDict): @@ -170,3 +174,14 @@ class SubscriptionItemUpdateParamsPriceDataRecurring(TypedDict): """ The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). """ + + +class SubscriptionItemUpdateParamsCurrentTrial(TypedDict): + trial_end: NotRequired[int] + """ + Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`. + """ + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py index 5c225983f..44ded83ee 100644 --- a/stripe/params/_subscription_modify_params.py +++ b/stripe/params/_subscription_modify_params.py @@ -380,14 +380,7 @@ class SubscriptionModifyParamsBillingScheduleBillUntil(TypedDict): """ The end date of the billing schedule. """ - type: Literal[ - "amendment_end", - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] + type: Literal["duration", "timestamp"] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -546,6 +539,10 @@ class SubscriptionModifyParamsItem(TypedDict): """ A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. """ + current_trial: NotRequired["SubscriptionModifyParamsItemCurrentTrial"] + """ + The trial offer to apply to this subscription item. + """ class SubscriptionModifyParamsItemBillingThresholds(TypedDict): @@ -642,6 +639,17 @@ class SubscriptionModifyParamsItemPriceDataRecurring(TypedDict): """ +class SubscriptionModifyParamsItemCurrentTrial(TypedDict): + trial_end: NotRequired[int] + """ + Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`. + """ + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ + + class SubscriptionModifyParamsPauseCollection(TypedDict): behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] """ diff --git a/stripe/params/_subscription_schedule_amend_params.py b/stripe/params/_subscription_schedule_amend_params.py index 96d7b4d4f..6a05112ec 100644 --- a/stripe/params/_subscription_schedule_amend_params.py +++ b/stripe/params/_subscription_schedule_amend_params.py @@ -96,6 +96,12 @@ class SubscriptionScheduleAmendParamsAmendment(TypedDict): """ Actions to apply to the billing schedules. """ + effective_at: NotRequired[ + Literal["amendment_start", "billing_period_start"] + ] + """ + Configures how the subscription schedule handles billing for phase transitions. Possible values are `phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice. + """ class SubscriptionScheduleAmendParamsAmendmentAmendmentEnd(TypedDict): @@ -338,6 +344,10 @@ class SubscriptionScheduleAmendParamsAmendmentItemActionAdd(TypedDict): """ Options that configure the trial on the subscription item. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class SubscriptionScheduleAmendParamsAmendmentItemActionAddDiscount(TypedDict): @@ -440,6 +450,10 @@ class SubscriptionScheduleAmendParamsAmendmentItemActionSet(TypedDict): """ If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class SubscriptionScheduleAmendParamsAmendmentItemActionSetDiscount(TypedDict): diff --git a/stripe/params/_subscription_schedule_create_params.py b/stripe/params/_subscription_schedule_create_params.py index 33e07aaa0..cd066a95d 100644 --- a/stripe/params/_subscription_schedule_create_params.py +++ b/stripe/params/_subscription_schedule_create_params.py @@ -666,6 +666,10 @@ class SubscriptionScheduleCreateParamsPhaseItem(TypedDict): """ Options that configure the trial on the subscription item. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class SubscriptionScheduleCreateParamsPhaseItemBillingThresholds(TypedDict): @@ -859,14 +863,7 @@ class SubscriptionScheduleCreateParamsBillingScheduleBillUntil(TypedDict): """ The end date of the billing schedule. """ - type: Literal[ - "amendment_end", - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] + type: Literal["duration", "timestamp"] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ diff --git a/stripe/params/_subscription_schedule_modify_params.py b/stripe/params/_subscription_schedule_modify_params.py index 7d3360cfc..817b9414e 100644 --- a/stripe/params/_subscription_schedule_modify_params.py +++ b/stripe/params/_subscription_schedule_modify_params.py @@ -636,6 +636,10 @@ class SubscriptionScheduleModifyParamsPhaseItem(TypedDict): """ Options that configure the trial on the subscription item. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class SubscriptionScheduleModifyParamsPhaseItemBillingThresholds(TypedDict): @@ -831,14 +835,7 @@ class SubscriptionScheduleModifyParamsBillingScheduleBillUntil(TypedDict): """ The end date of the billing schedule. """ - type: Literal[ - "amendment_end", - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] + type: Literal["duration", "timestamp"] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ diff --git a/stripe/params/_subscription_schedule_update_params.py b/stripe/params/_subscription_schedule_update_params.py index d070dcbbd..8ea8af8a5 100644 --- a/stripe/params/_subscription_schedule_update_params.py +++ b/stripe/params/_subscription_schedule_update_params.py @@ -635,6 +635,10 @@ class SubscriptionScheduleUpdateParamsPhaseItem(TypedDict): """ Options that configure the trial on the subscription item. """ + trial_offer: NotRequired[str] + """ + The ID of the trial offer to apply to the configuration item. + """ class SubscriptionScheduleUpdateParamsPhaseItemBillingThresholds(TypedDict): @@ -830,14 +834,7 @@ class SubscriptionScheduleUpdateParamsBillingScheduleBillUntil(TypedDict): """ The end date of the billing schedule. """ - type: Literal[ - "amendment_end", - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] + type: Literal["duration", "timestamp"] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py index 61bf6e02e..cc4ca52d9 100644 --- a/stripe/params/_subscription_update_params.py +++ b/stripe/params/_subscription_update_params.py @@ -379,14 +379,7 @@ class SubscriptionUpdateParamsBillingScheduleBillUntil(TypedDict): """ The end date of the billing schedule. """ - type: Literal[ - "amendment_end", - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] + type: Literal["duration", "timestamp"] """ Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. """ @@ -545,6 +538,10 @@ class SubscriptionUpdateParamsItem(TypedDict): """ A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. """ + current_trial: NotRequired["SubscriptionUpdateParamsItemCurrentTrial"] + """ + The trial offer to apply to this subscription item. + """ class SubscriptionUpdateParamsItemBillingThresholds(TypedDict): @@ -641,6 +638,17 @@ class SubscriptionUpdateParamsItemPriceDataRecurring(TypedDict): """ +class SubscriptionUpdateParamsItemCurrentTrial(TypedDict): + trial_end: NotRequired[int] + """ + Unix timestamp representing the end of the trial offer period. Required when the trial offer has `duration.type=timestamp`. Cannot be specified when `duration.type=relative`. + """ + trial_offer: str + """ + The ID of the trial offer to apply to the subscription item. + """ + + class SubscriptionUpdateParamsPauseCollection(TypedDict): behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] """ From d85e94440fca1c206814209208e016683bccf91b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 20 Nov 2025 22:42:46 +0000 Subject: [PATCH 3/4] Update generated code for v2128 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- stripe/_api_version.py | 2 +- stripe/delegated_checkout/_requested_session.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/API_VERSION b/API_VERSION index a49631fe1..3a2e1ae58 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -0dd134c7389483bd3510fb0bdfca6eef85688924 \ No newline at end of file +c85b626acfc47a72547df680726f0e1a14c8ca37 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 114ac0579..1d5ad796c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2127 \ No newline at end of file +v2128 \ No newline at end of file diff --git a/stripe/_api_version.py b/stripe/_api_version.py index da2f6b5bd..fa105a51e 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec class _ApiVersion: - CURRENT = "2025-10-29.preview" + CURRENT = "2025-11-17.preview" diff --git a/stripe/delegated_checkout/_requested_session.py b/stripe/delegated_checkout/_requested_session.py index 6c5daff3c..f6fac6d09 100644 --- a/stripe/delegated_checkout/_requested_session.py +++ b/stripe/delegated_checkout/_requested_session.py @@ -333,11 +333,11 @@ class ApplicableFee(StripeObject): """ _inner_class_types = {"applicable_fees": ApplicableFee} - amount_subtotal: int + amount_subtotal: Optional[int] """ The subtotal amount of the requested session. """ - amount_total: int + amount_total: Optional[int] """ The total amount of the requested session. """ From 4d98f0d9bf02d976bfb9299075ce65af14356e18 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 20 Nov 2025 23:07:02 +0000 Subject: [PATCH 4/4] Update generated code for v2128 and --- API_VERSION | 2 +- stripe/_object_classes.py | 9 + stripe/events/__init__.py | 2637 ++--------------- stripe/events/_event_classes.py | 2384 +-------------- stripe/events/_v1_account_updated_event.py | 108 - .../_v1_application_fee_created_event.py | 108 - .../_v1_application_fee_refunded_event.py | 108 - ...ling_portal_configuration_created_event.py | 110 - ...ling_portal_configuration_updated_event.py | 110 - stripe/events/_v1_capability_updated_event.py | 108 - stripe/events/_v1_charge_captured_event.py | 108 - .../events/_v1_charge_dispute_closed_event.py | 108 - .../_v1_charge_dispute_created_event.py | 108 - ...1_charge_dispute_funds_reinstated_event.py | 108 - ...v1_charge_dispute_funds_withdrawn_event.py | 108 - .../_v1_charge_dispute_updated_event.py | 108 - stripe/events/_v1_charge_expired_event.py | 108 - stripe/events/_v1_charge_failed_event.py | 108 - stripe/events/_v1_charge_pending_event.py | 108 - .../events/_v1_charge_refund_updated_event.py | 108 - stripe/events/_v1_charge_refunded_event.py | 108 - stripe/events/_v1_charge_succeeded_event.py | 108 - stripe/events/_v1_charge_updated_event.py | 108 - ...kout_session_async_payment_failed_event.py | 110 - ...t_session_async_payment_succeeded_event.py | 112 - .../_v1_checkout_session_completed_event.py | 108 - .../_v1_checkout_session_expired_event.py | 108 - .../_v1_climate_order_canceled_event.py | 108 - .../events/_v1_climate_order_created_event.py | 108 - .../events/_v1_climate_order_delayed_event.py | 108 - .../_v1_climate_order_delivered_event.py | 108 - ...climate_order_product_substituted_event.py | 110 - .../_v1_climate_product_created_event.py | 108 - ...1_climate_product_pricing_updated_event.py | 108 - stripe/events/_v1_coupon_created_event.py | 108 - stripe/events/_v1_coupon_deleted_event.py | 108 - stripe/events/_v1_coupon_updated_event.py | 108 - .../events/_v1_credit_note_created_event.py | 108 - .../events/_v1_credit_note_updated_event.py | 108 - stripe/events/_v1_credit_note_voided_event.py | 108 - stripe/events/_v1_customer_created_event.py | 108 - stripe/events/_v1_customer_deleted_event.py | 108 - ..._v1_customer_subscription_created_event.py | 108 - ..._v1_customer_subscription_deleted_event.py | 108 - .../_v1_customer_subscription_paused_event.py | 108 - ...bscription_pending_update_applied_event.py | 112 - ...bscription_pending_update_expired_event.py | 112 - ..._v1_customer_subscription_resumed_event.py | 108 - ...tomer_subscription_trial_will_end_event.py | 110 - ..._v1_customer_subscription_updated_event.py | 108 - .../_v1_customer_tax_id_created_event.py | 108 - .../_v1_customer_tax_id_deleted_event.py | 108 - .../_v1_customer_tax_id_updated_event.py | 108 - stripe/events/_v1_customer_updated_event.py | 108 - stripe/events/_v1_file_created_event.py | 108 - ...ncial_connections_account_created_event.py | 110 - ...l_connections_account_deactivated_event.py | 112 - ..._connections_account_disconnected_event.py | 112 - ...tions_account_refreshed_ownership_event.py | 114 - ...ns_account_refreshed_transactions_event.py | 114 - ...ity_verification_session_canceled_event.py | 112 - ...tity_verification_session_created_event.py | 110 - ...y_verification_session_processing_event.py | 112 - ...ity_verification_session_redacted_event.py | 112 - ...rification_session_requires_input_event.py | 112 - ...ity_verification_session_verified_event.py | 112 - stripe/events/_v1_invoice_created_event.py | 108 - stripe/events/_v1_invoice_deleted_event.py | 108 - .../_v1_invoice_finalization_failed_event.py | 108 - stripe/events/_v1_invoice_finalized_event.py | 108 - .../_v1_invoice_marked_uncollectible_event.py | 108 - stripe/events/_v1_invoice_overdue_event.py | 108 - stripe/events/_v1_invoice_overpaid_event.py | 108 - stripe/events/_v1_invoice_paid_event.py | 108 - ...1_invoice_payment_action_required_event.py | 108 - .../_v1_invoice_payment_failed_event.py | 108 - .../events/_v1_invoice_payment_paid_event.py | 108 - .../_v1_invoice_payment_succeeded_event.py | 108 - stripe/events/_v1_invoice_sent_event.py | 108 - stripe/events/_v1_invoice_upcoming_event.py | 108 - stripe/events/_v1_invoice_updated_event.py | 108 - stripe/events/_v1_invoice_voided_event.py | 108 - .../events/_v1_invoice_will_be_due_event.py | 108 - .../events/_v1_invoiceitem_created_event.py | 108 - .../events/_v1_invoiceitem_deleted_event.py | 108 - ..._v1_issuing_authorization_created_event.py | 108 - ..._v1_issuing_authorization_request_event.py | 108 - ..._v1_issuing_authorization_updated_event.py | 108 - .../events/_v1_issuing_card_created_event.py | 108 - .../events/_v1_issuing_card_updated_event.py | 108 - .../_v1_issuing_cardholder_created_event.py | 108 - .../_v1_issuing_cardholder_updated_event.py | 108 - .../_v1_issuing_dispute_closed_event.py | 108 - .../_v1_issuing_dispute_created_event.py | 108 - ..._issuing_dispute_funds_reinstated_event.py | 110 - ...1_issuing_dispute_funds_rescinded_event.py | 108 - .../_v1_issuing_dispute_submitted_event.py | 108 - .../_v1_issuing_dispute_updated_event.py | 108 - ..._personalization_design_activated_event.py | 112 - ...ersonalization_design_deactivated_event.py | 112 - ...g_personalization_design_rejected_event.py | 112 - ...ng_personalization_design_updated_event.py | 112 - .../events/_v1_issuing_token_created_event.py | 108 - .../events/_v1_issuing_token_updated_event.py | 108 - .../_v1_issuing_transaction_created_event.py | 108 - ..._purchase_details_receipt_updated_event.py | 114 - .../_v1_issuing_transaction_updated_event.py | 108 - stripe/events/_v1_mandate_updated_event.py | 108 - ..._intent_amount_capturable_updated_event.py | 112 - .../_v1_payment_intent_canceled_event.py | 108 - .../_v1_payment_intent_created_event.py | 108 - ...1_payment_intent_partially_funded_event.py | 108 - ..._v1_payment_intent_payment_failed_event.py | 108 - .../_v1_payment_intent_processing_event.py | 108 - ...v1_payment_intent_requires_action_event.py | 108 - .../_v1_payment_intent_succeeded_event.py | 108 - .../events/_v1_payment_link_created_event.py | 108 - .../events/_v1_payment_link_updated_event.py | 108 - .../_v1_payment_method_attached_event.py | 108 - ...ment_method_automatically_updated_event.py | 110 - .../_v1_payment_method_detached_event.py | 108 - .../_v1_payment_method_updated_event.py | 108 - stripe/events/_v1_payout_canceled_event.py | 108 - stripe/events/_v1_payout_created_event.py | 108 - stripe/events/_v1_payout_failed_event.py | 108 - stripe/events/_v1_payout_paid_event.py | 108 - ...1_payout_reconciliation_completed_event.py | 110 - stripe/events/_v1_payout_updated_event.py | 108 - stripe/events/_v1_person_created_event.py | 108 - stripe/events/_v1_person_deleted_event.py | 108 - stripe/events/_v1_person_updated_event.py | 108 - stripe/events/_v1_plan_created_event.py | 108 - stripe/events/_v1_plan_deleted_event.py | 108 - stripe/events/_v1_plan_updated_event.py | 108 - stripe/events/_v1_price_created_event.py | 108 - stripe/events/_v1_price_deleted_event.py | 108 - stripe/events/_v1_price_updated_event.py | 108 - stripe/events/_v1_product_created_event.py | 108 - stripe/events/_v1_product_deleted_event.py | 108 - stripe/events/_v1_product_updated_event.py | 108 - .../_v1_promotion_code_created_event.py | 108 - .../_v1_promotion_code_updated_event.py | 108 - stripe/events/_v1_quote_accepted_event.py | 108 - stripe/events/_v1_quote_canceled_event.py | 108 - stripe/events/_v1_quote_created_event.py | 108 - stripe/events/_v1_quote_finalized_event.py | 108 - ...radar_early_fraud_warning_created_event.py | 110 - ...radar_early_fraud_warning_updated_event.py | 110 - stripe/events/_v1_refund_created_event.py | 108 - stripe/events/_v1_refund_failed_event.py | 108 - stripe/events/_v1_refund_updated_event.py | 108 - stripe/events/_v1_review_closed_event.py | 108 - stripe/events/_v1_review_opened_event.py | 108 - .../events/_v1_setup_intent_canceled_event.py | 108 - .../events/_v1_setup_intent_created_event.py | 108 - .../_v1_setup_intent_requires_action_event.py | 108 - .../_v1_setup_intent_setup_failed_event.py | 108 - .../_v1_setup_intent_succeeded_event.py | 108 - ...sigma_scheduled_query_run_created_event.py | 110 - stripe/events/_v1_source_canceled_event.py | 108 - stripe/events/_v1_source_chargeable_event.py | 108 - stripe/events/_v1_source_failed_event.py | 108 - ...source_refund_attributes_required_event.py | 110 - ..._v1_subscription_schedule_aborted_event.py | 108 - ...v1_subscription_schedule_canceled_event.py | 108 - ...1_subscription_schedule_completed_event.py | 110 - ..._v1_subscription_schedule_created_event.py | 108 - ...v1_subscription_schedule_expiring_event.py | 108 - ...v1_subscription_schedule_released_event.py | 108 - ..._v1_subscription_schedule_updated_event.py | 108 - stripe/events/_v1_tax_rate_created_event.py | 108 - stripe/events/_v1_tax_rate_updated_event.py | 108 - ..._v1_terminal_reader_action_failed_event.py | 108 - ..._terminal_reader_action_succeeded_event.py | 110 - ...v1_terminal_reader_action_updated_event.py | 108 - ...test_helpers_test_clock_advancing_event.py | 110 - ...1_test_helpers_test_clock_created_event.py | 108 - ...1_test_helpers_test_clock_deleted_event.py | 108 - ...lpers_test_clock_internal_failure_event.py | 112 - ..._v1_test_helpers_test_clock_ready_event.py | 108 - stripe/events/_v1_topup_canceled_event.py | 108 - stripe/events/_v1_topup_created_event.py | 108 - stripe/events/_v1_topup_failed_event.py | 108 - stripe/events/_v1_topup_reversed_event.py | 108 - stripe/events/_v1_topup_succeeded_event.py | 108 - stripe/events/_v1_transfer_created_event.py | 108 - stripe/events/_v1_transfer_reversed_event.py | 108 - stripe/events/_v1_transfer_updated_event.py | 108 - .../_v2_core_health_api_error_firing_event.py | 4 + ...v2_core_health_api_error_resolved_event.py | 4 + ...v2_core_health_api_latency_firing_event.py | 4 + ..._core_health_api_latency_resolved_event.py | 4 + ...event_generation_failure_resolved_event.py | 31 +- ..._core_health_fraud_rate_increased_event.py | 14 +- ...thorization_request_errors_firing_event.py | 29 +- ...orization_request_errors_resolved_event.py | 29 +- ...horization_request_timeout_firing_event.py | 29 +- ...rization_request_timeout_resolved_event.py | 29 +- ...ealth_payment_method_error_firing_event.py | 4 + ...lth_payment_method_error_resolved_event.py | 4 + ...f_session_payment_attempt_failed_event.py} | 34 +- ..._session_payment_attempt_started_event.py} | 36 +- stripe/params/v2/billing/__init__.py | 10 + .../_collection_setting_create_params.py | 4 +- .../_collection_setting_update_params.py | 4 +- .../billing/_service_action_create_params.py | 29 +- stripe/params/v2/core/__init__.py | 494 +++ .../params/v2/core/_account_create_params.py | 155 +- .../v2/core/_account_retrieve_params.py | 1 + .../v2/core/_account_token_create_params.py | 1534 ++++++++++ .../v2/core/_account_token_retrieve_params.py | 7 + .../params/v2/core/_account_update_params.py | 157 +- stripe/params/v2/core/_event_list_params.py | 31 +- stripe/params/v2/core/accounts/__init__.py | 124 + .../v2/core/accounts/_person_create_params.py | 5 + .../accounts/_person_token_create_params.py | 496 ++++ .../accounts/_person_token_retrieve_params.py | 7 + .../v2/core/accounts/_person_update_params.py | 5 + stripe/params/v2/money_management/__init__.py | 61 + .../_currency_conversion_create_params.py | 63 + .../_currency_conversion_list_params.py | 14 + .../_currency_conversion_retrieve_params.py | 7 + .../_inbound_transfer_create_params.py | 14 +- .../_outbound_payment_create_params.py | 14 +- .../_outbound_payment_quote_create_params.py | 14 +- .../_outbound_transfer_create_params.py | 14 +- stripe/params/v2/payments/__init__.py | 24 +- .../_off_session_payment_capture_params.py | 15 +- .../_off_session_payment_create_params.py | 97 +- stripe/params/v2/test_helpers/__init__.py | 5 + .../_financial_address_credit_params.py | 14 +- stripe/v2/_core_service.py | 6 + ...nancial_address_generated_microdeposits.py | 15 +- stripe/v2/_money_management_service.py | 8 + stripe/v2/billing/_cadence.py | 4 +- stripe/v2/billing/_collection_setting.py | 4 +- .../v2/billing/_collection_setting_version.py | 4 +- stripe/v2/billing/_meter_event.py | 3 +- stripe/v2/billing/_service_action.py | 35 +- stripe/v2/core/__init__.py | 10 + stripe/v2/core/_account.py | 491 ++- stripe/v2/core/_account_person.py | 1 + stripe/v2/core/_account_person_token.py | 39 + stripe/v2/core/_account_service.py | 8 + stripe/v2/core/_account_token.py | 39 + stripe/v2/core/_account_token_service.py | 96 + stripe/v2/core/_event.py | 4 - stripe/v2/core/accounts/__init__.py | 7 + .../v2/core/accounts/_person_token_service.py | 110 + stripe/v2/money_management/__init__.py | 14 + stripe/v2/money_management/_adjustment.py | 13 +- .../money_management/_currency_conversion.py | 84 + .../_currency_conversion_service.py | 144 + .../v2/money_management/_financial_account.py | 47 +- .../v2/money_management/_inbound_transfer.py | 42 +- .../v2/money_management/_outbound_payment.py | 38 +- .../_outbound_payment_quote.py | 49 +- .../v2/money_management/_outbound_transfer.py | 38 +- .../v2/money_management/_received_credit.py | 25 +- stripe/v2/money_management/_received_debit.py | 25 +- stripe/v2/money_management/_transaction.py | 53 +- .../v2/money_management/_transaction_entry.py | 42 +- stripe/v2/payments/_off_session_payment.py | 104 +- tests/test_generated_examples.py | 492 ++- 264 files changed, 5744 insertions(+), 25044 deletions(-) delete mode 100644 stripe/events/_v1_account_updated_event.py delete mode 100644 stripe/events/_v1_application_fee_created_event.py delete mode 100644 stripe/events/_v1_application_fee_refunded_event.py delete mode 100644 stripe/events/_v1_billing_portal_configuration_created_event.py delete mode 100644 stripe/events/_v1_billing_portal_configuration_updated_event.py delete mode 100644 stripe/events/_v1_capability_updated_event.py delete mode 100644 stripe/events/_v1_charge_captured_event.py delete mode 100644 stripe/events/_v1_charge_dispute_closed_event.py delete mode 100644 stripe/events/_v1_charge_dispute_created_event.py delete mode 100644 stripe/events/_v1_charge_dispute_funds_reinstated_event.py delete mode 100644 stripe/events/_v1_charge_dispute_funds_withdrawn_event.py delete mode 100644 stripe/events/_v1_charge_dispute_updated_event.py delete mode 100644 stripe/events/_v1_charge_expired_event.py delete mode 100644 stripe/events/_v1_charge_failed_event.py delete mode 100644 stripe/events/_v1_charge_pending_event.py delete mode 100644 stripe/events/_v1_charge_refund_updated_event.py delete mode 100644 stripe/events/_v1_charge_refunded_event.py delete mode 100644 stripe/events/_v1_charge_succeeded_event.py delete mode 100644 stripe/events/_v1_charge_updated_event.py delete mode 100644 stripe/events/_v1_checkout_session_async_payment_failed_event.py delete mode 100644 stripe/events/_v1_checkout_session_async_payment_succeeded_event.py delete mode 100644 stripe/events/_v1_checkout_session_completed_event.py delete mode 100644 stripe/events/_v1_checkout_session_expired_event.py delete mode 100644 stripe/events/_v1_climate_order_canceled_event.py delete mode 100644 stripe/events/_v1_climate_order_created_event.py delete mode 100644 stripe/events/_v1_climate_order_delayed_event.py delete mode 100644 stripe/events/_v1_climate_order_delivered_event.py delete mode 100644 stripe/events/_v1_climate_order_product_substituted_event.py delete mode 100644 stripe/events/_v1_climate_product_created_event.py delete mode 100644 stripe/events/_v1_climate_product_pricing_updated_event.py delete mode 100644 stripe/events/_v1_coupon_created_event.py delete mode 100644 stripe/events/_v1_coupon_deleted_event.py delete mode 100644 stripe/events/_v1_coupon_updated_event.py delete mode 100644 stripe/events/_v1_credit_note_created_event.py delete mode 100644 stripe/events/_v1_credit_note_updated_event.py delete mode 100644 stripe/events/_v1_credit_note_voided_event.py delete mode 100644 stripe/events/_v1_customer_created_event.py delete mode 100644 stripe/events/_v1_customer_deleted_event.py delete mode 100644 stripe/events/_v1_customer_subscription_created_event.py delete mode 100644 stripe/events/_v1_customer_subscription_deleted_event.py delete mode 100644 stripe/events/_v1_customer_subscription_paused_event.py delete mode 100644 stripe/events/_v1_customer_subscription_pending_update_applied_event.py delete mode 100644 stripe/events/_v1_customer_subscription_pending_update_expired_event.py delete mode 100644 stripe/events/_v1_customer_subscription_resumed_event.py delete mode 100644 stripe/events/_v1_customer_subscription_trial_will_end_event.py delete mode 100644 stripe/events/_v1_customer_subscription_updated_event.py delete mode 100644 stripe/events/_v1_customer_tax_id_created_event.py delete mode 100644 stripe/events/_v1_customer_tax_id_deleted_event.py delete mode 100644 stripe/events/_v1_customer_tax_id_updated_event.py delete mode 100644 stripe/events/_v1_customer_updated_event.py delete mode 100644 stripe/events/_v1_file_created_event.py delete mode 100644 stripe/events/_v1_financial_connections_account_created_event.py delete mode 100644 stripe/events/_v1_financial_connections_account_deactivated_event.py delete mode 100644 stripe/events/_v1_financial_connections_account_disconnected_event.py delete mode 100644 stripe/events/_v1_financial_connections_account_refreshed_ownership_event.py delete mode 100644 stripe/events/_v1_financial_connections_account_refreshed_transactions_event.py delete mode 100644 stripe/events/_v1_identity_verification_session_canceled_event.py delete mode 100644 stripe/events/_v1_identity_verification_session_created_event.py delete mode 100644 stripe/events/_v1_identity_verification_session_processing_event.py delete mode 100644 stripe/events/_v1_identity_verification_session_redacted_event.py delete mode 100644 stripe/events/_v1_identity_verification_session_requires_input_event.py delete mode 100644 stripe/events/_v1_identity_verification_session_verified_event.py delete mode 100644 stripe/events/_v1_invoice_created_event.py delete mode 100644 stripe/events/_v1_invoice_deleted_event.py delete mode 100644 stripe/events/_v1_invoice_finalization_failed_event.py delete mode 100644 stripe/events/_v1_invoice_finalized_event.py delete mode 100644 stripe/events/_v1_invoice_marked_uncollectible_event.py delete mode 100644 stripe/events/_v1_invoice_overdue_event.py delete mode 100644 stripe/events/_v1_invoice_overpaid_event.py delete mode 100644 stripe/events/_v1_invoice_paid_event.py delete mode 100644 stripe/events/_v1_invoice_payment_action_required_event.py delete mode 100644 stripe/events/_v1_invoice_payment_failed_event.py delete mode 100644 stripe/events/_v1_invoice_payment_paid_event.py delete mode 100644 stripe/events/_v1_invoice_payment_succeeded_event.py delete mode 100644 stripe/events/_v1_invoice_sent_event.py delete mode 100644 stripe/events/_v1_invoice_upcoming_event.py delete mode 100644 stripe/events/_v1_invoice_updated_event.py delete mode 100644 stripe/events/_v1_invoice_voided_event.py delete mode 100644 stripe/events/_v1_invoice_will_be_due_event.py delete mode 100644 stripe/events/_v1_invoiceitem_created_event.py delete mode 100644 stripe/events/_v1_invoiceitem_deleted_event.py delete mode 100644 stripe/events/_v1_issuing_authorization_created_event.py delete mode 100644 stripe/events/_v1_issuing_authorization_request_event.py delete mode 100644 stripe/events/_v1_issuing_authorization_updated_event.py delete mode 100644 stripe/events/_v1_issuing_card_created_event.py delete mode 100644 stripe/events/_v1_issuing_card_updated_event.py delete mode 100644 stripe/events/_v1_issuing_cardholder_created_event.py delete mode 100644 stripe/events/_v1_issuing_cardholder_updated_event.py delete mode 100644 stripe/events/_v1_issuing_dispute_closed_event.py delete mode 100644 stripe/events/_v1_issuing_dispute_created_event.py delete mode 100644 stripe/events/_v1_issuing_dispute_funds_reinstated_event.py delete mode 100644 stripe/events/_v1_issuing_dispute_funds_rescinded_event.py delete mode 100644 stripe/events/_v1_issuing_dispute_submitted_event.py delete mode 100644 stripe/events/_v1_issuing_dispute_updated_event.py delete mode 100644 stripe/events/_v1_issuing_personalization_design_activated_event.py delete mode 100644 stripe/events/_v1_issuing_personalization_design_deactivated_event.py delete mode 100644 stripe/events/_v1_issuing_personalization_design_rejected_event.py delete mode 100644 stripe/events/_v1_issuing_personalization_design_updated_event.py delete mode 100644 stripe/events/_v1_issuing_token_created_event.py delete mode 100644 stripe/events/_v1_issuing_token_updated_event.py delete mode 100644 stripe/events/_v1_issuing_transaction_created_event.py delete mode 100644 stripe/events/_v1_issuing_transaction_purchase_details_receipt_updated_event.py delete mode 100644 stripe/events/_v1_issuing_transaction_updated_event.py delete mode 100644 stripe/events/_v1_mandate_updated_event.py delete mode 100644 stripe/events/_v1_payment_intent_amount_capturable_updated_event.py delete mode 100644 stripe/events/_v1_payment_intent_canceled_event.py delete mode 100644 stripe/events/_v1_payment_intent_created_event.py delete mode 100644 stripe/events/_v1_payment_intent_partially_funded_event.py delete mode 100644 stripe/events/_v1_payment_intent_payment_failed_event.py delete mode 100644 stripe/events/_v1_payment_intent_processing_event.py delete mode 100644 stripe/events/_v1_payment_intent_requires_action_event.py delete mode 100644 stripe/events/_v1_payment_intent_succeeded_event.py delete mode 100644 stripe/events/_v1_payment_link_created_event.py delete mode 100644 stripe/events/_v1_payment_link_updated_event.py delete mode 100644 stripe/events/_v1_payment_method_attached_event.py delete mode 100644 stripe/events/_v1_payment_method_automatically_updated_event.py delete mode 100644 stripe/events/_v1_payment_method_detached_event.py delete mode 100644 stripe/events/_v1_payment_method_updated_event.py delete mode 100644 stripe/events/_v1_payout_canceled_event.py delete mode 100644 stripe/events/_v1_payout_created_event.py delete mode 100644 stripe/events/_v1_payout_failed_event.py delete mode 100644 stripe/events/_v1_payout_paid_event.py delete mode 100644 stripe/events/_v1_payout_reconciliation_completed_event.py delete mode 100644 stripe/events/_v1_payout_updated_event.py delete mode 100644 stripe/events/_v1_person_created_event.py delete mode 100644 stripe/events/_v1_person_deleted_event.py delete mode 100644 stripe/events/_v1_person_updated_event.py delete mode 100644 stripe/events/_v1_plan_created_event.py delete mode 100644 stripe/events/_v1_plan_deleted_event.py delete mode 100644 stripe/events/_v1_plan_updated_event.py delete mode 100644 stripe/events/_v1_price_created_event.py delete mode 100644 stripe/events/_v1_price_deleted_event.py delete mode 100644 stripe/events/_v1_price_updated_event.py delete mode 100644 stripe/events/_v1_product_created_event.py delete mode 100644 stripe/events/_v1_product_deleted_event.py delete mode 100644 stripe/events/_v1_product_updated_event.py delete mode 100644 stripe/events/_v1_promotion_code_created_event.py delete mode 100644 stripe/events/_v1_promotion_code_updated_event.py delete mode 100644 stripe/events/_v1_quote_accepted_event.py delete mode 100644 stripe/events/_v1_quote_canceled_event.py delete mode 100644 stripe/events/_v1_quote_created_event.py delete mode 100644 stripe/events/_v1_quote_finalized_event.py delete mode 100644 stripe/events/_v1_radar_early_fraud_warning_created_event.py delete mode 100644 stripe/events/_v1_radar_early_fraud_warning_updated_event.py delete mode 100644 stripe/events/_v1_refund_created_event.py delete mode 100644 stripe/events/_v1_refund_failed_event.py delete mode 100644 stripe/events/_v1_refund_updated_event.py delete mode 100644 stripe/events/_v1_review_closed_event.py delete mode 100644 stripe/events/_v1_review_opened_event.py delete mode 100644 stripe/events/_v1_setup_intent_canceled_event.py delete mode 100644 stripe/events/_v1_setup_intent_created_event.py delete mode 100644 stripe/events/_v1_setup_intent_requires_action_event.py delete mode 100644 stripe/events/_v1_setup_intent_setup_failed_event.py delete mode 100644 stripe/events/_v1_setup_intent_succeeded_event.py delete mode 100644 stripe/events/_v1_sigma_scheduled_query_run_created_event.py delete mode 100644 stripe/events/_v1_source_canceled_event.py delete mode 100644 stripe/events/_v1_source_chargeable_event.py delete mode 100644 stripe/events/_v1_source_failed_event.py delete mode 100644 stripe/events/_v1_source_refund_attributes_required_event.py delete mode 100644 stripe/events/_v1_subscription_schedule_aborted_event.py delete mode 100644 stripe/events/_v1_subscription_schedule_canceled_event.py delete mode 100644 stripe/events/_v1_subscription_schedule_completed_event.py delete mode 100644 stripe/events/_v1_subscription_schedule_created_event.py delete mode 100644 stripe/events/_v1_subscription_schedule_expiring_event.py delete mode 100644 stripe/events/_v1_subscription_schedule_released_event.py delete mode 100644 stripe/events/_v1_subscription_schedule_updated_event.py delete mode 100644 stripe/events/_v1_tax_rate_created_event.py delete mode 100644 stripe/events/_v1_tax_rate_updated_event.py delete mode 100644 stripe/events/_v1_terminal_reader_action_failed_event.py delete mode 100644 stripe/events/_v1_terminal_reader_action_succeeded_event.py delete mode 100644 stripe/events/_v1_terminal_reader_action_updated_event.py delete mode 100644 stripe/events/_v1_test_helpers_test_clock_advancing_event.py delete mode 100644 stripe/events/_v1_test_helpers_test_clock_created_event.py delete mode 100644 stripe/events/_v1_test_helpers_test_clock_deleted_event.py delete mode 100644 stripe/events/_v1_test_helpers_test_clock_internal_failure_event.py delete mode 100644 stripe/events/_v1_test_helpers_test_clock_ready_event.py delete mode 100644 stripe/events/_v1_topup_canceled_event.py delete mode 100644 stripe/events/_v1_topup_created_event.py delete mode 100644 stripe/events/_v1_topup_failed_event.py delete mode 100644 stripe/events/_v1_topup_reversed_event.py delete mode 100644 stripe/events/_v1_topup_succeeded_event.py delete mode 100644 stripe/events/_v1_transfer_created_event.py delete mode 100644 stripe/events/_v1_transfer_reversed_event.py delete mode 100644 stripe/events/_v1_transfer_updated_event.py rename stripe/events/{_v1_financial_connections_account_reactivated_event.py => _v2_payments_off_session_payment_attempt_failed_event.py} (70%) rename stripe/events/{_v1_financial_connections_account_refreshed_balance_event.py => _v2_payments_off_session_payment_attempt_started_event.py} (72%) create mode 100644 stripe/params/v2/core/_account_token_create_params.py create mode 100644 stripe/params/v2/core/_account_token_retrieve_params.py create mode 100644 stripe/params/v2/core/accounts/_person_token_create_params.py create mode 100644 stripe/params/v2/core/accounts/_person_token_retrieve_params.py create mode 100644 stripe/params/v2/money_management/_currency_conversion_create_params.py create mode 100644 stripe/params/v2/money_management/_currency_conversion_list_params.py create mode 100644 stripe/params/v2/money_management/_currency_conversion_retrieve_params.py create mode 100644 stripe/v2/core/_account_person_token.py create mode 100644 stripe/v2/core/_account_token.py create mode 100644 stripe/v2/core/_account_token_service.py create mode 100644 stripe/v2/core/accounts/_person_token_service.py create mode 100644 stripe/v2/money_management/_currency_conversion.py create mode 100644 stripe/v2/money_management/_currency_conversion_service.py diff --git a/API_VERSION b/API_VERSION index 3a2e1ae58..e2854d256 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -c85b626acfc47a72547df680726f0e1a14c8ca37 \ No newline at end of file +7f436e73385732b1c5502f408a6fe37f7b6b0612 \ No newline at end of file diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index cb8a46a7b..ce97d7c91 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -499,6 +499,11 @@ "stripe.v2.core._account_person", "AccountPerson", ), + "v2.core.account_person_token": ( + "stripe.v2.core._account_person_token", + "AccountPersonToken", + ), + "v2.core.account_token": ("stripe.v2.core._account_token", "AccountToken"), "v2.core.claimable_sandbox": ( "stripe.v2.core._claimable_sandbox", "ClaimableSandbox", @@ -528,6 +533,10 @@ "stripe.v2.money_management._adjustment", "Adjustment", ), + "v2.money_management.currency_conversion": ( + "stripe.v2.money_management._currency_conversion", + "CurrencyConversion", + ), "v2.money_management.financial_account": ( "stripe.v2.money_management._financial_account", "FinancialAccount", diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py index 627d3d697..a18a80621 100644 --- a/stripe/events/__init__.py +++ b/stripe/events/__init__.py @@ -13,18 +13,6 @@ from stripe.events._event_classes import ( ALL_EVENT_NOTIFICATIONS as ALL_EVENT_NOTIFICATIONS, ) - from stripe.events._v1_account_updated_event import ( - V1AccountUpdatedEvent as V1AccountUpdatedEvent, - V1AccountUpdatedEventNotification as V1AccountUpdatedEventNotification, - ) - from stripe.events._v1_application_fee_created_event import ( - V1ApplicationFeeCreatedEvent as V1ApplicationFeeCreatedEvent, - V1ApplicationFeeCreatedEventNotification as V1ApplicationFeeCreatedEventNotification, - ) - from stripe.events._v1_application_fee_refunded_event import ( - V1ApplicationFeeRefundedEvent as V1ApplicationFeeRefundedEvent, - V1ApplicationFeeRefundedEventNotification as V1ApplicationFeeRefundedEventNotification, - ) from stripe.events._v1_billing_meter_error_report_triggered_event import ( V1BillingMeterErrorReportTriggeredEvent as V1BillingMeterErrorReportTriggeredEvent, V1BillingMeterErrorReportTriggeredEventNotification as V1BillingMeterErrorReportTriggeredEventNotification, @@ -33,738 +21,6 @@ V1BillingMeterNoMeterFoundEvent as V1BillingMeterNoMeterFoundEvent, V1BillingMeterNoMeterFoundEventNotification as V1BillingMeterNoMeterFoundEventNotification, ) - from stripe.events._v1_billing_portal_configuration_created_event import ( - V1BillingPortalConfigurationCreatedEvent as V1BillingPortalConfigurationCreatedEvent, - V1BillingPortalConfigurationCreatedEventNotification as V1BillingPortalConfigurationCreatedEventNotification, - ) - from stripe.events._v1_billing_portal_configuration_updated_event import ( - V1BillingPortalConfigurationUpdatedEvent as V1BillingPortalConfigurationUpdatedEvent, - V1BillingPortalConfigurationUpdatedEventNotification as V1BillingPortalConfigurationUpdatedEventNotification, - ) - from stripe.events._v1_capability_updated_event import ( - V1CapabilityUpdatedEvent as V1CapabilityUpdatedEvent, - V1CapabilityUpdatedEventNotification as V1CapabilityUpdatedEventNotification, - ) - from stripe.events._v1_charge_captured_event import ( - V1ChargeCapturedEvent as V1ChargeCapturedEvent, - V1ChargeCapturedEventNotification as V1ChargeCapturedEventNotification, - ) - from stripe.events._v1_charge_dispute_closed_event import ( - V1ChargeDisputeClosedEvent as V1ChargeDisputeClosedEvent, - V1ChargeDisputeClosedEventNotification as V1ChargeDisputeClosedEventNotification, - ) - from stripe.events._v1_charge_dispute_created_event import ( - V1ChargeDisputeCreatedEvent as V1ChargeDisputeCreatedEvent, - V1ChargeDisputeCreatedEventNotification as V1ChargeDisputeCreatedEventNotification, - ) - from stripe.events._v1_charge_dispute_funds_reinstated_event import ( - V1ChargeDisputeFundsReinstatedEvent as V1ChargeDisputeFundsReinstatedEvent, - V1ChargeDisputeFundsReinstatedEventNotification as V1ChargeDisputeFundsReinstatedEventNotification, - ) - from stripe.events._v1_charge_dispute_funds_withdrawn_event import ( - V1ChargeDisputeFundsWithdrawnEvent as V1ChargeDisputeFundsWithdrawnEvent, - V1ChargeDisputeFundsWithdrawnEventNotification as V1ChargeDisputeFundsWithdrawnEventNotification, - ) - from stripe.events._v1_charge_dispute_updated_event import ( - V1ChargeDisputeUpdatedEvent as V1ChargeDisputeUpdatedEvent, - V1ChargeDisputeUpdatedEventNotification as V1ChargeDisputeUpdatedEventNotification, - ) - from stripe.events._v1_charge_expired_event import ( - V1ChargeExpiredEvent as V1ChargeExpiredEvent, - V1ChargeExpiredEventNotification as V1ChargeExpiredEventNotification, - ) - from stripe.events._v1_charge_failed_event import ( - V1ChargeFailedEvent as V1ChargeFailedEvent, - V1ChargeFailedEventNotification as V1ChargeFailedEventNotification, - ) - from stripe.events._v1_charge_pending_event import ( - V1ChargePendingEvent as V1ChargePendingEvent, - V1ChargePendingEventNotification as V1ChargePendingEventNotification, - ) - from stripe.events._v1_charge_refund_updated_event import ( - V1ChargeRefundUpdatedEvent as V1ChargeRefundUpdatedEvent, - V1ChargeRefundUpdatedEventNotification as V1ChargeRefundUpdatedEventNotification, - ) - from stripe.events._v1_charge_refunded_event import ( - V1ChargeRefundedEvent as V1ChargeRefundedEvent, - V1ChargeRefundedEventNotification as V1ChargeRefundedEventNotification, - ) - from stripe.events._v1_charge_succeeded_event import ( - V1ChargeSucceededEvent as V1ChargeSucceededEvent, - V1ChargeSucceededEventNotification as V1ChargeSucceededEventNotification, - ) - from stripe.events._v1_charge_updated_event import ( - V1ChargeUpdatedEvent as V1ChargeUpdatedEvent, - V1ChargeUpdatedEventNotification as V1ChargeUpdatedEventNotification, - ) - from stripe.events._v1_checkout_session_async_payment_failed_event import ( - V1CheckoutSessionAsyncPaymentFailedEvent as V1CheckoutSessionAsyncPaymentFailedEvent, - V1CheckoutSessionAsyncPaymentFailedEventNotification as V1CheckoutSessionAsyncPaymentFailedEventNotification, - ) - from stripe.events._v1_checkout_session_async_payment_succeeded_event import ( - V1CheckoutSessionAsyncPaymentSucceededEvent as V1CheckoutSessionAsyncPaymentSucceededEvent, - V1CheckoutSessionAsyncPaymentSucceededEventNotification as V1CheckoutSessionAsyncPaymentSucceededEventNotification, - ) - from stripe.events._v1_checkout_session_completed_event import ( - V1CheckoutSessionCompletedEvent as V1CheckoutSessionCompletedEvent, - V1CheckoutSessionCompletedEventNotification as V1CheckoutSessionCompletedEventNotification, - ) - from stripe.events._v1_checkout_session_expired_event import ( - V1CheckoutSessionExpiredEvent as V1CheckoutSessionExpiredEvent, - V1CheckoutSessionExpiredEventNotification as V1CheckoutSessionExpiredEventNotification, - ) - from stripe.events._v1_climate_order_canceled_event import ( - V1ClimateOrderCanceledEvent as V1ClimateOrderCanceledEvent, - V1ClimateOrderCanceledEventNotification as V1ClimateOrderCanceledEventNotification, - ) - from stripe.events._v1_climate_order_created_event import ( - V1ClimateOrderCreatedEvent as V1ClimateOrderCreatedEvent, - V1ClimateOrderCreatedEventNotification as V1ClimateOrderCreatedEventNotification, - ) - from stripe.events._v1_climate_order_delayed_event import ( - V1ClimateOrderDelayedEvent as V1ClimateOrderDelayedEvent, - V1ClimateOrderDelayedEventNotification as V1ClimateOrderDelayedEventNotification, - ) - from stripe.events._v1_climate_order_delivered_event import ( - V1ClimateOrderDeliveredEvent as V1ClimateOrderDeliveredEvent, - V1ClimateOrderDeliveredEventNotification as V1ClimateOrderDeliveredEventNotification, - ) - from stripe.events._v1_climate_order_product_substituted_event import ( - V1ClimateOrderProductSubstitutedEvent as V1ClimateOrderProductSubstitutedEvent, - V1ClimateOrderProductSubstitutedEventNotification as V1ClimateOrderProductSubstitutedEventNotification, - ) - from stripe.events._v1_climate_product_created_event import ( - V1ClimateProductCreatedEvent as V1ClimateProductCreatedEvent, - V1ClimateProductCreatedEventNotification as V1ClimateProductCreatedEventNotification, - ) - from stripe.events._v1_climate_product_pricing_updated_event import ( - V1ClimateProductPricingUpdatedEvent as V1ClimateProductPricingUpdatedEvent, - V1ClimateProductPricingUpdatedEventNotification as V1ClimateProductPricingUpdatedEventNotification, - ) - from stripe.events._v1_coupon_created_event import ( - V1CouponCreatedEvent as V1CouponCreatedEvent, - V1CouponCreatedEventNotification as V1CouponCreatedEventNotification, - ) - from stripe.events._v1_coupon_deleted_event import ( - V1CouponDeletedEvent as V1CouponDeletedEvent, - V1CouponDeletedEventNotification as V1CouponDeletedEventNotification, - ) - from stripe.events._v1_coupon_updated_event import ( - V1CouponUpdatedEvent as V1CouponUpdatedEvent, - V1CouponUpdatedEventNotification as V1CouponUpdatedEventNotification, - ) - from stripe.events._v1_credit_note_created_event import ( - V1CreditNoteCreatedEvent as V1CreditNoteCreatedEvent, - V1CreditNoteCreatedEventNotification as V1CreditNoteCreatedEventNotification, - ) - from stripe.events._v1_credit_note_updated_event import ( - V1CreditNoteUpdatedEvent as V1CreditNoteUpdatedEvent, - V1CreditNoteUpdatedEventNotification as V1CreditNoteUpdatedEventNotification, - ) - from stripe.events._v1_credit_note_voided_event import ( - V1CreditNoteVoidedEvent as V1CreditNoteVoidedEvent, - V1CreditNoteVoidedEventNotification as V1CreditNoteVoidedEventNotification, - ) - from stripe.events._v1_customer_created_event import ( - V1CustomerCreatedEvent as V1CustomerCreatedEvent, - V1CustomerCreatedEventNotification as V1CustomerCreatedEventNotification, - ) - from stripe.events._v1_customer_deleted_event import ( - V1CustomerDeletedEvent as V1CustomerDeletedEvent, - V1CustomerDeletedEventNotification as V1CustomerDeletedEventNotification, - ) - from stripe.events._v1_customer_subscription_created_event import ( - V1CustomerSubscriptionCreatedEvent as V1CustomerSubscriptionCreatedEvent, - V1CustomerSubscriptionCreatedEventNotification as V1CustomerSubscriptionCreatedEventNotification, - ) - from stripe.events._v1_customer_subscription_deleted_event import ( - V1CustomerSubscriptionDeletedEvent as V1CustomerSubscriptionDeletedEvent, - V1CustomerSubscriptionDeletedEventNotification as V1CustomerSubscriptionDeletedEventNotification, - ) - from stripe.events._v1_customer_subscription_paused_event import ( - V1CustomerSubscriptionPausedEvent as V1CustomerSubscriptionPausedEvent, - V1CustomerSubscriptionPausedEventNotification as V1CustomerSubscriptionPausedEventNotification, - ) - from stripe.events._v1_customer_subscription_pending_update_applied_event import ( - V1CustomerSubscriptionPendingUpdateAppliedEvent as V1CustomerSubscriptionPendingUpdateAppliedEvent, - V1CustomerSubscriptionPendingUpdateAppliedEventNotification as V1CustomerSubscriptionPendingUpdateAppliedEventNotification, - ) - from stripe.events._v1_customer_subscription_pending_update_expired_event import ( - V1CustomerSubscriptionPendingUpdateExpiredEvent as V1CustomerSubscriptionPendingUpdateExpiredEvent, - V1CustomerSubscriptionPendingUpdateExpiredEventNotification as V1CustomerSubscriptionPendingUpdateExpiredEventNotification, - ) - from stripe.events._v1_customer_subscription_resumed_event import ( - V1CustomerSubscriptionResumedEvent as V1CustomerSubscriptionResumedEvent, - V1CustomerSubscriptionResumedEventNotification as V1CustomerSubscriptionResumedEventNotification, - ) - from stripe.events._v1_customer_subscription_trial_will_end_event import ( - V1CustomerSubscriptionTrialWillEndEvent as V1CustomerSubscriptionTrialWillEndEvent, - V1CustomerSubscriptionTrialWillEndEventNotification as V1CustomerSubscriptionTrialWillEndEventNotification, - ) - from stripe.events._v1_customer_subscription_updated_event import ( - V1CustomerSubscriptionUpdatedEvent as V1CustomerSubscriptionUpdatedEvent, - V1CustomerSubscriptionUpdatedEventNotification as V1CustomerSubscriptionUpdatedEventNotification, - ) - from stripe.events._v1_customer_tax_id_created_event import ( - V1CustomerTaxIdCreatedEvent as V1CustomerTaxIdCreatedEvent, - V1CustomerTaxIdCreatedEventNotification as V1CustomerTaxIdCreatedEventNotification, - ) - from stripe.events._v1_customer_tax_id_deleted_event import ( - V1CustomerTaxIdDeletedEvent as V1CustomerTaxIdDeletedEvent, - V1CustomerTaxIdDeletedEventNotification as V1CustomerTaxIdDeletedEventNotification, - ) - from stripe.events._v1_customer_tax_id_updated_event import ( - V1CustomerTaxIdUpdatedEvent as V1CustomerTaxIdUpdatedEvent, - V1CustomerTaxIdUpdatedEventNotification as V1CustomerTaxIdUpdatedEventNotification, - ) - from stripe.events._v1_customer_updated_event import ( - V1CustomerUpdatedEvent as V1CustomerUpdatedEvent, - V1CustomerUpdatedEventNotification as V1CustomerUpdatedEventNotification, - ) - from stripe.events._v1_file_created_event import ( - V1FileCreatedEvent as V1FileCreatedEvent, - V1FileCreatedEventNotification as V1FileCreatedEventNotification, - ) - from stripe.events._v1_financial_connections_account_created_event import ( - V1FinancialConnectionsAccountCreatedEvent as V1FinancialConnectionsAccountCreatedEvent, - V1FinancialConnectionsAccountCreatedEventNotification as V1FinancialConnectionsAccountCreatedEventNotification, - ) - from stripe.events._v1_financial_connections_account_deactivated_event import ( - V1FinancialConnectionsAccountDeactivatedEvent as V1FinancialConnectionsAccountDeactivatedEvent, - V1FinancialConnectionsAccountDeactivatedEventNotification as V1FinancialConnectionsAccountDeactivatedEventNotification, - ) - from stripe.events._v1_financial_connections_account_disconnected_event import ( - V1FinancialConnectionsAccountDisconnectedEvent as V1FinancialConnectionsAccountDisconnectedEvent, - V1FinancialConnectionsAccountDisconnectedEventNotification as V1FinancialConnectionsAccountDisconnectedEventNotification, - ) - from stripe.events._v1_financial_connections_account_reactivated_event import ( - V1FinancialConnectionsAccountReactivatedEvent as V1FinancialConnectionsAccountReactivatedEvent, - V1FinancialConnectionsAccountReactivatedEventNotification as V1FinancialConnectionsAccountReactivatedEventNotification, - ) - from stripe.events._v1_financial_connections_account_refreshed_balance_event import ( - V1FinancialConnectionsAccountRefreshedBalanceEvent as V1FinancialConnectionsAccountRefreshedBalanceEvent, - V1FinancialConnectionsAccountRefreshedBalanceEventNotification as V1FinancialConnectionsAccountRefreshedBalanceEventNotification, - ) - from stripe.events._v1_financial_connections_account_refreshed_ownership_event import ( - V1FinancialConnectionsAccountRefreshedOwnershipEvent as V1FinancialConnectionsAccountRefreshedOwnershipEvent, - V1FinancialConnectionsAccountRefreshedOwnershipEventNotification as V1FinancialConnectionsAccountRefreshedOwnershipEventNotification, - ) - from stripe.events._v1_financial_connections_account_refreshed_transactions_event import ( - V1FinancialConnectionsAccountRefreshedTransactionsEvent as V1FinancialConnectionsAccountRefreshedTransactionsEvent, - V1FinancialConnectionsAccountRefreshedTransactionsEventNotification as V1FinancialConnectionsAccountRefreshedTransactionsEventNotification, - ) - from stripe.events._v1_identity_verification_session_canceled_event import ( - V1IdentityVerificationSessionCanceledEvent as V1IdentityVerificationSessionCanceledEvent, - V1IdentityVerificationSessionCanceledEventNotification as V1IdentityVerificationSessionCanceledEventNotification, - ) - from stripe.events._v1_identity_verification_session_created_event import ( - V1IdentityVerificationSessionCreatedEvent as V1IdentityVerificationSessionCreatedEvent, - V1IdentityVerificationSessionCreatedEventNotification as V1IdentityVerificationSessionCreatedEventNotification, - ) - from stripe.events._v1_identity_verification_session_processing_event import ( - V1IdentityVerificationSessionProcessingEvent as V1IdentityVerificationSessionProcessingEvent, - V1IdentityVerificationSessionProcessingEventNotification as V1IdentityVerificationSessionProcessingEventNotification, - ) - from stripe.events._v1_identity_verification_session_redacted_event import ( - V1IdentityVerificationSessionRedactedEvent as V1IdentityVerificationSessionRedactedEvent, - V1IdentityVerificationSessionRedactedEventNotification as V1IdentityVerificationSessionRedactedEventNotification, - ) - from stripe.events._v1_identity_verification_session_requires_input_event import ( - V1IdentityVerificationSessionRequiresInputEvent as V1IdentityVerificationSessionRequiresInputEvent, - V1IdentityVerificationSessionRequiresInputEventNotification as V1IdentityVerificationSessionRequiresInputEventNotification, - ) - from stripe.events._v1_identity_verification_session_verified_event import ( - V1IdentityVerificationSessionVerifiedEvent as V1IdentityVerificationSessionVerifiedEvent, - V1IdentityVerificationSessionVerifiedEventNotification as V1IdentityVerificationSessionVerifiedEventNotification, - ) - from stripe.events._v1_invoice_created_event import ( - V1InvoiceCreatedEvent as V1InvoiceCreatedEvent, - V1InvoiceCreatedEventNotification as V1InvoiceCreatedEventNotification, - ) - from stripe.events._v1_invoice_deleted_event import ( - V1InvoiceDeletedEvent as V1InvoiceDeletedEvent, - V1InvoiceDeletedEventNotification as V1InvoiceDeletedEventNotification, - ) - from stripe.events._v1_invoice_finalization_failed_event import ( - V1InvoiceFinalizationFailedEvent as V1InvoiceFinalizationFailedEvent, - V1InvoiceFinalizationFailedEventNotification as V1InvoiceFinalizationFailedEventNotification, - ) - from stripe.events._v1_invoice_finalized_event import ( - V1InvoiceFinalizedEvent as V1InvoiceFinalizedEvent, - V1InvoiceFinalizedEventNotification as V1InvoiceFinalizedEventNotification, - ) - from stripe.events._v1_invoice_marked_uncollectible_event import ( - V1InvoiceMarkedUncollectibleEvent as V1InvoiceMarkedUncollectibleEvent, - V1InvoiceMarkedUncollectibleEventNotification as V1InvoiceMarkedUncollectibleEventNotification, - ) - from stripe.events._v1_invoice_overdue_event import ( - V1InvoiceOverdueEvent as V1InvoiceOverdueEvent, - V1InvoiceOverdueEventNotification as V1InvoiceOverdueEventNotification, - ) - from stripe.events._v1_invoice_overpaid_event import ( - V1InvoiceOverpaidEvent as V1InvoiceOverpaidEvent, - V1InvoiceOverpaidEventNotification as V1InvoiceOverpaidEventNotification, - ) - from stripe.events._v1_invoice_paid_event import ( - V1InvoicePaidEvent as V1InvoicePaidEvent, - V1InvoicePaidEventNotification as V1InvoicePaidEventNotification, - ) - from stripe.events._v1_invoice_payment_action_required_event import ( - V1InvoicePaymentActionRequiredEvent as V1InvoicePaymentActionRequiredEvent, - V1InvoicePaymentActionRequiredEventNotification as V1InvoicePaymentActionRequiredEventNotification, - ) - from stripe.events._v1_invoice_payment_failed_event import ( - V1InvoicePaymentFailedEvent as V1InvoicePaymentFailedEvent, - V1InvoicePaymentFailedEventNotification as V1InvoicePaymentFailedEventNotification, - ) - from stripe.events._v1_invoice_payment_paid_event import ( - V1InvoicePaymentPaidEvent as V1InvoicePaymentPaidEvent, - V1InvoicePaymentPaidEventNotification as V1InvoicePaymentPaidEventNotification, - ) - from stripe.events._v1_invoice_payment_succeeded_event import ( - V1InvoicePaymentSucceededEvent as V1InvoicePaymentSucceededEvent, - V1InvoicePaymentSucceededEventNotification as V1InvoicePaymentSucceededEventNotification, - ) - from stripe.events._v1_invoice_sent_event import ( - V1InvoiceSentEvent as V1InvoiceSentEvent, - V1InvoiceSentEventNotification as V1InvoiceSentEventNotification, - ) - from stripe.events._v1_invoice_upcoming_event import ( - V1InvoiceUpcomingEvent as V1InvoiceUpcomingEvent, - V1InvoiceUpcomingEventNotification as V1InvoiceUpcomingEventNotification, - ) - from stripe.events._v1_invoice_updated_event import ( - V1InvoiceUpdatedEvent as V1InvoiceUpdatedEvent, - V1InvoiceUpdatedEventNotification as V1InvoiceUpdatedEventNotification, - ) - from stripe.events._v1_invoice_voided_event import ( - V1InvoiceVoidedEvent as V1InvoiceVoidedEvent, - V1InvoiceVoidedEventNotification as V1InvoiceVoidedEventNotification, - ) - from stripe.events._v1_invoice_will_be_due_event import ( - V1InvoiceWillBeDueEvent as V1InvoiceWillBeDueEvent, - V1InvoiceWillBeDueEventNotification as V1InvoiceWillBeDueEventNotification, - ) - from stripe.events._v1_invoiceitem_created_event import ( - V1InvoiceitemCreatedEvent as V1InvoiceitemCreatedEvent, - V1InvoiceitemCreatedEventNotification as V1InvoiceitemCreatedEventNotification, - ) - from stripe.events._v1_invoiceitem_deleted_event import ( - V1InvoiceitemDeletedEvent as V1InvoiceitemDeletedEvent, - V1InvoiceitemDeletedEventNotification as V1InvoiceitemDeletedEventNotification, - ) - from stripe.events._v1_issuing_authorization_created_event import ( - V1IssuingAuthorizationCreatedEvent as V1IssuingAuthorizationCreatedEvent, - V1IssuingAuthorizationCreatedEventNotification as V1IssuingAuthorizationCreatedEventNotification, - ) - from stripe.events._v1_issuing_authorization_request_event import ( - V1IssuingAuthorizationRequestEvent as V1IssuingAuthorizationRequestEvent, - V1IssuingAuthorizationRequestEventNotification as V1IssuingAuthorizationRequestEventNotification, - ) - from stripe.events._v1_issuing_authorization_updated_event import ( - V1IssuingAuthorizationUpdatedEvent as V1IssuingAuthorizationUpdatedEvent, - V1IssuingAuthorizationUpdatedEventNotification as V1IssuingAuthorizationUpdatedEventNotification, - ) - from stripe.events._v1_issuing_card_created_event import ( - V1IssuingCardCreatedEvent as V1IssuingCardCreatedEvent, - V1IssuingCardCreatedEventNotification as V1IssuingCardCreatedEventNotification, - ) - from stripe.events._v1_issuing_card_updated_event import ( - V1IssuingCardUpdatedEvent as V1IssuingCardUpdatedEvent, - V1IssuingCardUpdatedEventNotification as V1IssuingCardUpdatedEventNotification, - ) - from stripe.events._v1_issuing_cardholder_created_event import ( - V1IssuingCardholderCreatedEvent as V1IssuingCardholderCreatedEvent, - V1IssuingCardholderCreatedEventNotification as V1IssuingCardholderCreatedEventNotification, - ) - from stripe.events._v1_issuing_cardholder_updated_event import ( - V1IssuingCardholderUpdatedEvent as V1IssuingCardholderUpdatedEvent, - V1IssuingCardholderUpdatedEventNotification as V1IssuingCardholderUpdatedEventNotification, - ) - from stripe.events._v1_issuing_dispute_closed_event import ( - V1IssuingDisputeClosedEvent as V1IssuingDisputeClosedEvent, - V1IssuingDisputeClosedEventNotification as V1IssuingDisputeClosedEventNotification, - ) - from stripe.events._v1_issuing_dispute_created_event import ( - V1IssuingDisputeCreatedEvent as V1IssuingDisputeCreatedEvent, - V1IssuingDisputeCreatedEventNotification as V1IssuingDisputeCreatedEventNotification, - ) - from stripe.events._v1_issuing_dispute_funds_reinstated_event import ( - V1IssuingDisputeFundsReinstatedEvent as V1IssuingDisputeFundsReinstatedEvent, - V1IssuingDisputeFundsReinstatedEventNotification as V1IssuingDisputeFundsReinstatedEventNotification, - ) - from stripe.events._v1_issuing_dispute_funds_rescinded_event import ( - V1IssuingDisputeFundsRescindedEvent as V1IssuingDisputeFundsRescindedEvent, - V1IssuingDisputeFundsRescindedEventNotification as V1IssuingDisputeFundsRescindedEventNotification, - ) - from stripe.events._v1_issuing_dispute_submitted_event import ( - V1IssuingDisputeSubmittedEvent as V1IssuingDisputeSubmittedEvent, - V1IssuingDisputeSubmittedEventNotification as V1IssuingDisputeSubmittedEventNotification, - ) - from stripe.events._v1_issuing_dispute_updated_event import ( - V1IssuingDisputeUpdatedEvent as V1IssuingDisputeUpdatedEvent, - V1IssuingDisputeUpdatedEventNotification as V1IssuingDisputeUpdatedEventNotification, - ) - from stripe.events._v1_issuing_personalization_design_activated_event import ( - V1IssuingPersonalizationDesignActivatedEvent as V1IssuingPersonalizationDesignActivatedEvent, - V1IssuingPersonalizationDesignActivatedEventNotification as V1IssuingPersonalizationDesignActivatedEventNotification, - ) - from stripe.events._v1_issuing_personalization_design_deactivated_event import ( - V1IssuingPersonalizationDesignDeactivatedEvent as V1IssuingPersonalizationDesignDeactivatedEvent, - V1IssuingPersonalizationDesignDeactivatedEventNotification as V1IssuingPersonalizationDesignDeactivatedEventNotification, - ) - from stripe.events._v1_issuing_personalization_design_rejected_event import ( - V1IssuingPersonalizationDesignRejectedEvent as V1IssuingPersonalizationDesignRejectedEvent, - V1IssuingPersonalizationDesignRejectedEventNotification as V1IssuingPersonalizationDesignRejectedEventNotification, - ) - from stripe.events._v1_issuing_personalization_design_updated_event import ( - V1IssuingPersonalizationDesignUpdatedEvent as V1IssuingPersonalizationDesignUpdatedEvent, - V1IssuingPersonalizationDesignUpdatedEventNotification as V1IssuingPersonalizationDesignUpdatedEventNotification, - ) - from stripe.events._v1_issuing_token_created_event import ( - V1IssuingTokenCreatedEvent as V1IssuingTokenCreatedEvent, - V1IssuingTokenCreatedEventNotification as V1IssuingTokenCreatedEventNotification, - ) - from stripe.events._v1_issuing_token_updated_event import ( - V1IssuingTokenUpdatedEvent as V1IssuingTokenUpdatedEvent, - V1IssuingTokenUpdatedEventNotification as V1IssuingTokenUpdatedEventNotification, - ) - from stripe.events._v1_issuing_transaction_created_event import ( - V1IssuingTransactionCreatedEvent as V1IssuingTransactionCreatedEvent, - V1IssuingTransactionCreatedEventNotification as V1IssuingTransactionCreatedEventNotification, - ) - from stripe.events._v1_issuing_transaction_purchase_details_receipt_updated_event import ( - V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent as V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent, - V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification as V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification, - ) - from stripe.events._v1_issuing_transaction_updated_event import ( - V1IssuingTransactionUpdatedEvent as V1IssuingTransactionUpdatedEvent, - V1IssuingTransactionUpdatedEventNotification as V1IssuingTransactionUpdatedEventNotification, - ) - from stripe.events._v1_mandate_updated_event import ( - V1MandateUpdatedEvent as V1MandateUpdatedEvent, - V1MandateUpdatedEventNotification as V1MandateUpdatedEventNotification, - ) - from stripe.events._v1_payment_intent_amount_capturable_updated_event import ( - V1PaymentIntentAmountCapturableUpdatedEvent as V1PaymentIntentAmountCapturableUpdatedEvent, - V1PaymentIntentAmountCapturableUpdatedEventNotification as V1PaymentIntentAmountCapturableUpdatedEventNotification, - ) - from stripe.events._v1_payment_intent_canceled_event import ( - V1PaymentIntentCanceledEvent as V1PaymentIntentCanceledEvent, - V1PaymentIntentCanceledEventNotification as V1PaymentIntentCanceledEventNotification, - ) - from stripe.events._v1_payment_intent_created_event import ( - V1PaymentIntentCreatedEvent as V1PaymentIntentCreatedEvent, - V1PaymentIntentCreatedEventNotification as V1PaymentIntentCreatedEventNotification, - ) - from stripe.events._v1_payment_intent_partially_funded_event import ( - V1PaymentIntentPartiallyFundedEvent as V1PaymentIntentPartiallyFundedEvent, - V1PaymentIntentPartiallyFundedEventNotification as V1PaymentIntentPartiallyFundedEventNotification, - ) - from stripe.events._v1_payment_intent_payment_failed_event import ( - V1PaymentIntentPaymentFailedEvent as V1PaymentIntentPaymentFailedEvent, - V1PaymentIntentPaymentFailedEventNotification as V1PaymentIntentPaymentFailedEventNotification, - ) - from stripe.events._v1_payment_intent_processing_event import ( - V1PaymentIntentProcessingEvent as V1PaymentIntentProcessingEvent, - V1PaymentIntentProcessingEventNotification as V1PaymentIntentProcessingEventNotification, - ) - from stripe.events._v1_payment_intent_requires_action_event import ( - V1PaymentIntentRequiresActionEvent as V1PaymentIntentRequiresActionEvent, - V1PaymentIntentRequiresActionEventNotification as V1PaymentIntentRequiresActionEventNotification, - ) - from stripe.events._v1_payment_intent_succeeded_event import ( - V1PaymentIntentSucceededEvent as V1PaymentIntentSucceededEvent, - V1PaymentIntentSucceededEventNotification as V1PaymentIntentSucceededEventNotification, - ) - from stripe.events._v1_payment_link_created_event import ( - V1PaymentLinkCreatedEvent as V1PaymentLinkCreatedEvent, - V1PaymentLinkCreatedEventNotification as V1PaymentLinkCreatedEventNotification, - ) - from stripe.events._v1_payment_link_updated_event import ( - V1PaymentLinkUpdatedEvent as V1PaymentLinkUpdatedEvent, - V1PaymentLinkUpdatedEventNotification as V1PaymentLinkUpdatedEventNotification, - ) - from stripe.events._v1_payment_method_attached_event import ( - V1PaymentMethodAttachedEvent as V1PaymentMethodAttachedEvent, - V1PaymentMethodAttachedEventNotification as V1PaymentMethodAttachedEventNotification, - ) - from stripe.events._v1_payment_method_automatically_updated_event import ( - V1PaymentMethodAutomaticallyUpdatedEvent as V1PaymentMethodAutomaticallyUpdatedEvent, - V1PaymentMethodAutomaticallyUpdatedEventNotification as V1PaymentMethodAutomaticallyUpdatedEventNotification, - ) - from stripe.events._v1_payment_method_detached_event import ( - V1PaymentMethodDetachedEvent as V1PaymentMethodDetachedEvent, - V1PaymentMethodDetachedEventNotification as V1PaymentMethodDetachedEventNotification, - ) - from stripe.events._v1_payment_method_updated_event import ( - V1PaymentMethodUpdatedEvent as V1PaymentMethodUpdatedEvent, - V1PaymentMethodUpdatedEventNotification as V1PaymentMethodUpdatedEventNotification, - ) - from stripe.events._v1_payout_canceled_event import ( - V1PayoutCanceledEvent as V1PayoutCanceledEvent, - V1PayoutCanceledEventNotification as V1PayoutCanceledEventNotification, - ) - from stripe.events._v1_payout_created_event import ( - V1PayoutCreatedEvent as V1PayoutCreatedEvent, - V1PayoutCreatedEventNotification as V1PayoutCreatedEventNotification, - ) - from stripe.events._v1_payout_failed_event import ( - V1PayoutFailedEvent as V1PayoutFailedEvent, - V1PayoutFailedEventNotification as V1PayoutFailedEventNotification, - ) - from stripe.events._v1_payout_paid_event import ( - V1PayoutPaidEvent as V1PayoutPaidEvent, - V1PayoutPaidEventNotification as V1PayoutPaidEventNotification, - ) - from stripe.events._v1_payout_reconciliation_completed_event import ( - V1PayoutReconciliationCompletedEvent as V1PayoutReconciliationCompletedEvent, - V1PayoutReconciliationCompletedEventNotification as V1PayoutReconciliationCompletedEventNotification, - ) - from stripe.events._v1_payout_updated_event import ( - V1PayoutUpdatedEvent as V1PayoutUpdatedEvent, - V1PayoutUpdatedEventNotification as V1PayoutUpdatedEventNotification, - ) - from stripe.events._v1_person_created_event import ( - V1PersonCreatedEvent as V1PersonCreatedEvent, - V1PersonCreatedEventNotification as V1PersonCreatedEventNotification, - ) - from stripe.events._v1_person_deleted_event import ( - V1PersonDeletedEvent as V1PersonDeletedEvent, - V1PersonDeletedEventNotification as V1PersonDeletedEventNotification, - ) - from stripe.events._v1_person_updated_event import ( - V1PersonUpdatedEvent as V1PersonUpdatedEvent, - V1PersonUpdatedEventNotification as V1PersonUpdatedEventNotification, - ) - from stripe.events._v1_plan_created_event import ( - V1PlanCreatedEvent as V1PlanCreatedEvent, - V1PlanCreatedEventNotification as V1PlanCreatedEventNotification, - ) - from stripe.events._v1_plan_deleted_event import ( - V1PlanDeletedEvent as V1PlanDeletedEvent, - V1PlanDeletedEventNotification as V1PlanDeletedEventNotification, - ) - from stripe.events._v1_plan_updated_event import ( - V1PlanUpdatedEvent as V1PlanUpdatedEvent, - V1PlanUpdatedEventNotification as V1PlanUpdatedEventNotification, - ) - from stripe.events._v1_price_created_event import ( - V1PriceCreatedEvent as V1PriceCreatedEvent, - V1PriceCreatedEventNotification as V1PriceCreatedEventNotification, - ) - from stripe.events._v1_price_deleted_event import ( - V1PriceDeletedEvent as V1PriceDeletedEvent, - V1PriceDeletedEventNotification as V1PriceDeletedEventNotification, - ) - from stripe.events._v1_price_updated_event import ( - V1PriceUpdatedEvent as V1PriceUpdatedEvent, - V1PriceUpdatedEventNotification as V1PriceUpdatedEventNotification, - ) - from stripe.events._v1_product_created_event import ( - V1ProductCreatedEvent as V1ProductCreatedEvent, - V1ProductCreatedEventNotification as V1ProductCreatedEventNotification, - ) - from stripe.events._v1_product_deleted_event import ( - V1ProductDeletedEvent as V1ProductDeletedEvent, - V1ProductDeletedEventNotification as V1ProductDeletedEventNotification, - ) - from stripe.events._v1_product_updated_event import ( - V1ProductUpdatedEvent as V1ProductUpdatedEvent, - V1ProductUpdatedEventNotification as V1ProductUpdatedEventNotification, - ) - from stripe.events._v1_promotion_code_created_event import ( - V1PromotionCodeCreatedEvent as V1PromotionCodeCreatedEvent, - V1PromotionCodeCreatedEventNotification as V1PromotionCodeCreatedEventNotification, - ) - from stripe.events._v1_promotion_code_updated_event import ( - V1PromotionCodeUpdatedEvent as V1PromotionCodeUpdatedEvent, - V1PromotionCodeUpdatedEventNotification as V1PromotionCodeUpdatedEventNotification, - ) - from stripe.events._v1_quote_accepted_event import ( - V1QuoteAcceptedEvent as V1QuoteAcceptedEvent, - V1QuoteAcceptedEventNotification as V1QuoteAcceptedEventNotification, - ) - from stripe.events._v1_quote_canceled_event import ( - V1QuoteCanceledEvent as V1QuoteCanceledEvent, - V1QuoteCanceledEventNotification as V1QuoteCanceledEventNotification, - ) - from stripe.events._v1_quote_created_event import ( - V1QuoteCreatedEvent as V1QuoteCreatedEvent, - V1QuoteCreatedEventNotification as V1QuoteCreatedEventNotification, - ) - from stripe.events._v1_quote_finalized_event import ( - V1QuoteFinalizedEvent as V1QuoteFinalizedEvent, - V1QuoteFinalizedEventNotification as V1QuoteFinalizedEventNotification, - ) - from stripe.events._v1_radar_early_fraud_warning_created_event import ( - V1RadarEarlyFraudWarningCreatedEvent as V1RadarEarlyFraudWarningCreatedEvent, - V1RadarEarlyFraudWarningCreatedEventNotification as V1RadarEarlyFraudWarningCreatedEventNotification, - ) - from stripe.events._v1_radar_early_fraud_warning_updated_event import ( - V1RadarEarlyFraudWarningUpdatedEvent as V1RadarEarlyFraudWarningUpdatedEvent, - V1RadarEarlyFraudWarningUpdatedEventNotification as V1RadarEarlyFraudWarningUpdatedEventNotification, - ) - from stripe.events._v1_refund_created_event import ( - V1RefundCreatedEvent as V1RefundCreatedEvent, - V1RefundCreatedEventNotification as V1RefundCreatedEventNotification, - ) - from stripe.events._v1_refund_failed_event import ( - V1RefundFailedEvent as V1RefundFailedEvent, - V1RefundFailedEventNotification as V1RefundFailedEventNotification, - ) - from stripe.events._v1_refund_updated_event import ( - V1RefundUpdatedEvent as V1RefundUpdatedEvent, - V1RefundUpdatedEventNotification as V1RefundUpdatedEventNotification, - ) - from stripe.events._v1_review_closed_event import ( - V1ReviewClosedEvent as V1ReviewClosedEvent, - V1ReviewClosedEventNotification as V1ReviewClosedEventNotification, - ) - from stripe.events._v1_review_opened_event import ( - V1ReviewOpenedEvent as V1ReviewOpenedEvent, - V1ReviewOpenedEventNotification as V1ReviewOpenedEventNotification, - ) - from stripe.events._v1_setup_intent_canceled_event import ( - V1SetupIntentCanceledEvent as V1SetupIntentCanceledEvent, - V1SetupIntentCanceledEventNotification as V1SetupIntentCanceledEventNotification, - ) - from stripe.events._v1_setup_intent_created_event import ( - V1SetupIntentCreatedEvent as V1SetupIntentCreatedEvent, - V1SetupIntentCreatedEventNotification as V1SetupIntentCreatedEventNotification, - ) - from stripe.events._v1_setup_intent_requires_action_event import ( - V1SetupIntentRequiresActionEvent as V1SetupIntentRequiresActionEvent, - V1SetupIntentRequiresActionEventNotification as V1SetupIntentRequiresActionEventNotification, - ) - from stripe.events._v1_setup_intent_setup_failed_event import ( - V1SetupIntentSetupFailedEvent as V1SetupIntentSetupFailedEvent, - V1SetupIntentSetupFailedEventNotification as V1SetupIntentSetupFailedEventNotification, - ) - from stripe.events._v1_setup_intent_succeeded_event import ( - V1SetupIntentSucceededEvent as V1SetupIntentSucceededEvent, - V1SetupIntentSucceededEventNotification as V1SetupIntentSucceededEventNotification, - ) - from stripe.events._v1_sigma_scheduled_query_run_created_event import ( - V1SigmaScheduledQueryRunCreatedEvent as V1SigmaScheduledQueryRunCreatedEvent, - V1SigmaScheduledQueryRunCreatedEventNotification as V1SigmaScheduledQueryRunCreatedEventNotification, - ) - from stripe.events._v1_source_canceled_event import ( - V1SourceCanceledEvent as V1SourceCanceledEvent, - V1SourceCanceledEventNotification as V1SourceCanceledEventNotification, - ) - from stripe.events._v1_source_chargeable_event import ( - V1SourceChargeableEvent as V1SourceChargeableEvent, - V1SourceChargeableEventNotification as V1SourceChargeableEventNotification, - ) - from stripe.events._v1_source_failed_event import ( - V1SourceFailedEvent as V1SourceFailedEvent, - V1SourceFailedEventNotification as V1SourceFailedEventNotification, - ) - from stripe.events._v1_source_refund_attributes_required_event import ( - V1SourceRefundAttributesRequiredEvent as V1SourceRefundAttributesRequiredEvent, - V1SourceRefundAttributesRequiredEventNotification as V1SourceRefundAttributesRequiredEventNotification, - ) - from stripe.events._v1_subscription_schedule_aborted_event import ( - V1SubscriptionScheduleAbortedEvent as V1SubscriptionScheduleAbortedEvent, - V1SubscriptionScheduleAbortedEventNotification as V1SubscriptionScheduleAbortedEventNotification, - ) - from stripe.events._v1_subscription_schedule_canceled_event import ( - V1SubscriptionScheduleCanceledEvent as V1SubscriptionScheduleCanceledEvent, - V1SubscriptionScheduleCanceledEventNotification as V1SubscriptionScheduleCanceledEventNotification, - ) - from stripe.events._v1_subscription_schedule_completed_event import ( - V1SubscriptionScheduleCompletedEvent as V1SubscriptionScheduleCompletedEvent, - V1SubscriptionScheduleCompletedEventNotification as V1SubscriptionScheduleCompletedEventNotification, - ) - from stripe.events._v1_subscription_schedule_created_event import ( - V1SubscriptionScheduleCreatedEvent as V1SubscriptionScheduleCreatedEvent, - V1SubscriptionScheduleCreatedEventNotification as V1SubscriptionScheduleCreatedEventNotification, - ) - from stripe.events._v1_subscription_schedule_expiring_event import ( - V1SubscriptionScheduleExpiringEvent as V1SubscriptionScheduleExpiringEvent, - V1SubscriptionScheduleExpiringEventNotification as V1SubscriptionScheduleExpiringEventNotification, - ) - from stripe.events._v1_subscription_schedule_released_event import ( - V1SubscriptionScheduleReleasedEvent as V1SubscriptionScheduleReleasedEvent, - V1SubscriptionScheduleReleasedEventNotification as V1SubscriptionScheduleReleasedEventNotification, - ) - from stripe.events._v1_subscription_schedule_updated_event import ( - V1SubscriptionScheduleUpdatedEvent as V1SubscriptionScheduleUpdatedEvent, - V1SubscriptionScheduleUpdatedEventNotification as V1SubscriptionScheduleUpdatedEventNotification, - ) - from stripe.events._v1_tax_rate_created_event import ( - V1TaxRateCreatedEvent as V1TaxRateCreatedEvent, - V1TaxRateCreatedEventNotification as V1TaxRateCreatedEventNotification, - ) - from stripe.events._v1_tax_rate_updated_event import ( - V1TaxRateUpdatedEvent as V1TaxRateUpdatedEvent, - V1TaxRateUpdatedEventNotification as V1TaxRateUpdatedEventNotification, - ) - from stripe.events._v1_terminal_reader_action_failed_event import ( - V1TerminalReaderActionFailedEvent as V1TerminalReaderActionFailedEvent, - V1TerminalReaderActionFailedEventNotification as V1TerminalReaderActionFailedEventNotification, - ) - from stripe.events._v1_terminal_reader_action_succeeded_event import ( - V1TerminalReaderActionSucceededEvent as V1TerminalReaderActionSucceededEvent, - V1TerminalReaderActionSucceededEventNotification as V1TerminalReaderActionSucceededEventNotification, - ) - from stripe.events._v1_terminal_reader_action_updated_event import ( - V1TerminalReaderActionUpdatedEvent as V1TerminalReaderActionUpdatedEvent, - V1TerminalReaderActionUpdatedEventNotification as V1TerminalReaderActionUpdatedEventNotification, - ) - from stripe.events._v1_test_helpers_test_clock_advancing_event import ( - V1TestHelpersTestClockAdvancingEvent as V1TestHelpersTestClockAdvancingEvent, - V1TestHelpersTestClockAdvancingEventNotification as V1TestHelpersTestClockAdvancingEventNotification, - ) - from stripe.events._v1_test_helpers_test_clock_created_event import ( - V1TestHelpersTestClockCreatedEvent as V1TestHelpersTestClockCreatedEvent, - V1TestHelpersTestClockCreatedEventNotification as V1TestHelpersTestClockCreatedEventNotification, - ) - from stripe.events._v1_test_helpers_test_clock_deleted_event import ( - V1TestHelpersTestClockDeletedEvent as V1TestHelpersTestClockDeletedEvent, - V1TestHelpersTestClockDeletedEventNotification as V1TestHelpersTestClockDeletedEventNotification, - ) - from stripe.events._v1_test_helpers_test_clock_internal_failure_event import ( - V1TestHelpersTestClockInternalFailureEvent as V1TestHelpersTestClockInternalFailureEvent, - V1TestHelpersTestClockInternalFailureEventNotification as V1TestHelpersTestClockInternalFailureEventNotification, - ) - from stripe.events._v1_test_helpers_test_clock_ready_event import ( - V1TestHelpersTestClockReadyEvent as V1TestHelpersTestClockReadyEvent, - V1TestHelpersTestClockReadyEventNotification as V1TestHelpersTestClockReadyEventNotification, - ) - from stripe.events._v1_topup_canceled_event import ( - V1TopupCanceledEvent as V1TopupCanceledEvent, - V1TopupCanceledEventNotification as V1TopupCanceledEventNotification, - ) - from stripe.events._v1_topup_created_event import ( - V1TopupCreatedEvent as V1TopupCreatedEvent, - V1TopupCreatedEventNotification as V1TopupCreatedEventNotification, - ) - from stripe.events._v1_topup_failed_event import ( - V1TopupFailedEvent as V1TopupFailedEvent, - V1TopupFailedEventNotification as V1TopupFailedEventNotification, - ) - from stripe.events._v1_topup_reversed_event import ( - V1TopupReversedEvent as V1TopupReversedEvent, - V1TopupReversedEventNotification as V1TopupReversedEventNotification, - ) - from stripe.events._v1_topup_succeeded_event import ( - V1TopupSucceededEvent as V1TopupSucceededEvent, - V1TopupSucceededEventNotification as V1TopupSucceededEventNotification, - ) - from stripe.events._v1_transfer_created_event import ( - V1TransferCreatedEvent as V1TransferCreatedEvent, - V1TransferCreatedEventNotification as V1TransferCreatedEventNotification, - ) - from stripe.events._v1_transfer_reversed_event import ( - V1TransferReversedEvent as V1TransferReversedEvent, - V1TransferReversedEventNotification as V1TransferReversedEventNotification, - ) - from stripe.events._v1_transfer_updated_event import ( - V1TransferUpdatedEvent as V1TransferUpdatedEvent, - V1TransferUpdatedEventNotification as V1TransferUpdatedEventNotification, - ) from stripe.events._v2_billing_cadence_billed_event import ( V2BillingCadenceBilledEvent as V2BillingCadenceBilledEvent, V2BillingCadenceBilledEventNotification as V2BillingCadenceBilledEventNotification, @@ -1047,1635 +303,266 @@ ) from stripe.events._v2_core_health_fraud_rate_increased_event import ( V2CoreHealthFraudRateIncreasedEvent as V2CoreHealthFraudRateIncreasedEvent, - V2CoreHealthFraudRateIncreasedEventNotification as V2CoreHealthFraudRateIncreasedEventNotification, - ) - from stripe.events._v2_core_health_issuing_authorization_request_errors_firing_event import ( - V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent as V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent, - V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification as V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification, - ) - from stripe.events._v2_core_health_issuing_authorization_request_errors_resolved_event import ( - V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent as V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent, - V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification as V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification, - ) - from stripe.events._v2_core_health_issuing_authorization_request_timeout_firing_event import ( - V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent as V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent, - V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification as V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification, - ) - from stripe.events._v2_core_health_issuing_authorization_request_timeout_resolved_event import ( - V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent as V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent, - V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification as V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification, - ) - from stripe.events._v2_core_health_payment_method_error_firing_event import ( - V2CoreHealthPaymentMethodErrorFiringEvent as V2CoreHealthPaymentMethodErrorFiringEvent, - V2CoreHealthPaymentMethodErrorFiringEventNotification as V2CoreHealthPaymentMethodErrorFiringEventNotification, - ) - from stripe.events._v2_core_health_payment_method_error_resolved_event import ( - V2CoreHealthPaymentMethodErrorResolvedEvent as V2CoreHealthPaymentMethodErrorResolvedEvent, - V2CoreHealthPaymentMethodErrorResolvedEventNotification as V2CoreHealthPaymentMethodErrorResolvedEventNotification, - ) - from stripe.events._v2_core_health_traffic_volume_drop_firing_event import ( - V2CoreHealthTrafficVolumeDropFiringEvent as V2CoreHealthTrafficVolumeDropFiringEvent, - V2CoreHealthTrafficVolumeDropFiringEventNotification as V2CoreHealthTrafficVolumeDropFiringEventNotification, - ) - from stripe.events._v2_core_health_traffic_volume_drop_resolved_event import ( - V2CoreHealthTrafficVolumeDropResolvedEvent as V2CoreHealthTrafficVolumeDropResolvedEvent, - V2CoreHealthTrafficVolumeDropResolvedEventNotification as V2CoreHealthTrafficVolumeDropResolvedEventNotification, - ) - from stripe.events._v2_core_health_webhook_latency_firing_event import ( - V2CoreHealthWebhookLatencyFiringEvent as V2CoreHealthWebhookLatencyFiringEvent, - V2CoreHealthWebhookLatencyFiringEventNotification as V2CoreHealthWebhookLatencyFiringEventNotification, - ) - from stripe.events._v2_core_health_webhook_latency_resolved_event import ( - V2CoreHealthWebhookLatencyResolvedEvent as V2CoreHealthWebhookLatencyResolvedEvent, - V2CoreHealthWebhookLatencyResolvedEventNotification as V2CoreHealthWebhookLatencyResolvedEventNotification, - ) - from stripe.events._v2_money_management_adjustment_created_event import ( - V2MoneyManagementAdjustmentCreatedEvent as V2MoneyManagementAdjustmentCreatedEvent, - V2MoneyManagementAdjustmentCreatedEventNotification as V2MoneyManagementAdjustmentCreatedEventNotification, - ) - from stripe.events._v2_money_management_financial_account_created_event import ( - V2MoneyManagementFinancialAccountCreatedEvent as V2MoneyManagementFinancialAccountCreatedEvent, - V2MoneyManagementFinancialAccountCreatedEventNotification as V2MoneyManagementFinancialAccountCreatedEventNotification, - ) - from stripe.events._v2_money_management_financial_account_updated_event import ( - V2MoneyManagementFinancialAccountUpdatedEvent as V2MoneyManagementFinancialAccountUpdatedEvent, - V2MoneyManagementFinancialAccountUpdatedEventNotification as V2MoneyManagementFinancialAccountUpdatedEventNotification, - ) - from stripe.events._v2_money_management_financial_address_activated_event import ( - V2MoneyManagementFinancialAddressActivatedEvent as V2MoneyManagementFinancialAddressActivatedEvent, - V2MoneyManagementFinancialAddressActivatedEventNotification as V2MoneyManagementFinancialAddressActivatedEventNotification, - ) - from stripe.events._v2_money_management_financial_address_failed_event import ( - V2MoneyManagementFinancialAddressFailedEvent as V2MoneyManagementFinancialAddressFailedEvent, - V2MoneyManagementFinancialAddressFailedEventNotification as V2MoneyManagementFinancialAddressFailedEventNotification, - ) - from stripe.events._v2_money_management_inbound_transfer_available_event import ( - V2MoneyManagementInboundTransferAvailableEvent as V2MoneyManagementInboundTransferAvailableEvent, - V2MoneyManagementInboundTransferAvailableEventNotification as V2MoneyManagementInboundTransferAvailableEventNotification, - ) - from stripe.events._v2_money_management_inbound_transfer_bank_debit_failed_event import ( - V2MoneyManagementInboundTransferBankDebitFailedEvent as V2MoneyManagementInboundTransferBankDebitFailedEvent, - V2MoneyManagementInboundTransferBankDebitFailedEventNotification as V2MoneyManagementInboundTransferBankDebitFailedEventNotification, - ) - from stripe.events._v2_money_management_inbound_transfer_bank_debit_processing_event import ( - V2MoneyManagementInboundTransferBankDebitProcessingEvent as V2MoneyManagementInboundTransferBankDebitProcessingEvent, - V2MoneyManagementInboundTransferBankDebitProcessingEventNotification as V2MoneyManagementInboundTransferBankDebitProcessingEventNotification, - ) - from stripe.events._v2_money_management_inbound_transfer_bank_debit_queued_event import ( - V2MoneyManagementInboundTransferBankDebitQueuedEvent as V2MoneyManagementInboundTransferBankDebitQueuedEvent, - V2MoneyManagementInboundTransferBankDebitQueuedEventNotification as V2MoneyManagementInboundTransferBankDebitQueuedEventNotification, - ) - from stripe.events._v2_money_management_inbound_transfer_bank_debit_returned_event import ( - V2MoneyManagementInboundTransferBankDebitReturnedEvent as V2MoneyManagementInboundTransferBankDebitReturnedEvent, - V2MoneyManagementInboundTransferBankDebitReturnedEventNotification as V2MoneyManagementInboundTransferBankDebitReturnedEventNotification, - ) - from stripe.events._v2_money_management_inbound_transfer_bank_debit_succeeded_event import ( - V2MoneyManagementInboundTransferBankDebitSucceededEvent as V2MoneyManagementInboundTransferBankDebitSucceededEvent, - V2MoneyManagementInboundTransferBankDebitSucceededEventNotification as V2MoneyManagementInboundTransferBankDebitSucceededEventNotification, - ) - from stripe.events._v2_money_management_outbound_payment_canceled_event import ( - V2MoneyManagementOutboundPaymentCanceledEvent as V2MoneyManagementOutboundPaymentCanceledEvent, - V2MoneyManagementOutboundPaymentCanceledEventNotification as V2MoneyManagementOutboundPaymentCanceledEventNotification, - ) - from stripe.events._v2_money_management_outbound_payment_created_event import ( - V2MoneyManagementOutboundPaymentCreatedEvent as V2MoneyManagementOutboundPaymentCreatedEvent, - V2MoneyManagementOutboundPaymentCreatedEventNotification as V2MoneyManagementOutboundPaymentCreatedEventNotification, - ) - from stripe.events._v2_money_management_outbound_payment_failed_event import ( - V2MoneyManagementOutboundPaymentFailedEvent as V2MoneyManagementOutboundPaymentFailedEvent, - V2MoneyManagementOutboundPaymentFailedEventNotification as V2MoneyManagementOutboundPaymentFailedEventNotification, - ) - from stripe.events._v2_money_management_outbound_payment_posted_event import ( - V2MoneyManagementOutboundPaymentPostedEvent as V2MoneyManagementOutboundPaymentPostedEvent, - V2MoneyManagementOutboundPaymentPostedEventNotification as V2MoneyManagementOutboundPaymentPostedEventNotification, - ) - from stripe.events._v2_money_management_outbound_payment_returned_event import ( - V2MoneyManagementOutboundPaymentReturnedEvent as V2MoneyManagementOutboundPaymentReturnedEvent, - V2MoneyManagementOutboundPaymentReturnedEventNotification as V2MoneyManagementOutboundPaymentReturnedEventNotification, - ) - from stripe.events._v2_money_management_outbound_payment_updated_event import ( - V2MoneyManagementOutboundPaymentUpdatedEvent as V2MoneyManagementOutboundPaymentUpdatedEvent, - V2MoneyManagementOutboundPaymentUpdatedEventNotification as V2MoneyManagementOutboundPaymentUpdatedEventNotification, - ) - from stripe.events._v2_money_management_outbound_transfer_canceled_event import ( - V2MoneyManagementOutboundTransferCanceledEvent as V2MoneyManagementOutboundTransferCanceledEvent, - V2MoneyManagementOutboundTransferCanceledEventNotification as V2MoneyManagementOutboundTransferCanceledEventNotification, - ) - from stripe.events._v2_money_management_outbound_transfer_created_event import ( - V2MoneyManagementOutboundTransferCreatedEvent as V2MoneyManagementOutboundTransferCreatedEvent, - V2MoneyManagementOutboundTransferCreatedEventNotification as V2MoneyManagementOutboundTransferCreatedEventNotification, - ) - from stripe.events._v2_money_management_outbound_transfer_failed_event import ( - V2MoneyManagementOutboundTransferFailedEvent as V2MoneyManagementOutboundTransferFailedEvent, - V2MoneyManagementOutboundTransferFailedEventNotification as V2MoneyManagementOutboundTransferFailedEventNotification, - ) - from stripe.events._v2_money_management_outbound_transfer_posted_event import ( - V2MoneyManagementOutboundTransferPostedEvent as V2MoneyManagementOutboundTransferPostedEvent, - V2MoneyManagementOutboundTransferPostedEventNotification as V2MoneyManagementOutboundTransferPostedEventNotification, - ) - from stripe.events._v2_money_management_outbound_transfer_returned_event import ( - V2MoneyManagementOutboundTransferReturnedEvent as V2MoneyManagementOutboundTransferReturnedEvent, - V2MoneyManagementOutboundTransferReturnedEventNotification as V2MoneyManagementOutboundTransferReturnedEventNotification, - ) - from stripe.events._v2_money_management_outbound_transfer_updated_event import ( - V2MoneyManagementOutboundTransferUpdatedEvent as V2MoneyManagementOutboundTransferUpdatedEvent, - V2MoneyManagementOutboundTransferUpdatedEventNotification as V2MoneyManagementOutboundTransferUpdatedEventNotification, - ) - from stripe.events._v2_money_management_payout_method_updated_event import ( - V2MoneyManagementPayoutMethodUpdatedEvent as V2MoneyManagementPayoutMethodUpdatedEvent, - V2MoneyManagementPayoutMethodUpdatedEventNotification as V2MoneyManagementPayoutMethodUpdatedEventNotification, - ) - from stripe.events._v2_money_management_received_credit_available_event import ( - V2MoneyManagementReceivedCreditAvailableEvent as V2MoneyManagementReceivedCreditAvailableEvent, - V2MoneyManagementReceivedCreditAvailableEventNotification as V2MoneyManagementReceivedCreditAvailableEventNotification, - ) - from stripe.events._v2_money_management_received_credit_failed_event import ( - V2MoneyManagementReceivedCreditFailedEvent as V2MoneyManagementReceivedCreditFailedEvent, - V2MoneyManagementReceivedCreditFailedEventNotification as V2MoneyManagementReceivedCreditFailedEventNotification, - ) - from stripe.events._v2_money_management_received_credit_returned_event import ( - V2MoneyManagementReceivedCreditReturnedEvent as V2MoneyManagementReceivedCreditReturnedEvent, - V2MoneyManagementReceivedCreditReturnedEventNotification as V2MoneyManagementReceivedCreditReturnedEventNotification, - ) - from stripe.events._v2_money_management_received_credit_succeeded_event import ( - V2MoneyManagementReceivedCreditSucceededEvent as V2MoneyManagementReceivedCreditSucceededEvent, - V2MoneyManagementReceivedCreditSucceededEventNotification as V2MoneyManagementReceivedCreditSucceededEventNotification, - ) - from stripe.events._v2_money_management_received_debit_canceled_event import ( - V2MoneyManagementReceivedDebitCanceledEvent as V2MoneyManagementReceivedDebitCanceledEvent, - V2MoneyManagementReceivedDebitCanceledEventNotification as V2MoneyManagementReceivedDebitCanceledEventNotification, - ) - from stripe.events._v2_money_management_received_debit_failed_event import ( - V2MoneyManagementReceivedDebitFailedEvent as V2MoneyManagementReceivedDebitFailedEvent, - V2MoneyManagementReceivedDebitFailedEventNotification as V2MoneyManagementReceivedDebitFailedEventNotification, - ) - from stripe.events._v2_money_management_received_debit_pending_event import ( - V2MoneyManagementReceivedDebitPendingEvent as V2MoneyManagementReceivedDebitPendingEvent, - V2MoneyManagementReceivedDebitPendingEventNotification as V2MoneyManagementReceivedDebitPendingEventNotification, - ) - from stripe.events._v2_money_management_received_debit_succeeded_event import ( - V2MoneyManagementReceivedDebitSucceededEvent as V2MoneyManagementReceivedDebitSucceededEvent, - V2MoneyManagementReceivedDebitSucceededEventNotification as V2MoneyManagementReceivedDebitSucceededEventNotification, - ) - from stripe.events._v2_money_management_received_debit_updated_event import ( - V2MoneyManagementReceivedDebitUpdatedEvent as V2MoneyManagementReceivedDebitUpdatedEvent, - V2MoneyManagementReceivedDebitUpdatedEventNotification as V2MoneyManagementReceivedDebitUpdatedEventNotification, - ) - from stripe.events._v2_money_management_recipient_verification_created_event import ( - V2MoneyManagementRecipientVerificationCreatedEvent as V2MoneyManagementRecipientVerificationCreatedEvent, - V2MoneyManagementRecipientVerificationCreatedEventNotification as V2MoneyManagementRecipientVerificationCreatedEventNotification, - ) - from stripe.events._v2_money_management_recipient_verification_updated_event import ( - V2MoneyManagementRecipientVerificationUpdatedEvent as V2MoneyManagementRecipientVerificationUpdatedEvent, - V2MoneyManagementRecipientVerificationUpdatedEventNotification as V2MoneyManagementRecipientVerificationUpdatedEventNotification, - ) - from stripe.events._v2_money_management_transaction_created_event import ( - V2MoneyManagementTransactionCreatedEvent as V2MoneyManagementTransactionCreatedEvent, - V2MoneyManagementTransactionCreatedEventNotification as V2MoneyManagementTransactionCreatedEventNotification, - ) - from stripe.events._v2_money_management_transaction_updated_event import ( - V2MoneyManagementTransactionUpdatedEvent as V2MoneyManagementTransactionUpdatedEvent, - V2MoneyManagementTransactionUpdatedEventNotification as V2MoneyManagementTransactionUpdatedEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_authorization_attempt_failed_event import ( - V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent as V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent, - V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification as V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_authorization_attempt_started_event import ( - V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent as V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent, - V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification as V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_canceled_event import ( - V2PaymentsOffSessionPaymentCanceledEvent as V2PaymentsOffSessionPaymentCanceledEvent, - V2PaymentsOffSessionPaymentCanceledEventNotification as V2PaymentsOffSessionPaymentCanceledEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_created_event import ( - V2PaymentsOffSessionPaymentCreatedEvent as V2PaymentsOffSessionPaymentCreatedEvent, - V2PaymentsOffSessionPaymentCreatedEventNotification as V2PaymentsOffSessionPaymentCreatedEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_failed_event import ( - V2PaymentsOffSessionPaymentFailedEvent as V2PaymentsOffSessionPaymentFailedEvent, - V2PaymentsOffSessionPaymentFailedEventNotification as V2PaymentsOffSessionPaymentFailedEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_requires_capture_event import ( - V2PaymentsOffSessionPaymentRequiresCaptureEvent as V2PaymentsOffSessionPaymentRequiresCaptureEvent, - V2PaymentsOffSessionPaymentRequiresCaptureEventNotification as V2PaymentsOffSessionPaymentRequiresCaptureEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_succeeded_event import ( - V2PaymentsOffSessionPaymentSucceededEvent as V2PaymentsOffSessionPaymentSucceededEvent, - V2PaymentsOffSessionPaymentSucceededEventNotification as V2PaymentsOffSessionPaymentSucceededEventNotification, - ) - from stripe.events._v2_reporting_report_run_created_event import ( - V2ReportingReportRunCreatedEvent as V2ReportingReportRunCreatedEvent, - V2ReportingReportRunCreatedEventNotification as V2ReportingReportRunCreatedEventNotification, - ) - from stripe.events._v2_reporting_report_run_failed_event import ( - V2ReportingReportRunFailedEvent as V2ReportingReportRunFailedEvent, - V2ReportingReportRunFailedEventNotification as V2ReportingReportRunFailedEventNotification, - ) - from stripe.events._v2_reporting_report_run_succeeded_event import ( - V2ReportingReportRunSucceededEvent as V2ReportingReportRunSucceededEvent, - V2ReportingReportRunSucceededEventNotification as V2ReportingReportRunSucceededEventNotification, - ) - from stripe.events._v2_reporting_report_run_updated_event import ( - V2ReportingReportRunUpdatedEvent as V2ReportingReportRunUpdatedEvent, - V2ReportingReportRunUpdatedEventNotification as V2ReportingReportRunUpdatedEventNotification, - ) - -# name -> (import_target, is_submodule) -_import_map = { - "ALL_EVENT_NOTIFICATIONS": ("stripe.events._event_classes", False), - "V1AccountUpdatedEvent": ( - "stripe.events._v1_account_updated_event", - False, - ), - "V1AccountUpdatedEventNotification": ( - "stripe.events._v1_account_updated_event", - False, - ), - "V1ApplicationFeeCreatedEvent": ( - "stripe.events._v1_application_fee_created_event", - False, - ), - "V1ApplicationFeeCreatedEventNotification": ( - "stripe.events._v1_application_fee_created_event", - False, - ), - "V1ApplicationFeeRefundedEvent": ( - "stripe.events._v1_application_fee_refunded_event", - False, - ), - "V1ApplicationFeeRefundedEventNotification": ( - "stripe.events._v1_application_fee_refunded_event", - False, - ), - "V1BillingMeterErrorReportTriggeredEvent": ( - "stripe.events._v1_billing_meter_error_report_triggered_event", - False, - ), - "V1BillingMeterErrorReportTriggeredEventNotification": ( - "stripe.events._v1_billing_meter_error_report_triggered_event", - False, - ), - "V1BillingMeterNoMeterFoundEvent": ( - "stripe.events._v1_billing_meter_no_meter_found_event", - False, - ), - "V1BillingMeterNoMeterFoundEventNotification": ( - "stripe.events._v1_billing_meter_no_meter_found_event", - False, - ), - "V1BillingPortalConfigurationCreatedEvent": ( - "stripe.events._v1_billing_portal_configuration_created_event", - False, - ), - "V1BillingPortalConfigurationCreatedEventNotification": ( - "stripe.events._v1_billing_portal_configuration_created_event", - False, - ), - "V1BillingPortalConfigurationUpdatedEvent": ( - "stripe.events._v1_billing_portal_configuration_updated_event", - False, - ), - "V1BillingPortalConfigurationUpdatedEventNotification": ( - "stripe.events._v1_billing_portal_configuration_updated_event", - False, - ), - "V1CapabilityUpdatedEvent": ( - "stripe.events._v1_capability_updated_event", - False, - ), - "V1CapabilityUpdatedEventNotification": ( - "stripe.events._v1_capability_updated_event", - False, - ), - "V1ChargeCapturedEvent": ( - "stripe.events._v1_charge_captured_event", - False, - ), - "V1ChargeCapturedEventNotification": ( - "stripe.events._v1_charge_captured_event", - False, - ), - "V1ChargeDisputeClosedEvent": ( - "stripe.events._v1_charge_dispute_closed_event", - False, - ), - "V1ChargeDisputeClosedEventNotification": ( - "stripe.events._v1_charge_dispute_closed_event", - False, - ), - "V1ChargeDisputeCreatedEvent": ( - "stripe.events._v1_charge_dispute_created_event", - False, - ), - "V1ChargeDisputeCreatedEventNotification": ( - "stripe.events._v1_charge_dispute_created_event", - False, - ), - "V1ChargeDisputeFundsReinstatedEvent": ( - "stripe.events._v1_charge_dispute_funds_reinstated_event", - False, - ), - "V1ChargeDisputeFundsReinstatedEventNotification": ( - "stripe.events._v1_charge_dispute_funds_reinstated_event", - False, - ), - "V1ChargeDisputeFundsWithdrawnEvent": ( - "stripe.events._v1_charge_dispute_funds_withdrawn_event", - False, - ), - "V1ChargeDisputeFundsWithdrawnEventNotification": ( - "stripe.events._v1_charge_dispute_funds_withdrawn_event", - False, - ), - "V1ChargeDisputeUpdatedEvent": ( - "stripe.events._v1_charge_dispute_updated_event", - False, - ), - "V1ChargeDisputeUpdatedEventNotification": ( - "stripe.events._v1_charge_dispute_updated_event", - False, - ), - "V1ChargeExpiredEvent": ("stripe.events._v1_charge_expired_event", False), - "V1ChargeExpiredEventNotification": ( - "stripe.events._v1_charge_expired_event", - False, - ), - "V1ChargeFailedEvent": ("stripe.events._v1_charge_failed_event", False), - "V1ChargeFailedEventNotification": ( - "stripe.events._v1_charge_failed_event", - False, - ), - "V1ChargePendingEvent": ("stripe.events._v1_charge_pending_event", False), - "V1ChargePendingEventNotification": ( - "stripe.events._v1_charge_pending_event", - False, - ), - "V1ChargeRefundUpdatedEvent": ( - "stripe.events._v1_charge_refund_updated_event", - False, - ), - "V1ChargeRefundUpdatedEventNotification": ( - "stripe.events._v1_charge_refund_updated_event", - False, - ), - "V1ChargeRefundedEvent": ( - "stripe.events._v1_charge_refunded_event", - False, - ), - "V1ChargeRefundedEventNotification": ( - "stripe.events._v1_charge_refunded_event", - False, - ), - "V1ChargeSucceededEvent": ( - "stripe.events._v1_charge_succeeded_event", - False, - ), - "V1ChargeSucceededEventNotification": ( - "stripe.events._v1_charge_succeeded_event", - False, - ), - "V1ChargeUpdatedEvent": ("stripe.events._v1_charge_updated_event", False), - "V1ChargeUpdatedEventNotification": ( - "stripe.events._v1_charge_updated_event", - False, - ), - "V1CheckoutSessionAsyncPaymentFailedEvent": ( - "stripe.events._v1_checkout_session_async_payment_failed_event", - False, - ), - "V1CheckoutSessionAsyncPaymentFailedEventNotification": ( - "stripe.events._v1_checkout_session_async_payment_failed_event", - False, - ), - "V1CheckoutSessionAsyncPaymentSucceededEvent": ( - "stripe.events._v1_checkout_session_async_payment_succeeded_event", - False, - ), - "V1CheckoutSessionAsyncPaymentSucceededEventNotification": ( - "stripe.events._v1_checkout_session_async_payment_succeeded_event", - False, - ), - "V1CheckoutSessionCompletedEvent": ( - "stripe.events._v1_checkout_session_completed_event", - False, - ), - "V1CheckoutSessionCompletedEventNotification": ( - "stripe.events._v1_checkout_session_completed_event", - False, - ), - "V1CheckoutSessionExpiredEvent": ( - "stripe.events._v1_checkout_session_expired_event", - False, - ), - "V1CheckoutSessionExpiredEventNotification": ( - "stripe.events._v1_checkout_session_expired_event", - False, - ), - "V1ClimateOrderCanceledEvent": ( - "stripe.events._v1_climate_order_canceled_event", - False, - ), - "V1ClimateOrderCanceledEventNotification": ( - "stripe.events._v1_climate_order_canceled_event", - False, - ), - "V1ClimateOrderCreatedEvent": ( - "stripe.events._v1_climate_order_created_event", - False, - ), - "V1ClimateOrderCreatedEventNotification": ( - "stripe.events._v1_climate_order_created_event", - False, - ), - "V1ClimateOrderDelayedEvent": ( - "stripe.events._v1_climate_order_delayed_event", - False, - ), - "V1ClimateOrderDelayedEventNotification": ( - "stripe.events._v1_climate_order_delayed_event", - False, - ), - "V1ClimateOrderDeliveredEvent": ( - "stripe.events._v1_climate_order_delivered_event", - False, - ), - "V1ClimateOrderDeliveredEventNotification": ( - "stripe.events._v1_climate_order_delivered_event", - False, - ), - "V1ClimateOrderProductSubstitutedEvent": ( - "stripe.events._v1_climate_order_product_substituted_event", - False, - ), - "V1ClimateOrderProductSubstitutedEventNotification": ( - "stripe.events._v1_climate_order_product_substituted_event", - False, - ), - "V1ClimateProductCreatedEvent": ( - "stripe.events._v1_climate_product_created_event", - False, - ), - "V1ClimateProductCreatedEventNotification": ( - "stripe.events._v1_climate_product_created_event", - False, - ), - "V1ClimateProductPricingUpdatedEvent": ( - "stripe.events._v1_climate_product_pricing_updated_event", - False, - ), - "V1ClimateProductPricingUpdatedEventNotification": ( - "stripe.events._v1_climate_product_pricing_updated_event", - False, - ), - "V1CouponCreatedEvent": ("stripe.events._v1_coupon_created_event", False), - "V1CouponCreatedEventNotification": ( - "stripe.events._v1_coupon_created_event", - False, - ), - "V1CouponDeletedEvent": ("stripe.events._v1_coupon_deleted_event", False), - "V1CouponDeletedEventNotification": ( - "stripe.events._v1_coupon_deleted_event", - False, - ), - "V1CouponUpdatedEvent": ("stripe.events._v1_coupon_updated_event", False), - "V1CouponUpdatedEventNotification": ( - "stripe.events._v1_coupon_updated_event", - False, - ), - "V1CreditNoteCreatedEvent": ( - "stripe.events._v1_credit_note_created_event", - False, - ), - "V1CreditNoteCreatedEventNotification": ( - "stripe.events._v1_credit_note_created_event", - False, - ), - "V1CreditNoteUpdatedEvent": ( - "stripe.events._v1_credit_note_updated_event", - False, - ), - "V1CreditNoteUpdatedEventNotification": ( - "stripe.events._v1_credit_note_updated_event", - False, - ), - "V1CreditNoteVoidedEvent": ( - "stripe.events._v1_credit_note_voided_event", - False, - ), - "V1CreditNoteVoidedEventNotification": ( - "stripe.events._v1_credit_note_voided_event", - False, - ), - "V1CustomerCreatedEvent": ( - "stripe.events._v1_customer_created_event", - False, - ), - "V1CustomerCreatedEventNotification": ( - "stripe.events._v1_customer_created_event", - False, - ), - "V1CustomerDeletedEvent": ( - "stripe.events._v1_customer_deleted_event", - False, - ), - "V1CustomerDeletedEventNotification": ( - "stripe.events._v1_customer_deleted_event", - False, - ), - "V1CustomerSubscriptionCreatedEvent": ( - "stripe.events._v1_customer_subscription_created_event", - False, - ), - "V1CustomerSubscriptionCreatedEventNotification": ( - "stripe.events._v1_customer_subscription_created_event", - False, - ), - "V1CustomerSubscriptionDeletedEvent": ( - "stripe.events._v1_customer_subscription_deleted_event", - False, - ), - "V1CustomerSubscriptionDeletedEventNotification": ( - "stripe.events._v1_customer_subscription_deleted_event", - False, - ), - "V1CustomerSubscriptionPausedEvent": ( - "stripe.events._v1_customer_subscription_paused_event", - False, - ), - "V1CustomerSubscriptionPausedEventNotification": ( - "stripe.events._v1_customer_subscription_paused_event", - False, - ), - "V1CustomerSubscriptionPendingUpdateAppliedEvent": ( - "stripe.events._v1_customer_subscription_pending_update_applied_event", - False, - ), - "V1CustomerSubscriptionPendingUpdateAppliedEventNotification": ( - "stripe.events._v1_customer_subscription_pending_update_applied_event", - False, - ), - "V1CustomerSubscriptionPendingUpdateExpiredEvent": ( - "stripe.events._v1_customer_subscription_pending_update_expired_event", - False, - ), - "V1CustomerSubscriptionPendingUpdateExpiredEventNotification": ( - "stripe.events._v1_customer_subscription_pending_update_expired_event", - False, - ), - "V1CustomerSubscriptionResumedEvent": ( - "stripe.events._v1_customer_subscription_resumed_event", - False, - ), - "V1CustomerSubscriptionResumedEventNotification": ( - "stripe.events._v1_customer_subscription_resumed_event", - False, - ), - "V1CustomerSubscriptionTrialWillEndEvent": ( - "stripe.events._v1_customer_subscription_trial_will_end_event", - False, - ), - "V1CustomerSubscriptionTrialWillEndEventNotification": ( - "stripe.events._v1_customer_subscription_trial_will_end_event", - False, - ), - "V1CustomerSubscriptionUpdatedEvent": ( - "stripe.events._v1_customer_subscription_updated_event", - False, - ), - "V1CustomerSubscriptionUpdatedEventNotification": ( - "stripe.events._v1_customer_subscription_updated_event", - False, - ), - "V1CustomerTaxIdCreatedEvent": ( - "stripe.events._v1_customer_tax_id_created_event", - False, - ), - "V1CustomerTaxIdCreatedEventNotification": ( - "stripe.events._v1_customer_tax_id_created_event", - False, - ), - "V1CustomerTaxIdDeletedEvent": ( - "stripe.events._v1_customer_tax_id_deleted_event", - False, - ), - "V1CustomerTaxIdDeletedEventNotification": ( - "stripe.events._v1_customer_tax_id_deleted_event", - False, - ), - "V1CustomerTaxIdUpdatedEvent": ( - "stripe.events._v1_customer_tax_id_updated_event", - False, - ), - "V1CustomerTaxIdUpdatedEventNotification": ( - "stripe.events._v1_customer_tax_id_updated_event", - False, - ), - "V1CustomerUpdatedEvent": ( - "stripe.events._v1_customer_updated_event", - False, - ), - "V1CustomerUpdatedEventNotification": ( - "stripe.events._v1_customer_updated_event", - False, - ), - "V1FileCreatedEvent": ("stripe.events._v1_file_created_event", False), - "V1FileCreatedEventNotification": ( - "stripe.events._v1_file_created_event", - False, - ), - "V1FinancialConnectionsAccountCreatedEvent": ( - "stripe.events._v1_financial_connections_account_created_event", - False, - ), - "V1FinancialConnectionsAccountCreatedEventNotification": ( - "stripe.events._v1_financial_connections_account_created_event", - False, - ), - "V1FinancialConnectionsAccountDeactivatedEvent": ( - "stripe.events._v1_financial_connections_account_deactivated_event", - False, - ), - "V1FinancialConnectionsAccountDeactivatedEventNotification": ( - "stripe.events._v1_financial_connections_account_deactivated_event", - False, - ), - "V1FinancialConnectionsAccountDisconnectedEvent": ( - "stripe.events._v1_financial_connections_account_disconnected_event", - False, - ), - "V1FinancialConnectionsAccountDisconnectedEventNotification": ( - "stripe.events._v1_financial_connections_account_disconnected_event", - False, - ), - "V1FinancialConnectionsAccountReactivatedEvent": ( - "stripe.events._v1_financial_connections_account_reactivated_event", - False, - ), - "V1FinancialConnectionsAccountReactivatedEventNotification": ( - "stripe.events._v1_financial_connections_account_reactivated_event", - False, - ), - "V1FinancialConnectionsAccountRefreshedBalanceEvent": ( - "stripe.events._v1_financial_connections_account_refreshed_balance_event", - False, - ), - "V1FinancialConnectionsAccountRefreshedBalanceEventNotification": ( - "stripe.events._v1_financial_connections_account_refreshed_balance_event", - False, - ), - "V1FinancialConnectionsAccountRefreshedOwnershipEvent": ( - "stripe.events._v1_financial_connections_account_refreshed_ownership_event", - False, - ), - "V1FinancialConnectionsAccountRefreshedOwnershipEventNotification": ( - "stripe.events._v1_financial_connections_account_refreshed_ownership_event", - False, - ), - "V1FinancialConnectionsAccountRefreshedTransactionsEvent": ( - "stripe.events._v1_financial_connections_account_refreshed_transactions_event", - False, - ), - "V1FinancialConnectionsAccountRefreshedTransactionsEventNotification": ( - "stripe.events._v1_financial_connections_account_refreshed_transactions_event", - False, - ), - "V1IdentityVerificationSessionCanceledEvent": ( - "stripe.events._v1_identity_verification_session_canceled_event", - False, - ), - "V1IdentityVerificationSessionCanceledEventNotification": ( - "stripe.events._v1_identity_verification_session_canceled_event", - False, - ), - "V1IdentityVerificationSessionCreatedEvent": ( - "stripe.events._v1_identity_verification_session_created_event", - False, - ), - "V1IdentityVerificationSessionCreatedEventNotification": ( - "stripe.events._v1_identity_verification_session_created_event", - False, - ), - "V1IdentityVerificationSessionProcessingEvent": ( - "stripe.events._v1_identity_verification_session_processing_event", - False, - ), - "V1IdentityVerificationSessionProcessingEventNotification": ( - "stripe.events._v1_identity_verification_session_processing_event", - False, - ), - "V1IdentityVerificationSessionRedactedEvent": ( - "stripe.events._v1_identity_verification_session_redacted_event", - False, - ), - "V1IdentityVerificationSessionRedactedEventNotification": ( - "stripe.events._v1_identity_verification_session_redacted_event", - False, - ), - "V1IdentityVerificationSessionRequiresInputEvent": ( - "stripe.events._v1_identity_verification_session_requires_input_event", - False, - ), - "V1IdentityVerificationSessionRequiresInputEventNotification": ( - "stripe.events._v1_identity_verification_session_requires_input_event", - False, - ), - "V1IdentityVerificationSessionVerifiedEvent": ( - "stripe.events._v1_identity_verification_session_verified_event", - False, - ), - "V1IdentityVerificationSessionVerifiedEventNotification": ( - "stripe.events._v1_identity_verification_session_verified_event", - False, - ), - "V1InvoiceCreatedEvent": ( - "stripe.events._v1_invoice_created_event", - False, - ), - "V1InvoiceCreatedEventNotification": ( - "stripe.events._v1_invoice_created_event", - False, - ), - "V1InvoiceDeletedEvent": ( - "stripe.events._v1_invoice_deleted_event", - False, - ), - "V1InvoiceDeletedEventNotification": ( - "stripe.events._v1_invoice_deleted_event", - False, - ), - "V1InvoiceFinalizationFailedEvent": ( - "stripe.events._v1_invoice_finalization_failed_event", - False, - ), - "V1InvoiceFinalizationFailedEventNotification": ( - "stripe.events._v1_invoice_finalization_failed_event", - False, - ), - "V1InvoiceFinalizedEvent": ( - "stripe.events._v1_invoice_finalized_event", - False, - ), - "V1InvoiceFinalizedEventNotification": ( - "stripe.events._v1_invoice_finalized_event", - False, - ), - "V1InvoiceMarkedUncollectibleEvent": ( - "stripe.events._v1_invoice_marked_uncollectible_event", - False, - ), - "V1InvoiceMarkedUncollectibleEventNotification": ( - "stripe.events._v1_invoice_marked_uncollectible_event", - False, - ), - "V1InvoiceOverdueEvent": ( - "stripe.events._v1_invoice_overdue_event", - False, - ), - "V1InvoiceOverdueEventNotification": ( - "stripe.events._v1_invoice_overdue_event", - False, - ), - "V1InvoiceOverpaidEvent": ( - "stripe.events._v1_invoice_overpaid_event", - False, - ), - "V1InvoiceOverpaidEventNotification": ( - "stripe.events._v1_invoice_overpaid_event", - False, - ), - "V1InvoicePaidEvent": ("stripe.events._v1_invoice_paid_event", False), - "V1InvoicePaidEventNotification": ( - "stripe.events._v1_invoice_paid_event", - False, - ), - "V1InvoicePaymentActionRequiredEvent": ( - "stripe.events._v1_invoice_payment_action_required_event", - False, - ), - "V1InvoicePaymentActionRequiredEventNotification": ( - "stripe.events._v1_invoice_payment_action_required_event", - False, - ), - "V1InvoicePaymentFailedEvent": ( - "stripe.events._v1_invoice_payment_failed_event", - False, - ), - "V1InvoicePaymentFailedEventNotification": ( - "stripe.events._v1_invoice_payment_failed_event", - False, - ), - "V1InvoicePaymentPaidEvent": ( - "stripe.events._v1_invoice_payment_paid_event", - False, - ), - "V1InvoicePaymentPaidEventNotification": ( - "stripe.events._v1_invoice_payment_paid_event", - False, - ), - "V1InvoicePaymentSucceededEvent": ( - "stripe.events._v1_invoice_payment_succeeded_event", - False, - ), - "V1InvoicePaymentSucceededEventNotification": ( - "stripe.events._v1_invoice_payment_succeeded_event", - False, - ), - "V1InvoiceSentEvent": ("stripe.events._v1_invoice_sent_event", False), - "V1InvoiceSentEventNotification": ( - "stripe.events._v1_invoice_sent_event", - False, - ), - "V1InvoiceUpcomingEvent": ( - "stripe.events._v1_invoice_upcoming_event", - False, - ), - "V1InvoiceUpcomingEventNotification": ( - "stripe.events._v1_invoice_upcoming_event", - False, - ), - "V1InvoiceUpdatedEvent": ( - "stripe.events._v1_invoice_updated_event", - False, - ), - "V1InvoiceUpdatedEventNotification": ( - "stripe.events._v1_invoice_updated_event", - False, - ), - "V1InvoiceVoidedEvent": ("stripe.events._v1_invoice_voided_event", False), - "V1InvoiceVoidedEventNotification": ( - "stripe.events._v1_invoice_voided_event", - False, - ), - "V1InvoiceWillBeDueEvent": ( - "stripe.events._v1_invoice_will_be_due_event", - False, - ), - "V1InvoiceWillBeDueEventNotification": ( - "stripe.events._v1_invoice_will_be_due_event", - False, - ), - "V1InvoiceitemCreatedEvent": ( - "stripe.events._v1_invoiceitem_created_event", - False, - ), - "V1InvoiceitemCreatedEventNotification": ( - "stripe.events._v1_invoiceitem_created_event", - False, - ), - "V1InvoiceitemDeletedEvent": ( - "stripe.events._v1_invoiceitem_deleted_event", - False, - ), - "V1InvoiceitemDeletedEventNotification": ( - "stripe.events._v1_invoiceitem_deleted_event", - False, - ), - "V1IssuingAuthorizationCreatedEvent": ( - "stripe.events._v1_issuing_authorization_created_event", - False, - ), - "V1IssuingAuthorizationCreatedEventNotification": ( - "stripe.events._v1_issuing_authorization_created_event", - False, - ), - "V1IssuingAuthorizationRequestEvent": ( - "stripe.events._v1_issuing_authorization_request_event", - False, - ), - "V1IssuingAuthorizationRequestEventNotification": ( - "stripe.events._v1_issuing_authorization_request_event", - False, - ), - "V1IssuingAuthorizationUpdatedEvent": ( - "stripe.events._v1_issuing_authorization_updated_event", - False, - ), - "V1IssuingAuthorizationUpdatedEventNotification": ( - "stripe.events._v1_issuing_authorization_updated_event", - False, - ), - "V1IssuingCardCreatedEvent": ( - "stripe.events._v1_issuing_card_created_event", - False, - ), - "V1IssuingCardCreatedEventNotification": ( - "stripe.events._v1_issuing_card_created_event", - False, - ), - "V1IssuingCardUpdatedEvent": ( - "stripe.events._v1_issuing_card_updated_event", - False, - ), - "V1IssuingCardUpdatedEventNotification": ( - "stripe.events._v1_issuing_card_updated_event", - False, - ), - "V1IssuingCardholderCreatedEvent": ( - "stripe.events._v1_issuing_cardholder_created_event", - False, - ), - "V1IssuingCardholderCreatedEventNotification": ( - "stripe.events._v1_issuing_cardholder_created_event", - False, - ), - "V1IssuingCardholderUpdatedEvent": ( - "stripe.events._v1_issuing_cardholder_updated_event", - False, - ), - "V1IssuingCardholderUpdatedEventNotification": ( - "stripe.events._v1_issuing_cardholder_updated_event", - False, - ), - "V1IssuingDisputeClosedEvent": ( - "stripe.events._v1_issuing_dispute_closed_event", - False, - ), - "V1IssuingDisputeClosedEventNotification": ( - "stripe.events._v1_issuing_dispute_closed_event", - False, - ), - "V1IssuingDisputeCreatedEvent": ( - "stripe.events._v1_issuing_dispute_created_event", - False, - ), - "V1IssuingDisputeCreatedEventNotification": ( - "stripe.events._v1_issuing_dispute_created_event", - False, - ), - "V1IssuingDisputeFundsReinstatedEvent": ( - "stripe.events._v1_issuing_dispute_funds_reinstated_event", - False, - ), - "V1IssuingDisputeFundsReinstatedEventNotification": ( - "stripe.events._v1_issuing_dispute_funds_reinstated_event", - False, - ), - "V1IssuingDisputeFundsRescindedEvent": ( - "stripe.events._v1_issuing_dispute_funds_rescinded_event", - False, - ), - "V1IssuingDisputeFundsRescindedEventNotification": ( - "stripe.events._v1_issuing_dispute_funds_rescinded_event", - False, - ), - "V1IssuingDisputeSubmittedEvent": ( - "stripe.events._v1_issuing_dispute_submitted_event", - False, - ), - "V1IssuingDisputeSubmittedEventNotification": ( - "stripe.events._v1_issuing_dispute_submitted_event", - False, - ), - "V1IssuingDisputeUpdatedEvent": ( - "stripe.events._v1_issuing_dispute_updated_event", - False, - ), - "V1IssuingDisputeUpdatedEventNotification": ( - "stripe.events._v1_issuing_dispute_updated_event", - False, - ), - "V1IssuingPersonalizationDesignActivatedEvent": ( - "stripe.events._v1_issuing_personalization_design_activated_event", - False, - ), - "V1IssuingPersonalizationDesignActivatedEventNotification": ( - "stripe.events._v1_issuing_personalization_design_activated_event", - False, - ), - "V1IssuingPersonalizationDesignDeactivatedEvent": ( - "stripe.events._v1_issuing_personalization_design_deactivated_event", - False, - ), - "V1IssuingPersonalizationDesignDeactivatedEventNotification": ( - "stripe.events._v1_issuing_personalization_design_deactivated_event", - False, - ), - "V1IssuingPersonalizationDesignRejectedEvent": ( - "stripe.events._v1_issuing_personalization_design_rejected_event", - False, - ), - "V1IssuingPersonalizationDesignRejectedEventNotification": ( - "stripe.events._v1_issuing_personalization_design_rejected_event", - False, - ), - "V1IssuingPersonalizationDesignUpdatedEvent": ( - "stripe.events._v1_issuing_personalization_design_updated_event", - False, - ), - "V1IssuingPersonalizationDesignUpdatedEventNotification": ( - "stripe.events._v1_issuing_personalization_design_updated_event", - False, - ), - "V1IssuingTokenCreatedEvent": ( - "stripe.events._v1_issuing_token_created_event", - False, - ), - "V1IssuingTokenCreatedEventNotification": ( - "stripe.events._v1_issuing_token_created_event", - False, - ), - "V1IssuingTokenUpdatedEvent": ( - "stripe.events._v1_issuing_token_updated_event", - False, - ), - "V1IssuingTokenUpdatedEventNotification": ( - "stripe.events._v1_issuing_token_updated_event", - False, - ), - "V1IssuingTransactionCreatedEvent": ( - "stripe.events._v1_issuing_transaction_created_event", - False, - ), - "V1IssuingTransactionCreatedEventNotification": ( - "stripe.events._v1_issuing_transaction_created_event", - False, - ), - "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent": ( - "stripe.events._v1_issuing_transaction_purchase_details_receipt_updated_event", - False, - ), - "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification": ( - "stripe.events._v1_issuing_transaction_purchase_details_receipt_updated_event", - False, - ), - "V1IssuingTransactionUpdatedEvent": ( - "stripe.events._v1_issuing_transaction_updated_event", - False, - ), - "V1IssuingTransactionUpdatedEventNotification": ( - "stripe.events._v1_issuing_transaction_updated_event", - False, - ), - "V1MandateUpdatedEvent": ( - "stripe.events._v1_mandate_updated_event", - False, - ), - "V1MandateUpdatedEventNotification": ( - "stripe.events._v1_mandate_updated_event", - False, - ), - "V1PaymentIntentAmountCapturableUpdatedEvent": ( - "stripe.events._v1_payment_intent_amount_capturable_updated_event", - False, - ), - "V1PaymentIntentAmountCapturableUpdatedEventNotification": ( - "stripe.events._v1_payment_intent_amount_capturable_updated_event", - False, - ), - "V1PaymentIntentCanceledEvent": ( - "stripe.events._v1_payment_intent_canceled_event", - False, - ), - "V1PaymentIntentCanceledEventNotification": ( - "stripe.events._v1_payment_intent_canceled_event", - False, - ), - "V1PaymentIntentCreatedEvent": ( - "stripe.events._v1_payment_intent_created_event", - False, - ), - "V1PaymentIntentCreatedEventNotification": ( - "stripe.events._v1_payment_intent_created_event", - False, - ), - "V1PaymentIntentPartiallyFundedEvent": ( - "stripe.events._v1_payment_intent_partially_funded_event", - False, - ), - "V1PaymentIntentPartiallyFundedEventNotification": ( - "stripe.events._v1_payment_intent_partially_funded_event", - False, - ), - "V1PaymentIntentPaymentFailedEvent": ( - "stripe.events._v1_payment_intent_payment_failed_event", - False, - ), - "V1PaymentIntentPaymentFailedEventNotification": ( - "stripe.events._v1_payment_intent_payment_failed_event", - False, - ), - "V1PaymentIntentProcessingEvent": ( - "stripe.events._v1_payment_intent_processing_event", - False, - ), - "V1PaymentIntentProcessingEventNotification": ( - "stripe.events._v1_payment_intent_processing_event", - False, - ), - "V1PaymentIntentRequiresActionEvent": ( - "stripe.events._v1_payment_intent_requires_action_event", - False, - ), - "V1PaymentIntentRequiresActionEventNotification": ( - "stripe.events._v1_payment_intent_requires_action_event", - False, - ), - "V1PaymentIntentSucceededEvent": ( - "stripe.events._v1_payment_intent_succeeded_event", - False, - ), - "V1PaymentIntentSucceededEventNotification": ( - "stripe.events._v1_payment_intent_succeeded_event", - False, - ), - "V1PaymentLinkCreatedEvent": ( - "stripe.events._v1_payment_link_created_event", - False, - ), - "V1PaymentLinkCreatedEventNotification": ( - "stripe.events._v1_payment_link_created_event", - False, - ), - "V1PaymentLinkUpdatedEvent": ( - "stripe.events._v1_payment_link_updated_event", - False, - ), - "V1PaymentLinkUpdatedEventNotification": ( - "stripe.events._v1_payment_link_updated_event", - False, - ), - "V1PaymentMethodAttachedEvent": ( - "stripe.events._v1_payment_method_attached_event", - False, - ), - "V1PaymentMethodAttachedEventNotification": ( - "stripe.events._v1_payment_method_attached_event", - False, - ), - "V1PaymentMethodAutomaticallyUpdatedEvent": ( - "stripe.events._v1_payment_method_automatically_updated_event", - False, - ), - "V1PaymentMethodAutomaticallyUpdatedEventNotification": ( - "stripe.events._v1_payment_method_automatically_updated_event", - False, - ), - "V1PaymentMethodDetachedEvent": ( - "stripe.events._v1_payment_method_detached_event", - False, - ), - "V1PaymentMethodDetachedEventNotification": ( - "stripe.events._v1_payment_method_detached_event", - False, - ), - "V1PaymentMethodUpdatedEvent": ( - "stripe.events._v1_payment_method_updated_event", - False, - ), - "V1PaymentMethodUpdatedEventNotification": ( - "stripe.events._v1_payment_method_updated_event", - False, - ), - "V1PayoutCanceledEvent": ( - "stripe.events._v1_payout_canceled_event", - False, - ), - "V1PayoutCanceledEventNotification": ( - "stripe.events._v1_payout_canceled_event", - False, - ), - "V1PayoutCreatedEvent": ("stripe.events._v1_payout_created_event", False), - "V1PayoutCreatedEventNotification": ( - "stripe.events._v1_payout_created_event", - False, - ), - "V1PayoutFailedEvent": ("stripe.events._v1_payout_failed_event", False), - "V1PayoutFailedEventNotification": ( - "stripe.events._v1_payout_failed_event", - False, - ), - "V1PayoutPaidEvent": ("stripe.events._v1_payout_paid_event", False), - "V1PayoutPaidEventNotification": ( - "stripe.events._v1_payout_paid_event", - False, - ), - "V1PayoutReconciliationCompletedEvent": ( - "stripe.events._v1_payout_reconciliation_completed_event", - False, - ), - "V1PayoutReconciliationCompletedEventNotification": ( - "stripe.events._v1_payout_reconciliation_completed_event", - False, - ), - "V1PayoutUpdatedEvent": ("stripe.events._v1_payout_updated_event", False), - "V1PayoutUpdatedEventNotification": ( - "stripe.events._v1_payout_updated_event", - False, - ), - "V1PersonCreatedEvent": ("stripe.events._v1_person_created_event", False), - "V1PersonCreatedEventNotification": ( - "stripe.events._v1_person_created_event", - False, - ), - "V1PersonDeletedEvent": ("stripe.events._v1_person_deleted_event", False), - "V1PersonDeletedEventNotification": ( - "stripe.events._v1_person_deleted_event", - False, - ), - "V1PersonUpdatedEvent": ("stripe.events._v1_person_updated_event", False), - "V1PersonUpdatedEventNotification": ( - "stripe.events._v1_person_updated_event", - False, - ), - "V1PlanCreatedEvent": ("stripe.events._v1_plan_created_event", False), - "V1PlanCreatedEventNotification": ( - "stripe.events._v1_plan_created_event", - False, - ), - "V1PlanDeletedEvent": ("stripe.events._v1_plan_deleted_event", False), - "V1PlanDeletedEventNotification": ( - "stripe.events._v1_plan_deleted_event", - False, - ), - "V1PlanUpdatedEvent": ("stripe.events._v1_plan_updated_event", False), - "V1PlanUpdatedEventNotification": ( - "stripe.events._v1_plan_updated_event", - False, - ), - "V1PriceCreatedEvent": ("stripe.events._v1_price_created_event", False), - "V1PriceCreatedEventNotification": ( - "stripe.events._v1_price_created_event", - False, - ), - "V1PriceDeletedEvent": ("stripe.events._v1_price_deleted_event", False), - "V1PriceDeletedEventNotification": ( - "stripe.events._v1_price_deleted_event", - False, - ), - "V1PriceUpdatedEvent": ("stripe.events._v1_price_updated_event", False), - "V1PriceUpdatedEventNotification": ( - "stripe.events._v1_price_updated_event", - False, - ), - "V1ProductCreatedEvent": ( - "stripe.events._v1_product_created_event", - False, - ), - "V1ProductCreatedEventNotification": ( - "stripe.events._v1_product_created_event", - False, - ), - "V1ProductDeletedEvent": ( - "stripe.events._v1_product_deleted_event", - False, - ), - "V1ProductDeletedEventNotification": ( - "stripe.events._v1_product_deleted_event", - False, - ), - "V1ProductUpdatedEvent": ( - "stripe.events._v1_product_updated_event", - False, - ), - "V1ProductUpdatedEventNotification": ( - "stripe.events._v1_product_updated_event", - False, - ), - "V1PromotionCodeCreatedEvent": ( - "stripe.events._v1_promotion_code_created_event", - False, - ), - "V1PromotionCodeCreatedEventNotification": ( - "stripe.events._v1_promotion_code_created_event", - False, - ), - "V1PromotionCodeUpdatedEvent": ( - "stripe.events._v1_promotion_code_updated_event", - False, - ), - "V1PromotionCodeUpdatedEventNotification": ( - "stripe.events._v1_promotion_code_updated_event", - False, - ), - "V1QuoteAcceptedEvent": ("stripe.events._v1_quote_accepted_event", False), - "V1QuoteAcceptedEventNotification": ( - "stripe.events._v1_quote_accepted_event", - False, - ), - "V1QuoteCanceledEvent": ("stripe.events._v1_quote_canceled_event", False), - "V1QuoteCanceledEventNotification": ( - "stripe.events._v1_quote_canceled_event", - False, - ), - "V1QuoteCreatedEvent": ("stripe.events._v1_quote_created_event", False), - "V1QuoteCreatedEventNotification": ( - "stripe.events._v1_quote_created_event", - False, - ), - "V1QuoteFinalizedEvent": ( - "stripe.events._v1_quote_finalized_event", - False, - ), - "V1QuoteFinalizedEventNotification": ( - "stripe.events._v1_quote_finalized_event", - False, - ), - "V1RadarEarlyFraudWarningCreatedEvent": ( - "stripe.events._v1_radar_early_fraud_warning_created_event", - False, - ), - "V1RadarEarlyFraudWarningCreatedEventNotification": ( - "stripe.events._v1_radar_early_fraud_warning_created_event", - False, - ), - "V1RadarEarlyFraudWarningUpdatedEvent": ( - "stripe.events._v1_radar_early_fraud_warning_updated_event", - False, - ), - "V1RadarEarlyFraudWarningUpdatedEventNotification": ( - "stripe.events._v1_radar_early_fraud_warning_updated_event", - False, - ), - "V1RefundCreatedEvent": ("stripe.events._v1_refund_created_event", False), - "V1RefundCreatedEventNotification": ( - "stripe.events._v1_refund_created_event", - False, - ), - "V1RefundFailedEvent": ("stripe.events._v1_refund_failed_event", False), - "V1RefundFailedEventNotification": ( - "stripe.events._v1_refund_failed_event", - False, - ), - "V1RefundUpdatedEvent": ("stripe.events._v1_refund_updated_event", False), - "V1RefundUpdatedEventNotification": ( - "stripe.events._v1_refund_updated_event", - False, - ), - "V1ReviewClosedEvent": ("stripe.events._v1_review_closed_event", False), - "V1ReviewClosedEventNotification": ( - "stripe.events._v1_review_closed_event", - False, - ), - "V1ReviewOpenedEvent": ("stripe.events._v1_review_opened_event", False), - "V1ReviewOpenedEventNotification": ( - "stripe.events._v1_review_opened_event", - False, - ), - "V1SetupIntentCanceledEvent": ( - "stripe.events._v1_setup_intent_canceled_event", - False, - ), - "V1SetupIntentCanceledEventNotification": ( - "stripe.events._v1_setup_intent_canceled_event", - False, - ), - "V1SetupIntentCreatedEvent": ( - "stripe.events._v1_setup_intent_created_event", - False, - ), - "V1SetupIntentCreatedEventNotification": ( - "stripe.events._v1_setup_intent_created_event", - False, - ), - "V1SetupIntentRequiresActionEvent": ( - "stripe.events._v1_setup_intent_requires_action_event", - False, - ), - "V1SetupIntentRequiresActionEventNotification": ( - "stripe.events._v1_setup_intent_requires_action_event", - False, - ), - "V1SetupIntentSetupFailedEvent": ( - "stripe.events._v1_setup_intent_setup_failed_event", - False, - ), - "V1SetupIntentSetupFailedEventNotification": ( - "stripe.events._v1_setup_intent_setup_failed_event", - False, - ), - "V1SetupIntentSucceededEvent": ( - "stripe.events._v1_setup_intent_succeeded_event", - False, - ), - "V1SetupIntentSucceededEventNotification": ( - "stripe.events._v1_setup_intent_succeeded_event", - False, - ), - "V1SigmaScheduledQueryRunCreatedEvent": ( - "stripe.events._v1_sigma_scheduled_query_run_created_event", - False, - ), - "V1SigmaScheduledQueryRunCreatedEventNotification": ( - "stripe.events._v1_sigma_scheduled_query_run_created_event", - False, - ), - "V1SourceCanceledEvent": ( - "stripe.events._v1_source_canceled_event", - False, - ), - "V1SourceCanceledEventNotification": ( - "stripe.events._v1_source_canceled_event", - False, - ), - "V1SourceChargeableEvent": ( - "stripe.events._v1_source_chargeable_event", - False, - ), - "V1SourceChargeableEventNotification": ( - "stripe.events._v1_source_chargeable_event", - False, - ), - "V1SourceFailedEvent": ("stripe.events._v1_source_failed_event", False), - "V1SourceFailedEventNotification": ( - "stripe.events._v1_source_failed_event", - False, - ), - "V1SourceRefundAttributesRequiredEvent": ( - "stripe.events._v1_source_refund_attributes_required_event", - False, - ), - "V1SourceRefundAttributesRequiredEventNotification": ( - "stripe.events._v1_source_refund_attributes_required_event", - False, - ), - "V1SubscriptionScheduleAbortedEvent": ( - "stripe.events._v1_subscription_schedule_aborted_event", - False, - ), - "V1SubscriptionScheduleAbortedEventNotification": ( - "stripe.events._v1_subscription_schedule_aborted_event", - False, - ), - "V1SubscriptionScheduleCanceledEvent": ( - "stripe.events._v1_subscription_schedule_canceled_event", - False, - ), - "V1SubscriptionScheduleCanceledEventNotification": ( - "stripe.events._v1_subscription_schedule_canceled_event", - False, - ), - "V1SubscriptionScheduleCompletedEvent": ( - "stripe.events._v1_subscription_schedule_completed_event", - False, - ), - "V1SubscriptionScheduleCompletedEventNotification": ( - "stripe.events._v1_subscription_schedule_completed_event", - False, - ), - "V1SubscriptionScheduleCreatedEvent": ( - "stripe.events._v1_subscription_schedule_created_event", - False, - ), - "V1SubscriptionScheduleCreatedEventNotification": ( - "stripe.events._v1_subscription_schedule_created_event", - False, - ), - "V1SubscriptionScheduleExpiringEvent": ( - "stripe.events._v1_subscription_schedule_expiring_event", - False, - ), - "V1SubscriptionScheduleExpiringEventNotification": ( - "stripe.events._v1_subscription_schedule_expiring_event", - False, - ), - "V1SubscriptionScheduleReleasedEvent": ( - "stripe.events._v1_subscription_schedule_released_event", - False, - ), - "V1SubscriptionScheduleReleasedEventNotification": ( - "stripe.events._v1_subscription_schedule_released_event", - False, - ), - "V1SubscriptionScheduleUpdatedEvent": ( - "stripe.events._v1_subscription_schedule_updated_event", - False, - ), - "V1SubscriptionScheduleUpdatedEventNotification": ( - "stripe.events._v1_subscription_schedule_updated_event", - False, - ), - "V1TaxRateCreatedEvent": ( - "stripe.events._v1_tax_rate_created_event", - False, - ), - "V1TaxRateCreatedEventNotification": ( - "stripe.events._v1_tax_rate_created_event", - False, - ), - "V1TaxRateUpdatedEvent": ( - "stripe.events._v1_tax_rate_updated_event", - False, - ), - "V1TaxRateUpdatedEventNotification": ( - "stripe.events._v1_tax_rate_updated_event", - False, - ), - "V1TerminalReaderActionFailedEvent": ( - "stripe.events._v1_terminal_reader_action_failed_event", - False, - ), - "V1TerminalReaderActionFailedEventNotification": ( - "stripe.events._v1_terminal_reader_action_failed_event", - False, - ), - "V1TerminalReaderActionSucceededEvent": ( - "stripe.events._v1_terminal_reader_action_succeeded_event", - False, - ), - "V1TerminalReaderActionSucceededEventNotification": ( - "stripe.events._v1_terminal_reader_action_succeeded_event", - False, - ), - "V1TerminalReaderActionUpdatedEvent": ( - "stripe.events._v1_terminal_reader_action_updated_event", - False, - ), - "V1TerminalReaderActionUpdatedEventNotification": ( - "stripe.events._v1_terminal_reader_action_updated_event", - False, - ), - "V1TestHelpersTestClockAdvancingEvent": ( - "stripe.events._v1_test_helpers_test_clock_advancing_event", - False, - ), - "V1TestHelpersTestClockAdvancingEventNotification": ( - "stripe.events._v1_test_helpers_test_clock_advancing_event", - False, - ), - "V1TestHelpersTestClockCreatedEvent": ( - "stripe.events._v1_test_helpers_test_clock_created_event", - False, - ), - "V1TestHelpersTestClockCreatedEventNotification": ( - "stripe.events._v1_test_helpers_test_clock_created_event", - False, - ), - "V1TestHelpersTestClockDeletedEvent": ( - "stripe.events._v1_test_helpers_test_clock_deleted_event", - False, - ), - "V1TestHelpersTestClockDeletedEventNotification": ( - "stripe.events._v1_test_helpers_test_clock_deleted_event", - False, - ), - "V1TestHelpersTestClockInternalFailureEvent": ( - "stripe.events._v1_test_helpers_test_clock_internal_failure_event", - False, - ), - "V1TestHelpersTestClockInternalFailureEventNotification": ( - "stripe.events._v1_test_helpers_test_clock_internal_failure_event", - False, - ), - "V1TestHelpersTestClockReadyEvent": ( - "stripe.events._v1_test_helpers_test_clock_ready_event", - False, - ), - "V1TestHelpersTestClockReadyEventNotification": ( - "stripe.events._v1_test_helpers_test_clock_ready_event", - False, - ), - "V1TopupCanceledEvent": ("stripe.events._v1_topup_canceled_event", False), - "V1TopupCanceledEventNotification": ( - "stripe.events._v1_topup_canceled_event", - False, - ), - "V1TopupCreatedEvent": ("stripe.events._v1_topup_created_event", False), - "V1TopupCreatedEventNotification": ( - "stripe.events._v1_topup_created_event", - False, - ), - "V1TopupFailedEvent": ("stripe.events._v1_topup_failed_event", False), - "V1TopupFailedEventNotification": ( - "stripe.events._v1_topup_failed_event", - False, - ), - "V1TopupReversedEvent": ("stripe.events._v1_topup_reversed_event", False), - "V1TopupReversedEventNotification": ( - "stripe.events._v1_topup_reversed_event", - False, - ), - "V1TopupSucceededEvent": ( - "stripe.events._v1_topup_succeeded_event", - False, - ), - "V1TopupSucceededEventNotification": ( - "stripe.events._v1_topup_succeeded_event", - False, - ), - "V1TransferCreatedEvent": ( - "stripe.events._v1_transfer_created_event", - False, - ), - "V1TransferCreatedEventNotification": ( - "stripe.events._v1_transfer_created_event", - False, - ), - "V1TransferReversedEvent": ( - "stripe.events._v1_transfer_reversed_event", + V2CoreHealthFraudRateIncreasedEventNotification as V2CoreHealthFraudRateIncreasedEventNotification, + ) + from stripe.events._v2_core_health_issuing_authorization_request_errors_firing_event import ( + V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent as V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent, + V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification as V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification, + ) + from stripe.events._v2_core_health_issuing_authorization_request_errors_resolved_event import ( + V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent as V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent, + V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification as V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification, + ) + from stripe.events._v2_core_health_issuing_authorization_request_timeout_firing_event import ( + V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent as V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent, + V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification as V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification, + ) + from stripe.events._v2_core_health_issuing_authorization_request_timeout_resolved_event import ( + V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent as V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent, + V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification as V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification, + ) + from stripe.events._v2_core_health_payment_method_error_firing_event import ( + V2CoreHealthPaymentMethodErrorFiringEvent as V2CoreHealthPaymentMethodErrorFiringEvent, + V2CoreHealthPaymentMethodErrorFiringEventNotification as V2CoreHealthPaymentMethodErrorFiringEventNotification, + ) + from stripe.events._v2_core_health_payment_method_error_resolved_event import ( + V2CoreHealthPaymentMethodErrorResolvedEvent as V2CoreHealthPaymentMethodErrorResolvedEvent, + V2CoreHealthPaymentMethodErrorResolvedEventNotification as V2CoreHealthPaymentMethodErrorResolvedEventNotification, + ) + from stripe.events._v2_core_health_traffic_volume_drop_firing_event import ( + V2CoreHealthTrafficVolumeDropFiringEvent as V2CoreHealthTrafficVolumeDropFiringEvent, + V2CoreHealthTrafficVolumeDropFiringEventNotification as V2CoreHealthTrafficVolumeDropFiringEventNotification, + ) + from stripe.events._v2_core_health_traffic_volume_drop_resolved_event import ( + V2CoreHealthTrafficVolumeDropResolvedEvent as V2CoreHealthTrafficVolumeDropResolvedEvent, + V2CoreHealthTrafficVolumeDropResolvedEventNotification as V2CoreHealthTrafficVolumeDropResolvedEventNotification, + ) + from stripe.events._v2_core_health_webhook_latency_firing_event import ( + V2CoreHealthWebhookLatencyFiringEvent as V2CoreHealthWebhookLatencyFiringEvent, + V2CoreHealthWebhookLatencyFiringEventNotification as V2CoreHealthWebhookLatencyFiringEventNotification, + ) + from stripe.events._v2_core_health_webhook_latency_resolved_event import ( + V2CoreHealthWebhookLatencyResolvedEvent as V2CoreHealthWebhookLatencyResolvedEvent, + V2CoreHealthWebhookLatencyResolvedEventNotification as V2CoreHealthWebhookLatencyResolvedEventNotification, + ) + from stripe.events._v2_money_management_adjustment_created_event import ( + V2MoneyManagementAdjustmentCreatedEvent as V2MoneyManagementAdjustmentCreatedEvent, + V2MoneyManagementAdjustmentCreatedEventNotification as V2MoneyManagementAdjustmentCreatedEventNotification, + ) + from stripe.events._v2_money_management_financial_account_created_event import ( + V2MoneyManagementFinancialAccountCreatedEvent as V2MoneyManagementFinancialAccountCreatedEvent, + V2MoneyManagementFinancialAccountCreatedEventNotification as V2MoneyManagementFinancialAccountCreatedEventNotification, + ) + from stripe.events._v2_money_management_financial_account_updated_event import ( + V2MoneyManagementFinancialAccountUpdatedEvent as V2MoneyManagementFinancialAccountUpdatedEvent, + V2MoneyManagementFinancialAccountUpdatedEventNotification as V2MoneyManagementFinancialAccountUpdatedEventNotification, + ) + from stripe.events._v2_money_management_financial_address_activated_event import ( + V2MoneyManagementFinancialAddressActivatedEvent as V2MoneyManagementFinancialAddressActivatedEvent, + V2MoneyManagementFinancialAddressActivatedEventNotification as V2MoneyManagementFinancialAddressActivatedEventNotification, + ) + from stripe.events._v2_money_management_financial_address_failed_event import ( + V2MoneyManagementFinancialAddressFailedEvent as V2MoneyManagementFinancialAddressFailedEvent, + V2MoneyManagementFinancialAddressFailedEventNotification as V2MoneyManagementFinancialAddressFailedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_available_event import ( + V2MoneyManagementInboundTransferAvailableEvent as V2MoneyManagementInboundTransferAvailableEvent, + V2MoneyManagementInboundTransferAvailableEventNotification as V2MoneyManagementInboundTransferAvailableEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_failed_event import ( + V2MoneyManagementInboundTransferBankDebitFailedEvent as V2MoneyManagementInboundTransferBankDebitFailedEvent, + V2MoneyManagementInboundTransferBankDebitFailedEventNotification as V2MoneyManagementInboundTransferBankDebitFailedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_processing_event import ( + V2MoneyManagementInboundTransferBankDebitProcessingEvent as V2MoneyManagementInboundTransferBankDebitProcessingEvent, + V2MoneyManagementInboundTransferBankDebitProcessingEventNotification as V2MoneyManagementInboundTransferBankDebitProcessingEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_queued_event import ( + V2MoneyManagementInboundTransferBankDebitQueuedEvent as V2MoneyManagementInboundTransferBankDebitQueuedEvent, + V2MoneyManagementInboundTransferBankDebitQueuedEventNotification as V2MoneyManagementInboundTransferBankDebitQueuedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_returned_event import ( + V2MoneyManagementInboundTransferBankDebitReturnedEvent as V2MoneyManagementInboundTransferBankDebitReturnedEvent, + V2MoneyManagementInboundTransferBankDebitReturnedEventNotification as V2MoneyManagementInboundTransferBankDebitReturnedEventNotification, + ) + from stripe.events._v2_money_management_inbound_transfer_bank_debit_succeeded_event import ( + V2MoneyManagementInboundTransferBankDebitSucceededEvent as V2MoneyManagementInboundTransferBankDebitSucceededEvent, + V2MoneyManagementInboundTransferBankDebitSucceededEventNotification as V2MoneyManagementInboundTransferBankDebitSucceededEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_canceled_event import ( + V2MoneyManagementOutboundPaymentCanceledEvent as V2MoneyManagementOutboundPaymentCanceledEvent, + V2MoneyManagementOutboundPaymentCanceledEventNotification as V2MoneyManagementOutboundPaymentCanceledEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_created_event import ( + V2MoneyManagementOutboundPaymentCreatedEvent as V2MoneyManagementOutboundPaymentCreatedEvent, + V2MoneyManagementOutboundPaymentCreatedEventNotification as V2MoneyManagementOutboundPaymentCreatedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_failed_event import ( + V2MoneyManagementOutboundPaymentFailedEvent as V2MoneyManagementOutboundPaymentFailedEvent, + V2MoneyManagementOutboundPaymentFailedEventNotification as V2MoneyManagementOutboundPaymentFailedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_posted_event import ( + V2MoneyManagementOutboundPaymentPostedEvent as V2MoneyManagementOutboundPaymentPostedEvent, + V2MoneyManagementOutboundPaymentPostedEventNotification as V2MoneyManagementOutboundPaymentPostedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_returned_event import ( + V2MoneyManagementOutboundPaymentReturnedEvent as V2MoneyManagementOutboundPaymentReturnedEvent, + V2MoneyManagementOutboundPaymentReturnedEventNotification as V2MoneyManagementOutboundPaymentReturnedEventNotification, + ) + from stripe.events._v2_money_management_outbound_payment_updated_event import ( + V2MoneyManagementOutboundPaymentUpdatedEvent as V2MoneyManagementOutboundPaymentUpdatedEvent, + V2MoneyManagementOutboundPaymentUpdatedEventNotification as V2MoneyManagementOutboundPaymentUpdatedEventNotification, + ) + from stripe.events._v2_money_management_outbound_transfer_canceled_event import ( + V2MoneyManagementOutboundTransferCanceledEvent as V2MoneyManagementOutboundTransferCanceledEvent, + V2MoneyManagementOutboundTransferCanceledEventNotification as V2MoneyManagementOutboundTransferCanceledEventNotification, + ) + from stripe.events._v2_money_management_outbound_transfer_created_event import ( + V2MoneyManagementOutboundTransferCreatedEvent as V2MoneyManagementOutboundTransferCreatedEvent, + V2MoneyManagementOutboundTransferCreatedEventNotification as V2MoneyManagementOutboundTransferCreatedEventNotification, + ) + from stripe.events._v2_money_management_outbound_transfer_failed_event import ( + V2MoneyManagementOutboundTransferFailedEvent as V2MoneyManagementOutboundTransferFailedEvent, + V2MoneyManagementOutboundTransferFailedEventNotification as V2MoneyManagementOutboundTransferFailedEventNotification, + ) + from stripe.events._v2_money_management_outbound_transfer_posted_event import ( + V2MoneyManagementOutboundTransferPostedEvent as V2MoneyManagementOutboundTransferPostedEvent, + V2MoneyManagementOutboundTransferPostedEventNotification as V2MoneyManagementOutboundTransferPostedEventNotification, + ) + from stripe.events._v2_money_management_outbound_transfer_returned_event import ( + V2MoneyManagementOutboundTransferReturnedEvent as V2MoneyManagementOutboundTransferReturnedEvent, + V2MoneyManagementOutboundTransferReturnedEventNotification as V2MoneyManagementOutboundTransferReturnedEventNotification, + ) + from stripe.events._v2_money_management_outbound_transfer_updated_event import ( + V2MoneyManagementOutboundTransferUpdatedEvent as V2MoneyManagementOutboundTransferUpdatedEvent, + V2MoneyManagementOutboundTransferUpdatedEventNotification as V2MoneyManagementOutboundTransferUpdatedEventNotification, + ) + from stripe.events._v2_money_management_payout_method_updated_event import ( + V2MoneyManagementPayoutMethodUpdatedEvent as V2MoneyManagementPayoutMethodUpdatedEvent, + V2MoneyManagementPayoutMethodUpdatedEventNotification as V2MoneyManagementPayoutMethodUpdatedEventNotification, + ) + from stripe.events._v2_money_management_received_credit_available_event import ( + V2MoneyManagementReceivedCreditAvailableEvent as V2MoneyManagementReceivedCreditAvailableEvent, + V2MoneyManagementReceivedCreditAvailableEventNotification as V2MoneyManagementReceivedCreditAvailableEventNotification, + ) + from stripe.events._v2_money_management_received_credit_failed_event import ( + V2MoneyManagementReceivedCreditFailedEvent as V2MoneyManagementReceivedCreditFailedEvent, + V2MoneyManagementReceivedCreditFailedEventNotification as V2MoneyManagementReceivedCreditFailedEventNotification, + ) + from stripe.events._v2_money_management_received_credit_returned_event import ( + V2MoneyManagementReceivedCreditReturnedEvent as V2MoneyManagementReceivedCreditReturnedEvent, + V2MoneyManagementReceivedCreditReturnedEventNotification as V2MoneyManagementReceivedCreditReturnedEventNotification, + ) + from stripe.events._v2_money_management_received_credit_succeeded_event import ( + V2MoneyManagementReceivedCreditSucceededEvent as V2MoneyManagementReceivedCreditSucceededEvent, + V2MoneyManagementReceivedCreditSucceededEventNotification as V2MoneyManagementReceivedCreditSucceededEventNotification, + ) + from stripe.events._v2_money_management_received_debit_canceled_event import ( + V2MoneyManagementReceivedDebitCanceledEvent as V2MoneyManagementReceivedDebitCanceledEvent, + V2MoneyManagementReceivedDebitCanceledEventNotification as V2MoneyManagementReceivedDebitCanceledEventNotification, + ) + from stripe.events._v2_money_management_received_debit_failed_event import ( + V2MoneyManagementReceivedDebitFailedEvent as V2MoneyManagementReceivedDebitFailedEvent, + V2MoneyManagementReceivedDebitFailedEventNotification as V2MoneyManagementReceivedDebitFailedEventNotification, + ) + from stripe.events._v2_money_management_received_debit_pending_event import ( + V2MoneyManagementReceivedDebitPendingEvent as V2MoneyManagementReceivedDebitPendingEvent, + V2MoneyManagementReceivedDebitPendingEventNotification as V2MoneyManagementReceivedDebitPendingEventNotification, + ) + from stripe.events._v2_money_management_received_debit_succeeded_event import ( + V2MoneyManagementReceivedDebitSucceededEvent as V2MoneyManagementReceivedDebitSucceededEvent, + V2MoneyManagementReceivedDebitSucceededEventNotification as V2MoneyManagementReceivedDebitSucceededEventNotification, + ) + from stripe.events._v2_money_management_received_debit_updated_event import ( + V2MoneyManagementReceivedDebitUpdatedEvent as V2MoneyManagementReceivedDebitUpdatedEvent, + V2MoneyManagementReceivedDebitUpdatedEventNotification as V2MoneyManagementReceivedDebitUpdatedEventNotification, + ) + from stripe.events._v2_money_management_recipient_verification_created_event import ( + V2MoneyManagementRecipientVerificationCreatedEvent as V2MoneyManagementRecipientVerificationCreatedEvent, + V2MoneyManagementRecipientVerificationCreatedEventNotification as V2MoneyManagementRecipientVerificationCreatedEventNotification, + ) + from stripe.events._v2_money_management_recipient_verification_updated_event import ( + V2MoneyManagementRecipientVerificationUpdatedEvent as V2MoneyManagementRecipientVerificationUpdatedEvent, + V2MoneyManagementRecipientVerificationUpdatedEventNotification as V2MoneyManagementRecipientVerificationUpdatedEventNotification, + ) + from stripe.events._v2_money_management_transaction_created_event import ( + V2MoneyManagementTransactionCreatedEvent as V2MoneyManagementTransactionCreatedEvent, + V2MoneyManagementTransactionCreatedEventNotification as V2MoneyManagementTransactionCreatedEventNotification, + ) + from stripe.events._v2_money_management_transaction_updated_event import ( + V2MoneyManagementTransactionUpdatedEvent as V2MoneyManagementTransactionUpdatedEvent, + V2MoneyManagementTransactionUpdatedEventNotification as V2MoneyManagementTransactionUpdatedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_attempt_failed_event import ( + V2PaymentsOffSessionPaymentAttemptFailedEvent as V2PaymentsOffSessionPaymentAttemptFailedEvent, + V2PaymentsOffSessionPaymentAttemptFailedEventNotification as V2PaymentsOffSessionPaymentAttemptFailedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_attempt_started_event import ( + V2PaymentsOffSessionPaymentAttemptStartedEvent as V2PaymentsOffSessionPaymentAttemptStartedEvent, + V2PaymentsOffSessionPaymentAttemptStartedEventNotification as V2PaymentsOffSessionPaymentAttemptStartedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_authorization_attempt_failed_event import ( + V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent as V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent, + V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification as V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_authorization_attempt_started_event import ( + V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent as V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent, + V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification as V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_canceled_event import ( + V2PaymentsOffSessionPaymentCanceledEvent as V2PaymentsOffSessionPaymentCanceledEvent, + V2PaymentsOffSessionPaymentCanceledEventNotification as V2PaymentsOffSessionPaymentCanceledEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_created_event import ( + V2PaymentsOffSessionPaymentCreatedEvent as V2PaymentsOffSessionPaymentCreatedEvent, + V2PaymentsOffSessionPaymentCreatedEventNotification as V2PaymentsOffSessionPaymentCreatedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_failed_event import ( + V2PaymentsOffSessionPaymentFailedEvent as V2PaymentsOffSessionPaymentFailedEvent, + V2PaymentsOffSessionPaymentFailedEventNotification as V2PaymentsOffSessionPaymentFailedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_requires_capture_event import ( + V2PaymentsOffSessionPaymentRequiresCaptureEvent as V2PaymentsOffSessionPaymentRequiresCaptureEvent, + V2PaymentsOffSessionPaymentRequiresCaptureEventNotification as V2PaymentsOffSessionPaymentRequiresCaptureEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_succeeded_event import ( + V2PaymentsOffSessionPaymentSucceededEvent as V2PaymentsOffSessionPaymentSucceededEvent, + V2PaymentsOffSessionPaymentSucceededEventNotification as V2PaymentsOffSessionPaymentSucceededEventNotification, + ) + from stripe.events._v2_reporting_report_run_created_event import ( + V2ReportingReportRunCreatedEvent as V2ReportingReportRunCreatedEvent, + V2ReportingReportRunCreatedEventNotification as V2ReportingReportRunCreatedEventNotification, + ) + from stripe.events._v2_reporting_report_run_failed_event import ( + V2ReportingReportRunFailedEvent as V2ReportingReportRunFailedEvent, + V2ReportingReportRunFailedEventNotification as V2ReportingReportRunFailedEventNotification, + ) + from stripe.events._v2_reporting_report_run_succeeded_event import ( + V2ReportingReportRunSucceededEvent as V2ReportingReportRunSucceededEvent, + V2ReportingReportRunSucceededEventNotification as V2ReportingReportRunSucceededEventNotification, + ) + from stripe.events._v2_reporting_report_run_updated_event import ( + V2ReportingReportRunUpdatedEvent as V2ReportingReportRunUpdatedEvent, + V2ReportingReportRunUpdatedEventNotification as V2ReportingReportRunUpdatedEventNotification, + ) + +# name -> (import_target, is_submodule) +_import_map = { + "ALL_EVENT_NOTIFICATIONS": ("stripe.events._event_classes", False), + "V1BillingMeterErrorReportTriggeredEvent": ( + "stripe.events._v1_billing_meter_error_report_triggered_event", False, ), - "V1TransferReversedEventNotification": ( - "stripe.events._v1_transfer_reversed_event", + "V1BillingMeterErrorReportTriggeredEventNotification": ( + "stripe.events._v1_billing_meter_error_report_triggered_event", False, ), - "V1TransferUpdatedEvent": ( - "stripe.events._v1_transfer_updated_event", + "V1BillingMeterNoMeterFoundEvent": ( + "stripe.events._v1_billing_meter_no_meter_found_event", False, ), - "V1TransferUpdatedEventNotification": ( - "stripe.events._v1_transfer_updated_event", + "V1BillingMeterNoMeterFoundEventNotification": ( + "stripe.events._v1_billing_meter_no_meter_found_event", False, ), "V2BillingCadenceBilledEvent": ( @@ -3622,6 +1509,22 @@ "stripe.events._v2_money_management_transaction_updated_event", False, ), + "V2PaymentsOffSessionPaymentAttemptFailedEvent": ( + "stripe.events._v2_payments_off_session_payment_attempt_failed_event", + False, + ), + "V2PaymentsOffSessionPaymentAttemptFailedEventNotification": ( + "stripe.events._v2_payments_off_session_payment_attempt_failed_event", + False, + ), + "V2PaymentsOffSessionPaymentAttemptStartedEvent": ( + "stripe.events._v2_payments_off_session_payment_attempt_started_event", + False, + ), + "V2PaymentsOffSessionPaymentAttemptStartedEventNotification": ( + "stripe.events._v2_payments_off_session_payment_attempt_started_event", + False, + ), "V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent": ( "stripe.events._v2_payments_off_session_payment_authorization_attempt_failed_event", False, diff --git a/stripe/events/_event_classes.py b/stripe/events/_event_classes.py index bc4b1d762..830235043 100644 --- a/stripe/events/_event_classes.py +++ b/stripe/events/_event_classes.py @@ -7,570 +7,12 @@ from stripe._stripe_object import StripeObject if TYPE_CHECKING: - from stripe.events._v1_account_updated_event import ( - V1AccountUpdatedEventNotification, - ) - from stripe.events._v1_application_fee_created_event import ( - V1ApplicationFeeCreatedEventNotification, - ) - from stripe.events._v1_application_fee_refunded_event import ( - V1ApplicationFeeRefundedEventNotification, - ) from stripe.events._v1_billing_meter_error_report_triggered_event import ( V1BillingMeterErrorReportTriggeredEventNotification, ) from stripe.events._v1_billing_meter_no_meter_found_event import ( V1BillingMeterNoMeterFoundEventNotification, ) - from stripe.events._v1_billing_portal_configuration_created_event import ( - V1BillingPortalConfigurationCreatedEventNotification, - ) - from stripe.events._v1_billing_portal_configuration_updated_event import ( - V1BillingPortalConfigurationUpdatedEventNotification, - ) - from stripe.events._v1_capability_updated_event import ( - V1CapabilityUpdatedEventNotification, - ) - from stripe.events._v1_charge_captured_event import ( - V1ChargeCapturedEventNotification, - ) - from stripe.events._v1_charge_dispute_closed_event import ( - V1ChargeDisputeClosedEventNotification, - ) - from stripe.events._v1_charge_dispute_created_event import ( - V1ChargeDisputeCreatedEventNotification, - ) - from stripe.events._v1_charge_dispute_funds_reinstated_event import ( - V1ChargeDisputeFundsReinstatedEventNotification, - ) - from stripe.events._v1_charge_dispute_funds_withdrawn_event import ( - V1ChargeDisputeFundsWithdrawnEventNotification, - ) - from stripe.events._v1_charge_dispute_updated_event import ( - V1ChargeDisputeUpdatedEventNotification, - ) - from stripe.events._v1_charge_expired_event import ( - V1ChargeExpiredEventNotification, - ) - from stripe.events._v1_charge_failed_event import ( - V1ChargeFailedEventNotification, - ) - from stripe.events._v1_charge_pending_event import ( - V1ChargePendingEventNotification, - ) - from stripe.events._v1_charge_refund_updated_event import ( - V1ChargeRefundUpdatedEventNotification, - ) - from stripe.events._v1_charge_refunded_event import ( - V1ChargeRefundedEventNotification, - ) - from stripe.events._v1_charge_succeeded_event import ( - V1ChargeSucceededEventNotification, - ) - from stripe.events._v1_charge_updated_event import ( - V1ChargeUpdatedEventNotification, - ) - from stripe.events._v1_checkout_session_async_payment_failed_event import ( - V1CheckoutSessionAsyncPaymentFailedEventNotification, - ) - from stripe.events._v1_checkout_session_async_payment_succeeded_event import ( - V1CheckoutSessionAsyncPaymentSucceededEventNotification, - ) - from stripe.events._v1_checkout_session_completed_event import ( - V1CheckoutSessionCompletedEventNotification, - ) - from stripe.events._v1_checkout_session_expired_event import ( - V1CheckoutSessionExpiredEventNotification, - ) - from stripe.events._v1_climate_order_canceled_event import ( - V1ClimateOrderCanceledEventNotification, - ) - from stripe.events._v1_climate_order_created_event import ( - V1ClimateOrderCreatedEventNotification, - ) - from stripe.events._v1_climate_order_delayed_event import ( - V1ClimateOrderDelayedEventNotification, - ) - from stripe.events._v1_climate_order_delivered_event import ( - V1ClimateOrderDeliveredEventNotification, - ) - from stripe.events._v1_climate_order_product_substituted_event import ( - V1ClimateOrderProductSubstitutedEventNotification, - ) - from stripe.events._v1_climate_product_created_event import ( - V1ClimateProductCreatedEventNotification, - ) - from stripe.events._v1_climate_product_pricing_updated_event import ( - V1ClimateProductPricingUpdatedEventNotification, - ) - from stripe.events._v1_coupon_created_event import ( - V1CouponCreatedEventNotification, - ) - from stripe.events._v1_coupon_deleted_event import ( - V1CouponDeletedEventNotification, - ) - from stripe.events._v1_coupon_updated_event import ( - V1CouponUpdatedEventNotification, - ) - from stripe.events._v1_credit_note_created_event import ( - V1CreditNoteCreatedEventNotification, - ) - from stripe.events._v1_credit_note_updated_event import ( - V1CreditNoteUpdatedEventNotification, - ) - from stripe.events._v1_credit_note_voided_event import ( - V1CreditNoteVoidedEventNotification, - ) - from stripe.events._v1_customer_created_event import ( - V1CustomerCreatedEventNotification, - ) - from stripe.events._v1_customer_deleted_event import ( - V1CustomerDeletedEventNotification, - ) - from stripe.events._v1_customer_subscription_created_event import ( - V1CustomerSubscriptionCreatedEventNotification, - ) - from stripe.events._v1_customer_subscription_deleted_event import ( - V1CustomerSubscriptionDeletedEventNotification, - ) - from stripe.events._v1_customer_subscription_paused_event import ( - V1CustomerSubscriptionPausedEventNotification, - ) - from stripe.events._v1_customer_subscription_pending_update_applied_event import ( - V1CustomerSubscriptionPendingUpdateAppliedEventNotification, - ) - from stripe.events._v1_customer_subscription_pending_update_expired_event import ( - V1CustomerSubscriptionPendingUpdateExpiredEventNotification, - ) - from stripe.events._v1_customer_subscription_resumed_event import ( - V1CustomerSubscriptionResumedEventNotification, - ) - from stripe.events._v1_customer_subscription_trial_will_end_event import ( - V1CustomerSubscriptionTrialWillEndEventNotification, - ) - from stripe.events._v1_customer_subscription_updated_event import ( - V1CustomerSubscriptionUpdatedEventNotification, - ) - from stripe.events._v1_customer_tax_id_created_event import ( - V1CustomerTaxIdCreatedEventNotification, - ) - from stripe.events._v1_customer_tax_id_deleted_event import ( - V1CustomerTaxIdDeletedEventNotification, - ) - from stripe.events._v1_customer_tax_id_updated_event import ( - V1CustomerTaxIdUpdatedEventNotification, - ) - from stripe.events._v1_customer_updated_event import ( - V1CustomerUpdatedEventNotification, - ) - from stripe.events._v1_file_created_event import ( - V1FileCreatedEventNotification, - ) - from stripe.events._v1_financial_connections_account_created_event import ( - V1FinancialConnectionsAccountCreatedEventNotification, - ) - from stripe.events._v1_financial_connections_account_deactivated_event import ( - V1FinancialConnectionsAccountDeactivatedEventNotification, - ) - from stripe.events._v1_financial_connections_account_disconnected_event import ( - V1FinancialConnectionsAccountDisconnectedEventNotification, - ) - from stripe.events._v1_financial_connections_account_reactivated_event import ( - V1FinancialConnectionsAccountReactivatedEventNotification, - ) - from stripe.events._v1_financial_connections_account_refreshed_balance_event import ( - V1FinancialConnectionsAccountRefreshedBalanceEventNotification, - ) - from stripe.events._v1_financial_connections_account_refreshed_ownership_event import ( - V1FinancialConnectionsAccountRefreshedOwnershipEventNotification, - ) - from stripe.events._v1_financial_connections_account_refreshed_transactions_event import ( - V1FinancialConnectionsAccountRefreshedTransactionsEventNotification, - ) - from stripe.events._v1_identity_verification_session_canceled_event import ( - V1IdentityVerificationSessionCanceledEventNotification, - ) - from stripe.events._v1_identity_verification_session_created_event import ( - V1IdentityVerificationSessionCreatedEventNotification, - ) - from stripe.events._v1_identity_verification_session_processing_event import ( - V1IdentityVerificationSessionProcessingEventNotification, - ) - from stripe.events._v1_identity_verification_session_redacted_event import ( - V1IdentityVerificationSessionRedactedEventNotification, - ) - from stripe.events._v1_identity_verification_session_requires_input_event import ( - V1IdentityVerificationSessionRequiresInputEventNotification, - ) - from stripe.events._v1_identity_verification_session_verified_event import ( - V1IdentityVerificationSessionVerifiedEventNotification, - ) - from stripe.events._v1_invoice_created_event import ( - V1InvoiceCreatedEventNotification, - ) - from stripe.events._v1_invoice_deleted_event import ( - V1InvoiceDeletedEventNotification, - ) - from stripe.events._v1_invoice_finalization_failed_event import ( - V1InvoiceFinalizationFailedEventNotification, - ) - from stripe.events._v1_invoice_finalized_event import ( - V1InvoiceFinalizedEventNotification, - ) - from stripe.events._v1_invoice_marked_uncollectible_event import ( - V1InvoiceMarkedUncollectibleEventNotification, - ) - from stripe.events._v1_invoice_overdue_event import ( - V1InvoiceOverdueEventNotification, - ) - from stripe.events._v1_invoice_overpaid_event import ( - V1InvoiceOverpaidEventNotification, - ) - from stripe.events._v1_invoice_paid_event import ( - V1InvoicePaidEventNotification, - ) - from stripe.events._v1_invoice_payment_action_required_event import ( - V1InvoicePaymentActionRequiredEventNotification, - ) - from stripe.events._v1_invoice_payment_failed_event import ( - V1InvoicePaymentFailedEventNotification, - ) - from stripe.events._v1_invoice_payment_succeeded_event import ( - V1InvoicePaymentSucceededEventNotification, - ) - from stripe.events._v1_invoice_sent_event import ( - V1InvoiceSentEventNotification, - ) - from stripe.events._v1_invoice_upcoming_event import ( - V1InvoiceUpcomingEventNotification, - ) - from stripe.events._v1_invoice_updated_event import ( - V1InvoiceUpdatedEventNotification, - ) - from stripe.events._v1_invoice_voided_event import ( - V1InvoiceVoidedEventNotification, - ) - from stripe.events._v1_invoice_will_be_due_event import ( - V1InvoiceWillBeDueEventNotification, - ) - from stripe.events._v1_invoice_payment_paid_event import ( - V1InvoicePaymentPaidEventNotification, - ) - from stripe.events._v1_invoiceitem_created_event import ( - V1InvoiceitemCreatedEventNotification, - ) - from stripe.events._v1_invoiceitem_deleted_event import ( - V1InvoiceitemDeletedEventNotification, - ) - from stripe.events._v1_issuing_authorization_created_event import ( - V1IssuingAuthorizationCreatedEventNotification, - ) - from stripe.events._v1_issuing_authorization_request_event import ( - V1IssuingAuthorizationRequestEventNotification, - ) - from stripe.events._v1_issuing_authorization_updated_event import ( - V1IssuingAuthorizationUpdatedEventNotification, - ) - from stripe.events._v1_issuing_card_created_event import ( - V1IssuingCardCreatedEventNotification, - ) - from stripe.events._v1_issuing_card_updated_event import ( - V1IssuingCardUpdatedEventNotification, - ) - from stripe.events._v1_issuing_cardholder_created_event import ( - V1IssuingCardholderCreatedEventNotification, - ) - from stripe.events._v1_issuing_cardholder_updated_event import ( - V1IssuingCardholderUpdatedEventNotification, - ) - from stripe.events._v1_issuing_dispute_closed_event import ( - V1IssuingDisputeClosedEventNotification, - ) - from stripe.events._v1_issuing_dispute_created_event import ( - V1IssuingDisputeCreatedEventNotification, - ) - from stripe.events._v1_issuing_dispute_funds_reinstated_event import ( - V1IssuingDisputeFundsReinstatedEventNotification, - ) - from stripe.events._v1_issuing_dispute_funds_rescinded_event import ( - V1IssuingDisputeFundsRescindedEventNotification, - ) - from stripe.events._v1_issuing_dispute_submitted_event import ( - V1IssuingDisputeSubmittedEventNotification, - ) - from stripe.events._v1_issuing_dispute_updated_event import ( - V1IssuingDisputeUpdatedEventNotification, - ) - from stripe.events._v1_issuing_personalization_design_activated_event import ( - V1IssuingPersonalizationDesignActivatedEventNotification, - ) - from stripe.events._v1_issuing_personalization_design_deactivated_event import ( - V1IssuingPersonalizationDesignDeactivatedEventNotification, - ) - from stripe.events._v1_issuing_personalization_design_rejected_event import ( - V1IssuingPersonalizationDesignRejectedEventNotification, - ) - from stripe.events._v1_issuing_personalization_design_updated_event import ( - V1IssuingPersonalizationDesignUpdatedEventNotification, - ) - from stripe.events._v1_issuing_token_created_event import ( - V1IssuingTokenCreatedEventNotification, - ) - from stripe.events._v1_issuing_token_updated_event import ( - V1IssuingTokenUpdatedEventNotification, - ) - from stripe.events._v1_issuing_transaction_created_event import ( - V1IssuingTransactionCreatedEventNotification, - ) - from stripe.events._v1_issuing_transaction_purchase_details_receipt_updated_event import ( - V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification, - ) - from stripe.events._v1_issuing_transaction_updated_event import ( - V1IssuingTransactionUpdatedEventNotification, - ) - from stripe.events._v1_mandate_updated_event import ( - V1MandateUpdatedEventNotification, - ) - from stripe.events._v1_payment_intent_amount_capturable_updated_event import ( - V1PaymentIntentAmountCapturableUpdatedEventNotification, - ) - from stripe.events._v1_payment_intent_canceled_event import ( - V1PaymentIntentCanceledEventNotification, - ) - from stripe.events._v1_payment_intent_created_event import ( - V1PaymentIntentCreatedEventNotification, - ) - from stripe.events._v1_payment_intent_partially_funded_event import ( - V1PaymentIntentPartiallyFundedEventNotification, - ) - from stripe.events._v1_payment_intent_payment_failed_event import ( - V1PaymentIntentPaymentFailedEventNotification, - ) - from stripe.events._v1_payment_intent_processing_event import ( - V1PaymentIntentProcessingEventNotification, - ) - from stripe.events._v1_payment_intent_requires_action_event import ( - V1PaymentIntentRequiresActionEventNotification, - ) - from stripe.events._v1_payment_intent_succeeded_event import ( - V1PaymentIntentSucceededEventNotification, - ) - from stripe.events._v1_payment_link_created_event import ( - V1PaymentLinkCreatedEventNotification, - ) - from stripe.events._v1_payment_link_updated_event import ( - V1PaymentLinkUpdatedEventNotification, - ) - from stripe.events._v1_payment_method_attached_event import ( - V1PaymentMethodAttachedEventNotification, - ) - from stripe.events._v1_payment_method_automatically_updated_event import ( - V1PaymentMethodAutomaticallyUpdatedEventNotification, - ) - from stripe.events._v1_payment_method_detached_event import ( - V1PaymentMethodDetachedEventNotification, - ) - from stripe.events._v1_payment_method_updated_event import ( - V1PaymentMethodUpdatedEventNotification, - ) - from stripe.events._v1_payout_canceled_event import ( - V1PayoutCanceledEventNotification, - ) - from stripe.events._v1_payout_created_event import ( - V1PayoutCreatedEventNotification, - ) - from stripe.events._v1_payout_failed_event import ( - V1PayoutFailedEventNotification, - ) - from stripe.events._v1_payout_paid_event import ( - V1PayoutPaidEventNotification, - ) - from stripe.events._v1_payout_reconciliation_completed_event import ( - V1PayoutReconciliationCompletedEventNotification, - ) - from stripe.events._v1_payout_updated_event import ( - V1PayoutUpdatedEventNotification, - ) - from stripe.events._v1_person_created_event import ( - V1PersonCreatedEventNotification, - ) - from stripe.events._v1_person_deleted_event import ( - V1PersonDeletedEventNotification, - ) - from stripe.events._v1_person_updated_event import ( - V1PersonUpdatedEventNotification, - ) - from stripe.events._v1_plan_created_event import ( - V1PlanCreatedEventNotification, - ) - from stripe.events._v1_plan_deleted_event import ( - V1PlanDeletedEventNotification, - ) - from stripe.events._v1_plan_updated_event import ( - V1PlanUpdatedEventNotification, - ) - from stripe.events._v1_price_created_event import ( - V1PriceCreatedEventNotification, - ) - from stripe.events._v1_price_deleted_event import ( - V1PriceDeletedEventNotification, - ) - from stripe.events._v1_price_updated_event import ( - V1PriceUpdatedEventNotification, - ) - from stripe.events._v1_product_created_event import ( - V1ProductCreatedEventNotification, - ) - from stripe.events._v1_product_deleted_event import ( - V1ProductDeletedEventNotification, - ) - from stripe.events._v1_product_updated_event import ( - V1ProductUpdatedEventNotification, - ) - from stripe.events._v1_promotion_code_created_event import ( - V1PromotionCodeCreatedEventNotification, - ) - from stripe.events._v1_promotion_code_updated_event import ( - V1PromotionCodeUpdatedEventNotification, - ) - from stripe.events._v1_quote_accepted_event import ( - V1QuoteAcceptedEventNotification, - ) - from stripe.events._v1_quote_canceled_event import ( - V1QuoteCanceledEventNotification, - ) - from stripe.events._v1_quote_created_event import ( - V1QuoteCreatedEventNotification, - ) - from stripe.events._v1_quote_finalized_event import ( - V1QuoteFinalizedEventNotification, - ) - from stripe.events._v1_radar_early_fraud_warning_created_event import ( - V1RadarEarlyFraudWarningCreatedEventNotification, - ) - from stripe.events._v1_radar_early_fraud_warning_updated_event import ( - V1RadarEarlyFraudWarningUpdatedEventNotification, - ) - from stripe.events._v1_refund_created_event import ( - V1RefundCreatedEventNotification, - ) - from stripe.events._v1_refund_failed_event import ( - V1RefundFailedEventNotification, - ) - from stripe.events._v1_refund_updated_event import ( - V1RefundUpdatedEventNotification, - ) - from stripe.events._v1_review_closed_event import ( - V1ReviewClosedEventNotification, - ) - from stripe.events._v1_review_opened_event import ( - V1ReviewOpenedEventNotification, - ) - from stripe.events._v1_setup_intent_canceled_event import ( - V1SetupIntentCanceledEventNotification, - ) - from stripe.events._v1_setup_intent_created_event import ( - V1SetupIntentCreatedEventNotification, - ) - from stripe.events._v1_setup_intent_requires_action_event import ( - V1SetupIntentRequiresActionEventNotification, - ) - from stripe.events._v1_setup_intent_setup_failed_event import ( - V1SetupIntentSetupFailedEventNotification, - ) - from stripe.events._v1_setup_intent_succeeded_event import ( - V1SetupIntentSucceededEventNotification, - ) - from stripe.events._v1_sigma_scheduled_query_run_created_event import ( - V1SigmaScheduledQueryRunCreatedEventNotification, - ) - from stripe.events._v1_source_canceled_event import ( - V1SourceCanceledEventNotification, - ) - from stripe.events._v1_source_chargeable_event import ( - V1SourceChargeableEventNotification, - ) - from stripe.events._v1_source_failed_event import ( - V1SourceFailedEventNotification, - ) - from stripe.events._v1_source_refund_attributes_required_event import ( - V1SourceRefundAttributesRequiredEventNotification, - ) - from stripe.events._v1_subscription_schedule_aborted_event import ( - V1SubscriptionScheduleAbortedEventNotification, - ) - from stripe.events._v1_subscription_schedule_canceled_event import ( - V1SubscriptionScheduleCanceledEventNotification, - ) - from stripe.events._v1_subscription_schedule_completed_event import ( - V1SubscriptionScheduleCompletedEventNotification, - ) - from stripe.events._v1_subscription_schedule_created_event import ( - V1SubscriptionScheduleCreatedEventNotification, - ) - from stripe.events._v1_subscription_schedule_expiring_event import ( - V1SubscriptionScheduleExpiringEventNotification, - ) - from stripe.events._v1_subscription_schedule_released_event import ( - V1SubscriptionScheduleReleasedEventNotification, - ) - from stripe.events._v1_subscription_schedule_updated_event import ( - V1SubscriptionScheduleUpdatedEventNotification, - ) - from stripe.events._v1_tax_rate_created_event import ( - V1TaxRateCreatedEventNotification, - ) - from stripe.events._v1_tax_rate_updated_event import ( - V1TaxRateUpdatedEventNotification, - ) - from stripe.events._v1_terminal_reader_action_failed_event import ( - V1TerminalReaderActionFailedEventNotification, - ) - from stripe.events._v1_terminal_reader_action_succeeded_event import ( - V1TerminalReaderActionSucceededEventNotification, - ) - from stripe.events._v1_terminal_reader_action_updated_event import ( - V1TerminalReaderActionUpdatedEventNotification, - ) - from stripe.events._v1_test_helpers_test_clock_advancing_event import ( - V1TestHelpersTestClockAdvancingEventNotification, - ) - from stripe.events._v1_test_helpers_test_clock_created_event import ( - V1TestHelpersTestClockCreatedEventNotification, - ) - from stripe.events._v1_test_helpers_test_clock_deleted_event import ( - V1TestHelpersTestClockDeletedEventNotification, - ) - from stripe.events._v1_test_helpers_test_clock_internal_failure_event import ( - V1TestHelpersTestClockInternalFailureEventNotification, - ) - from stripe.events._v1_test_helpers_test_clock_ready_event import ( - V1TestHelpersTestClockReadyEventNotification, - ) - from stripe.events._v1_topup_canceled_event import ( - V1TopupCanceledEventNotification, - ) - from stripe.events._v1_topup_created_event import ( - V1TopupCreatedEventNotification, - ) - from stripe.events._v1_topup_failed_event import ( - V1TopupFailedEventNotification, - ) - from stripe.events._v1_topup_reversed_event import ( - V1TopupReversedEventNotification, - ) - from stripe.events._v1_topup_succeeded_event import ( - V1TopupSucceededEventNotification, - ) - from stripe.events._v1_transfer_created_event import ( - V1TransferCreatedEventNotification, - ) - from stripe.events._v1_transfer_reversed_event import ( - V1TransferReversedEventNotification, - ) - from stripe.events._v1_transfer_updated_event import ( - V1TransferUpdatedEventNotification, - ) from stripe.events._v2_billing_cadence_billed_event import ( V2BillingCadenceBilledEventNotification, ) @@ -903,815 +345,77 @@ ) from stripe.events._v2_money_management_received_debit_failed_event import ( V2MoneyManagementReceivedDebitFailedEventNotification, - ) - from stripe.events._v2_money_management_received_debit_pending_event import ( - V2MoneyManagementReceivedDebitPendingEventNotification, - ) - from stripe.events._v2_money_management_received_debit_succeeded_event import ( - V2MoneyManagementReceivedDebitSucceededEventNotification, - ) - from stripe.events._v2_money_management_received_debit_updated_event import ( - V2MoneyManagementReceivedDebitUpdatedEventNotification, - ) - from stripe.events._v2_money_management_recipient_verification_created_event import ( - V2MoneyManagementRecipientVerificationCreatedEventNotification, - ) - from stripe.events._v2_money_management_recipient_verification_updated_event import ( - V2MoneyManagementRecipientVerificationUpdatedEventNotification, - ) - from stripe.events._v2_money_management_transaction_created_event import ( - V2MoneyManagementTransactionCreatedEventNotification, - ) - from stripe.events._v2_money_management_transaction_updated_event import ( - V2MoneyManagementTransactionUpdatedEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_authorization_attempt_failed_event import ( - V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_authorization_attempt_started_event import ( - V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_canceled_event import ( - V2PaymentsOffSessionPaymentCanceledEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_created_event import ( - V2PaymentsOffSessionPaymentCreatedEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_failed_event import ( - V2PaymentsOffSessionPaymentFailedEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_requires_capture_event import ( - V2PaymentsOffSessionPaymentRequiresCaptureEventNotification, - ) - from stripe.events._v2_payments_off_session_payment_succeeded_event import ( - V2PaymentsOffSessionPaymentSucceededEventNotification, - ) - from stripe.events._v2_reporting_report_run_created_event import ( - V2ReportingReportRunCreatedEventNotification, - ) - from stripe.events._v2_reporting_report_run_failed_event import ( - V2ReportingReportRunFailedEventNotification, - ) - from stripe.events._v2_reporting_report_run_succeeded_event import ( - V2ReportingReportRunSucceededEventNotification, - ) - from stripe.events._v2_reporting_report_run_updated_event import ( - V2ReportingReportRunUpdatedEventNotification, - ) - - -_V2_EVENT_CLASS_LOOKUP = { - "v1.account.updated": ( - "stripe.events._v1_account_updated_event", - "V1AccountUpdatedEvent", - ), - "v1.application_fee.created": ( - "stripe.events._v1_application_fee_created_event", - "V1ApplicationFeeCreatedEvent", - ), - "v1.application_fee.refunded": ( - "stripe.events._v1_application_fee_refunded_event", - "V1ApplicationFeeRefundedEvent", - ), - "v1.billing.meter.error_report_triggered": ( - "stripe.events._v1_billing_meter_error_report_triggered_event", - "V1BillingMeterErrorReportTriggeredEvent", - ), - "v1.billing.meter.no_meter_found": ( - "stripe.events._v1_billing_meter_no_meter_found_event", - "V1BillingMeterNoMeterFoundEvent", - ), - "v1.billing_portal.configuration.created": ( - "stripe.events._v1_billing_portal_configuration_created_event", - "V1BillingPortalConfigurationCreatedEvent", - ), - "v1.billing_portal.configuration.updated": ( - "stripe.events._v1_billing_portal_configuration_updated_event", - "V1BillingPortalConfigurationUpdatedEvent", - ), - "v1.capability.updated": ( - "stripe.events._v1_capability_updated_event", - "V1CapabilityUpdatedEvent", - ), - "v1.charge.captured": ( - "stripe.events._v1_charge_captured_event", - "V1ChargeCapturedEvent", - ), - "v1.charge.dispute.closed": ( - "stripe.events._v1_charge_dispute_closed_event", - "V1ChargeDisputeClosedEvent", - ), - "v1.charge.dispute.created": ( - "stripe.events._v1_charge_dispute_created_event", - "V1ChargeDisputeCreatedEvent", - ), - "v1.charge.dispute.funds_reinstated": ( - "stripe.events._v1_charge_dispute_funds_reinstated_event", - "V1ChargeDisputeFundsReinstatedEvent", - ), - "v1.charge.dispute.funds_withdrawn": ( - "stripe.events._v1_charge_dispute_funds_withdrawn_event", - "V1ChargeDisputeFundsWithdrawnEvent", - ), - "v1.charge.dispute.updated": ( - "stripe.events._v1_charge_dispute_updated_event", - "V1ChargeDisputeUpdatedEvent", - ), - "v1.charge.expired": ( - "stripe.events._v1_charge_expired_event", - "V1ChargeExpiredEvent", - ), - "v1.charge.failed": ( - "stripe.events._v1_charge_failed_event", - "V1ChargeFailedEvent", - ), - "v1.charge.pending": ( - "stripe.events._v1_charge_pending_event", - "V1ChargePendingEvent", - ), - "v1.charge.refunded": ( - "stripe.events._v1_charge_refunded_event", - "V1ChargeRefundedEvent", - ), - "v1.charge.refund.updated": ( - "stripe.events._v1_charge_refund_updated_event", - "V1ChargeRefundUpdatedEvent", - ), - "v1.charge.succeeded": ( - "stripe.events._v1_charge_succeeded_event", - "V1ChargeSucceededEvent", - ), - "v1.charge.updated": ( - "stripe.events._v1_charge_updated_event", - "V1ChargeUpdatedEvent", - ), - "v1.checkout.session.async_payment_failed": ( - "stripe.events._v1_checkout_session_async_payment_failed_event", - "V1CheckoutSessionAsyncPaymentFailedEvent", - ), - "v1.checkout.session.async_payment_succeeded": ( - "stripe.events._v1_checkout_session_async_payment_succeeded_event", - "V1CheckoutSessionAsyncPaymentSucceededEvent", - ), - "v1.checkout.session.completed": ( - "stripe.events._v1_checkout_session_completed_event", - "V1CheckoutSessionCompletedEvent", - ), - "v1.checkout.session.expired": ( - "stripe.events._v1_checkout_session_expired_event", - "V1CheckoutSessionExpiredEvent", - ), - "v1.climate.order.canceled": ( - "stripe.events._v1_climate_order_canceled_event", - "V1ClimateOrderCanceledEvent", - ), - "v1.climate.order.created": ( - "stripe.events._v1_climate_order_created_event", - "V1ClimateOrderCreatedEvent", - ), - "v1.climate.order.delayed": ( - "stripe.events._v1_climate_order_delayed_event", - "V1ClimateOrderDelayedEvent", - ), - "v1.climate.order.delivered": ( - "stripe.events._v1_climate_order_delivered_event", - "V1ClimateOrderDeliveredEvent", - ), - "v1.climate.order.product_substituted": ( - "stripe.events._v1_climate_order_product_substituted_event", - "V1ClimateOrderProductSubstitutedEvent", - ), - "v1.climate.product.created": ( - "stripe.events._v1_climate_product_created_event", - "V1ClimateProductCreatedEvent", - ), - "v1.climate.product.pricing_updated": ( - "stripe.events._v1_climate_product_pricing_updated_event", - "V1ClimateProductPricingUpdatedEvent", - ), - "v1.coupon.created": ( - "stripe.events._v1_coupon_created_event", - "V1CouponCreatedEvent", - ), - "v1.coupon.deleted": ( - "stripe.events._v1_coupon_deleted_event", - "V1CouponDeletedEvent", - ), - "v1.coupon.updated": ( - "stripe.events._v1_coupon_updated_event", - "V1CouponUpdatedEvent", - ), - "v1.credit_note.created": ( - "stripe.events._v1_credit_note_created_event", - "V1CreditNoteCreatedEvent", - ), - "v1.credit_note.updated": ( - "stripe.events._v1_credit_note_updated_event", - "V1CreditNoteUpdatedEvent", - ), - "v1.credit_note.voided": ( - "stripe.events._v1_credit_note_voided_event", - "V1CreditNoteVoidedEvent", - ), - "v1.customer.created": ( - "stripe.events._v1_customer_created_event", - "V1CustomerCreatedEvent", - ), - "v1.customer.deleted": ( - "stripe.events._v1_customer_deleted_event", - "V1CustomerDeletedEvent", - ), - "v1.customer.subscription.created": ( - "stripe.events._v1_customer_subscription_created_event", - "V1CustomerSubscriptionCreatedEvent", - ), - "v1.customer.subscription.deleted": ( - "stripe.events._v1_customer_subscription_deleted_event", - "V1CustomerSubscriptionDeletedEvent", - ), - "v1.customer.subscription.paused": ( - "stripe.events._v1_customer_subscription_paused_event", - "V1CustomerSubscriptionPausedEvent", - ), - "v1.customer.subscription.pending_update_applied": ( - "stripe.events._v1_customer_subscription_pending_update_applied_event", - "V1CustomerSubscriptionPendingUpdateAppliedEvent", - ), - "v1.customer.subscription.pending_update_expired": ( - "stripe.events._v1_customer_subscription_pending_update_expired_event", - "V1CustomerSubscriptionPendingUpdateExpiredEvent", - ), - "v1.customer.subscription.resumed": ( - "stripe.events._v1_customer_subscription_resumed_event", - "V1CustomerSubscriptionResumedEvent", - ), - "v1.customer.subscription.trial_will_end": ( - "stripe.events._v1_customer_subscription_trial_will_end_event", - "V1CustomerSubscriptionTrialWillEndEvent", - ), - "v1.customer.subscription.updated": ( - "stripe.events._v1_customer_subscription_updated_event", - "V1CustomerSubscriptionUpdatedEvent", - ), - "v1.customer.tax_id.created": ( - "stripe.events._v1_customer_tax_id_created_event", - "V1CustomerTaxIdCreatedEvent", - ), - "v1.customer.tax_id.deleted": ( - "stripe.events._v1_customer_tax_id_deleted_event", - "V1CustomerTaxIdDeletedEvent", - ), - "v1.customer.tax_id.updated": ( - "stripe.events._v1_customer_tax_id_updated_event", - "V1CustomerTaxIdUpdatedEvent", - ), - "v1.customer.updated": ( - "stripe.events._v1_customer_updated_event", - "V1CustomerUpdatedEvent", - ), - "v1.file.created": ( - "stripe.events._v1_file_created_event", - "V1FileCreatedEvent", - ), - "v1.financial_connections.account.created": ( - "stripe.events._v1_financial_connections_account_created_event", - "V1FinancialConnectionsAccountCreatedEvent", - ), - "v1.financial_connections.account.deactivated": ( - "stripe.events._v1_financial_connections_account_deactivated_event", - "V1FinancialConnectionsAccountDeactivatedEvent", - ), - "v1.financial_connections.account.disconnected": ( - "stripe.events._v1_financial_connections_account_disconnected_event", - "V1FinancialConnectionsAccountDisconnectedEvent", - ), - "v1.financial_connections.account.reactivated": ( - "stripe.events._v1_financial_connections_account_reactivated_event", - "V1FinancialConnectionsAccountReactivatedEvent", - ), - "v1.financial_connections.account.refreshed_balance": ( - "stripe.events._v1_financial_connections_account_refreshed_balance_event", - "V1FinancialConnectionsAccountRefreshedBalanceEvent", - ), - "v1.financial_connections.account.refreshed_ownership": ( - "stripe.events._v1_financial_connections_account_refreshed_ownership_event", - "V1FinancialConnectionsAccountRefreshedOwnershipEvent", - ), - "v1.financial_connections.account.refreshed_transactions": ( - "stripe.events._v1_financial_connections_account_refreshed_transactions_event", - "V1FinancialConnectionsAccountRefreshedTransactionsEvent", - ), - "v1.identity.verification_session.canceled": ( - "stripe.events._v1_identity_verification_session_canceled_event", - "V1IdentityVerificationSessionCanceledEvent", - ), - "v1.identity.verification_session.created": ( - "stripe.events._v1_identity_verification_session_created_event", - "V1IdentityVerificationSessionCreatedEvent", - ), - "v1.identity.verification_session.processing": ( - "stripe.events._v1_identity_verification_session_processing_event", - "V1IdentityVerificationSessionProcessingEvent", - ), - "v1.identity.verification_session.redacted": ( - "stripe.events._v1_identity_verification_session_redacted_event", - "V1IdentityVerificationSessionRedactedEvent", - ), - "v1.identity.verification_session.requires_input": ( - "stripe.events._v1_identity_verification_session_requires_input_event", - "V1IdentityVerificationSessionRequiresInputEvent", - ), - "v1.identity.verification_session.verified": ( - "stripe.events._v1_identity_verification_session_verified_event", - "V1IdentityVerificationSessionVerifiedEvent", - ), - "v1.invoice.created": ( - "stripe.events._v1_invoice_created_event", - "V1InvoiceCreatedEvent", - ), - "v1.invoice.deleted": ( - "stripe.events._v1_invoice_deleted_event", - "V1InvoiceDeletedEvent", - ), - "v1.invoice.finalization_failed": ( - "stripe.events._v1_invoice_finalization_failed_event", - "V1InvoiceFinalizationFailedEvent", - ), - "v1.invoice.finalized": ( - "stripe.events._v1_invoice_finalized_event", - "V1InvoiceFinalizedEvent", - ), - "v1.invoiceitem.created": ( - "stripe.events._v1_invoiceitem_created_event", - "V1InvoiceitemCreatedEvent", - ), - "v1.invoiceitem.deleted": ( - "stripe.events._v1_invoiceitem_deleted_event", - "V1InvoiceitemDeletedEvent", - ), - "v1.invoice.marked_uncollectible": ( - "stripe.events._v1_invoice_marked_uncollectible_event", - "V1InvoiceMarkedUncollectibleEvent", - ), - "v1.invoice.overdue": ( - "stripe.events._v1_invoice_overdue_event", - "V1InvoiceOverdueEvent", - ), - "v1.invoice.overpaid": ( - "stripe.events._v1_invoice_overpaid_event", - "V1InvoiceOverpaidEvent", - ), - "v1.invoice.paid": ( - "stripe.events._v1_invoice_paid_event", - "V1InvoicePaidEvent", - ), - "v1.invoice.payment_action_required": ( - "stripe.events._v1_invoice_payment_action_required_event", - "V1InvoicePaymentActionRequiredEvent", - ), - "v1.invoice.payment_failed": ( - "stripe.events._v1_invoice_payment_failed_event", - "V1InvoicePaymentFailedEvent", - ), - "v1.invoice_payment.paid": ( - "stripe.events._v1_invoice_payment_paid_event", - "V1InvoicePaymentPaidEvent", - ), - "v1.invoice.payment_succeeded": ( - "stripe.events._v1_invoice_payment_succeeded_event", - "V1InvoicePaymentSucceededEvent", - ), - "v1.invoice.sent": ( - "stripe.events._v1_invoice_sent_event", - "V1InvoiceSentEvent", - ), - "v1.invoice.upcoming": ( - "stripe.events._v1_invoice_upcoming_event", - "V1InvoiceUpcomingEvent", - ), - "v1.invoice.updated": ( - "stripe.events._v1_invoice_updated_event", - "V1InvoiceUpdatedEvent", - ), - "v1.invoice.voided": ( - "stripe.events._v1_invoice_voided_event", - "V1InvoiceVoidedEvent", - ), - "v1.invoice.will_be_due": ( - "stripe.events._v1_invoice_will_be_due_event", - "V1InvoiceWillBeDueEvent", - ), - "v1.issuing_authorization.created": ( - "stripe.events._v1_issuing_authorization_created_event", - "V1IssuingAuthorizationCreatedEvent", - ), - "v1.issuing_authorization.request": ( - "stripe.events._v1_issuing_authorization_request_event", - "V1IssuingAuthorizationRequestEvent", - ), - "v1.issuing_authorization.updated": ( - "stripe.events._v1_issuing_authorization_updated_event", - "V1IssuingAuthorizationUpdatedEvent", - ), - "v1.issuing_card.created": ( - "stripe.events._v1_issuing_card_created_event", - "V1IssuingCardCreatedEvent", - ), - "v1.issuing_cardholder.created": ( - "stripe.events._v1_issuing_cardholder_created_event", - "V1IssuingCardholderCreatedEvent", - ), - "v1.issuing_cardholder.updated": ( - "stripe.events._v1_issuing_cardholder_updated_event", - "V1IssuingCardholderUpdatedEvent", - ), - "v1.issuing_card.updated": ( - "stripe.events._v1_issuing_card_updated_event", - "V1IssuingCardUpdatedEvent", - ), - "v1.issuing_dispute.closed": ( - "stripe.events._v1_issuing_dispute_closed_event", - "V1IssuingDisputeClosedEvent", - ), - "v1.issuing_dispute.created": ( - "stripe.events._v1_issuing_dispute_created_event", - "V1IssuingDisputeCreatedEvent", - ), - "v1.issuing_dispute.funds_reinstated": ( - "stripe.events._v1_issuing_dispute_funds_reinstated_event", - "V1IssuingDisputeFundsReinstatedEvent", - ), - "v1.issuing_dispute.funds_rescinded": ( - "stripe.events._v1_issuing_dispute_funds_rescinded_event", - "V1IssuingDisputeFundsRescindedEvent", - ), - "v1.issuing_dispute.submitted": ( - "stripe.events._v1_issuing_dispute_submitted_event", - "V1IssuingDisputeSubmittedEvent", - ), - "v1.issuing_dispute.updated": ( - "stripe.events._v1_issuing_dispute_updated_event", - "V1IssuingDisputeUpdatedEvent", - ), - "v1.issuing_personalization_design.activated": ( - "stripe.events._v1_issuing_personalization_design_activated_event", - "V1IssuingPersonalizationDesignActivatedEvent", - ), - "v1.issuing_personalization_design.deactivated": ( - "stripe.events._v1_issuing_personalization_design_deactivated_event", - "V1IssuingPersonalizationDesignDeactivatedEvent", - ), - "v1.issuing_personalization_design.rejected": ( - "stripe.events._v1_issuing_personalization_design_rejected_event", - "V1IssuingPersonalizationDesignRejectedEvent", - ), - "v1.issuing_personalization_design.updated": ( - "stripe.events._v1_issuing_personalization_design_updated_event", - "V1IssuingPersonalizationDesignUpdatedEvent", - ), - "v1.issuing_token.created": ( - "stripe.events._v1_issuing_token_created_event", - "V1IssuingTokenCreatedEvent", - ), - "v1.issuing_token.updated": ( - "stripe.events._v1_issuing_token_updated_event", - "V1IssuingTokenUpdatedEvent", - ), - "v1.issuing_transaction.created": ( - "stripe.events._v1_issuing_transaction_created_event", - "V1IssuingTransactionCreatedEvent", - ), - "v1.issuing_transaction.purchase_details_receipt_updated": ( - "stripe.events._v1_issuing_transaction_purchase_details_receipt_updated_event", - "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent", - ), - "v1.issuing_transaction.updated": ( - "stripe.events._v1_issuing_transaction_updated_event", - "V1IssuingTransactionUpdatedEvent", - ), - "v1.mandate.updated": ( - "stripe.events._v1_mandate_updated_event", - "V1MandateUpdatedEvent", - ), - "v1.payment_intent.amount_capturable_updated": ( - "stripe.events._v1_payment_intent_amount_capturable_updated_event", - "V1PaymentIntentAmountCapturableUpdatedEvent", - ), - "v1.payment_intent.canceled": ( - "stripe.events._v1_payment_intent_canceled_event", - "V1PaymentIntentCanceledEvent", - ), - "v1.payment_intent.created": ( - "stripe.events._v1_payment_intent_created_event", - "V1PaymentIntentCreatedEvent", - ), - "v1.payment_intent.partially_funded": ( - "stripe.events._v1_payment_intent_partially_funded_event", - "V1PaymentIntentPartiallyFundedEvent", - ), - "v1.payment_intent.payment_failed": ( - "stripe.events._v1_payment_intent_payment_failed_event", - "V1PaymentIntentPaymentFailedEvent", - ), - "v1.payment_intent.processing": ( - "stripe.events._v1_payment_intent_processing_event", - "V1PaymentIntentProcessingEvent", - ), - "v1.payment_intent.requires_action": ( - "stripe.events._v1_payment_intent_requires_action_event", - "V1PaymentIntentRequiresActionEvent", - ), - "v1.payment_intent.succeeded": ( - "stripe.events._v1_payment_intent_succeeded_event", - "V1PaymentIntentSucceededEvent", - ), - "v1.payment_link.created": ( - "stripe.events._v1_payment_link_created_event", - "V1PaymentLinkCreatedEvent", - ), - "v1.payment_link.updated": ( - "stripe.events._v1_payment_link_updated_event", - "V1PaymentLinkUpdatedEvent", - ), - "v1.payment_method.attached": ( - "stripe.events._v1_payment_method_attached_event", - "V1PaymentMethodAttachedEvent", - ), - "v1.payment_method.automatically_updated": ( - "stripe.events._v1_payment_method_automatically_updated_event", - "V1PaymentMethodAutomaticallyUpdatedEvent", - ), - "v1.payment_method.detached": ( - "stripe.events._v1_payment_method_detached_event", - "V1PaymentMethodDetachedEvent", - ), - "v1.payment_method.updated": ( - "stripe.events._v1_payment_method_updated_event", - "V1PaymentMethodUpdatedEvent", - ), - "v1.payout.canceled": ( - "stripe.events._v1_payout_canceled_event", - "V1PayoutCanceledEvent", - ), - "v1.payout.created": ( - "stripe.events._v1_payout_created_event", - "V1PayoutCreatedEvent", - ), - "v1.payout.failed": ( - "stripe.events._v1_payout_failed_event", - "V1PayoutFailedEvent", - ), - "v1.payout.paid": ( - "stripe.events._v1_payout_paid_event", - "V1PayoutPaidEvent", - ), - "v1.payout.reconciliation_completed": ( - "stripe.events._v1_payout_reconciliation_completed_event", - "V1PayoutReconciliationCompletedEvent", - ), - "v1.payout.updated": ( - "stripe.events._v1_payout_updated_event", - "V1PayoutUpdatedEvent", - ), - "v1.person.created": ( - "stripe.events._v1_person_created_event", - "V1PersonCreatedEvent", - ), - "v1.person.deleted": ( - "stripe.events._v1_person_deleted_event", - "V1PersonDeletedEvent", - ), - "v1.person.updated": ( - "stripe.events._v1_person_updated_event", - "V1PersonUpdatedEvent", - ), - "v1.plan.created": ( - "stripe.events._v1_plan_created_event", - "V1PlanCreatedEvent", - ), - "v1.plan.deleted": ( - "stripe.events._v1_plan_deleted_event", - "V1PlanDeletedEvent", - ), - "v1.plan.updated": ( - "stripe.events._v1_plan_updated_event", - "V1PlanUpdatedEvent", - ), - "v1.price.created": ( - "stripe.events._v1_price_created_event", - "V1PriceCreatedEvent", - ), - "v1.price.deleted": ( - "stripe.events._v1_price_deleted_event", - "V1PriceDeletedEvent", - ), - "v1.price.updated": ( - "stripe.events._v1_price_updated_event", - "V1PriceUpdatedEvent", - ), - "v1.product.created": ( - "stripe.events._v1_product_created_event", - "V1ProductCreatedEvent", - ), - "v1.product.deleted": ( - "stripe.events._v1_product_deleted_event", - "V1ProductDeletedEvent", - ), - "v1.product.updated": ( - "stripe.events._v1_product_updated_event", - "V1ProductUpdatedEvent", - ), - "v1.promotion_code.created": ( - "stripe.events._v1_promotion_code_created_event", - "V1PromotionCodeCreatedEvent", - ), - "v1.promotion_code.updated": ( - "stripe.events._v1_promotion_code_updated_event", - "V1PromotionCodeUpdatedEvent", - ), - "v1.quote.accepted": ( - "stripe.events._v1_quote_accepted_event", - "V1QuoteAcceptedEvent", - ), - "v1.quote.canceled": ( - "stripe.events._v1_quote_canceled_event", - "V1QuoteCanceledEvent", - ), - "v1.quote.created": ( - "stripe.events._v1_quote_created_event", - "V1QuoteCreatedEvent", - ), - "v1.quote.finalized": ( - "stripe.events._v1_quote_finalized_event", - "V1QuoteFinalizedEvent", - ), - "v1.radar.early_fraud_warning.created": ( - "stripe.events._v1_radar_early_fraud_warning_created_event", - "V1RadarEarlyFraudWarningCreatedEvent", - ), - "v1.radar.early_fraud_warning.updated": ( - "stripe.events._v1_radar_early_fraud_warning_updated_event", - "V1RadarEarlyFraudWarningUpdatedEvent", - ), - "v1.refund.created": ( - "stripe.events._v1_refund_created_event", - "V1RefundCreatedEvent", - ), - "v1.refund.failed": ( - "stripe.events._v1_refund_failed_event", - "V1RefundFailedEvent", - ), - "v1.refund.updated": ( - "stripe.events._v1_refund_updated_event", - "V1RefundUpdatedEvent", - ), - "v1.review.closed": ( - "stripe.events._v1_review_closed_event", - "V1ReviewClosedEvent", - ), - "v1.review.opened": ( - "stripe.events._v1_review_opened_event", - "V1ReviewOpenedEvent", - ), - "v1.setup_intent.canceled": ( - "stripe.events._v1_setup_intent_canceled_event", - "V1SetupIntentCanceledEvent", - ), - "v1.setup_intent.created": ( - "stripe.events._v1_setup_intent_created_event", - "V1SetupIntentCreatedEvent", - ), - "v1.setup_intent.requires_action": ( - "stripe.events._v1_setup_intent_requires_action_event", - "V1SetupIntentRequiresActionEvent", - ), - "v1.setup_intent.setup_failed": ( - "stripe.events._v1_setup_intent_setup_failed_event", - "V1SetupIntentSetupFailedEvent", - ), - "v1.setup_intent.succeeded": ( - "stripe.events._v1_setup_intent_succeeded_event", - "V1SetupIntentSucceededEvent", - ), - "v1.sigma.scheduled_query_run.created": ( - "stripe.events._v1_sigma_scheduled_query_run_created_event", - "V1SigmaScheduledQueryRunCreatedEvent", - ), - "v1.source.canceled": ( - "stripe.events._v1_source_canceled_event", - "V1SourceCanceledEvent", - ), - "v1.source.chargeable": ( - "stripe.events._v1_source_chargeable_event", - "V1SourceChargeableEvent", - ), - "v1.source.failed": ( - "stripe.events._v1_source_failed_event", - "V1SourceFailedEvent", - ), - "v1.source.refund_attributes_required": ( - "stripe.events._v1_source_refund_attributes_required_event", - "V1SourceRefundAttributesRequiredEvent", - ), - "v1.subscription_schedule.aborted": ( - "stripe.events._v1_subscription_schedule_aborted_event", - "V1SubscriptionScheduleAbortedEvent", - ), - "v1.subscription_schedule.canceled": ( - "stripe.events._v1_subscription_schedule_canceled_event", - "V1SubscriptionScheduleCanceledEvent", - ), - "v1.subscription_schedule.completed": ( - "stripe.events._v1_subscription_schedule_completed_event", - "V1SubscriptionScheduleCompletedEvent", - ), - "v1.subscription_schedule.created": ( - "stripe.events._v1_subscription_schedule_created_event", - "V1SubscriptionScheduleCreatedEvent", - ), - "v1.subscription_schedule.expiring": ( - "stripe.events._v1_subscription_schedule_expiring_event", - "V1SubscriptionScheduleExpiringEvent", - ), - "v1.subscription_schedule.released": ( - "stripe.events._v1_subscription_schedule_released_event", - "V1SubscriptionScheduleReleasedEvent", - ), - "v1.subscription_schedule.updated": ( - "stripe.events._v1_subscription_schedule_updated_event", - "V1SubscriptionScheduleUpdatedEvent", - ), - "v1.tax_rate.created": ( - "stripe.events._v1_tax_rate_created_event", - "V1TaxRateCreatedEvent", - ), - "v1.tax_rate.updated": ( - "stripe.events._v1_tax_rate_updated_event", - "V1TaxRateUpdatedEvent", - ), - "v1.terminal.reader.action_failed": ( - "stripe.events._v1_terminal_reader_action_failed_event", - "V1TerminalReaderActionFailedEvent", - ), - "v1.terminal.reader.action_succeeded": ( - "stripe.events._v1_terminal_reader_action_succeeded_event", - "V1TerminalReaderActionSucceededEvent", - ), - "v1.terminal.reader.action_updated": ( - "stripe.events._v1_terminal_reader_action_updated_event", - "V1TerminalReaderActionUpdatedEvent", - ), - "v1.test_helpers.test_clock.advancing": ( - "stripe.events._v1_test_helpers_test_clock_advancing_event", - "V1TestHelpersTestClockAdvancingEvent", - ), - "v1.test_helpers.test_clock.created": ( - "stripe.events._v1_test_helpers_test_clock_created_event", - "V1TestHelpersTestClockCreatedEvent", - ), - "v1.test_helpers.test_clock.deleted": ( - "stripe.events._v1_test_helpers_test_clock_deleted_event", - "V1TestHelpersTestClockDeletedEvent", - ), - "v1.test_helpers.test_clock.internal_failure": ( - "stripe.events._v1_test_helpers_test_clock_internal_failure_event", - "V1TestHelpersTestClockInternalFailureEvent", - ), - "v1.test_helpers.test_clock.ready": ( - "stripe.events._v1_test_helpers_test_clock_ready_event", - "V1TestHelpersTestClockReadyEvent", - ), - "v1.topup.canceled": ( - "stripe.events._v1_topup_canceled_event", - "V1TopupCanceledEvent", - ), - "v1.topup.created": ( - "stripe.events._v1_topup_created_event", - "V1TopupCreatedEvent", - ), - "v1.topup.failed": ( - "stripe.events._v1_topup_failed_event", - "V1TopupFailedEvent", - ), - "v1.topup.reversed": ( - "stripe.events._v1_topup_reversed_event", - "V1TopupReversedEvent", - ), - "v1.topup.succeeded": ( - "stripe.events._v1_topup_succeeded_event", - "V1TopupSucceededEvent", - ), - "v1.transfer.created": ( - "stripe.events._v1_transfer_created_event", - "V1TransferCreatedEvent", - ), - "v1.transfer.reversed": ( - "stripe.events._v1_transfer_reversed_event", - "V1TransferReversedEvent", + ) + from stripe.events._v2_money_management_received_debit_pending_event import ( + V2MoneyManagementReceivedDebitPendingEventNotification, + ) + from stripe.events._v2_money_management_received_debit_succeeded_event import ( + V2MoneyManagementReceivedDebitSucceededEventNotification, + ) + from stripe.events._v2_money_management_received_debit_updated_event import ( + V2MoneyManagementReceivedDebitUpdatedEventNotification, + ) + from stripe.events._v2_money_management_recipient_verification_created_event import ( + V2MoneyManagementRecipientVerificationCreatedEventNotification, + ) + from stripe.events._v2_money_management_recipient_verification_updated_event import ( + V2MoneyManagementRecipientVerificationUpdatedEventNotification, + ) + from stripe.events._v2_money_management_transaction_created_event import ( + V2MoneyManagementTransactionCreatedEventNotification, + ) + from stripe.events._v2_money_management_transaction_updated_event import ( + V2MoneyManagementTransactionUpdatedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_attempt_failed_event import ( + V2PaymentsOffSessionPaymentAttemptFailedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_attempt_started_event import ( + V2PaymentsOffSessionPaymentAttemptStartedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_authorization_attempt_failed_event import ( + V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_authorization_attempt_started_event import ( + V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_canceled_event import ( + V2PaymentsOffSessionPaymentCanceledEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_created_event import ( + V2PaymentsOffSessionPaymentCreatedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_failed_event import ( + V2PaymentsOffSessionPaymentFailedEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_requires_capture_event import ( + V2PaymentsOffSessionPaymentRequiresCaptureEventNotification, + ) + from stripe.events._v2_payments_off_session_payment_succeeded_event import ( + V2PaymentsOffSessionPaymentSucceededEventNotification, + ) + from stripe.events._v2_reporting_report_run_created_event import ( + V2ReportingReportRunCreatedEventNotification, + ) + from stripe.events._v2_reporting_report_run_failed_event import ( + V2ReportingReportRunFailedEventNotification, + ) + from stripe.events._v2_reporting_report_run_succeeded_event import ( + V2ReportingReportRunSucceededEventNotification, + ) + from stripe.events._v2_reporting_report_run_updated_event import ( + V2ReportingReportRunUpdatedEventNotification, + ) + + +_V2_EVENT_CLASS_LOOKUP = { + "v1.billing.meter.error_report_triggered": ( + "stripe.events._v1_billing_meter_error_report_triggered_event", + "V1BillingMeterErrorReportTriggeredEvent", ), - "v1.transfer.updated": ( - "stripe.events._v1_transfer_updated_event", - "V1TransferUpdatedEvent", + "v1.billing.meter.no_meter_found": ( + "stripe.events._v1_billing_meter_no_meter_found_event", + "V1BillingMeterNoMeterFoundEvent", ), "v2.billing.cadence.billed": ( "stripe.events._v2_billing_cadence_billed_event", @@ -2185,6 +889,14 @@ "stripe.events._v2_money_management_transaction_updated_event", "V2MoneyManagementTransactionUpdatedEvent", ), + "v2.payments.off_session_payment.attempt_failed": ( + "stripe.events._v2_payments_off_session_payment_attempt_failed_event", + "V2PaymentsOffSessionPaymentAttemptFailedEvent", + ), + "v2.payments.off_session_payment.attempt_started": ( + "stripe.events._v2_payments_off_session_payment_attempt_started_event", + "V2PaymentsOffSessionPaymentAttemptStartedEvent", + ), "v2.payments.off_session_payment.authorization_attempt_failed": ( "stripe.events._v2_payments_off_session_payment_authorization_attempt_failed_event", "V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent", @@ -2244,18 +956,6 @@ def get_v2_event_class(type_: str): _V2_EVENT_NOTIFICATION_CLASS_LOOKUP = { - "v1.account.updated": ( - "stripe.events._v1_account_updated_event", - "V1AccountUpdatedEventNotification", - ), - "v1.application_fee.created": ( - "stripe.events._v1_application_fee_created_event", - "V1ApplicationFeeCreatedEventNotification", - ), - "v1.application_fee.refunded": ( - "stripe.events._v1_application_fee_refunded_event", - "V1ApplicationFeeRefundedEventNotification", - ), "v1.billing.meter.error_report_triggered": ( "stripe.events._v1_billing_meter_error_report_triggered_event", "V1BillingMeterErrorReportTriggeredEventNotification", @@ -2264,738 +964,6 @@ def get_v2_event_class(type_: str): "stripe.events._v1_billing_meter_no_meter_found_event", "V1BillingMeterNoMeterFoundEventNotification", ), - "v1.billing_portal.configuration.created": ( - "stripe.events._v1_billing_portal_configuration_created_event", - "V1BillingPortalConfigurationCreatedEventNotification", - ), - "v1.billing_portal.configuration.updated": ( - "stripe.events._v1_billing_portal_configuration_updated_event", - "V1BillingPortalConfigurationUpdatedEventNotification", - ), - "v1.capability.updated": ( - "stripe.events._v1_capability_updated_event", - "V1CapabilityUpdatedEventNotification", - ), - "v1.charge.captured": ( - "stripe.events._v1_charge_captured_event", - "V1ChargeCapturedEventNotification", - ), - "v1.charge.dispute.closed": ( - "stripe.events._v1_charge_dispute_closed_event", - "V1ChargeDisputeClosedEventNotification", - ), - "v1.charge.dispute.created": ( - "stripe.events._v1_charge_dispute_created_event", - "V1ChargeDisputeCreatedEventNotification", - ), - "v1.charge.dispute.funds_reinstated": ( - "stripe.events._v1_charge_dispute_funds_reinstated_event", - "V1ChargeDisputeFundsReinstatedEventNotification", - ), - "v1.charge.dispute.funds_withdrawn": ( - "stripe.events._v1_charge_dispute_funds_withdrawn_event", - "V1ChargeDisputeFundsWithdrawnEventNotification", - ), - "v1.charge.dispute.updated": ( - "stripe.events._v1_charge_dispute_updated_event", - "V1ChargeDisputeUpdatedEventNotification", - ), - "v1.charge.expired": ( - "stripe.events._v1_charge_expired_event", - "V1ChargeExpiredEventNotification", - ), - "v1.charge.failed": ( - "stripe.events._v1_charge_failed_event", - "V1ChargeFailedEventNotification", - ), - "v1.charge.pending": ( - "stripe.events._v1_charge_pending_event", - "V1ChargePendingEventNotification", - ), - "v1.charge.refunded": ( - "stripe.events._v1_charge_refunded_event", - "V1ChargeRefundedEventNotification", - ), - "v1.charge.refund.updated": ( - "stripe.events._v1_charge_refund_updated_event", - "V1ChargeRefundUpdatedEventNotification", - ), - "v1.charge.succeeded": ( - "stripe.events._v1_charge_succeeded_event", - "V1ChargeSucceededEventNotification", - ), - "v1.charge.updated": ( - "stripe.events._v1_charge_updated_event", - "V1ChargeUpdatedEventNotification", - ), - "v1.checkout.session.async_payment_failed": ( - "stripe.events._v1_checkout_session_async_payment_failed_event", - "V1CheckoutSessionAsyncPaymentFailedEventNotification", - ), - "v1.checkout.session.async_payment_succeeded": ( - "stripe.events._v1_checkout_session_async_payment_succeeded_event", - "V1CheckoutSessionAsyncPaymentSucceededEventNotification", - ), - "v1.checkout.session.completed": ( - "stripe.events._v1_checkout_session_completed_event", - "V1CheckoutSessionCompletedEventNotification", - ), - "v1.checkout.session.expired": ( - "stripe.events._v1_checkout_session_expired_event", - "V1CheckoutSessionExpiredEventNotification", - ), - "v1.climate.order.canceled": ( - "stripe.events._v1_climate_order_canceled_event", - "V1ClimateOrderCanceledEventNotification", - ), - "v1.climate.order.created": ( - "stripe.events._v1_climate_order_created_event", - "V1ClimateOrderCreatedEventNotification", - ), - "v1.climate.order.delayed": ( - "stripe.events._v1_climate_order_delayed_event", - "V1ClimateOrderDelayedEventNotification", - ), - "v1.climate.order.delivered": ( - "stripe.events._v1_climate_order_delivered_event", - "V1ClimateOrderDeliveredEventNotification", - ), - "v1.climate.order.product_substituted": ( - "stripe.events._v1_climate_order_product_substituted_event", - "V1ClimateOrderProductSubstitutedEventNotification", - ), - "v1.climate.product.created": ( - "stripe.events._v1_climate_product_created_event", - "V1ClimateProductCreatedEventNotification", - ), - "v1.climate.product.pricing_updated": ( - "stripe.events._v1_climate_product_pricing_updated_event", - "V1ClimateProductPricingUpdatedEventNotification", - ), - "v1.coupon.created": ( - "stripe.events._v1_coupon_created_event", - "V1CouponCreatedEventNotification", - ), - "v1.coupon.deleted": ( - "stripe.events._v1_coupon_deleted_event", - "V1CouponDeletedEventNotification", - ), - "v1.coupon.updated": ( - "stripe.events._v1_coupon_updated_event", - "V1CouponUpdatedEventNotification", - ), - "v1.credit_note.created": ( - "stripe.events._v1_credit_note_created_event", - "V1CreditNoteCreatedEventNotification", - ), - "v1.credit_note.updated": ( - "stripe.events._v1_credit_note_updated_event", - "V1CreditNoteUpdatedEventNotification", - ), - "v1.credit_note.voided": ( - "stripe.events._v1_credit_note_voided_event", - "V1CreditNoteVoidedEventNotification", - ), - "v1.customer.created": ( - "stripe.events._v1_customer_created_event", - "V1CustomerCreatedEventNotification", - ), - "v1.customer.deleted": ( - "stripe.events._v1_customer_deleted_event", - "V1CustomerDeletedEventNotification", - ), - "v1.customer.subscription.created": ( - "stripe.events._v1_customer_subscription_created_event", - "V1CustomerSubscriptionCreatedEventNotification", - ), - "v1.customer.subscription.deleted": ( - "stripe.events._v1_customer_subscription_deleted_event", - "V1CustomerSubscriptionDeletedEventNotification", - ), - "v1.customer.subscription.paused": ( - "stripe.events._v1_customer_subscription_paused_event", - "V1CustomerSubscriptionPausedEventNotification", - ), - "v1.customer.subscription.pending_update_applied": ( - "stripe.events._v1_customer_subscription_pending_update_applied_event", - "V1CustomerSubscriptionPendingUpdateAppliedEventNotification", - ), - "v1.customer.subscription.pending_update_expired": ( - "stripe.events._v1_customer_subscription_pending_update_expired_event", - "V1CustomerSubscriptionPendingUpdateExpiredEventNotification", - ), - "v1.customer.subscription.resumed": ( - "stripe.events._v1_customer_subscription_resumed_event", - "V1CustomerSubscriptionResumedEventNotification", - ), - "v1.customer.subscription.trial_will_end": ( - "stripe.events._v1_customer_subscription_trial_will_end_event", - "V1CustomerSubscriptionTrialWillEndEventNotification", - ), - "v1.customer.subscription.updated": ( - "stripe.events._v1_customer_subscription_updated_event", - "V1CustomerSubscriptionUpdatedEventNotification", - ), - "v1.customer.tax_id.created": ( - "stripe.events._v1_customer_tax_id_created_event", - "V1CustomerTaxIdCreatedEventNotification", - ), - "v1.customer.tax_id.deleted": ( - "stripe.events._v1_customer_tax_id_deleted_event", - "V1CustomerTaxIdDeletedEventNotification", - ), - "v1.customer.tax_id.updated": ( - "stripe.events._v1_customer_tax_id_updated_event", - "V1CustomerTaxIdUpdatedEventNotification", - ), - "v1.customer.updated": ( - "stripe.events._v1_customer_updated_event", - "V1CustomerUpdatedEventNotification", - ), - "v1.file.created": ( - "stripe.events._v1_file_created_event", - "V1FileCreatedEventNotification", - ), - "v1.financial_connections.account.created": ( - "stripe.events._v1_financial_connections_account_created_event", - "V1FinancialConnectionsAccountCreatedEventNotification", - ), - "v1.financial_connections.account.deactivated": ( - "stripe.events._v1_financial_connections_account_deactivated_event", - "V1FinancialConnectionsAccountDeactivatedEventNotification", - ), - "v1.financial_connections.account.disconnected": ( - "stripe.events._v1_financial_connections_account_disconnected_event", - "V1FinancialConnectionsAccountDisconnectedEventNotification", - ), - "v1.financial_connections.account.reactivated": ( - "stripe.events._v1_financial_connections_account_reactivated_event", - "V1FinancialConnectionsAccountReactivatedEventNotification", - ), - "v1.financial_connections.account.refreshed_balance": ( - "stripe.events._v1_financial_connections_account_refreshed_balance_event", - "V1FinancialConnectionsAccountRefreshedBalanceEventNotification", - ), - "v1.financial_connections.account.refreshed_ownership": ( - "stripe.events._v1_financial_connections_account_refreshed_ownership_event", - "V1FinancialConnectionsAccountRefreshedOwnershipEventNotification", - ), - "v1.financial_connections.account.refreshed_transactions": ( - "stripe.events._v1_financial_connections_account_refreshed_transactions_event", - "V1FinancialConnectionsAccountRefreshedTransactionsEventNotification", - ), - "v1.identity.verification_session.canceled": ( - "stripe.events._v1_identity_verification_session_canceled_event", - "V1IdentityVerificationSessionCanceledEventNotification", - ), - "v1.identity.verification_session.created": ( - "stripe.events._v1_identity_verification_session_created_event", - "V1IdentityVerificationSessionCreatedEventNotification", - ), - "v1.identity.verification_session.processing": ( - "stripe.events._v1_identity_verification_session_processing_event", - "V1IdentityVerificationSessionProcessingEventNotification", - ), - "v1.identity.verification_session.redacted": ( - "stripe.events._v1_identity_verification_session_redacted_event", - "V1IdentityVerificationSessionRedactedEventNotification", - ), - "v1.identity.verification_session.requires_input": ( - "stripe.events._v1_identity_verification_session_requires_input_event", - "V1IdentityVerificationSessionRequiresInputEventNotification", - ), - "v1.identity.verification_session.verified": ( - "stripe.events._v1_identity_verification_session_verified_event", - "V1IdentityVerificationSessionVerifiedEventNotification", - ), - "v1.invoice.created": ( - "stripe.events._v1_invoice_created_event", - "V1InvoiceCreatedEventNotification", - ), - "v1.invoice.deleted": ( - "stripe.events._v1_invoice_deleted_event", - "V1InvoiceDeletedEventNotification", - ), - "v1.invoice.finalization_failed": ( - "stripe.events._v1_invoice_finalization_failed_event", - "V1InvoiceFinalizationFailedEventNotification", - ), - "v1.invoice.finalized": ( - "stripe.events._v1_invoice_finalized_event", - "V1InvoiceFinalizedEventNotification", - ), - "v1.invoiceitem.created": ( - "stripe.events._v1_invoiceitem_created_event", - "V1InvoiceitemCreatedEventNotification", - ), - "v1.invoiceitem.deleted": ( - "stripe.events._v1_invoiceitem_deleted_event", - "V1InvoiceitemDeletedEventNotification", - ), - "v1.invoice.marked_uncollectible": ( - "stripe.events._v1_invoice_marked_uncollectible_event", - "V1InvoiceMarkedUncollectibleEventNotification", - ), - "v1.invoice.overdue": ( - "stripe.events._v1_invoice_overdue_event", - "V1InvoiceOverdueEventNotification", - ), - "v1.invoice.overpaid": ( - "stripe.events._v1_invoice_overpaid_event", - "V1InvoiceOverpaidEventNotification", - ), - "v1.invoice.paid": ( - "stripe.events._v1_invoice_paid_event", - "V1InvoicePaidEventNotification", - ), - "v1.invoice.payment_action_required": ( - "stripe.events._v1_invoice_payment_action_required_event", - "V1InvoicePaymentActionRequiredEventNotification", - ), - "v1.invoice.payment_failed": ( - "stripe.events._v1_invoice_payment_failed_event", - "V1InvoicePaymentFailedEventNotification", - ), - "v1.invoice_payment.paid": ( - "stripe.events._v1_invoice_payment_paid_event", - "V1InvoicePaymentPaidEventNotification", - ), - "v1.invoice.payment_succeeded": ( - "stripe.events._v1_invoice_payment_succeeded_event", - "V1InvoicePaymentSucceededEventNotification", - ), - "v1.invoice.sent": ( - "stripe.events._v1_invoice_sent_event", - "V1InvoiceSentEventNotification", - ), - "v1.invoice.upcoming": ( - "stripe.events._v1_invoice_upcoming_event", - "V1InvoiceUpcomingEventNotification", - ), - "v1.invoice.updated": ( - "stripe.events._v1_invoice_updated_event", - "V1InvoiceUpdatedEventNotification", - ), - "v1.invoice.voided": ( - "stripe.events._v1_invoice_voided_event", - "V1InvoiceVoidedEventNotification", - ), - "v1.invoice.will_be_due": ( - "stripe.events._v1_invoice_will_be_due_event", - "V1InvoiceWillBeDueEventNotification", - ), - "v1.issuing_authorization.created": ( - "stripe.events._v1_issuing_authorization_created_event", - "V1IssuingAuthorizationCreatedEventNotification", - ), - "v1.issuing_authorization.request": ( - "stripe.events._v1_issuing_authorization_request_event", - "V1IssuingAuthorizationRequestEventNotification", - ), - "v1.issuing_authorization.updated": ( - "stripe.events._v1_issuing_authorization_updated_event", - "V1IssuingAuthorizationUpdatedEventNotification", - ), - "v1.issuing_card.created": ( - "stripe.events._v1_issuing_card_created_event", - "V1IssuingCardCreatedEventNotification", - ), - "v1.issuing_cardholder.created": ( - "stripe.events._v1_issuing_cardholder_created_event", - "V1IssuingCardholderCreatedEventNotification", - ), - "v1.issuing_cardholder.updated": ( - "stripe.events._v1_issuing_cardholder_updated_event", - "V1IssuingCardholderUpdatedEventNotification", - ), - "v1.issuing_card.updated": ( - "stripe.events._v1_issuing_card_updated_event", - "V1IssuingCardUpdatedEventNotification", - ), - "v1.issuing_dispute.closed": ( - "stripe.events._v1_issuing_dispute_closed_event", - "V1IssuingDisputeClosedEventNotification", - ), - "v1.issuing_dispute.created": ( - "stripe.events._v1_issuing_dispute_created_event", - "V1IssuingDisputeCreatedEventNotification", - ), - "v1.issuing_dispute.funds_reinstated": ( - "stripe.events._v1_issuing_dispute_funds_reinstated_event", - "V1IssuingDisputeFundsReinstatedEventNotification", - ), - "v1.issuing_dispute.funds_rescinded": ( - "stripe.events._v1_issuing_dispute_funds_rescinded_event", - "V1IssuingDisputeFundsRescindedEventNotification", - ), - "v1.issuing_dispute.submitted": ( - "stripe.events._v1_issuing_dispute_submitted_event", - "V1IssuingDisputeSubmittedEventNotification", - ), - "v1.issuing_dispute.updated": ( - "stripe.events._v1_issuing_dispute_updated_event", - "V1IssuingDisputeUpdatedEventNotification", - ), - "v1.issuing_personalization_design.activated": ( - "stripe.events._v1_issuing_personalization_design_activated_event", - "V1IssuingPersonalizationDesignActivatedEventNotification", - ), - "v1.issuing_personalization_design.deactivated": ( - "stripe.events._v1_issuing_personalization_design_deactivated_event", - "V1IssuingPersonalizationDesignDeactivatedEventNotification", - ), - "v1.issuing_personalization_design.rejected": ( - "stripe.events._v1_issuing_personalization_design_rejected_event", - "V1IssuingPersonalizationDesignRejectedEventNotification", - ), - "v1.issuing_personalization_design.updated": ( - "stripe.events._v1_issuing_personalization_design_updated_event", - "V1IssuingPersonalizationDesignUpdatedEventNotification", - ), - "v1.issuing_token.created": ( - "stripe.events._v1_issuing_token_created_event", - "V1IssuingTokenCreatedEventNotification", - ), - "v1.issuing_token.updated": ( - "stripe.events._v1_issuing_token_updated_event", - "V1IssuingTokenUpdatedEventNotification", - ), - "v1.issuing_transaction.created": ( - "stripe.events._v1_issuing_transaction_created_event", - "V1IssuingTransactionCreatedEventNotification", - ), - "v1.issuing_transaction.purchase_details_receipt_updated": ( - "stripe.events._v1_issuing_transaction_purchase_details_receipt_updated_event", - "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification", - ), - "v1.issuing_transaction.updated": ( - "stripe.events._v1_issuing_transaction_updated_event", - "V1IssuingTransactionUpdatedEventNotification", - ), - "v1.mandate.updated": ( - "stripe.events._v1_mandate_updated_event", - "V1MandateUpdatedEventNotification", - ), - "v1.payment_intent.amount_capturable_updated": ( - "stripe.events._v1_payment_intent_amount_capturable_updated_event", - "V1PaymentIntentAmountCapturableUpdatedEventNotification", - ), - "v1.payment_intent.canceled": ( - "stripe.events._v1_payment_intent_canceled_event", - "V1PaymentIntentCanceledEventNotification", - ), - "v1.payment_intent.created": ( - "stripe.events._v1_payment_intent_created_event", - "V1PaymentIntentCreatedEventNotification", - ), - "v1.payment_intent.partially_funded": ( - "stripe.events._v1_payment_intent_partially_funded_event", - "V1PaymentIntentPartiallyFundedEventNotification", - ), - "v1.payment_intent.payment_failed": ( - "stripe.events._v1_payment_intent_payment_failed_event", - "V1PaymentIntentPaymentFailedEventNotification", - ), - "v1.payment_intent.processing": ( - "stripe.events._v1_payment_intent_processing_event", - "V1PaymentIntentProcessingEventNotification", - ), - "v1.payment_intent.requires_action": ( - "stripe.events._v1_payment_intent_requires_action_event", - "V1PaymentIntentRequiresActionEventNotification", - ), - "v1.payment_intent.succeeded": ( - "stripe.events._v1_payment_intent_succeeded_event", - "V1PaymentIntentSucceededEventNotification", - ), - "v1.payment_link.created": ( - "stripe.events._v1_payment_link_created_event", - "V1PaymentLinkCreatedEventNotification", - ), - "v1.payment_link.updated": ( - "stripe.events._v1_payment_link_updated_event", - "V1PaymentLinkUpdatedEventNotification", - ), - "v1.payment_method.attached": ( - "stripe.events._v1_payment_method_attached_event", - "V1PaymentMethodAttachedEventNotification", - ), - "v1.payment_method.automatically_updated": ( - "stripe.events._v1_payment_method_automatically_updated_event", - "V1PaymentMethodAutomaticallyUpdatedEventNotification", - ), - "v1.payment_method.detached": ( - "stripe.events._v1_payment_method_detached_event", - "V1PaymentMethodDetachedEventNotification", - ), - "v1.payment_method.updated": ( - "stripe.events._v1_payment_method_updated_event", - "V1PaymentMethodUpdatedEventNotification", - ), - "v1.payout.canceled": ( - "stripe.events._v1_payout_canceled_event", - "V1PayoutCanceledEventNotification", - ), - "v1.payout.created": ( - "stripe.events._v1_payout_created_event", - "V1PayoutCreatedEventNotification", - ), - "v1.payout.failed": ( - "stripe.events._v1_payout_failed_event", - "V1PayoutFailedEventNotification", - ), - "v1.payout.paid": ( - "stripe.events._v1_payout_paid_event", - "V1PayoutPaidEventNotification", - ), - "v1.payout.reconciliation_completed": ( - "stripe.events._v1_payout_reconciliation_completed_event", - "V1PayoutReconciliationCompletedEventNotification", - ), - "v1.payout.updated": ( - "stripe.events._v1_payout_updated_event", - "V1PayoutUpdatedEventNotification", - ), - "v1.person.created": ( - "stripe.events._v1_person_created_event", - "V1PersonCreatedEventNotification", - ), - "v1.person.deleted": ( - "stripe.events._v1_person_deleted_event", - "V1PersonDeletedEventNotification", - ), - "v1.person.updated": ( - "stripe.events._v1_person_updated_event", - "V1PersonUpdatedEventNotification", - ), - "v1.plan.created": ( - "stripe.events._v1_plan_created_event", - "V1PlanCreatedEventNotification", - ), - "v1.plan.deleted": ( - "stripe.events._v1_plan_deleted_event", - "V1PlanDeletedEventNotification", - ), - "v1.plan.updated": ( - "stripe.events._v1_plan_updated_event", - "V1PlanUpdatedEventNotification", - ), - "v1.price.created": ( - "stripe.events._v1_price_created_event", - "V1PriceCreatedEventNotification", - ), - "v1.price.deleted": ( - "stripe.events._v1_price_deleted_event", - "V1PriceDeletedEventNotification", - ), - "v1.price.updated": ( - "stripe.events._v1_price_updated_event", - "V1PriceUpdatedEventNotification", - ), - "v1.product.created": ( - "stripe.events._v1_product_created_event", - "V1ProductCreatedEventNotification", - ), - "v1.product.deleted": ( - "stripe.events._v1_product_deleted_event", - "V1ProductDeletedEventNotification", - ), - "v1.product.updated": ( - "stripe.events._v1_product_updated_event", - "V1ProductUpdatedEventNotification", - ), - "v1.promotion_code.created": ( - "stripe.events._v1_promotion_code_created_event", - "V1PromotionCodeCreatedEventNotification", - ), - "v1.promotion_code.updated": ( - "stripe.events._v1_promotion_code_updated_event", - "V1PromotionCodeUpdatedEventNotification", - ), - "v1.quote.accepted": ( - "stripe.events._v1_quote_accepted_event", - "V1QuoteAcceptedEventNotification", - ), - "v1.quote.canceled": ( - "stripe.events._v1_quote_canceled_event", - "V1QuoteCanceledEventNotification", - ), - "v1.quote.created": ( - "stripe.events._v1_quote_created_event", - "V1QuoteCreatedEventNotification", - ), - "v1.quote.finalized": ( - "stripe.events._v1_quote_finalized_event", - "V1QuoteFinalizedEventNotification", - ), - "v1.radar.early_fraud_warning.created": ( - "stripe.events._v1_radar_early_fraud_warning_created_event", - "V1RadarEarlyFraudWarningCreatedEventNotification", - ), - "v1.radar.early_fraud_warning.updated": ( - "stripe.events._v1_radar_early_fraud_warning_updated_event", - "V1RadarEarlyFraudWarningUpdatedEventNotification", - ), - "v1.refund.created": ( - "stripe.events._v1_refund_created_event", - "V1RefundCreatedEventNotification", - ), - "v1.refund.failed": ( - "stripe.events._v1_refund_failed_event", - "V1RefundFailedEventNotification", - ), - "v1.refund.updated": ( - "stripe.events._v1_refund_updated_event", - "V1RefundUpdatedEventNotification", - ), - "v1.review.closed": ( - "stripe.events._v1_review_closed_event", - "V1ReviewClosedEventNotification", - ), - "v1.review.opened": ( - "stripe.events._v1_review_opened_event", - "V1ReviewOpenedEventNotification", - ), - "v1.setup_intent.canceled": ( - "stripe.events._v1_setup_intent_canceled_event", - "V1SetupIntentCanceledEventNotification", - ), - "v1.setup_intent.created": ( - "stripe.events._v1_setup_intent_created_event", - "V1SetupIntentCreatedEventNotification", - ), - "v1.setup_intent.requires_action": ( - "stripe.events._v1_setup_intent_requires_action_event", - "V1SetupIntentRequiresActionEventNotification", - ), - "v1.setup_intent.setup_failed": ( - "stripe.events._v1_setup_intent_setup_failed_event", - "V1SetupIntentSetupFailedEventNotification", - ), - "v1.setup_intent.succeeded": ( - "stripe.events._v1_setup_intent_succeeded_event", - "V1SetupIntentSucceededEventNotification", - ), - "v1.sigma.scheduled_query_run.created": ( - "stripe.events._v1_sigma_scheduled_query_run_created_event", - "V1SigmaScheduledQueryRunCreatedEventNotification", - ), - "v1.source.canceled": ( - "stripe.events._v1_source_canceled_event", - "V1SourceCanceledEventNotification", - ), - "v1.source.chargeable": ( - "stripe.events._v1_source_chargeable_event", - "V1SourceChargeableEventNotification", - ), - "v1.source.failed": ( - "stripe.events._v1_source_failed_event", - "V1SourceFailedEventNotification", - ), - "v1.source.refund_attributes_required": ( - "stripe.events._v1_source_refund_attributes_required_event", - "V1SourceRefundAttributesRequiredEventNotification", - ), - "v1.subscription_schedule.aborted": ( - "stripe.events._v1_subscription_schedule_aborted_event", - "V1SubscriptionScheduleAbortedEventNotification", - ), - "v1.subscription_schedule.canceled": ( - "stripe.events._v1_subscription_schedule_canceled_event", - "V1SubscriptionScheduleCanceledEventNotification", - ), - "v1.subscription_schedule.completed": ( - "stripe.events._v1_subscription_schedule_completed_event", - "V1SubscriptionScheduleCompletedEventNotification", - ), - "v1.subscription_schedule.created": ( - "stripe.events._v1_subscription_schedule_created_event", - "V1SubscriptionScheduleCreatedEventNotification", - ), - "v1.subscription_schedule.expiring": ( - "stripe.events._v1_subscription_schedule_expiring_event", - "V1SubscriptionScheduleExpiringEventNotification", - ), - "v1.subscription_schedule.released": ( - "stripe.events._v1_subscription_schedule_released_event", - "V1SubscriptionScheduleReleasedEventNotification", - ), - "v1.subscription_schedule.updated": ( - "stripe.events._v1_subscription_schedule_updated_event", - "V1SubscriptionScheduleUpdatedEventNotification", - ), - "v1.tax_rate.created": ( - "stripe.events._v1_tax_rate_created_event", - "V1TaxRateCreatedEventNotification", - ), - "v1.tax_rate.updated": ( - "stripe.events._v1_tax_rate_updated_event", - "V1TaxRateUpdatedEventNotification", - ), - "v1.terminal.reader.action_failed": ( - "stripe.events._v1_terminal_reader_action_failed_event", - "V1TerminalReaderActionFailedEventNotification", - ), - "v1.terminal.reader.action_succeeded": ( - "stripe.events._v1_terminal_reader_action_succeeded_event", - "V1TerminalReaderActionSucceededEventNotification", - ), - "v1.terminal.reader.action_updated": ( - "stripe.events._v1_terminal_reader_action_updated_event", - "V1TerminalReaderActionUpdatedEventNotification", - ), - "v1.test_helpers.test_clock.advancing": ( - "stripe.events._v1_test_helpers_test_clock_advancing_event", - "V1TestHelpersTestClockAdvancingEventNotification", - ), - "v1.test_helpers.test_clock.created": ( - "stripe.events._v1_test_helpers_test_clock_created_event", - "V1TestHelpersTestClockCreatedEventNotification", - ), - "v1.test_helpers.test_clock.deleted": ( - "stripe.events._v1_test_helpers_test_clock_deleted_event", - "V1TestHelpersTestClockDeletedEventNotification", - ), - "v1.test_helpers.test_clock.internal_failure": ( - "stripe.events._v1_test_helpers_test_clock_internal_failure_event", - "V1TestHelpersTestClockInternalFailureEventNotification", - ), - "v1.test_helpers.test_clock.ready": ( - "stripe.events._v1_test_helpers_test_clock_ready_event", - "V1TestHelpersTestClockReadyEventNotification", - ), - "v1.topup.canceled": ( - "stripe.events._v1_topup_canceled_event", - "V1TopupCanceledEventNotification", - ), - "v1.topup.created": ( - "stripe.events._v1_topup_created_event", - "V1TopupCreatedEventNotification", - ), - "v1.topup.failed": ( - "stripe.events._v1_topup_failed_event", - "V1TopupFailedEventNotification", - ), - "v1.topup.reversed": ( - "stripe.events._v1_topup_reversed_event", - "V1TopupReversedEventNotification", - ), - "v1.topup.succeeded": ( - "stripe.events._v1_topup_succeeded_event", - "V1TopupSucceededEventNotification", - ), - "v1.transfer.created": ( - "stripe.events._v1_transfer_created_event", - "V1TransferCreatedEventNotification", - ), - "v1.transfer.reversed": ( - "stripe.events._v1_transfer_reversed_event", - "V1TransferReversedEventNotification", - ), - "v1.transfer.updated": ( - "stripe.events._v1_transfer_updated_event", - "V1TransferUpdatedEventNotification", - ), "v2.billing.cadence.billed": ( "stripe.events._v2_billing_cadence_billed_event", "V2BillingCadenceBilledEventNotification", @@ -3468,6 +1436,14 @@ def get_v2_event_class(type_: str): "stripe.events._v2_money_management_transaction_updated_event", "V2MoneyManagementTransactionUpdatedEventNotification", ), + "v2.payments.off_session_payment.attempt_failed": ( + "stripe.events._v2_payments_off_session_payment_attempt_failed_event", + "V2PaymentsOffSessionPaymentAttemptFailedEventNotification", + ), + "v2.payments.off_session_payment.attempt_started": ( + "stripe.events._v2_payments_off_session_payment_attempt_started_event", + "V2PaymentsOffSessionPaymentAttemptStartedEventNotification", + ), "v2.payments.off_session_payment.authorization_attempt_failed": ( "stripe.events._v2_payments_off_session_payment_authorization_attempt_failed_event", "V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification", @@ -3527,194 +1503,8 @@ def get_v2_event_notification_class(type_: str): ALL_EVENT_NOTIFICATIONS = Union[ - "V1AccountUpdatedEventNotification", - "V1ApplicationFeeCreatedEventNotification", - "V1ApplicationFeeRefundedEventNotification", "V1BillingMeterErrorReportTriggeredEventNotification", "V1BillingMeterNoMeterFoundEventNotification", - "V1BillingPortalConfigurationCreatedEventNotification", - "V1BillingPortalConfigurationUpdatedEventNotification", - "V1CapabilityUpdatedEventNotification", - "V1ChargeCapturedEventNotification", - "V1ChargeDisputeClosedEventNotification", - "V1ChargeDisputeCreatedEventNotification", - "V1ChargeDisputeFundsReinstatedEventNotification", - "V1ChargeDisputeFundsWithdrawnEventNotification", - "V1ChargeDisputeUpdatedEventNotification", - "V1ChargeExpiredEventNotification", - "V1ChargeFailedEventNotification", - "V1ChargePendingEventNotification", - "V1ChargeRefundedEventNotification", - "V1ChargeRefundUpdatedEventNotification", - "V1ChargeSucceededEventNotification", - "V1ChargeUpdatedEventNotification", - "V1CheckoutSessionAsyncPaymentFailedEventNotification", - "V1CheckoutSessionAsyncPaymentSucceededEventNotification", - "V1CheckoutSessionCompletedEventNotification", - "V1CheckoutSessionExpiredEventNotification", - "V1ClimateOrderCanceledEventNotification", - "V1ClimateOrderCreatedEventNotification", - "V1ClimateOrderDelayedEventNotification", - "V1ClimateOrderDeliveredEventNotification", - "V1ClimateOrderProductSubstitutedEventNotification", - "V1ClimateProductCreatedEventNotification", - "V1ClimateProductPricingUpdatedEventNotification", - "V1CouponCreatedEventNotification", - "V1CouponDeletedEventNotification", - "V1CouponUpdatedEventNotification", - "V1CreditNoteCreatedEventNotification", - "V1CreditNoteUpdatedEventNotification", - "V1CreditNoteVoidedEventNotification", - "V1CustomerCreatedEventNotification", - "V1CustomerDeletedEventNotification", - "V1CustomerSubscriptionCreatedEventNotification", - "V1CustomerSubscriptionDeletedEventNotification", - "V1CustomerSubscriptionPausedEventNotification", - "V1CustomerSubscriptionPendingUpdateAppliedEventNotification", - "V1CustomerSubscriptionPendingUpdateExpiredEventNotification", - "V1CustomerSubscriptionResumedEventNotification", - "V1CustomerSubscriptionTrialWillEndEventNotification", - "V1CustomerSubscriptionUpdatedEventNotification", - "V1CustomerTaxIdCreatedEventNotification", - "V1CustomerTaxIdDeletedEventNotification", - "V1CustomerTaxIdUpdatedEventNotification", - "V1CustomerUpdatedEventNotification", - "V1FileCreatedEventNotification", - "V1FinancialConnectionsAccountCreatedEventNotification", - "V1FinancialConnectionsAccountDeactivatedEventNotification", - "V1FinancialConnectionsAccountDisconnectedEventNotification", - "V1FinancialConnectionsAccountReactivatedEventNotification", - "V1FinancialConnectionsAccountRefreshedBalanceEventNotification", - "V1FinancialConnectionsAccountRefreshedOwnershipEventNotification", - "V1FinancialConnectionsAccountRefreshedTransactionsEventNotification", - "V1IdentityVerificationSessionCanceledEventNotification", - "V1IdentityVerificationSessionCreatedEventNotification", - "V1IdentityVerificationSessionProcessingEventNotification", - "V1IdentityVerificationSessionRedactedEventNotification", - "V1IdentityVerificationSessionRequiresInputEventNotification", - "V1IdentityVerificationSessionVerifiedEventNotification", - "V1InvoiceCreatedEventNotification", - "V1InvoiceDeletedEventNotification", - "V1InvoiceFinalizationFailedEventNotification", - "V1InvoiceFinalizedEventNotification", - "V1InvoiceitemCreatedEventNotification", - "V1InvoiceitemDeletedEventNotification", - "V1InvoiceMarkedUncollectibleEventNotification", - "V1InvoiceOverdueEventNotification", - "V1InvoiceOverpaidEventNotification", - "V1InvoicePaidEventNotification", - "V1InvoicePaymentActionRequiredEventNotification", - "V1InvoicePaymentFailedEventNotification", - "V1InvoicePaymentPaidEventNotification", - "V1InvoicePaymentSucceededEventNotification", - "V1InvoiceSentEventNotification", - "V1InvoiceUpcomingEventNotification", - "V1InvoiceUpdatedEventNotification", - "V1InvoiceVoidedEventNotification", - "V1InvoiceWillBeDueEventNotification", - "V1IssuingAuthorizationCreatedEventNotification", - "V1IssuingAuthorizationRequestEventNotification", - "V1IssuingAuthorizationUpdatedEventNotification", - "V1IssuingCardCreatedEventNotification", - "V1IssuingCardholderCreatedEventNotification", - "V1IssuingCardholderUpdatedEventNotification", - "V1IssuingCardUpdatedEventNotification", - "V1IssuingDisputeClosedEventNotification", - "V1IssuingDisputeCreatedEventNotification", - "V1IssuingDisputeFundsReinstatedEventNotification", - "V1IssuingDisputeFundsRescindedEventNotification", - "V1IssuingDisputeSubmittedEventNotification", - "V1IssuingDisputeUpdatedEventNotification", - "V1IssuingPersonalizationDesignActivatedEventNotification", - "V1IssuingPersonalizationDesignDeactivatedEventNotification", - "V1IssuingPersonalizationDesignRejectedEventNotification", - "V1IssuingPersonalizationDesignUpdatedEventNotification", - "V1IssuingTokenCreatedEventNotification", - "V1IssuingTokenUpdatedEventNotification", - "V1IssuingTransactionCreatedEventNotification", - "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification", - "V1IssuingTransactionUpdatedEventNotification", - "V1MandateUpdatedEventNotification", - "V1PaymentIntentAmountCapturableUpdatedEventNotification", - "V1PaymentIntentCanceledEventNotification", - "V1PaymentIntentCreatedEventNotification", - "V1PaymentIntentPartiallyFundedEventNotification", - "V1PaymentIntentPaymentFailedEventNotification", - "V1PaymentIntentProcessingEventNotification", - "V1PaymentIntentRequiresActionEventNotification", - "V1PaymentIntentSucceededEventNotification", - "V1PaymentLinkCreatedEventNotification", - "V1PaymentLinkUpdatedEventNotification", - "V1PaymentMethodAttachedEventNotification", - "V1PaymentMethodAutomaticallyUpdatedEventNotification", - "V1PaymentMethodDetachedEventNotification", - "V1PaymentMethodUpdatedEventNotification", - "V1PayoutCanceledEventNotification", - "V1PayoutCreatedEventNotification", - "V1PayoutFailedEventNotification", - "V1PayoutPaidEventNotification", - "V1PayoutReconciliationCompletedEventNotification", - "V1PayoutUpdatedEventNotification", - "V1PersonCreatedEventNotification", - "V1PersonDeletedEventNotification", - "V1PersonUpdatedEventNotification", - "V1PlanCreatedEventNotification", - "V1PlanDeletedEventNotification", - "V1PlanUpdatedEventNotification", - "V1PriceCreatedEventNotification", - "V1PriceDeletedEventNotification", - "V1PriceUpdatedEventNotification", - "V1ProductCreatedEventNotification", - "V1ProductDeletedEventNotification", - "V1ProductUpdatedEventNotification", - "V1PromotionCodeCreatedEventNotification", - "V1PromotionCodeUpdatedEventNotification", - "V1QuoteAcceptedEventNotification", - "V1QuoteCanceledEventNotification", - "V1QuoteCreatedEventNotification", - "V1QuoteFinalizedEventNotification", - "V1RadarEarlyFraudWarningCreatedEventNotification", - "V1RadarEarlyFraudWarningUpdatedEventNotification", - "V1RefundCreatedEventNotification", - "V1RefundFailedEventNotification", - "V1RefundUpdatedEventNotification", - "V1ReviewClosedEventNotification", - "V1ReviewOpenedEventNotification", - "V1SetupIntentCanceledEventNotification", - "V1SetupIntentCreatedEventNotification", - "V1SetupIntentRequiresActionEventNotification", - "V1SetupIntentSetupFailedEventNotification", - "V1SetupIntentSucceededEventNotification", - "V1SigmaScheduledQueryRunCreatedEventNotification", - "V1SourceCanceledEventNotification", - "V1SourceChargeableEventNotification", - "V1SourceFailedEventNotification", - "V1SourceRefundAttributesRequiredEventNotification", - "V1SubscriptionScheduleAbortedEventNotification", - "V1SubscriptionScheduleCanceledEventNotification", - "V1SubscriptionScheduleCompletedEventNotification", - "V1SubscriptionScheduleCreatedEventNotification", - "V1SubscriptionScheduleExpiringEventNotification", - "V1SubscriptionScheduleReleasedEventNotification", - "V1SubscriptionScheduleUpdatedEventNotification", - "V1TaxRateCreatedEventNotification", - "V1TaxRateUpdatedEventNotification", - "V1TerminalReaderActionFailedEventNotification", - "V1TerminalReaderActionSucceededEventNotification", - "V1TerminalReaderActionUpdatedEventNotification", - "V1TestHelpersTestClockAdvancingEventNotification", - "V1TestHelpersTestClockCreatedEventNotification", - "V1TestHelpersTestClockDeletedEventNotification", - "V1TestHelpersTestClockInternalFailureEventNotification", - "V1TestHelpersTestClockReadyEventNotification", - "V1TopupCanceledEventNotification", - "V1TopupCreatedEventNotification", - "V1TopupFailedEventNotification", - "V1TopupReversedEventNotification", - "V1TopupSucceededEventNotification", - "V1TransferCreatedEventNotification", - "V1TransferReversedEventNotification", - "V1TransferUpdatedEventNotification", "V2BillingCadenceBilledEventNotification", "V2BillingCadenceCanceledEventNotification", "V2BillingCadenceCreatedEventNotification", @@ -3833,6 +1623,8 @@ def get_v2_event_notification_class(type_: str): "V2MoneyManagementRecipientVerificationUpdatedEventNotification", "V2MoneyManagementTransactionCreatedEventNotification", "V2MoneyManagementTransactionUpdatedEventNotification", + "V2PaymentsOffSessionPaymentAttemptFailedEventNotification", + "V2PaymentsOffSessionPaymentAttemptStartedEventNotification", "V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification", "V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification", "V2PaymentsOffSessionPaymentCanceledEventNotification", diff --git a/stripe/events/_v1_account_updated_event.py b/stripe/events/_v1_account_updated_event.py deleted file mode 100644 index 6f9896cef..000000000 --- a/stripe/events/_v1_account_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._account import Account - from stripe._stripe_client import StripeClient - - -class V1AccountUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.account.updated" - type: Literal["v1.account.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1AccountUpdatedEvent": - return cast( - "V1AccountUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Account": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Account", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1AccountUpdatedEvent": - return cast( - "V1AccountUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Account": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Account", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1AccountUpdatedEvent(Event): - LOOKUP_TYPE = "v1.account.updated" - type: Literal["v1.account.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Account": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Account", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_application_fee_created_event.py b/stripe/events/_v1_application_fee_created_event.py deleted file mode 100644 index 9d3a46179..000000000 --- a/stripe/events/_v1_application_fee_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._application_fee import ApplicationFee - from stripe._stripe_client import StripeClient - - -class V1ApplicationFeeCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.application_fee.created" - type: Literal["v1.application_fee.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ApplicationFeeCreatedEvent": - return cast( - "V1ApplicationFeeCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "ApplicationFee": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "ApplicationFee", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ApplicationFeeCreatedEvent": - return cast( - "V1ApplicationFeeCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "ApplicationFee": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "ApplicationFee", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ApplicationFeeCreatedEvent(Event): - LOOKUP_TYPE = "v1.application_fee.created" - type: Literal["v1.application_fee.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "ApplicationFee": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "ApplicationFee", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_application_fee_refunded_event.py b/stripe/events/_v1_application_fee_refunded_event.py deleted file mode 100644 index 886b81e07..000000000 --- a/stripe/events/_v1_application_fee_refunded_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._application_fee import ApplicationFee - from stripe._stripe_client import StripeClient - - -class V1ApplicationFeeRefundedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.application_fee.refunded" - type: Literal["v1.application_fee.refunded"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ApplicationFeeRefundedEvent": - return cast( - "V1ApplicationFeeRefundedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "ApplicationFee": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "ApplicationFee", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ApplicationFeeRefundedEvent": - return cast( - "V1ApplicationFeeRefundedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "ApplicationFee": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "ApplicationFee", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ApplicationFeeRefundedEvent(Event): - LOOKUP_TYPE = "v1.application_fee.refunded" - type: Literal["v1.application_fee.refunded"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "ApplicationFee": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "ApplicationFee", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_billing_portal_configuration_created_event.py b/stripe/events/_v1_billing_portal_configuration_created_event.py deleted file mode 100644 index 3f6ae6571..000000000 --- a/stripe/events/_v1_billing_portal_configuration_created_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.billing_portal._configuration import Configuration - - -class V1BillingPortalConfigurationCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.billing_portal.configuration.created" - type: Literal["v1.billing_portal.configuration.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1BillingPortalConfigurationCreatedEvent": - return cast( - "V1BillingPortalConfigurationCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Configuration": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Configuration", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1BillingPortalConfigurationCreatedEvent": - return cast( - "V1BillingPortalConfigurationCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Configuration": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Configuration", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1BillingPortalConfigurationCreatedEvent(Event): - LOOKUP_TYPE = "v1.billing_portal.configuration.created" - type: Literal["v1.billing_portal.configuration.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Configuration": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Configuration", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_billing_portal_configuration_updated_event.py b/stripe/events/_v1_billing_portal_configuration_updated_event.py deleted file mode 100644 index c979f1406..000000000 --- a/stripe/events/_v1_billing_portal_configuration_updated_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.billing_portal._configuration import Configuration - - -class V1BillingPortalConfigurationUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.billing_portal.configuration.updated" - type: Literal["v1.billing_portal.configuration.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1BillingPortalConfigurationUpdatedEvent": - return cast( - "V1BillingPortalConfigurationUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Configuration": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Configuration", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1BillingPortalConfigurationUpdatedEvent": - return cast( - "V1BillingPortalConfigurationUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Configuration": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Configuration", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1BillingPortalConfigurationUpdatedEvent(Event): - LOOKUP_TYPE = "v1.billing_portal.configuration.updated" - type: Literal["v1.billing_portal.configuration.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Configuration": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Configuration", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_capability_updated_event.py b/stripe/events/_v1_capability_updated_event.py deleted file mode 100644 index 0253e9038..000000000 --- a/stripe/events/_v1_capability_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._capability import Capability - from stripe._stripe_client import StripeClient - - -class V1CapabilityUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.capability.updated" - type: Literal["v1.capability.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CapabilityUpdatedEvent": - return cast( - "V1CapabilityUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Capability": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Capability", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CapabilityUpdatedEvent": - return cast( - "V1CapabilityUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Capability": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Capability", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CapabilityUpdatedEvent(Event): - LOOKUP_TYPE = "v1.capability.updated" - type: Literal["v1.capability.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Capability": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Capability", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_charge_captured_event.py b/stripe/events/_v1_charge_captured_event.py deleted file mode 100644 index 6fbc15fa9..000000000 --- a/stripe/events/_v1_charge_captured_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._charge import Charge - from stripe._stripe_client import StripeClient - - -class V1ChargeCapturedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.charge.captured" - type: Literal["v1.charge.captured"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ChargeCapturedEvent": - return cast( - "V1ChargeCapturedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Charge": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ChargeCapturedEvent": - return cast( - "V1ChargeCapturedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Charge": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ChargeCapturedEvent(Event): - LOOKUP_TYPE = "v1.charge.captured" - type: Literal["v1.charge.captured"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Charge": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Charge", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_charge_dispute_closed_event.py b/stripe/events/_v1_charge_dispute_closed_event.py deleted file mode 100644 index 543757df0..000000000 --- a/stripe/events/_v1_charge_dispute_closed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._dispute import Dispute - from stripe._stripe_client import StripeClient - - -class V1ChargeDisputeClosedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.charge.dispute.closed" - type: Literal["v1.charge.dispute.closed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ChargeDisputeClosedEvent": - return cast( - "V1ChargeDisputeClosedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Dispute": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ChargeDisputeClosedEvent": - return cast( - "V1ChargeDisputeClosedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Dispute": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ChargeDisputeClosedEvent(Event): - LOOKUP_TYPE = "v1.charge.dispute.closed" - type: Literal["v1.charge.dispute.closed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Dispute": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Dispute", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_charge_dispute_created_event.py b/stripe/events/_v1_charge_dispute_created_event.py deleted file mode 100644 index dc96ec247..000000000 --- a/stripe/events/_v1_charge_dispute_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._dispute import Dispute - from stripe._stripe_client import StripeClient - - -class V1ChargeDisputeCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.charge.dispute.created" - type: Literal["v1.charge.dispute.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ChargeDisputeCreatedEvent": - return cast( - "V1ChargeDisputeCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Dispute": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ChargeDisputeCreatedEvent": - return cast( - "V1ChargeDisputeCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Dispute": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ChargeDisputeCreatedEvent(Event): - LOOKUP_TYPE = "v1.charge.dispute.created" - type: Literal["v1.charge.dispute.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Dispute": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Dispute", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_charge_dispute_funds_reinstated_event.py b/stripe/events/_v1_charge_dispute_funds_reinstated_event.py deleted file mode 100644 index 3f905c221..000000000 --- a/stripe/events/_v1_charge_dispute_funds_reinstated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._dispute import Dispute - from stripe._stripe_client import StripeClient - - -class V1ChargeDisputeFundsReinstatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.charge.dispute.funds_reinstated" - type: Literal["v1.charge.dispute.funds_reinstated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ChargeDisputeFundsReinstatedEvent": - return cast( - "V1ChargeDisputeFundsReinstatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Dispute": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ChargeDisputeFundsReinstatedEvent": - return cast( - "V1ChargeDisputeFundsReinstatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Dispute": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ChargeDisputeFundsReinstatedEvent(Event): - LOOKUP_TYPE = "v1.charge.dispute.funds_reinstated" - type: Literal["v1.charge.dispute.funds_reinstated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Dispute": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Dispute", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_charge_dispute_funds_withdrawn_event.py b/stripe/events/_v1_charge_dispute_funds_withdrawn_event.py deleted file mode 100644 index d416ad203..000000000 --- a/stripe/events/_v1_charge_dispute_funds_withdrawn_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._dispute import Dispute - from stripe._stripe_client import StripeClient - - -class V1ChargeDisputeFundsWithdrawnEventNotification(EventNotification): - LOOKUP_TYPE = "v1.charge.dispute.funds_withdrawn" - type: Literal["v1.charge.dispute.funds_withdrawn"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ChargeDisputeFundsWithdrawnEvent": - return cast( - "V1ChargeDisputeFundsWithdrawnEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Dispute": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ChargeDisputeFundsWithdrawnEvent": - return cast( - "V1ChargeDisputeFundsWithdrawnEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Dispute": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ChargeDisputeFundsWithdrawnEvent(Event): - LOOKUP_TYPE = "v1.charge.dispute.funds_withdrawn" - type: Literal["v1.charge.dispute.funds_withdrawn"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Dispute": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Dispute", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_charge_dispute_updated_event.py b/stripe/events/_v1_charge_dispute_updated_event.py deleted file mode 100644 index f2b010ee7..000000000 --- a/stripe/events/_v1_charge_dispute_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._dispute import Dispute - from stripe._stripe_client import StripeClient - - -class V1ChargeDisputeUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.charge.dispute.updated" - type: Literal["v1.charge.dispute.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ChargeDisputeUpdatedEvent": - return cast( - "V1ChargeDisputeUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Dispute": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ChargeDisputeUpdatedEvent": - return cast( - "V1ChargeDisputeUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Dispute": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ChargeDisputeUpdatedEvent(Event): - LOOKUP_TYPE = "v1.charge.dispute.updated" - type: Literal["v1.charge.dispute.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Dispute": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Dispute", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_charge_expired_event.py b/stripe/events/_v1_charge_expired_event.py deleted file mode 100644 index 788134b58..000000000 --- a/stripe/events/_v1_charge_expired_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._charge import Charge - from stripe._stripe_client import StripeClient - - -class V1ChargeExpiredEventNotification(EventNotification): - LOOKUP_TYPE = "v1.charge.expired" - type: Literal["v1.charge.expired"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ChargeExpiredEvent": - return cast( - "V1ChargeExpiredEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Charge": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ChargeExpiredEvent": - return cast( - "V1ChargeExpiredEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Charge": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ChargeExpiredEvent(Event): - LOOKUP_TYPE = "v1.charge.expired" - type: Literal["v1.charge.expired"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Charge": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Charge", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_charge_failed_event.py b/stripe/events/_v1_charge_failed_event.py deleted file mode 100644 index d6d91522e..000000000 --- a/stripe/events/_v1_charge_failed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._charge import Charge - from stripe._stripe_client import StripeClient - - -class V1ChargeFailedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.charge.failed" - type: Literal["v1.charge.failed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ChargeFailedEvent": - return cast( - "V1ChargeFailedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Charge": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ChargeFailedEvent": - return cast( - "V1ChargeFailedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Charge": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ChargeFailedEvent(Event): - LOOKUP_TYPE = "v1.charge.failed" - type: Literal["v1.charge.failed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Charge": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Charge", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_charge_pending_event.py b/stripe/events/_v1_charge_pending_event.py deleted file mode 100644 index 183c76dc8..000000000 --- a/stripe/events/_v1_charge_pending_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._charge import Charge - from stripe._stripe_client import StripeClient - - -class V1ChargePendingEventNotification(EventNotification): - LOOKUP_TYPE = "v1.charge.pending" - type: Literal["v1.charge.pending"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ChargePendingEvent": - return cast( - "V1ChargePendingEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Charge": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ChargePendingEvent": - return cast( - "V1ChargePendingEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Charge": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ChargePendingEvent(Event): - LOOKUP_TYPE = "v1.charge.pending" - type: Literal["v1.charge.pending"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Charge": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Charge", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_charge_refund_updated_event.py b/stripe/events/_v1_charge_refund_updated_event.py deleted file mode 100644 index 0bcbd3f91..000000000 --- a/stripe/events/_v1_charge_refund_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._refund import Refund - from stripe._stripe_client import StripeClient - - -class V1ChargeRefundUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.charge.refund.updated" - type: Literal["v1.charge.refund.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ChargeRefundUpdatedEvent": - return cast( - "V1ChargeRefundUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Refund": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Refund", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ChargeRefundUpdatedEvent": - return cast( - "V1ChargeRefundUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Refund": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Refund", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ChargeRefundUpdatedEvent(Event): - LOOKUP_TYPE = "v1.charge.refund.updated" - type: Literal["v1.charge.refund.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Refund": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Refund", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_charge_refunded_event.py b/stripe/events/_v1_charge_refunded_event.py deleted file mode 100644 index fa9d5f373..000000000 --- a/stripe/events/_v1_charge_refunded_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._charge import Charge - from stripe._stripe_client import StripeClient - - -class V1ChargeRefundedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.charge.refunded" - type: Literal["v1.charge.refunded"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ChargeRefundedEvent": - return cast( - "V1ChargeRefundedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Charge": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ChargeRefundedEvent": - return cast( - "V1ChargeRefundedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Charge": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ChargeRefundedEvent(Event): - LOOKUP_TYPE = "v1.charge.refunded" - type: Literal["v1.charge.refunded"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Charge": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Charge", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_charge_succeeded_event.py b/stripe/events/_v1_charge_succeeded_event.py deleted file mode 100644 index 9f88eff73..000000000 --- a/stripe/events/_v1_charge_succeeded_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._charge import Charge - from stripe._stripe_client import StripeClient - - -class V1ChargeSucceededEventNotification(EventNotification): - LOOKUP_TYPE = "v1.charge.succeeded" - type: Literal["v1.charge.succeeded"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ChargeSucceededEvent": - return cast( - "V1ChargeSucceededEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Charge": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ChargeSucceededEvent": - return cast( - "V1ChargeSucceededEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Charge": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ChargeSucceededEvent(Event): - LOOKUP_TYPE = "v1.charge.succeeded" - type: Literal["v1.charge.succeeded"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Charge": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Charge", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_charge_updated_event.py b/stripe/events/_v1_charge_updated_event.py deleted file mode 100644 index 1cd4f6e8f..000000000 --- a/stripe/events/_v1_charge_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._charge import Charge - from stripe._stripe_client import StripeClient - - -class V1ChargeUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.charge.updated" - type: Literal["v1.charge.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ChargeUpdatedEvent": - return cast( - "V1ChargeUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Charge": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ChargeUpdatedEvent": - return cast( - "V1ChargeUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Charge": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Charge", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ChargeUpdatedEvent(Event): - LOOKUP_TYPE = "v1.charge.updated" - type: Literal["v1.charge.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Charge": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Charge", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_checkout_session_async_payment_failed_event.py b/stripe/events/_v1_checkout_session_async_payment_failed_event.py deleted file mode 100644 index 264d15b9e..000000000 --- a/stripe/events/_v1_checkout_session_async_payment_failed_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.checkout._session import Session - - -class V1CheckoutSessionAsyncPaymentFailedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.checkout.session.async_payment_failed" - type: Literal["v1.checkout.session.async_payment_failed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CheckoutSessionAsyncPaymentFailedEvent": - return cast( - "V1CheckoutSessionAsyncPaymentFailedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Session": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Session", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1CheckoutSessionAsyncPaymentFailedEvent": - return cast( - "V1CheckoutSessionAsyncPaymentFailedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Session": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Session", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CheckoutSessionAsyncPaymentFailedEvent(Event): - LOOKUP_TYPE = "v1.checkout.session.async_payment_failed" - type: Literal["v1.checkout.session.async_payment_failed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Session": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Session", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_checkout_session_async_payment_succeeded_event.py b/stripe/events/_v1_checkout_session_async_payment_succeeded_event.py deleted file mode 100644 index 88405b290..000000000 --- a/stripe/events/_v1_checkout_session_async_payment_succeeded_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.checkout._session import Session - - -class V1CheckoutSessionAsyncPaymentSucceededEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.checkout.session.async_payment_succeeded" - type: Literal["v1.checkout.session.async_payment_succeeded"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CheckoutSessionAsyncPaymentSucceededEvent": - return cast( - "V1CheckoutSessionAsyncPaymentSucceededEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Session": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Session", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1CheckoutSessionAsyncPaymentSucceededEvent": - return cast( - "V1CheckoutSessionAsyncPaymentSucceededEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Session": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Session", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CheckoutSessionAsyncPaymentSucceededEvent(Event): - LOOKUP_TYPE = "v1.checkout.session.async_payment_succeeded" - type: Literal["v1.checkout.session.async_payment_succeeded"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Session": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Session", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_checkout_session_completed_event.py b/stripe/events/_v1_checkout_session_completed_event.py deleted file mode 100644 index a56e1fc35..000000000 --- a/stripe/events/_v1_checkout_session_completed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.checkout._session import Session - - -class V1CheckoutSessionCompletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.checkout.session.completed" - type: Literal["v1.checkout.session.completed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CheckoutSessionCompletedEvent": - return cast( - "V1CheckoutSessionCompletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Session": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Session", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CheckoutSessionCompletedEvent": - return cast( - "V1CheckoutSessionCompletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Session": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Session", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CheckoutSessionCompletedEvent(Event): - LOOKUP_TYPE = "v1.checkout.session.completed" - type: Literal["v1.checkout.session.completed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Session": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Session", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_checkout_session_expired_event.py b/stripe/events/_v1_checkout_session_expired_event.py deleted file mode 100644 index cca35fee0..000000000 --- a/stripe/events/_v1_checkout_session_expired_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.checkout._session import Session - - -class V1CheckoutSessionExpiredEventNotification(EventNotification): - LOOKUP_TYPE = "v1.checkout.session.expired" - type: Literal["v1.checkout.session.expired"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CheckoutSessionExpiredEvent": - return cast( - "V1CheckoutSessionExpiredEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Session": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Session", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CheckoutSessionExpiredEvent": - return cast( - "V1CheckoutSessionExpiredEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Session": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Session", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CheckoutSessionExpiredEvent(Event): - LOOKUP_TYPE = "v1.checkout.session.expired" - type: Literal["v1.checkout.session.expired"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Session": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Session", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_climate_order_canceled_event.py b/stripe/events/_v1_climate_order_canceled_event.py deleted file mode 100644 index 7bcb12f07..000000000 --- a/stripe/events/_v1_climate_order_canceled_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.climate._order import Order - - -class V1ClimateOrderCanceledEventNotification(EventNotification): - LOOKUP_TYPE = "v1.climate.order.canceled" - type: Literal["v1.climate.order.canceled"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ClimateOrderCanceledEvent": - return cast( - "V1ClimateOrderCanceledEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Order": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Order", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ClimateOrderCanceledEvent": - return cast( - "V1ClimateOrderCanceledEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Order": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Order", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ClimateOrderCanceledEvent(Event): - LOOKUP_TYPE = "v1.climate.order.canceled" - type: Literal["v1.climate.order.canceled"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Order": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Order", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_climate_order_created_event.py b/stripe/events/_v1_climate_order_created_event.py deleted file mode 100644 index 4810d0ccd..000000000 --- a/stripe/events/_v1_climate_order_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.climate._order import Order - - -class V1ClimateOrderCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.climate.order.created" - type: Literal["v1.climate.order.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ClimateOrderCreatedEvent": - return cast( - "V1ClimateOrderCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Order": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Order", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ClimateOrderCreatedEvent": - return cast( - "V1ClimateOrderCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Order": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Order", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ClimateOrderCreatedEvent(Event): - LOOKUP_TYPE = "v1.climate.order.created" - type: Literal["v1.climate.order.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Order": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Order", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_climate_order_delayed_event.py b/stripe/events/_v1_climate_order_delayed_event.py deleted file mode 100644 index 115ca34d4..000000000 --- a/stripe/events/_v1_climate_order_delayed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.climate._order import Order - - -class V1ClimateOrderDelayedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.climate.order.delayed" - type: Literal["v1.climate.order.delayed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ClimateOrderDelayedEvent": - return cast( - "V1ClimateOrderDelayedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Order": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Order", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ClimateOrderDelayedEvent": - return cast( - "V1ClimateOrderDelayedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Order": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Order", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ClimateOrderDelayedEvent(Event): - LOOKUP_TYPE = "v1.climate.order.delayed" - type: Literal["v1.climate.order.delayed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Order": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Order", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_climate_order_delivered_event.py b/stripe/events/_v1_climate_order_delivered_event.py deleted file mode 100644 index a83298ac0..000000000 --- a/stripe/events/_v1_climate_order_delivered_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.climate._order import Order - - -class V1ClimateOrderDeliveredEventNotification(EventNotification): - LOOKUP_TYPE = "v1.climate.order.delivered" - type: Literal["v1.climate.order.delivered"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ClimateOrderDeliveredEvent": - return cast( - "V1ClimateOrderDeliveredEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Order": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Order", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ClimateOrderDeliveredEvent": - return cast( - "V1ClimateOrderDeliveredEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Order": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Order", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ClimateOrderDeliveredEvent(Event): - LOOKUP_TYPE = "v1.climate.order.delivered" - type: Literal["v1.climate.order.delivered"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Order": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Order", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_climate_order_product_substituted_event.py b/stripe/events/_v1_climate_order_product_substituted_event.py deleted file mode 100644 index a5b647177..000000000 --- a/stripe/events/_v1_climate_order_product_substituted_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.climate._order import Order - - -class V1ClimateOrderProductSubstitutedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.climate.order.product_substituted" - type: Literal["v1.climate.order.product_substituted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ClimateOrderProductSubstitutedEvent": - return cast( - "V1ClimateOrderProductSubstitutedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Order": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Order", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1ClimateOrderProductSubstitutedEvent": - return cast( - "V1ClimateOrderProductSubstitutedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Order": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Order", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ClimateOrderProductSubstitutedEvent(Event): - LOOKUP_TYPE = "v1.climate.order.product_substituted" - type: Literal["v1.climate.order.product_substituted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Order": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Order", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_climate_product_created_event.py b/stripe/events/_v1_climate_product_created_event.py deleted file mode 100644 index 35f9a10d2..000000000 --- a/stripe/events/_v1_climate_product_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.climate._product import Product - - -class V1ClimateProductCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.climate.product.created" - type: Literal["v1.climate.product.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ClimateProductCreatedEvent": - return cast( - "V1ClimateProductCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Product": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Product", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ClimateProductCreatedEvent": - return cast( - "V1ClimateProductCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Product": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Product", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ClimateProductCreatedEvent(Event): - LOOKUP_TYPE = "v1.climate.product.created" - type: Literal["v1.climate.product.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Product": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Product", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_climate_product_pricing_updated_event.py b/stripe/events/_v1_climate_product_pricing_updated_event.py deleted file mode 100644 index 80861fc03..000000000 --- a/stripe/events/_v1_climate_product_pricing_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.climate._product import Product - - -class V1ClimateProductPricingUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.climate.product.pricing_updated" - type: Literal["v1.climate.product.pricing_updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ClimateProductPricingUpdatedEvent": - return cast( - "V1ClimateProductPricingUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Product": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Product", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ClimateProductPricingUpdatedEvent": - return cast( - "V1ClimateProductPricingUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Product": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Product", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ClimateProductPricingUpdatedEvent(Event): - LOOKUP_TYPE = "v1.climate.product.pricing_updated" - type: Literal["v1.climate.product.pricing_updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Product": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Product", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_coupon_created_event.py b/stripe/events/_v1_coupon_created_event.py deleted file mode 100644 index a09454b17..000000000 --- a/stripe/events/_v1_coupon_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._coupon import Coupon - from stripe._stripe_client import StripeClient - - -class V1CouponCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.coupon.created" - type: Literal["v1.coupon.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CouponCreatedEvent": - return cast( - "V1CouponCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Coupon": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Coupon", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CouponCreatedEvent": - return cast( - "V1CouponCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Coupon": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Coupon", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CouponCreatedEvent(Event): - LOOKUP_TYPE = "v1.coupon.created" - type: Literal["v1.coupon.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Coupon": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Coupon", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_coupon_deleted_event.py b/stripe/events/_v1_coupon_deleted_event.py deleted file mode 100644 index 0a0b61a3b..000000000 --- a/stripe/events/_v1_coupon_deleted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._coupon import Coupon - from stripe._stripe_client import StripeClient - - -class V1CouponDeletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.coupon.deleted" - type: Literal["v1.coupon.deleted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CouponDeletedEvent": - return cast( - "V1CouponDeletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Coupon": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Coupon", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CouponDeletedEvent": - return cast( - "V1CouponDeletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Coupon": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Coupon", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CouponDeletedEvent(Event): - LOOKUP_TYPE = "v1.coupon.deleted" - type: Literal["v1.coupon.deleted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Coupon": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Coupon", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_coupon_updated_event.py b/stripe/events/_v1_coupon_updated_event.py deleted file mode 100644 index 0c02fe1e2..000000000 --- a/stripe/events/_v1_coupon_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._coupon import Coupon - from stripe._stripe_client import StripeClient - - -class V1CouponUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.coupon.updated" - type: Literal["v1.coupon.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CouponUpdatedEvent": - return cast( - "V1CouponUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Coupon": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Coupon", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CouponUpdatedEvent": - return cast( - "V1CouponUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Coupon": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Coupon", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CouponUpdatedEvent(Event): - LOOKUP_TYPE = "v1.coupon.updated" - type: Literal["v1.coupon.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Coupon": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Coupon", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_credit_note_created_event.py b/stripe/events/_v1_credit_note_created_event.py deleted file mode 100644 index 36e61f581..000000000 --- a/stripe/events/_v1_credit_note_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._credit_note import CreditNote - from stripe._stripe_client import StripeClient - - -class V1CreditNoteCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.credit_note.created" - type: Literal["v1.credit_note.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CreditNoteCreatedEvent": - return cast( - "V1CreditNoteCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "CreditNote": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "CreditNote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CreditNoteCreatedEvent": - return cast( - "V1CreditNoteCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "CreditNote": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "CreditNote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CreditNoteCreatedEvent(Event): - LOOKUP_TYPE = "v1.credit_note.created" - type: Literal["v1.credit_note.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "CreditNote": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "CreditNote", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_credit_note_updated_event.py b/stripe/events/_v1_credit_note_updated_event.py deleted file mode 100644 index fea69d90a..000000000 --- a/stripe/events/_v1_credit_note_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._credit_note import CreditNote - from stripe._stripe_client import StripeClient - - -class V1CreditNoteUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.credit_note.updated" - type: Literal["v1.credit_note.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CreditNoteUpdatedEvent": - return cast( - "V1CreditNoteUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "CreditNote": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "CreditNote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CreditNoteUpdatedEvent": - return cast( - "V1CreditNoteUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "CreditNote": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "CreditNote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CreditNoteUpdatedEvent(Event): - LOOKUP_TYPE = "v1.credit_note.updated" - type: Literal["v1.credit_note.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "CreditNote": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "CreditNote", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_credit_note_voided_event.py b/stripe/events/_v1_credit_note_voided_event.py deleted file mode 100644 index 1da7b5d96..000000000 --- a/stripe/events/_v1_credit_note_voided_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._credit_note import CreditNote - from stripe._stripe_client import StripeClient - - -class V1CreditNoteVoidedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.credit_note.voided" - type: Literal["v1.credit_note.voided"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CreditNoteVoidedEvent": - return cast( - "V1CreditNoteVoidedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "CreditNote": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "CreditNote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CreditNoteVoidedEvent": - return cast( - "V1CreditNoteVoidedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "CreditNote": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "CreditNote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CreditNoteVoidedEvent(Event): - LOOKUP_TYPE = "v1.credit_note.voided" - type: Literal["v1.credit_note.voided"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "CreditNote": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "CreditNote", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_created_event.py b/stripe/events/_v1_customer_created_event.py deleted file mode 100644 index 95a16733b..000000000 --- a/stripe/events/_v1_customer_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._customer import Customer - from stripe._stripe_client import StripeClient - - -class V1CustomerCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.customer.created" - type: Literal["v1.customer.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerCreatedEvent": - return cast( - "V1CustomerCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Customer": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Customer", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CustomerCreatedEvent": - return cast( - "V1CustomerCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Customer": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Customer", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerCreatedEvent(Event): - LOOKUP_TYPE = "v1.customer.created" - type: Literal["v1.customer.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Customer": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Customer", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_deleted_event.py b/stripe/events/_v1_customer_deleted_event.py deleted file mode 100644 index ea529a73a..000000000 --- a/stripe/events/_v1_customer_deleted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._customer import Customer - from stripe._stripe_client import StripeClient - - -class V1CustomerDeletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.customer.deleted" - type: Literal["v1.customer.deleted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerDeletedEvent": - return cast( - "V1CustomerDeletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Customer": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Customer", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CustomerDeletedEvent": - return cast( - "V1CustomerDeletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Customer": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Customer", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerDeletedEvent(Event): - LOOKUP_TYPE = "v1.customer.deleted" - type: Literal["v1.customer.deleted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Customer": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Customer", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_subscription_created_event.py b/stripe/events/_v1_customer_subscription_created_event.py deleted file mode 100644 index 527aa0c64..000000000 --- a/stripe/events/_v1_customer_subscription_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription import Subscription - - -class V1CustomerSubscriptionCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.customer.subscription.created" - type: Literal["v1.customer.subscription.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerSubscriptionCreatedEvent": - return cast( - "V1CustomerSubscriptionCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Subscription": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CustomerSubscriptionCreatedEvent": - return cast( - "V1CustomerSubscriptionCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Subscription": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerSubscriptionCreatedEvent(Event): - LOOKUP_TYPE = "v1.customer.subscription.created" - type: Literal["v1.customer.subscription.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Subscription": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Subscription", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_subscription_deleted_event.py b/stripe/events/_v1_customer_subscription_deleted_event.py deleted file mode 100644 index d5e106373..000000000 --- a/stripe/events/_v1_customer_subscription_deleted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription import Subscription - - -class V1CustomerSubscriptionDeletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.customer.subscription.deleted" - type: Literal["v1.customer.subscription.deleted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerSubscriptionDeletedEvent": - return cast( - "V1CustomerSubscriptionDeletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Subscription": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CustomerSubscriptionDeletedEvent": - return cast( - "V1CustomerSubscriptionDeletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Subscription": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerSubscriptionDeletedEvent(Event): - LOOKUP_TYPE = "v1.customer.subscription.deleted" - type: Literal["v1.customer.subscription.deleted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Subscription": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Subscription", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_subscription_paused_event.py b/stripe/events/_v1_customer_subscription_paused_event.py deleted file mode 100644 index 724298317..000000000 --- a/stripe/events/_v1_customer_subscription_paused_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription import Subscription - - -class V1CustomerSubscriptionPausedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.customer.subscription.paused" - type: Literal["v1.customer.subscription.paused"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerSubscriptionPausedEvent": - return cast( - "V1CustomerSubscriptionPausedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Subscription": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CustomerSubscriptionPausedEvent": - return cast( - "V1CustomerSubscriptionPausedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Subscription": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerSubscriptionPausedEvent(Event): - LOOKUP_TYPE = "v1.customer.subscription.paused" - type: Literal["v1.customer.subscription.paused"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Subscription": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Subscription", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_subscription_pending_update_applied_event.py b/stripe/events/_v1_customer_subscription_pending_update_applied_event.py deleted file mode 100644 index 6d3f6320e..000000000 --- a/stripe/events/_v1_customer_subscription_pending_update_applied_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription import Subscription - - -class V1CustomerSubscriptionPendingUpdateAppliedEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.customer.subscription.pending_update_applied" - type: Literal["v1.customer.subscription.pending_update_applied"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerSubscriptionPendingUpdateAppliedEvent": - return cast( - "V1CustomerSubscriptionPendingUpdateAppliedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Subscription": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1CustomerSubscriptionPendingUpdateAppliedEvent": - return cast( - "V1CustomerSubscriptionPendingUpdateAppliedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Subscription": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerSubscriptionPendingUpdateAppliedEvent(Event): - LOOKUP_TYPE = "v1.customer.subscription.pending_update_applied" - type: Literal["v1.customer.subscription.pending_update_applied"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Subscription": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Subscription", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_subscription_pending_update_expired_event.py b/stripe/events/_v1_customer_subscription_pending_update_expired_event.py deleted file mode 100644 index 8f9ba6da0..000000000 --- a/stripe/events/_v1_customer_subscription_pending_update_expired_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription import Subscription - - -class V1CustomerSubscriptionPendingUpdateExpiredEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.customer.subscription.pending_update_expired" - type: Literal["v1.customer.subscription.pending_update_expired"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerSubscriptionPendingUpdateExpiredEvent": - return cast( - "V1CustomerSubscriptionPendingUpdateExpiredEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Subscription": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1CustomerSubscriptionPendingUpdateExpiredEvent": - return cast( - "V1CustomerSubscriptionPendingUpdateExpiredEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Subscription": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerSubscriptionPendingUpdateExpiredEvent(Event): - LOOKUP_TYPE = "v1.customer.subscription.pending_update_expired" - type: Literal["v1.customer.subscription.pending_update_expired"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Subscription": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Subscription", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_subscription_resumed_event.py b/stripe/events/_v1_customer_subscription_resumed_event.py deleted file mode 100644 index 0cc515255..000000000 --- a/stripe/events/_v1_customer_subscription_resumed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription import Subscription - - -class V1CustomerSubscriptionResumedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.customer.subscription.resumed" - type: Literal["v1.customer.subscription.resumed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerSubscriptionResumedEvent": - return cast( - "V1CustomerSubscriptionResumedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Subscription": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CustomerSubscriptionResumedEvent": - return cast( - "V1CustomerSubscriptionResumedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Subscription": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerSubscriptionResumedEvent(Event): - LOOKUP_TYPE = "v1.customer.subscription.resumed" - type: Literal["v1.customer.subscription.resumed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Subscription": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Subscription", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_subscription_trial_will_end_event.py b/stripe/events/_v1_customer_subscription_trial_will_end_event.py deleted file mode 100644 index 8960808a6..000000000 --- a/stripe/events/_v1_customer_subscription_trial_will_end_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription import Subscription - - -class V1CustomerSubscriptionTrialWillEndEventNotification(EventNotification): - LOOKUP_TYPE = "v1.customer.subscription.trial_will_end" - type: Literal["v1.customer.subscription.trial_will_end"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerSubscriptionTrialWillEndEvent": - return cast( - "V1CustomerSubscriptionTrialWillEndEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Subscription": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1CustomerSubscriptionTrialWillEndEvent": - return cast( - "V1CustomerSubscriptionTrialWillEndEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Subscription": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerSubscriptionTrialWillEndEvent(Event): - LOOKUP_TYPE = "v1.customer.subscription.trial_will_end" - type: Literal["v1.customer.subscription.trial_will_end"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Subscription": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Subscription", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_subscription_updated_event.py b/stripe/events/_v1_customer_subscription_updated_event.py deleted file mode 100644 index b8b6570a4..000000000 --- a/stripe/events/_v1_customer_subscription_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription import Subscription - - -class V1CustomerSubscriptionUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.customer.subscription.updated" - type: Literal["v1.customer.subscription.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerSubscriptionUpdatedEvent": - return cast( - "V1CustomerSubscriptionUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Subscription": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CustomerSubscriptionUpdatedEvent": - return cast( - "V1CustomerSubscriptionUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Subscription": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Subscription", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerSubscriptionUpdatedEvent(Event): - LOOKUP_TYPE = "v1.customer.subscription.updated" - type: Literal["v1.customer.subscription.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Subscription": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Subscription", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_tax_id_created_event.py b/stripe/events/_v1_customer_tax_id_created_event.py deleted file mode 100644 index 9a33374b1..000000000 --- a/stripe/events/_v1_customer_tax_id_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._tax_id import TaxId - - -class V1CustomerTaxIdCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.customer.tax_id.created" - type: Literal["v1.customer.tax_id.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerTaxIdCreatedEvent": - return cast( - "V1CustomerTaxIdCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "TaxId": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TaxId", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CustomerTaxIdCreatedEvent": - return cast( - "V1CustomerTaxIdCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "TaxId": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TaxId", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerTaxIdCreatedEvent(Event): - LOOKUP_TYPE = "v1.customer.tax_id.created" - type: Literal["v1.customer.tax_id.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "TaxId": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "TaxId", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_tax_id_deleted_event.py b/stripe/events/_v1_customer_tax_id_deleted_event.py deleted file mode 100644 index e636b4b2d..000000000 --- a/stripe/events/_v1_customer_tax_id_deleted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._tax_id import TaxId - - -class V1CustomerTaxIdDeletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.customer.tax_id.deleted" - type: Literal["v1.customer.tax_id.deleted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerTaxIdDeletedEvent": - return cast( - "V1CustomerTaxIdDeletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "TaxId": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TaxId", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CustomerTaxIdDeletedEvent": - return cast( - "V1CustomerTaxIdDeletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "TaxId": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TaxId", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerTaxIdDeletedEvent(Event): - LOOKUP_TYPE = "v1.customer.tax_id.deleted" - type: Literal["v1.customer.tax_id.deleted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "TaxId": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "TaxId", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_tax_id_updated_event.py b/stripe/events/_v1_customer_tax_id_updated_event.py deleted file mode 100644 index 8995f2d11..000000000 --- a/stripe/events/_v1_customer_tax_id_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._tax_id import TaxId - - -class V1CustomerTaxIdUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.customer.tax_id.updated" - type: Literal["v1.customer.tax_id.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerTaxIdUpdatedEvent": - return cast( - "V1CustomerTaxIdUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "TaxId": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TaxId", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CustomerTaxIdUpdatedEvent": - return cast( - "V1CustomerTaxIdUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "TaxId": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TaxId", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerTaxIdUpdatedEvent(Event): - LOOKUP_TYPE = "v1.customer.tax_id.updated" - type: Literal["v1.customer.tax_id.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "TaxId": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "TaxId", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_customer_updated_event.py b/stripe/events/_v1_customer_updated_event.py deleted file mode 100644 index 4a8b7a2d2..000000000 --- a/stripe/events/_v1_customer_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._customer import Customer - from stripe._stripe_client import StripeClient - - -class V1CustomerUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.customer.updated" - type: Literal["v1.customer.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1CustomerUpdatedEvent": - return cast( - "V1CustomerUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Customer": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Customer", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1CustomerUpdatedEvent": - return cast( - "V1CustomerUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Customer": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Customer", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1CustomerUpdatedEvent(Event): - LOOKUP_TYPE = "v1.customer.updated" - type: Literal["v1.customer.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Customer": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Customer", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_file_created_event.py b/stripe/events/_v1_file_created_event.py deleted file mode 100644 index 28914a28c..000000000 --- a/stripe/events/_v1_file_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._file import File - from stripe._stripe_client import StripeClient - - -class V1FileCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.file.created" - type: Literal["v1.file.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1FileCreatedEvent": - return cast( - "V1FileCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "File": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "File", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1FileCreatedEvent": - return cast( - "V1FileCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "File": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "File", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1FileCreatedEvent(Event): - LOOKUP_TYPE = "v1.file.created" - type: Literal["v1.file.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "File": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "File", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_financial_connections_account_created_event.py b/stripe/events/_v1_financial_connections_account_created_event.py deleted file mode 100644 index 1dfe04276..000000000 --- a/stripe/events/_v1_financial_connections_account_created_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.financial_connections._account import Account - - -class V1FinancialConnectionsAccountCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.financial_connections.account.created" - type: Literal["v1.financial_connections.account.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1FinancialConnectionsAccountCreatedEvent": - return cast( - "V1FinancialConnectionsAccountCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Account": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Account", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1FinancialConnectionsAccountCreatedEvent": - return cast( - "V1FinancialConnectionsAccountCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Account": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Account", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1FinancialConnectionsAccountCreatedEvent(Event): - LOOKUP_TYPE = "v1.financial_connections.account.created" - type: Literal["v1.financial_connections.account.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Account": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Account", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_financial_connections_account_deactivated_event.py b/stripe/events/_v1_financial_connections_account_deactivated_event.py deleted file mode 100644 index 87a5b4561..000000000 --- a/stripe/events/_v1_financial_connections_account_deactivated_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.financial_connections._account import Account - - -class V1FinancialConnectionsAccountDeactivatedEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.financial_connections.account.deactivated" - type: Literal["v1.financial_connections.account.deactivated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1FinancialConnectionsAccountDeactivatedEvent": - return cast( - "V1FinancialConnectionsAccountDeactivatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Account": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Account", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1FinancialConnectionsAccountDeactivatedEvent": - return cast( - "V1FinancialConnectionsAccountDeactivatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Account": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Account", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1FinancialConnectionsAccountDeactivatedEvent(Event): - LOOKUP_TYPE = "v1.financial_connections.account.deactivated" - type: Literal["v1.financial_connections.account.deactivated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Account": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Account", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_financial_connections_account_disconnected_event.py b/stripe/events/_v1_financial_connections_account_disconnected_event.py deleted file mode 100644 index ee103da30..000000000 --- a/stripe/events/_v1_financial_connections_account_disconnected_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.financial_connections._account import Account - - -class V1FinancialConnectionsAccountDisconnectedEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.financial_connections.account.disconnected" - type: Literal["v1.financial_connections.account.disconnected"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1FinancialConnectionsAccountDisconnectedEvent": - return cast( - "V1FinancialConnectionsAccountDisconnectedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Account": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Account", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1FinancialConnectionsAccountDisconnectedEvent": - return cast( - "V1FinancialConnectionsAccountDisconnectedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Account": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Account", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1FinancialConnectionsAccountDisconnectedEvent(Event): - LOOKUP_TYPE = "v1.financial_connections.account.disconnected" - type: Literal["v1.financial_connections.account.disconnected"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Account": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Account", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_financial_connections_account_refreshed_ownership_event.py b/stripe/events/_v1_financial_connections_account_refreshed_ownership_event.py deleted file mode 100644 index 6c492f982..000000000 --- a/stripe/events/_v1_financial_connections_account_refreshed_ownership_event.py +++ /dev/null @@ -1,114 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.financial_connections._account import Account - - -class V1FinancialConnectionsAccountRefreshedOwnershipEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.financial_connections.account.refreshed_ownership" - type: Literal["v1.financial_connections.account.refreshed_ownership"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event( - self, - ) -> "V1FinancialConnectionsAccountRefreshedOwnershipEvent": - return cast( - "V1FinancialConnectionsAccountRefreshedOwnershipEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Account": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Account", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1FinancialConnectionsAccountRefreshedOwnershipEvent": - return cast( - "V1FinancialConnectionsAccountRefreshedOwnershipEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Account": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Account", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1FinancialConnectionsAccountRefreshedOwnershipEvent(Event): - LOOKUP_TYPE = "v1.financial_connections.account.refreshed_ownership" - type: Literal["v1.financial_connections.account.refreshed_ownership"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Account": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Account", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_financial_connections_account_refreshed_transactions_event.py b/stripe/events/_v1_financial_connections_account_refreshed_transactions_event.py deleted file mode 100644 index 1a4513ecc..000000000 --- a/stripe/events/_v1_financial_connections_account_refreshed_transactions_event.py +++ /dev/null @@ -1,114 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.financial_connections._account import Account - - -class V1FinancialConnectionsAccountRefreshedTransactionsEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.financial_connections.account.refreshed_transactions" - type: Literal["v1.financial_connections.account.refreshed_transactions"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event( - self, - ) -> "V1FinancialConnectionsAccountRefreshedTransactionsEvent": - return cast( - "V1FinancialConnectionsAccountRefreshedTransactionsEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Account": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Account", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1FinancialConnectionsAccountRefreshedTransactionsEvent": - return cast( - "V1FinancialConnectionsAccountRefreshedTransactionsEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Account": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Account", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1FinancialConnectionsAccountRefreshedTransactionsEvent(Event): - LOOKUP_TYPE = "v1.financial_connections.account.refreshed_transactions" - type: Literal["v1.financial_connections.account.refreshed_transactions"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Account": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Account", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_identity_verification_session_canceled_event.py b/stripe/events/_v1_identity_verification_session_canceled_event.py deleted file mode 100644 index 5093242a3..000000000 --- a/stripe/events/_v1_identity_verification_session_canceled_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.identity._verification_session import VerificationSession - - -class V1IdentityVerificationSessionCanceledEventNotification( - EventNotification -): - LOOKUP_TYPE = "v1.identity.verification_session.canceled" - type: Literal["v1.identity.verification_session.canceled"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IdentityVerificationSessionCanceledEvent": - return cast( - "V1IdentityVerificationSessionCanceledEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "VerificationSession": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "VerificationSession", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1IdentityVerificationSessionCanceledEvent": - return cast( - "V1IdentityVerificationSessionCanceledEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "VerificationSession": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "VerificationSession", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IdentityVerificationSessionCanceledEvent(Event): - LOOKUP_TYPE = "v1.identity.verification_session.canceled" - type: Literal["v1.identity.verification_session.canceled"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "VerificationSession": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "VerificationSession", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_identity_verification_session_created_event.py b/stripe/events/_v1_identity_verification_session_created_event.py deleted file mode 100644 index 8405d10b5..000000000 --- a/stripe/events/_v1_identity_verification_session_created_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.identity._verification_session import VerificationSession - - -class V1IdentityVerificationSessionCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.identity.verification_session.created" - type: Literal["v1.identity.verification_session.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IdentityVerificationSessionCreatedEvent": - return cast( - "V1IdentityVerificationSessionCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "VerificationSession": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "VerificationSession", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1IdentityVerificationSessionCreatedEvent": - return cast( - "V1IdentityVerificationSessionCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "VerificationSession": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "VerificationSession", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IdentityVerificationSessionCreatedEvent(Event): - LOOKUP_TYPE = "v1.identity.verification_session.created" - type: Literal["v1.identity.verification_session.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "VerificationSession": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "VerificationSession", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_identity_verification_session_processing_event.py b/stripe/events/_v1_identity_verification_session_processing_event.py deleted file mode 100644 index f844b8c13..000000000 --- a/stripe/events/_v1_identity_verification_session_processing_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.identity._verification_session import VerificationSession - - -class V1IdentityVerificationSessionProcessingEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.identity.verification_session.processing" - type: Literal["v1.identity.verification_session.processing"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IdentityVerificationSessionProcessingEvent": - return cast( - "V1IdentityVerificationSessionProcessingEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "VerificationSession": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "VerificationSession", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1IdentityVerificationSessionProcessingEvent": - return cast( - "V1IdentityVerificationSessionProcessingEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "VerificationSession": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "VerificationSession", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IdentityVerificationSessionProcessingEvent(Event): - LOOKUP_TYPE = "v1.identity.verification_session.processing" - type: Literal["v1.identity.verification_session.processing"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "VerificationSession": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "VerificationSession", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_identity_verification_session_redacted_event.py b/stripe/events/_v1_identity_verification_session_redacted_event.py deleted file mode 100644 index 396b43978..000000000 --- a/stripe/events/_v1_identity_verification_session_redacted_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.identity._verification_session import VerificationSession - - -class V1IdentityVerificationSessionRedactedEventNotification( - EventNotification -): - LOOKUP_TYPE = "v1.identity.verification_session.redacted" - type: Literal["v1.identity.verification_session.redacted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IdentityVerificationSessionRedactedEvent": - return cast( - "V1IdentityVerificationSessionRedactedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "VerificationSession": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "VerificationSession", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1IdentityVerificationSessionRedactedEvent": - return cast( - "V1IdentityVerificationSessionRedactedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "VerificationSession": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "VerificationSession", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IdentityVerificationSessionRedactedEvent(Event): - LOOKUP_TYPE = "v1.identity.verification_session.redacted" - type: Literal["v1.identity.verification_session.redacted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "VerificationSession": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "VerificationSession", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_identity_verification_session_requires_input_event.py b/stripe/events/_v1_identity_verification_session_requires_input_event.py deleted file mode 100644 index 2d36b36a6..000000000 --- a/stripe/events/_v1_identity_verification_session_requires_input_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.identity._verification_session import VerificationSession - - -class V1IdentityVerificationSessionRequiresInputEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.identity.verification_session.requires_input" - type: Literal["v1.identity.verification_session.requires_input"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IdentityVerificationSessionRequiresInputEvent": - return cast( - "V1IdentityVerificationSessionRequiresInputEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "VerificationSession": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "VerificationSession", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1IdentityVerificationSessionRequiresInputEvent": - return cast( - "V1IdentityVerificationSessionRequiresInputEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "VerificationSession": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "VerificationSession", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IdentityVerificationSessionRequiresInputEvent(Event): - LOOKUP_TYPE = "v1.identity.verification_session.requires_input" - type: Literal["v1.identity.verification_session.requires_input"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "VerificationSession": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "VerificationSession", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_identity_verification_session_verified_event.py b/stripe/events/_v1_identity_verification_session_verified_event.py deleted file mode 100644 index e251a8ba6..000000000 --- a/stripe/events/_v1_identity_verification_session_verified_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.identity._verification_session import VerificationSession - - -class V1IdentityVerificationSessionVerifiedEventNotification( - EventNotification -): - LOOKUP_TYPE = "v1.identity.verification_session.verified" - type: Literal["v1.identity.verification_session.verified"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IdentityVerificationSessionVerifiedEvent": - return cast( - "V1IdentityVerificationSessionVerifiedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "VerificationSession": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "VerificationSession", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1IdentityVerificationSessionVerifiedEvent": - return cast( - "V1IdentityVerificationSessionVerifiedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "VerificationSession": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "VerificationSession", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IdentityVerificationSessionVerifiedEvent(Event): - LOOKUP_TYPE = "v1.identity.verification_session.verified" - type: Literal["v1.identity.verification_session.verified"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "VerificationSession": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "VerificationSession", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_created_event.py b/stripe/events/_v1_invoice_created_event.py deleted file mode 100644 index 0b0cce8ec..000000000 --- a/stripe/events/_v1_invoice_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoiceCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.created" - type: Literal["v1.invoice.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceCreatedEvent": - return cast( - "V1InvoiceCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceCreatedEvent": - return cast( - "V1InvoiceCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceCreatedEvent(Event): - LOOKUP_TYPE = "v1.invoice.created" - type: Literal["v1.invoice.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_deleted_event.py b/stripe/events/_v1_invoice_deleted_event.py deleted file mode 100644 index c4e7a5378..000000000 --- a/stripe/events/_v1_invoice_deleted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoiceDeletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.deleted" - type: Literal["v1.invoice.deleted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceDeletedEvent": - return cast( - "V1InvoiceDeletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceDeletedEvent": - return cast( - "V1InvoiceDeletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceDeletedEvent(Event): - LOOKUP_TYPE = "v1.invoice.deleted" - type: Literal["v1.invoice.deleted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_finalization_failed_event.py b/stripe/events/_v1_invoice_finalization_failed_event.py deleted file mode 100644 index 5e2e30f65..000000000 --- a/stripe/events/_v1_invoice_finalization_failed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoiceFinalizationFailedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.finalization_failed" - type: Literal["v1.invoice.finalization_failed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceFinalizationFailedEvent": - return cast( - "V1InvoiceFinalizationFailedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceFinalizationFailedEvent": - return cast( - "V1InvoiceFinalizationFailedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceFinalizationFailedEvent(Event): - LOOKUP_TYPE = "v1.invoice.finalization_failed" - type: Literal["v1.invoice.finalization_failed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_finalized_event.py b/stripe/events/_v1_invoice_finalized_event.py deleted file mode 100644 index ac52310c2..000000000 --- a/stripe/events/_v1_invoice_finalized_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoiceFinalizedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.finalized" - type: Literal["v1.invoice.finalized"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceFinalizedEvent": - return cast( - "V1InvoiceFinalizedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceFinalizedEvent": - return cast( - "V1InvoiceFinalizedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceFinalizedEvent(Event): - LOOKUP_TYPE = "v1.invoice.finalized" - type: Literal["v1.invoice.finalized"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_marked_uncollectible_event.py b/stripe/events/_v1_invoice_marked_uncollectible_event.py deleted file mode 100644 index 3c6dc80ab..000000000 --- a/stripe/events/_v1_invoice_marked_uncollectible_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoiceMarkedUncollectibleEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.marked_uncollectible" - type: Literal["v1.invoice.marked_uncollectible"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceMarkedUncollectibleEvent": - return cast( - "V1InvoiceMarkedUncollectibleEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceMarkedUncollectibleEvent": - return cast( - "V1InvoiceMarkedUncollectibleEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceMarkedUncollectibleEvent(Event): - LOOKUP_TYPE = "v1.invoice.marked_uncollectible" - type: Literal["v1.invoice.marked_uncollectible"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_overdue_event.py b/stripe/events/_v1_invoice_overdue_event.py deleted file mode 100644 index 5e81f57fb..000000000 --- a/stripe/events/_v1_invoice_overdue_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoiceOverdueEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.overdue" - type: Literal["v1.invoice.overdue"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceOverdueEvent": - return cast( - "V1InvoiceOverdueEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceOverdueEvent": - return cast( - "V1InvoiceOverdueEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceOverdueEvent(Event): - LOOKUP_TYPE = "v1.invoice.overdue" - type: Literal["v1.invoice.overdue"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_overpaid_event.py b/stripe/events/_v1_invoice_overpaid_event.py deleted file mode 100644 index 1bcd1a9bf..000000000 --- a/stripe/events/_v1_invoice_overpaid_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoiceOverpaidEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.overpaid" - type: Literal["v1.invoice.overpaid"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceOverpaidEvent": - return cast( - "V1InvoiceOverpaidEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceOverpaidEvent": - return cast( - "V1InvoiceOverpaidEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceOverpaidEvent(Event): - LOOKUP_TYPE = "v1.invoice.overpaid" - type: Literal["v1.invoice.overpaid"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_paid_event.py b/stripe/events/_v1_invoice_paid_event.py deleted file mode 100644 index 03035a741..000000000 --- a/stripe/events/_v1_invoice_paid_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoicePaidEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.paid" - type: Literal["v1.invoice.paid"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoicePaidEvent": - return cast( - "V1InvoicePaidEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoicePaidEvent": - return cast( - "V1InvoicePaidEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoicePaidEvent(Event): - LOOKUP_TYPE = "v1.invoice.paid" - type: Literal["v1.invoice.paid"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_payment_action_required_event.py b/stripe/events/_v1_invoice_payment_action_required_event.py deleted file mode 100644 index 195b1c088..000000000 --- a/stripe/events/_v1_invoice_payment_action_required_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoicePaymentActionRequiredEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.payment_action_required" - type: Literal["v1.invoice.payment_action_required"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoicePaymentActionRequiredEvent": - return cast( - "V1InvoicePaymentActionRequiredEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoicePaymentActionRequiredEvent": - return cast( - "V1InvoicePaymentActionRequiredEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoicePaymentActionRequiredEvent(Event): - LOOKUP_TYPE = "v1.invoice.payment_action_required" - type: Literal["v1.invoice.payment_action_required"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_payment_failed_event.py b/stripe/events/_v1_invoice_payment_failed_event.py deleted file mode 100644 index 4a82d292a..000000000 --- a/stripe/events/_v1_invoice_payment_failed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoicePaymentFailedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.payment_failed" - type: Literal["v1.invoice.payment_failed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoicePaymentFailedEvent": - return cast( - "V1InvoicePaymentFailedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoicePaymentFailedEvent": - return cast( - "V1InvoicePaymentFailedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoicePaymentFailedEvent(Event): - LOOKUP_TYPE = "v1.invoice.payment_failed" - type: Literal["v1.invoice.payment_failed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_payment_paid_event.py b/stripe/events/_v1_invoice_payment_paid_event.py deleted file mode 100644 index c58d87049..000000000 --- a/stripe/events/_v1_invoice_payment_paid_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice_payment import InvoicePayment - from stripe._stripe_client import StripeClient - - -class V1InvoicePaymentPaidEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice_payment.paid" - type: Literal["v1.invoice_payment.paid"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoicePaymentPaidEvent": - return cast( - "V1InvoicePaymentPaidEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "InvoicePayment": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "InvoicePayment", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoicePaymentPaidEvent": - return cast( - "V1InvoicePaymentPaidEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "InvoicePayment": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "InvoicePayment", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoicePaymentPaidEvent(Event): - LOOKUP_TYPE = "v1.invoice_payment.paid" - type: Literal["v1.invoice_payment.paid"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "InvoicePayment": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "InvoicePayment", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_payment_succeeded_event.py b/stripe/events/_v1_invoice_payment_succeeded_event.py deleted file mode 100644 index bf0969aa4..000000000 --- a/stripe/events/_v1_invoice_payment_succeeded_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoicePaymentSucceededEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.payment_succeeded" - type: Literal["v1.invoice.payment_succeeded"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoicePaymentSucceededEvent": - return cast( - "V1InvoicePaymentSucceededEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoicePaymentSucceededEvent": - return cast( - "V1InvoicePaymentSucceededEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoicePaymentSucceededEvent(Event): - LOOKUP_TYPE = "v1.invoice.payment_succeeded" - type: Literal["v1.invoice.payment_succeeded"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_sent_event.py b/stripe/events/_v1_invoice_sent_event.py deleted file mode 100644 index 50df46216..000000000 --- a/stripe/events/_v1_invoice_sent_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoiceSentEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.sent" - type: Literal["v1.invoice.sent"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceSentEvent": - return cast( - "V1InvoiceSentEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceSentEvent": - return cast( - "V1InvoiceSentEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceSentEvent(Event): - LOOKUP_TYPE = "v1.invoice.sent" - type: Literal["v1.invoice.sent"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_upcoming_event.py b/stripe/events/_v1_invoice_upcoming_event.py deleted file mode 100644 index dc4f3801c..000000000 --- a/stripe/events/_v1_invoice_upcoming_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoiceUpcomingEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.upcoming" - type: Literal["v1.invoice.upcoming"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceUpcomingEvent": - return cast( - "V1InvoiceUpcomingEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceUpcomingEvent": - return cast( - "V1InvoiceUpcomingEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceUpcomingEvent(Event): - LOOKUP_TYPE = "v1.invoice.upcoming" - type: Literal["v1.invoice.upcoming"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_updated_event.py b/stripe/events/_v1_invoice_updated_event.py deleted file mode 100644 index 35aef9553..000000000 --- a/stripe/events/_v1_invoice_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoiceUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.updated" - type: Literal["v1.invoice.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceUpdatedEvent": - return cast( - "V1InvoiceUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceUpdatedEvent": - return cast( - "V1InvoiceUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceUpdatedEvent(Event): - LOOKUP_TYPE = "v1.invoice.updated" - type: Literal["v1.invoice.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_voided_event.py b/stripe/events/_v1_invoice_voided_event.py deleted file mode 100644 index a4fd09c53..000000000 --- a/stripe/events/_v1_invoice_voided_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoiceVoidedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.voided" - type: Literal["v1.invoice.voided"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceVoidedEvent": - return cast( - "V1InvoiceVoidedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceVoidedEvent": - return cast( - "V1InvoiceVoidedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceVoidedEvent(Event): - LOOKUP_TYPE = "v1.invoice.voided" - type: Literal["v1.invoice.voided"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoice_will_be_due_event.py b/stripe/events/_v1_invoice_will_be_due_event.py deleted file mode 100644 index 9cac86a00..000000000 --- a/stripe/events/_v1_invoice_will_be_due_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice import Invoice - from stripe._stripe_client import StripeClient - - -class V1InvoiceWillBeDueEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoice.will_be_due" - type: Literal["v1.invoice.will_be_due"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceWillBeDueEvent": - return cast( - "V1InvoiceWillBeDueEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceWillBeDueEvent": - return cast( - "V1InvoiceWillBeDueEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Invoice": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Invoice", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceWillBeDueEvent(Event): - LOOKUP_TYPE = "v1.invoice.will_be_due" - type: Literal["v1.invoice.will_be_due"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Invoice": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Invoice", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoiceitem_created_event.py b/stripe/events/_v1_invoiceitem_created_event.py deleted file mode 100644 index b046a0917..000000000 --- a/stripe/events/_v1_invoiceitem_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice_item import InvoiceItem - from stripe._stripe_client import StripeClient - - -class V1InvoiceitemCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoiceitem.created" - type: Literal["v1.invoiceitem.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceitemCreatedEvent": - return cast( - "V1InvoiceitemCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "InvoiceItem": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "InvoiceItem", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceitemCreatedEvent": - return cast( - "V1InvoiceitemCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "InvoiceItem": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "InvoiceItem", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceitemCreatedEvent(Event): - LOOKUP_TYPE = "v1.invoiceitem.created" - type: Literal["v1.invoiceitem.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "InvoiceItem": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "InvoiceItem", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_invoiceitem_deleted_event.py b/stripe/events/_v1_invoiceitem_deleted_event.py deleted file mode 100644 index 3dd7207db..000000000 --- a/stripe/events/_v1_invoiceitem_deleted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._invoice_item import InvoiceItem - from stripe._stripe_client import StripeClient - - -class V1InvoiceitemDeletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.invoiceitem.deleted" - type: Literal["v1.invoiceitem.deleted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1InvoiceitemDeletedEvent": - return cast( - "V1InvoiceitemDeletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "InvoiceItem": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "InvoiceItem", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1InvoiceitemDeletedEvent": - return cast( - "V1InvoiceitemDeletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "InvoiceItem": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "InvoiceItem", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1InvoiceitemDeletedEvent(Event): - LOOKUP_TYPE = "v1.invoiceitem.deleted" - type: Literal["v1.invoiceitem.deleted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "InvoiceItem": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "InvoiceItem", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_authorization_created_event.py b/stripe/events/_v1_issuing_authorization_created_event.py deleted file mode 100644 index bb0b30acd..000000000 --- a/stripe/events/_v1_issuing_authorization_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._authorization import Authorization - - -class V1IssuingAuthorizationCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_authorization.created" - type: Literal["v1.issuing_authorization.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingAuthorizationCreatedEvent": - return cast( - "V1IssuingAuthorizationCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Authorization": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Authorization", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingAuthorizationCreatedEvent": - return cast( - "V1IssuingAuthorizationCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Authorization": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Authorization", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingAuthorizationCreatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_authorization.created" - type: Literal["v1.issuing_authorization.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Authorization": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Authorization", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_authorization_request_event.py b/stripe/events/_v1_issuing_authorization_request_event.py deleted file mode 100644 index 3e57bf3bf..000000000 --- a/stripe/events/_v1_issuing_authorization_request_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._authorization import Authorization - - -class V1IssuingAuthorizationRequestEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_authorization.request" - type: Literal["v1.issuing_authorization.request"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingAuthorizationRequestEvent": - return cast( - "V1IssuingAuthorizationRequestEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Authorization": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Authorization", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingAuthorizationRequestEvent": - return cast( - "V1IssuingAuthorizationRequestEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Authorization": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Authorization", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingAuthorizationRequestEvent(Event): - LOOKUP_TYPE = "v1.issuing_authorization.request" - type: Literal["v1.issuing_authorization.request"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Authorization": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Authorization", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_authorization_updated_event.py b/stripe/events/_v1_issuing_authorization_updated_event.py deleted file mode 100644 index 50639f49b..000000000 --- a/stripe/events/_v1_issuing_authorization_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._authorization import Authorization - - -class V1IssuingAuthorizationUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_authorization.updated" - type: Literal["v1.issuing_authorization.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingAuthorizationUpdatedEvent": - return cast( - "V1IssuingAuthorizationUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Authorization": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Authorization", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingAuthorizationUpdatedEvent": - return cast( - "V1IssuingAuthorizationUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Authorization": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Authorization", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingAuthorizationUpdatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_authorization.updated" - type: Literal["v1.issuing_authorization.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Authorization": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Authorization", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_card_created_event.py b/stripe/events/_v1_issuing_card_created_event.py deleted file mode 100644 index 611a10f4e..000000000 --- a/stripe/events/_v1_issuing_card_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._card import Card - - -class V1IssuingCardCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_card.created" - type: Literal["v1.issuing_card.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingCardCreatedEvent": - return cast( - "V1IssuingCardCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Card": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Card", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingCardCreatedEvent": - return cast( - "V1IssuingCardCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Card": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Card", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingCardCreatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_card.created" - type: Literal["v1.issuing_card.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Card": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Card", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_card_updated_event.py b/stripe/events/_v1_issuing_card_updated_event.py deleted file mode 100644 index 68aaa4352..000000000 --- a/stripe/events/_v1_issuing_card_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._card import Card - - -class V1IssuingCardUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_card.updated" - type: Literal["v1.issuing_card.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingCardUpdatedEvent": - return cast( - "V1IssuingCardUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Card": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Card", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingCardUpdatedEvent": - return cast( - "V1IssuingCardUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Card": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Card", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingCardUpdatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_card.updated" - type: Literal["v1.issuing_card.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Card": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Card", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_cardholder_created_event.py b/stripe/events/_v1_issuing_cardholder_created_event.py deleted file mode 100644 index ff63f6892..000000000 --- a/stripe/events/_v1_issuing_cardholder_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._cardholder import Cardholder - - -class V1IssuingCardholderCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_cardholder.created" - type: Literal["v1.issuing_cardholder.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingCardholderCreatedEvent": - return cast( - "V1IssuingCardholderCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Cardholder": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Cardholder", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingCardholderCreatedEvent": - return cast( - "V1IssuingCardholderCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Cardholder": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Cardholder", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingCardholderCreatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_cardholder.created" - type: Literal["v1.issuing_cardholder.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Cardholder": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Cardholder", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_cardholder_updated_event.py b/stripe/events/_v1_issuing_cardholder_updated_event.py deleted file mode 100644 index a4a1239ad..000000000 --- a/stripe/events/_v1_issuing_cardholder_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._cardholder import Cardholder - - -class V1IssuingCardholderUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_cardholder.updated" - type: Literal["v1.issuing_cardholder.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingCardholderUpdatedEvent": - return cast( - "V1IssuingCardholderUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Cardholder": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Cardholder", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingCardholderUpdatedEvent": - return cast( - "V1IssuingCardholderUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Cardholder": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Cardholder", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingCardholderUpdatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_cardholder.updated" - type: Literal["v1.issuing_cardholder.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Cardholder": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Cardholder", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_dispute_closed_event.py b/stripe/events/_v1_issuing_dispute_closed_event.py deleted file mode 100644 index b89edb936..000000000 --- a/stripe/events/_v1_issuing_dispute_closed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._dispute import Dispute - - -class V1IssuingDisputeClosedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_dispute.closed" - type: Literal["v1.issuing_dispute.closed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingDisputeClosedEvent": - return cast( - "V1IssuingDisputeClosedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Dispute": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingDisputeClosedEvent": - return cast( - "V1IssuingDisputeClosedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Dispute": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingDisputeClosedEvent(Event): - LOOKUP_TYPE = "v1.issuing_dispute.closed" - type: Literal["v1.issuing_dispute.closed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Dispute": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Dispute", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_dispute_created_event.py b/stripe/events/_v1_issuing_dispute_created_event.py deleted file mode 100644 index 92bc31165..000000000 --- a/stripe/events/_v1_issuing_dispute_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._dispute import Dispute - - -class V1IssuingDisputeCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_dispute.created" - type: Literal["v1.issuing_dispute.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingDisputeCreatedEvent": - return cast( - "V1IssuingDisputeCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Dispute": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingDisputeCreatedEvent": - return cast( - "V1IssuingDisputeCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Dispute": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingDisputeCreatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_dispute.created" - type: Literal["v1.issuing_dispute.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Dispute": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Dispute", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_dispute_funds_reinstated_event.py b/stripe/events/_v1_issuing_dispute_funds_reinstated_event.py deleted file mode 100644 index ef6dd8bdb..000000000 --- a/stripe/events/_v1_issuing_dispute_funds_reinstated_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._dispute import Dispute - - -class V1IssuingDisputeFundsReinstatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_dispute.funds_reinstated" - type: Literal["v1.issuing_dispute.funds_reinstated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingDisputeFundsReinstatedEvent": - return cast( - "V1IssuingDisputeFundsReinstatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Dispute": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1IssuingDisputeFundsReinstatedEvent": - return cast( - "V1IssuingDisputeFundsReinstatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Dispute": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingDisputeFundsReinstatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_dispute.funds_reinstated" - type: Literal["v1.issuing_dispute.funds_reinstated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Dispute": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Dispute", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_dispute_funds_rescinded_event.py b/stripe/events/_v1_issuing_dispute_funds_rescinded_event.py deleted file mode 100644 index 7df64774a..000000000 --- a/stripe/events/_v1_issuing_dispute_funds_rescinded_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._dispute import Dispute - - -class V1IssuingDisputeFundsRescindedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_dispute.funds_rescinded" - type: Literal["v1.issuing_dispute.funds_rescinded"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingDisputeFundsRescindedEvent": - return cast( - "V1IssuingDisputeFundsRescindedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Dispute": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingDisputeFundsRescindedEvent": - return cast( - "V1IssuingDisputeFundsRescindedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Dispute": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingDisputeFundsRescindedEvent(Event): - LOOKUP_TYPE = "v1.issuing_dispute.funds_rescinded" - type: Literal["v1.issuing_dispute.funds_rescinded"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Dispute": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Dispute", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_dispute_submitted_event.py b/stripe/events/_v1_issuing_dispute_submitted_event.py deleted file mode 100644 index 69d748197..000000000 --- a/stripe/events/_v1_issuing_dispute_submitted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._dispute import Dispute - - -class V1IssuingDisputeSubmittedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_dispute.submitted" - type: Literal["v1.issuing_dispute.submitted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingDisputeSubmittedEvent": - return cast( - "V1IssuingDisputeSubmittedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Dispute": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingDisputeSubmittedEvent": - return cast( - "V1IssuingDisputeSubmittedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Dispute": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingDisputeSubmittedEvent(Event): - LOOKUP_TYPE = "v1.issuing_dispute.submitted" - type: Literal["v1.issuing_dispute.submitted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Dispute": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Dispute", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_dispute_updated_event.py b/stripe/events/_v1_issuing_dispute_updated_event.py deleted file mode 100644 index b25671ce5..000000000 --- a/stripe/events/_v1_issuing_dispute_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._dispute import Dispute - - -class V1IssuingDisputeUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_dispute.updated" - type: Literal["v1.issuing_dispute.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingDisputeUpdatedEvent": - return cast( - "V1IssuingDisputeUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Dispute": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingDisputeUpdatedEvent": - return cast( - "V1IssuingDisputeUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Dispute": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Dispute", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingDisputeUpdatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_dispute.updated" - type: Literal["v1.issuing_dispute.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Dispute": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Dispute", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_personalization_design_activated_event.py b/stripe/events/_v1_issuing_personalization_design_activated_event.py deleted file mode 100644 index ffe8bee10..000000000 --- a/stripe/events/_v1_issuing_personalization_design_activated_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._personalization_design import PersonalizationDesign - - -class V1IssuingPersonalizationDesignActivatedEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.issuing_personalization_design.activated" - type: Literal["v1.issuing_personalization_design.activated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingPersonalizationDesignActivatedEvent": - return cast( - "V1IssuingPersonalizationDesignActivatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PersonalizationDesign": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PersonalizationDesign", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1IssuingPersonalizationDesignActivatedEvent": - return cast( - "V1IssuingPersonalizationDesignActivatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PersonalizationDesign": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PersonalizationDesign", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingPersonalizationDesignActivatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_personalization_design.activated" - type: Literal["v1.issuing_personalization_design.activated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PersonalizationDesign": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PersonalizationDesign", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_personalization_design_deactivated_event.py b/stripe/events/_v1_issuing_personalization_design_deactivated_event.py deleted file mode 100644 index e605c78da..000000000 --- a/stripe/events/_v1_issuing_personalization_design_deactivated_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._personalization_design import PersonalizationDesign - - -class V1IssuingPersonalizationDesignDeactivatedEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.issuing_personalization_design.deactivated" - type: Literal["v1.issuing_personalization_design.deactivated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingPersonalizationDesignDeactivatedEvent": - return cast( - "V1IssuingPersonalizationDesignDeactivatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PersonalizationDesign": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PersonalizationDesign", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1IssuingPersonalizationDesignDeactivatedEvent": - return cast( - "V1IssuingPersonalizationDesignDeactivatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PersonalizationDesign": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PersonalizationDesign", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingPersonalizationDesignDeactivatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_personalization_design.deactivated" - type: Literal["v1.issuing_personalization_design.deactivated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PersonalizationDesign": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PersonalizationDesign", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_personalization_design_rejected_event.py b/stripe/events/_v1_issuing_personalization_design_rejected_event.py deleted file mode 100644 index b31314f38..000000000 --- a/stripe/events/_v1_issuing_personalization_design_rejected_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._personalization_design import PersonalizationDesign - - -class V1IssuingPersonalizationDesignRejectedEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.issuing_personalization_design.rejected" - type: Literal["v1.issuing_personalization_design.rejected"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingPersonalizationDesignRejectedEvent": - return cast( - "V1IssuingPersonalizationDesignRejectedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PersonalizationDesign": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PersonalizationDesign", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1IssuingPersonalizationDesignRejectedEvent": - return cast( - "V1IssuingPersonalizationDesignRejectedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PersonalizationDesign": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PersonalizationDesign", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingPersonalizationDesignRejectedEvent(Event): - LOOKUP_TYPE = "v1.issuing_personalization_design.rejected" - type: Literal["v1.issuing_personalization_design.rejected"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PersonalizationDesign": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PersonalizationDesign", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_personalization_design_updated_event.py b/stripe/events/_v1_issuing_personalization_design_updated_event.py deleted file mode 100644 index c1277bb63..000000000 --- a/stripe/events/_v1_issuing_personalization_design_updated_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._personalization_design import PersonalizationDesign - - -class V1IssuingPersonalizationDesignUpdatedEventNotification( - EventNotification -): - LOOKUP_TYPE = "v1.issuing_personalization_design.updated" - type: Literal["v1.issuing_personalization_design.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingPersonalizationDesignUpdatedEvent": - return cast( - "V1IssuingPersonalizationDesignUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PersonalizationDesign": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PersonalizationDesign", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1IssuingPersonalizationDesignUpdatedEvent": - return cast( - "V1IssuingPersonalizationDesignUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PersonalizationDesign": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PersonalizationDesign", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingPersonalizationDesignUpdatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_personalization_design.updated" - type: Literal["v1.issuing_personalization_design.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PersonalizationDesign": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PersonalizationDesign", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_token_created_event.py b/stripe/events/_v1_issuing_token_created_event.py deleted file mode 100644 index 0b64587c6..000000000 --- a/stripe/events/_v1_issuing_token_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._token import Token - - -class V1IssuingTokenCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_token.created" - type: Literal["v1.issuing_token.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingTokenCreatedEvent": - return cast( - "V1IssuingTokenCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Token": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Token", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingTokenCreatedEvent": - return cast( - "V1IssuingTokenCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Token": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Token", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingTokenCreatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_token.created" - type: Literal["v1.issuing_token.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Token": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Token", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_token_updated_event.py b/stripe/events/_v1_issuing_token_updated_event.py deleted file mode 100644 index 78d015513..000000000 --- a/stripe/events/_v1_issuing_token_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._token import Token - - -class V1IssuingTokenUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_token.updated" - type: Literal["v1.issuing_token.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingTokenUpdatedEvent": - return cast( - "V1IssuingTokenUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Token": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Token", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingTokenUpdatedEvent": - return cast( - "V1IssuingTokenUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Token": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Token", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingTokenUpdatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_token.updated" - type: Literal["v1.issuing_token.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Token": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Token", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_transaction_created_event.py b/stripe/events/_v1_issuing_transaction_created_event.py deleted file mode 100644 index 7a1b0fd6c..000000000 --- a/stripe/events/_v1_issuing_transaction_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._transaction import Transaction - - -class V1IssuingTransactionCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_transaction.created" - type: Literal["v1.issuing_transaction.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingTransactionCreatedEvent": - return cast( - "V1IssuingTransactionCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Transaction": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Transaction", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingTransactionCreatedEvent": - return cast( - "V1IssuingTransactionCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Transaction": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Transaction", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingTransactionCreatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_transaction.created" - type: Literal["v1.issuing_transaction.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Transaction": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Transaction", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_transaction_purchase_details_receipt_updated_event.py b/stripe/events/_v1_issuing_transaction_purchase_details_receipt_updated_event.py deleted file mode 100644 index d047d803f..000000000 --- a/stripe/events/_v1_issuing_transaction_purchase_details_receipt_updated_event.py +++ /dev/null @@ -1,114 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._transaction import Transaction - - -class V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.issuing_transaction.purchase_details_receipt_updated" - type: Literal["v1.issuing_transaction.purchase_details_receipt_updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event( - self, - ) -> "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent": - return cast( - "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Transaction": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Transaction", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent": - return cast( - "V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Transaction": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Transaction", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_transaction.purchase_details_receipt_updated" - type: Literal["v1.issuing_transaction.purchase_details_receipt_updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Transaction": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Transaction", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_issuing_transaction_updated_event.py b/stripe/events/_v1_issuing_transaction_updated_event.py deleted file mode 100644 index a8530d117..000000000 --- a/stripe/events/_v1_issuing_transaction_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.issuing._transaction import Transaction - - -class V1IssuingTransactionUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.issuing_transaction.updated" - type: Literal["v1.issuing_transaction.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1IssuingTransactionUpdatedEvent": - return cast( - "V1IssuingTransactionUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Transaction": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Transaction", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1IssuingTransactionUpdatedEvent": - return cast( - "V1IssuingTransactionUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Transaction": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Transaction", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1IssuingTransactionUpdatedEvent(Event): - LOOKUP_TYPE = "v1.issuing_transaction.updated" - type: Literal["v1.issuing_transaction.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Transaction": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Transaction", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_mandate_updated_event.py b/stripe/events/_v1_mandate_updated_event.py deleted file mode 100644 index 5c4366e10..000000000 --- a/stripe/events/_v1_mandate_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._mandate import Mandate - from stripe._stripe_client import StripeClient - - -class V1MandateUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.mandate.updated" - type: Literal["v1.mandate.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1MandateUpdatedEvent": - return cast( - "V1MandateUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Mandate": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Mandate", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1MandateUpdatedEvent": - return cast( - "V1MandateUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Mandate": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Mandate", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1MandateUpdatedEvent(Event): - LOOKUP_TYPE = "v1.mandate.updated" - type: Literal["v1.mandate.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Mandate": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Mandate", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_intent_amount_capturable_updated_event.py b/stripe/events/_v1_payment_intent_amount_capturable_updated_event.py deleted file mode 100644 index a4e94fb6b..000000000 --- a/stripe/events/_v1_payment_intent_amount_capturable_updated_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_intent import PaymentIntent - from stripe._stripe_client import StripeClient - - -class V1PaymentIntentAmountCapturableUpdatedEventNotification( - EventNotification, -): - LOOKUP_TYPE = "v1.payment_intent.amount_capturable_updated" - type: Literal["v1.payment_intent.amount_capturable_updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentIntentAmountCapturableUpdatedEvent": - return cast( - "V1PaymentIntentAmountCapturableUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentIntent": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1PaymentIntentAmountCapturableUpdatedEvent": - return cast( - "V1PaymentIntentAmountCapturableUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentIntent": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentIntentAmountCapturableUpdatedEvent(Event): - LOOKUP_TYPE = "v1.payment_intent.amount_capturable_updated" - type: Literal["v1.payment_intent.amount_capturable_updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentIntent": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentIntent", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_intent_canceled_event.py b/stripe/events/_v1_payment_intent_canceled_event.py deleted file mode 100644 index 31dbdf6bc..000000000 --- a/stripe/events/_v1_payment_intent_canceled_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_intent import PaymentIntent - from stripe._stripe_client import StripeClient - - -class V1PaymentIntentCanceledEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payment_intent.canceled" - type: Literal["v1.payment_intent.canceled"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentIntentCanceledEvent": - return cast( - "V1PaymentIntentCanceledEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentIntent": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PaymentIntentCanceledEvent": - return cast( - "V1PaymentIntentCanceledEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentIntent": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentIntentCanceledEvent(Event): - LOOKUP_TYPE = "v1.payment_intent.canceled" - type: Literal["v1.payment_intent.canceled"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentIntent": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentIntent", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_intent_created_event.py b/stripe/events/_v1_payment_intent_created_event.py deleted file mode 100644 index 38f1ee618..000000000 --- a/stripe/events/_v1_payment_intent_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_intent import PaymentIntent - from stripe._stripe_client import StripeClient - - -class V1PaymentIntentCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payment_intent.created" - type: Literal["v1.payment_intent.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentIntentCreatedEvent": - return cast( - "V1PaymentIntentCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentIntent": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PaymentIntentCreatedEvent": - return cast( - "V1PaymentIntentCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentIntent": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentIntentCreatedEvent(Event): - LOOKUP_TYPE = "v1.payment_intent.created" - type: Literal["v1.payment_intent.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentIntent": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentIntent", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_intent_partially_funded_event.py b/stripe/events/_v1_payment_intent_partially_funded_event.py deleted file mode 100644 index ea400ec77..000000000 --- a/stripe/events/_v1_payment_intent_partially_funded_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_intent import PaymentIntent - from stripe._stripe_client import StripeClient - - -class V1PaymentIntentPartiallyFundedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payment_intent.partially_funded" - type: Literal["v1.payment_intent.partially_funded"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentIntentPartiallyFundedEvent": - return cast( - "V1PaymentIntentPartiallyFundedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentIntent": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PaymentIntentPartiallyFundedEvent": - return cast( - "V1PaymentIntentPartiallyFundedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentIntent": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentIntentPartiallyFundedEvent(Event): - LOOKUP_TYPE = "v1.payment_intent.partially_funded" - type: Literal["v1.payment_intent.partially_funded"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentIntent": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentIntent", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_intent_payment_failed_event.py b/stripe/events/_v1_payment_intent_payment_failed_event.py deleted file mode 100644 index e9bd2e5d2..000000000 --- a/stripe/events/_v1_payment_intent_payment_failed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_intent import PaymentIntent - from stripe._stripe_client import StripeClient - - -class V1PaymentIntentPaymentFailedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payment_intent.payment_failed" - type: Literal["v1.payment_intent.payment_failed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentIntentPaymentFailedEvent": - return cast( - "V1PaymentIntentPaymentFailedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentIntent": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PaymentIntentPaymentFailedEvent": - return cast( - "V1PaymentIntentPaymentFailedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentIntent": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentIntentPaymentFailedEvent(Event): - LOOKUP_TYPE = "v1.payment_intent.payment_failed" - type: Literal["v1.payment_intent.payment_failed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentIntent": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentIntent", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_intent_processing_event.py b/stripe/events/_v1_payment_intent_processing_event.py deleted file mode 100644 index f6e6d9e6e..000000000 --- a/stripe/events/_v1_payment_intent_processing_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_intent import PaymentIntent - from stripe._stripe_client import StripeClient - - -class V1PaymentIntentProcessingEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payment_intent.processing" - type: Literal["v1.payment_intent.processing"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentIntentProcessingEvent": - return cast( - "V1PaymentIntentProcessingEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentIntent": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PaymentIntentProcessingEvent": - return cast( - "V1PaymentIntentProcessingEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentIntent": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentIntentProcessingEvent(Event): - LOOKUP_TYPE = "v1.payment_intent.processing" - type: Literal["v1.payment_intent.processing"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentIntent": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentIntent", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_intent_requires_action_event.py b/stripe/events/_v1_payment_intent_requires_action_event.py deleted file mode 100644 index 41cca65b7..000000000 --- a/stripe/events/_v1_payment_intent_requires_action_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_intent import PaymentIntent - from stripe._stripe_client import StripeClient - - -class V1PaymentIntentRequiresActionEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payment_intent.requires_action" - type: Literal["v1.payment_intent.requires_action"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentIntentRequiresActionEvent": - return cast( - "V1PaymentIntentRequiresActionEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentIntent": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PaymentIntentRequiresActionEvent": - return cast( - "V1PaymentIntentRequiresActionEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentIntent": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentIntentRequiresActionEvent(Event): - LOOKUP_TYPE = "v1.payment_intent.requires_action" - type: Literal["v1.payment_intent.requires_action"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentIntent": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentIntent", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_intent_succeeded_event.py b/stripe/events/_v1_payment_intent_succeeded_event.py deleted file mode 100644 index 16c81755b..000000000 --- a/stripe/events/_v1_payment_intent_succeeded_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_intent import PaymentIntent - from stripe._stripe_client import StripeClient - - -class V1PaymentIntentSucceededEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payment_intent.succeeded" - type: Literal["v1.payment_intent.succeeded"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentIntentSucceededEvent": - return cast( - "V1PaymentIntentSucceededEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentIntent": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PaymentIntentSucceededEvent": - return cast( - "V1PaymentIntentSucceededEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentIntent": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentIntentSucceededEvent(Event): - LOOKUP_TYPE = "v1.payment_intent.succeeded" - type: Literal["v1.payment_intent.succeeded"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentIntent": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentIntent", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_link_created_event.py b/stripe/events/_v1_payment_link_created_event.py deleted file mode 100644 index d3d5de14c..000000000 --- a/stripe/events/_v1_payment_link_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_link import PaymentLink - from stripe._stripe_client import StripeClient - - -class V1PaymentLinkCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payment_link.created" - type: Literal["v1.payment_link.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentLinkCreatedEvent": - return cast( - "V1PaymentLinkCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentLink": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentLink", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PaymentLinkCreatedEvent": - return cast( - "V1PaymentLinkCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentLink": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentLink", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentLinkCreatedEvent(Event): - LOOKUP_TYPE = "v1.payment_link.created" - type: Literal["v1.payment_link.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentLink": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentLink", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_link_updated_event.py b/stripe/events/_v1_payment_link_updated_event.py deleted file mode 100644 index 283b38702..000000000 --- a/stripe/events/_v1_payment_link_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_link import PaymentLink - from stripe._stripe_client import StripeClient - - -class V1PaymentLinkUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payment_link.updated" - type: Literal["v1.payment_link.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentLinkUpdatedEvent": - return cast( - "V1PaymentLinkUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentLink": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentLink", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PaymentLinkUpdatedEvent": - return cast( - "V1PaymentLinkUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentLink": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentLink", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentLinkUpdatedEvent(Event): - LOOKUP_TYPE = "v1.payment_link.updated" - type: Literal["v1.payment_link.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentLink": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentLink", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_method_attached_event.py b/stripe/events/_v1_payment_method_attached_event.py deleted file mode 100644 index 5ea74e01b..000000000 --- a/stripe/events/_v1_payment_method_attached_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_method import PaymentMethod - from stripe._stripe_client import StripeClient - - -class V1PaymentMethodAttachedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payment_method.attached" - type: Literal["v1.payment_method.attached"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentMethodAttachedEvent": - return cast( - "V1PaymentMethodAttachedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentMethod": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentMethod", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PaymentMethodAttachedEvent": - return cast( - "V1PaymentMethodAttachedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentMethod": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentMethod", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentMethodAttachedEvent(Event): - LOOKUP_TYPE = "v1.payment_method.attached" - type: Literal["v1.payment_method.attached"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentMethod": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentMethod", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_method_automatically_updated_event.py b/stripe/events/_v1_payment_method_automatically_updated_event.py deleted file mode 100644 index c18e9dcb6..000000000 --- a/stripe/events/_v1_payment_method_automatically_updated_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_method import PaymentMethod - from stripe._stripe_client import StripeClient - - -class V1PaymentMethodAutomaticallyUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payment_method.automatically_updated" - type: Literal["v1.payment_method.automatically_updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentMethodAutomaticallyUpdatedEvent": - return cast( - "V1PaymentMethodAutomaticallyUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentMethod": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentMethod", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1PaymentMethodAutomaticallyUpdatedEvent": - return cast( - "V1PaymentMethodAutomaticallyUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentMethod": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentMethod", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentMethodAutomaticallyUpdatedEvent(Event): - LOOKUP_TYPE = "v1.payment_method.automatically_updated" - type: Literal["v1.payment_method.automatically_updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentMethod": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentMethod", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_method_detached_event.py b/stripe/events/_v1_payment_method_detached_event.py deleted file mode 100644 index abae91f59..000000000 --- a/stripe/events/_v1_payment_method_detached_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_method import PaymentMethod - from stripe._stripe_client import StripeClient - - -class V1PaymentMethodDetachedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payment_method.detached" - type: Literal["v1.payment_method.detached"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentMethodDetachedEvent": - return cast( - "V1PaymentMethodDetachedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentMethod": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentMethod", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PaymentMethodDetachedEvent": - return cast( - "V1PaymentMethodDetachedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentMethod": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentMethod", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentMethodDetachedEvent(Event): - LOOKUP_TYPE = "v1.payment_method.detached" - type: Literal["v1.payment_method.detached"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentMethod": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentMethod", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payment_method_updated_event.py b/stripe/events/_v1_payment_method_updated_event.py deleted file mode 100644 index 95ea3cea8..000000000 --- a/stripe/events/_v1_payment_method_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payment_method import PaymentMethod - from stripe._stripe_client import StripeClient - - -class V1PaymentMethodUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payment_method.updated" - type: Literal["v1.payment_method.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PaymentMethodUpdatedEvent": - return cast( - "V1PaymentMethodUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PaymentMethod": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentMethod", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PaymentMethodUpdatedEvent": - return cast( - "V1PaymentMethodUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PaymentMethod": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PaymentMethod", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PaymentMethodUpdatedEvent(Event): - LOOKUP_TYPE = "v1.payment_method.updated" - type: Literal["v1.payment_method.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PaymentMethod": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PaymentMethod", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payout_canceled_event.py b/stripe/events/_v1_payout_canceled_event.py deleted file mode 100644 index 3ca98b98f..000000000 --- a/stripe/events/_v1_payout_canceled_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payout import Payout - from stripe._stripe_client import StripeClient - - -class V1PayoutCanceledEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payout.canceled" - type: Literal["v1.payout.canceled"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PayoutCanceledEvent": - return cast( - "V1PayoutCanceledEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Payout": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Payout", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PayoutCanceledEvent": - return cast( - "V1PayoutCanceledEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Payout": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Payout", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PayoutCanceledEvent(Event): - LOOKUP_TYPE = "v1.payout.canceled" - type: Literal["v1.payout.canceled"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Payout": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Payout", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payout_created_event.py b/stripe/events/_v1_payout_created_event.py deleted file mode 100644 index a1e2c3000..000000000 --- a/stripe/events/_v1_payout_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payout import Payout - from stripe._stripe_client import StripeClient - - -class V1PayoutCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payout.created" - type: Literal["v1.payout.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PayoutCreatedEvent": - return cast( - "V1PayoutCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Payout": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Payout", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PayoutCreatedEvent": - return cast( - "V1PayoutCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Payout": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Payout", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PayoutCreatedEvent(Event): - LOOKUP_TYPE = "v1.payout.created" - type: Literal["v1.payout.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Payout": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Payout", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payout_failed_event.py b/stripe/events/_v1_payout_failed_event.py deleted file mode 100644 index 855264621..000000000 --- a/stripe/events/_v1_payout_failed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payout import Payout - from stripe._stripe_client import StripeClient - - -class V1PayoutFailedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payout.failed" - type: Literal["v1.payout.failed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PayoutFailedEvent": - return cast( - "V1PayoutFailedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Payout": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Payout", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PayoutFailedEvent": - return cast( - "V1PayoutFailedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Payout": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Payout", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PayoutFailedEvent(Event): - LOOKUP_TYPE = "v1.payout.failed" - type: Literal["v1.payout.failed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Payout": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Payout", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payout_paid_event.py b/stripe/events/_v1_payout_paid_event.py deleted file mode 100644 index 3d6df0f6b..000000000 --- a/stripe/events/_v1_payout_paid_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payout import Payout - from stripe._stripe_client import StripeClient - - -class V1PayoutPaidEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payout.paid" - type: Literal["v1.payout.paid"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PayoutPaidEvent": - return cast( - "V1PayoutPaidEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Payout": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Payout", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PayoutPaidEvent": - return cast( - "V1PayoutPaidEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Payout": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Payout", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PayoutPaidEvent(Event): - LOOKUP_TYPE = "v1.payout.paid" - type: Literal["v1.payout.paid"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Payout": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Payout", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payout_reconciliation_completed_event.py b/stripe/events/_v1_payout_reconciliation_completed_event.py deleted file mode 100644 index bb0b62f63..000000000 --- a/stripe/events/_v1_payout_reconciliation_completed_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payout import Payout - from stripe._stripe_client import StripeClient - - -class V1PayoutReconciliationCompletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payout.reconciliation_completed" - type: Literal["v1.payout.reconciliation_completed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PayoutReconciliationCompletedEvent": - return cast( - "V1PayoutReconciliationCompletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Payout": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Payout", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1PayoutReconciliationCompletedEvent": - return cast( - "V1PayoutReconciliationCompletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Payout": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Payout", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PayoutReconciliationCompletedEvent(Event): - LOOKUP_TYPE = "v1.payout.reconciliation_completed" - type: Literal["v1.payout.reconciliation_completed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Payout": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Payout", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_payout_updated_event.py b/stripe/events/_v1_payout_updated_event.py deleted file mode 100644 index 032888291..000000000 --- a/stripe/events/_v1_payout_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._payout import Payout - from stripe._stripe_client import StripeClient - - -class V1PayoutUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.payout.updated" - type: Literal["v1.payout.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PayoutUpdatedEvent": - return cast( - "V1PayoutUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Payout": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Payout", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PayoutUpdatedEvent": - return cast( - "V1PayoutUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Payout": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Payout", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PayoutUpdatedEvent(Event): - LOOKUP_TYPE = "v1.payout.updated" - type: Literal["v1.payout.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Payout": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Payout", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_person_created_event.py b/stripe/events/_v1_person_created_event.py deleted file mode 100644 index 92f70735c..000000000 --- a/stripe/events/_v1_person_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._person import Person - from stripe._stripe_client import StripeClient - - -class V1PersonCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.person.created" - type: Literal["v1.person.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PersonCreatedEvent": - return cast( - "V1PersonCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Person": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Person", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PersonCreatedEvent": - return cast( - "V1PersonCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Person": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Person", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PersonCreatedEvent(Event): - LOOKUP_TYPE = "v1.person.created" - type: Literal["v1.person.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Person": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Person", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_person_deleted_event.py b/stripe/events/_v1_person_deleted_event.py deleted file mode 100644 index 4432efb16..000000000 --- a/stripe/events/_v1_person_deleted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._person import Person - from stripe._stripe_client import StripeClient - - -class V1PersonDeletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.person.deleted" - type: Literal["v1.person.deleted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PersonDeletedEvent": - return cast( - "V1PersonDeletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Person": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Person", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PersonDeletedEvent": - return cast( - "V1PersonDeletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Person": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Person", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PersonDeletedEvent(Event): - LOOKUP_TYPE = "v1.person.deleted" - type: Literal["v1.person.deleted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Person": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Person", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_person_updated_event.py b/stripe/events/_v1_person_updated_event.py deleted file mode 100644 index 921ddadbc..000000000 --- a/stripe/events/_v1_person_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._person import Person - from stripe._stripe_client import StripeClient - - -class V1PersonUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.person.updated" - type: Literal["v1.person.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PersonUpdatedEvent": - return cast( - "V1PersonUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Person": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Person", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PersonUpdatedEvent": - return cast( - "V1PersonUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Person": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Person", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PersonUpdatedEvent(Event): - LOOKUP_TYPE = "v1.person.updated" - type: Literal["v1.person.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Person": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Person", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_plan_created_event.py b/stripe/events/_v1_plan_created_event.py deleted file mode 100644 index 458fc6bd1..000000000 --- a/stripe/events/_v1_plan_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._plan import Plan - from stripe._stripe_client import StripeClient - - -class V1PlanCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.plan.created" - type: Literal["v1.plan.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PlanCreatedEvent": - return cast( - "V1PlanCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Plan": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Plan", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PlanCreatedEvent": - return cast( - "V1PlanCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Plan": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Plan", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PlanCreatedEvent(Event): - LOOKUP_TYPE = "v1.plan.created" - type: Literal["v1.plan.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Plan": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Plan", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_plan_deleted_event.py b/stripe/events/_v1_plan_deleted_event.py deleted file mode 100644 index 025be1f65..000000000 --- a/stripe/events/_v1_plan_deleted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._plan import Plan - from stripe._stripe_client import StripeClient - - -class V1PlanDeletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.plan.deleted" - type: Literal["v1.plan.deleted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PlanDeletedEvent": - return cast( - "V1PlanDeletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Plan": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Plan", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PlanDeletedEvent": - return cast( - "V1PlanDeletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Plan": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Plan", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PlanDeletedEvent(Event): - LOOKUP_TYPE = "v1.plan.deleted" - type: Literal["v1.plan.deleted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Plan": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Plan", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_plan_updated_event.py b/stripe/events/_v1_plan_updated_event.py deleted file mode 100644 index ec3a2e832..000000000 --- a/stripe/events/_v1_plan_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._plan import Plan - from stripe._stripe_client import StripeClient - - -class V1PlanUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.plan.updated" - type: Literal["v1.plan.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PlanUpdatedEvent": - return cast( - "V1PlanUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Plan": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Plan", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PlanUpdatedEvent": - return cast( - "V1PlanUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Plan": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Plan", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PlanUpdatedEvent(Event): - LOOKUP_TYPE = "v1.plan.updated" - type: Literal["v1.plan.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Plan": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Plan", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_price_created_event.py b/stripe/events/_v1_price_created_event.py deleted file mode 100644 index b5137131b..000000000 --- a/stripe/events/_v1_price_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._price import Price - from stripe._stripe_client import StripeClient - - -class V1PriceCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.price.created" - type: Literal["v1.price.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PriceCreatedEvent": - return cast( - "V1PriceCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Price": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Price", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PriceCreatedEvent": - return cast( - "V1PriceCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Price": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Price", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PriceCreatedEvent(Event): - LOOKUP_TYPE = "v1.price.created" - type: Literal["v1.price.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Price": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Price", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_price_deleted_event.py b/stripe/events/_v1_price_deleted_event.py deleted file mode 100644 index ea0b16126..000000000 --- a/stripe/events/_v1_price_deleted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._price import Price - from stripe._stripe_client import StripeClient - - -class V1PriceDeletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.price.deleted" - type: Literal["v1.price.deleted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PriceDeletedEvent": - return cast( - "V1PriceDeletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Price": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Price", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PriceDeletedEvent": - return cast( - "V1PriceDeletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Price": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Price", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PriceDeletedEvent(Event): - LOOKUP_TYPE = "v1.price.deleted" - type: Literal["v1.price.deleted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Price": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Price", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_price_updated_event.py b/stripe/events/_v1_price_updated_event.py deleted file mode 100644 index 87b604fea..000000000 --- a/stripe/events/_v1_price_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._price import Price - from stripe._stripe_client import StripeClient - - -class V1PriceUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.price.updated" - type: Literal["v1.price.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PriceUpdatedEvent": - return cast( - "V1PriceUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Price": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Price", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PriceUpdatedEvent": - return cast( - "V1PriceUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Price": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Price", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PriceUpdatedEvent(Event): - LOOKUP_TYPE = "v1.price.updated" - type: Literal["v1.price.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Price": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Price", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_product_created_event.py b/stripe/events/_v1_product_created_event.py deleted file mode 100644 index e8a15b04d..000000000 --- a/stripe/events/_v1_product_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._product import Product - from stripe._stripe_client import StripeClient - - -class V1ProductCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.product.created" - type: Literal["v1.product.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ProductCreatedEvent": - return cast( - "V1ProductCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Product": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Product", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ProductCreatedEvent": - return cast( - "V1ProductCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Product": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Product", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ProductCreatedEvent(Event): - LOOKUP_TYPE = "v1.product.created" - type: Literal["v1.product.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Product": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Product", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_product_deleted_event.py b/stripe/events/_v1_product_deleted_event.py deleted file mode 100644 index ba120286e..000000000 --- a/stripe/events/_v1_product_deleted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._product import Product - from stripe._stripe_client import StripeClient - - -class V1ProductDeletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.product.deleted" - type: Literal["v1.product.deleted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ProductDeletedEvent": - return cast( - "V1ProductDeletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Product": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Product", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ProductDeletedEvent": - return cast( - "V1ProductDeletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Product": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Product", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ProductDeletedEvent(Event): - LOOKUP_TYPE = "v1.product.deleted" - type: Literal["v1.product.deleted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Product": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Product", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_product_updated_event.py b/stripe/events/_v1_product_updated_event.py deleted file mode 100644 index 2503b1ca8..000000000 --- a/stripe/events/_v1_product_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._product import Product - from stripe._stripe_client import StripeClient - - -class V1ProductUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.product.updated" - type: Literal["v1.product.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ProductUpdatedEvent": - return cast( - "V1ProductUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Product": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Product", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ProductUpdatedEvent": - return cast( - "V1ProductUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Product": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Product", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ProductUpdatedEvent(Event): - LOOKUP_TYPE = "v1.product.updated" - type: Literal["v1.product.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Product": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Product", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_promotion_code_created_event.py b/stripe/events/_v1_promotion_code_created_event.py deleted file mode 100644 index bb324259e..000000000 --- a/stripe/events/_v1_promotion_code_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._promotion_code import PromotionCode - from stripe._stripe_client import StripeClient - - -class V1PromotionCodeCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.promotion_code.created" - type: Literal["v1.promotion_code.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PromotionCodeCreatedEvent": - return cast( - "V1PromotionCodeCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PromotionCode": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PromotionCode", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PromotionCodeCreatedEvent": - return cast( - "V1PromotionCodeCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PromotionCode": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PromotionCode", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PromotionCodeCreatedEvent(Event): - LOOKUP_TYPE = "v1.promotion_code.created" - type: Literal["v1.promotion_code.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PromotionCode": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PromotionCode", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_promotion_code_updated_event.py b/stripe/events/_v1_promotion_code_updated_event.py deleted file mode 100644 index 0cbd39c43..000000000 --- a/stripe/events/_v1_promotion_code_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._promotion_code import PromotionCode - from stripe._stripe_client import StripeClient - - -class V1PromotionCodeUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.promotion_code.updated" - type: Literal["v1.promotion_code.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1PromotionCodeUpdatedEvent": - return cast( - "V1PromotionCodeUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "PromotionCode": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PromotionCode", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1PromotionCodeUpdatedEvent": - return cast( - "V1PromotionCodeUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "PromotionCode": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "PromotionCode", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1PromotionCodeUpdatedEvent(Event): - LOOKUP_TYPE = "v1.promotion_code.updated" - type: Literal["v1.promotion_code.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "PromotionCode": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "PromotionCode", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_quote_accepted_event.py b/stripe/events/_v1_quote_accepted_event.py deleted file mode 100644 index f75df4786..000000000 --- a/stripe/events/_v1_quote_accepted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._quote import Quote - from stripe._stripe_client import StripeClient - - -class V1QuoteAcceptedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.quote.accepted" - type: Literal["v1.quote.accepted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1QuoteAcceptedEvent": - return cast( - "V1QuoteAcceptedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Quote": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Quote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1QuoteAcceptedEvent": - return cast( - "V1QuoteAcceptedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Quote": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Quote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1QuoteAcceptedEvent(Event): - LOOKUP_TYPE = "v1.quote.accepted" - type: Literal["v1.quote.accepted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Quote": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Quote", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_quote_canceled_event.py b/stripe/events/_v1_quote_canceled_event.py deleted file mode 100644 index 3053f0179..000000000 --- a/stripe/events/_v1_quote_canceled_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._quote import Quote - from stripe._stripe_client import StripeClient - - -class V1QuoteCanceledEventNotification(EventNotification): - LOOKUP_TYPE = "v1.quote.canceled" - type: Literal["v1.quote.canceled"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1QuoteCanceledEvent": - return cast( - "V1QuoteCanceledEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Quote": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Quote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1QuoteCanceledEvent": - return cast( - "V1QuoteCanceledEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Quote": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Quote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1QuoteCanceledEvent(Event): - LOOKUP_TYPE = "v1.quote.canceled" - type: Literal["v1.quote.canceled"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Quote": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Quote", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_quote_created_event.py b/stripe/events/_v1_quote_created_event.py deleted file mode 100644 index 57e128faa..000000000 --- a/stripe/events/_v1_quote_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._quote import Quote - from stripe._stripe_client import StripeClient - - -class V1QuoteCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.quote.created" - type: Literal["v1.quote.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1QuoteCreatedEvent": - return cast( - "V1QuoteCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Quote": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Quote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1QuoteCreatedEvent": - return cast( - "V1QuoteCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Quote": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Quote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1QuoteCreatedEvent(Event): - LOOKUP_TYPE = "v1.quote.created" - type: Literal["v1.quote.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Quote": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Quote", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_quote_finalized_event.py b/stripe/events/_v1_quote_finalized_event.py deleted file mode 100644 index cc135d931..000000000 --- a/stripe/events/_v1_quote_finalized_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._quote import Quote - from stripe._stripe_client import StripeClient - - -class V1QuoteFinalizedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.quote.finalized" - type: Literal["v1.quote.finalized"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1QuoteFinalizedEvent": - return cast( - "V1QuoteFinalizedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Quote": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Quote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1QuoteFinalizedEvent": - return cast( - "V1QuoteFinalizedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Quote": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Quote", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1QuoteFinalizedEvent(Event): - LOOKUP_TYPE = "v1.quote.finalized" - type: Literal["v1.quote.finalized"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Quote": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Quote", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_radar_early_fraud_warning_created_event.py b/stripe/events/_v1_radar_early_fraud_warning_created_event.py deleted file mode 100644 index cbb29a329..000000000 --- a/stripe/events/_v1_radar_early_fraud_warning_created_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.radar._early_fraud_warning import EarlyFraudWarning - - -class V1RadarEarlyFraudWarningCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.radar.early_fraud_warning.created" - type: Literal["v1.radar.early_fraud_warning.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1RadarEarlyFraudWarningCreatedEvent": - return cast( - "V1RadarEarlyFraudWarningCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "EarlyFraudWarning": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "EarlyFraudWarning", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1RadarEarlyFraudWarningCreatedEvent": - return cast( - "V1RadarEarlyFraudWarningCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "EarlyFraudWarning": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "EarlyFraudWarning", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1RadarEarlyFraudWarningCreatedEvent(Event): - LOOKUP_TYPE = "v1.radar.early_fraud_warning.created" - type: Literal["v1.radar.early_fraud_warning.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "EarlyFraudWarning": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "EarlyFraudWarning", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_radar_early_fraud_warning_updated_event.py b/stripe/events/_v1_radar_early_fraud_warning_updated_event.py deleted file mode 100644 index 1c808bf6e..000000000 --- a/stripe/events/_v1_radar_early_fraud_warning_updated_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.radar._early_fraud_warning import EarlyFraudWarning - - -class V1RadarEarlyFraudWarningUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.radar.early_fraud_warning.updated" - type: Literal["v1.radar.early_fraud_warning.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1RadarEarlyFraudWarningUpdatedEvent": - return cast( - "V1RadarEarlyFraudWarningUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "EarlyFraudWarning": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "EarlyFraudWarning", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1RadarEarlyFraudWarningUpdatedEvent": - return cast( - "V1RadarEarlyFraudWarningUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "EarlyFraudWarning": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "EarlyFraudWarning", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1RadarEarlyFraudWarningUpdatedEvent(Event): - LOOKUP_TYPE = "v1.radar.early_fraud_warning.updated" - type: Literal["v1.radar.early_fraud_warning.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "EarlyFraudWarning": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "EarlyFraudWarning", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_refund_created_event.py b/stripe/events/_v1_refund_created_event.py deleted file mode 100644 index 5fbc6296c..000000000 --- a/stripe/events/_v1_refund_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._refund import Refund - from stripe._stripe_client import StripeClient - - -class V1RefundCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.refund.created" - type: Literal["v1.refund.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1RefundCreatedEvent": - return cast( - "V1RefundCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Refund": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Refund", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1RefundCreatedEvent": - return cast( - "V1RefundCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Refund": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Refund", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1RefundCreatedEvent(Event): - LOOKUP_TYPE = "v1.refund.created" - type: Literal["v1.refund.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Refund": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Refund", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_refund_failed_event.py b/stripe/events/_v1_refund_failed_event.py deleted file mode 100644 index d2f17fc6a..000000000 --- a/stripe/events/_v1_refund_failed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._refund import Refund - from stripe._stripe_client import StripeClient - - -class V1RefundFailedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.refund.failed" - type: Literal["v1.refund.failed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1RefundFailedEvent": - return cast( - "V1RefundFailedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Refund": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Refund", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1RefundFailedEvent": - return cast( - "V1RefundFailedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Refund": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Refund", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1RefundFailedEvent(Event): - LOOKUP_TYPE = "v1.refund.failed" - type: Literal["v1.refund.failed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Refund": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Refund", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_refund_updated_event.py b/stripe/events/_v1_refund_updated_event.py deleted file mode 100644 index c8104aa90..000000000 --- a/stripe/events/_v1_refund_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._refund import Refund - from stripe._stripe_client import StripeClient - - -class V1RefundUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.refund.updated" - type: Literal["v1.refund.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1RefundUpdatedEvent": - return cast( - "V1RefundUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Refund": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Refund", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1RefundUpdatedEvent": - return cast( - "V1RefundUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Refund": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Refund", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1RefundUpdatedEvent(Event): - LOOKUP_TYPE = "v1.refund.updated" - type: Literal["v1.refund.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Refund": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Refund", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_review_closed_event.py b/stripe/events/_v1_review_closed_event.py deleted file mode 100644 index bdc7afa85..000000000 --- a/stripe/events/_v1_review_closed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._review import Review - from stripe._stripe_client import StripeClient - - -class V1ReviewClosedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.review.closed" - type: Literal["v1.review.closed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ReviewClosedEvent": - return cast( - "V1ReviewClosedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Review": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Review", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ReviewClosedEvent": - return cast( - "V1ReviewClosedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Review": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Review", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ReviewClosedEvent(Event): - LOOKUP_TYPE = "v1.review.closed" - type: Literal["v1.review.closed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Review": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Review", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_review_opened_event.py b/stripe/events/_v1_review_opened_event.py deleted file mode 100644 index 9b92c122b..000000000 --- a/stripe/events/_v1_review_opened_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._review import Review - from stripe._stripe_client import StripeClient - - -class V1ReviewOpenedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.review.opened" - type: Literal["v1.review.opened"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1ReviewOpenedEvent": - return cast( - "V1ReviewOpenedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Review": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Review", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1ReviewOpenedEvent": - return cast( - "V1ReviewOpenedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Review": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Review", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1ReviewOpenedEvent(Event): - LOOKUP_TYPE = "v1.review.opened" - type: Literal["v1.review.opened"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Review": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Review", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_setup_intent_canceled_event.py b/stripe/events/_v1_setup_intent_canceled_event.py deleted file mode 100644 index a5a299937..000000000 --- a/stripe/events/_v1_setup_intent_canceled_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._setup_intent import SetupIntent - from stripe._stripe_client import StripeClient - - -class V1SetupIntentCanceledEventNotification(EventNotification): - LOOKUP_TYPE = "v1.setup_intent.canceled" - type: Literal["v1.setup_intent.canceled"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SetupIntentCanceledEvent": - return cast( - "V1SetupIntentCanceledEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "SetupIntent": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SetupIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SetupIntentCanceledEvent": - return cast( - "V1SetupIntentCanceledEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "SetupIntent": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SetupIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SetupIntentCanceledEvent(Event): - LOOKUP_TYPE = "v1.setup_intent.canceled" - type: Literal["v1.setup_intent.canceled"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "SetupIntent": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "SetupIntent", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_setup_intent_created_event.py b/stripe/events/_v1_setup_intent_created_event.py deleted file mode 100644 index 9e1c73351..000000000 --- a/stripe/events/_v1_setup_intent_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._setup_intent import SetupIntent - from stripe._stripe_client import StripeClient - - -class V1SetupIntentCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.setup_intent.created" - type: Literal["v1.setup_intent.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SetupIntentCreatedEvent": - return cast( - "V1SetupIntentCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "SetupIntent": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SetupIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SetupIntentCreatedEvent": - return cast( - "V1SetupIntentCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "SetupIntent": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SetupIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SetupIntentCreatedEvent(Event): - LOOKUP_TYPE = "v1.setup_intent.created" - type: Literal["v1.setup_intent.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "SetupIntent": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "SetupIntent", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_setup_intent_requires_action_event.py b/stripe/events/_v1_setup_intent_requires_action_event.py deleted file mode 100644 index 61a3f6d2a..000000000 --- a/stripe/events/_v1_setup_intent_requires_action_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._setup_intent import SetupIntent - from stripe._stripe_client import StripeClient - - -class V1SetupIntentRequiresActionEventNotification(EventNotification): - LOOKUP_TYPE = "v1.setup_intent.requires_action" - type: Literal["v1.setup_intent.requires_action"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SetupIntentRequiresActionEvent": - return cast( - "V1SetupIntentRequiresActionEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "SetupIntent": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SetupIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SetupIntentRequiresActionEvent": - return cast( - "V1SetupIntentRequiresActionEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "SetupIntent": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SetupIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SetupIntentRequiresActionEvent(Event): - LOOKUP_TYPE = "v1.setup_intent.requires_action" - type: Literal["v1.setup_intent.requires_action"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "SetupIntent": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "SetupIntent", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_setup_intent_setup_failed_event.py b/stripe/events/_v1_setup_intent_setup_failed_event.py deleted file mode 100644 index 955ccd566..000000000 --- a/stripe/events/_v1_setup_intent_setup_failed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._setup_intent import SetupIntent - from stripe._stripe_client import StripeClient - - -class V1SetupIntentSetupFailedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.setup_intent.setup_failed" - type: Literal["v1.setup_intent.setup_failed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SetupIntentSetupFailedEvent": - return cast( - "V1SetupIntentSetupFailedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "SetupIntent": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SetupIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SetupIntentSetupFailedEvent": - return cast( - "V1SetupIntentSetupFailedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "SetupIntent": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SetupIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SetupIntentSetupFailedEvent(Event): - LOOKUP_TYPE = "v1.setup_intent.setup_failed" - type: Literal["v1.setup_intent.setup_failed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "SetupIntent": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "SetupIntent", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_setup_intent_succeeded_event.py b/stripe/events/_v1_setup_intent_succeeded_event.py deleted file mode 100644 index 52cec6fa7..000000000 --- a/stripe/events/_v1_setup_intent_succeeded_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._setup_intent import SetupIntent - from stripe._stripe_client import StripeClient - - -class V1SetupIntentSucceededEventNotification(EventNotification): - LOOKUP_TYPE = "v1.setup_intent.succeeded" - type: Literal["v1.setup_intent.succeeded"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SetupIntentSucceededEvent": - return cast( - "V1SetupIntentSucceededEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "SetupIntent": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SetupIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SetupIntentSucceededEvent": - return cast( - "V1SetupIntentSucceededEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "SetupIntent": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SetupIntent", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SetupIntentSucceededEvent(Event): - LOOKUP_TYPE = "v1.setup_intent.succeeded" - type: Literal["v1.setup_intent.succeeded"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "SetupIntent": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "SetupIntent", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_sigma_scheduled_query_run_created_event.py b/stripe/events/_v1_sigma_scheduled_query_run_created_event.py deleted file mode 100644 index f32f8c16e..000000000 --- a/stripe/events/_v1_sigma_scheduled_query_run_created_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.sigma._scheduled_query_run import ScheduledQueryRun - - -class V1SigmaScheduledQueryRunCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.sigma.scheduled_query_run.created" - type: Literal["v1.sigma.scheduled_query_run.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SigmaScheduledQueryRunCreatedEvent": - return cast( - "V1SigmaScheduledQueryRunCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "ScheduledQueryRun": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "ScheduledQueryRun", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1SigmaScheduledQueryRunCreatedEvent": - return cast( - "V1SigmaScheduledQueryRunCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "ScheduledQueryRun": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "ScheduledQueryRun", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SigmaScheduledQueryRunCreatedEvent(Event): - LOOKUP_TYPE = "v1.sigma.scheduled_query_run.created" - type: Literal["v1.sigma.scheduled_query_run.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "ScheduledQueryRun": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "ScheduledQueryRun", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_source_canceled_event.py b/stripe/events/_v1_source_canceled_event.py deleted file mode 100644 index 9998af216..000000000 --- a/stripe/events/_v1_source_canceled_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._source import Source - from stripe._stripe_client import StripeClient - - -class V1SourceCanceledEventNotification(EventNotification): - LOOKUP_TYPE = "v1.source.canceled" - type: Literal["v1.source.canceled"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SourceCanceledEvent": - return cast( - "V1SourceCanceledEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Source": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Source", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SourceCanceledEvent": - return cast( - "V1SourceCanceledEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Source": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Source", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SourceCanceledEvent(Event): - LOOKUP_TYPE = "v1.source.canceled" - type: Literal["v1.source.canceled"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Source": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Source", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_source_chargeable_event.py b/stripe/events/_v1_source_chargeable_event.py deleted file mode 100644 index 97b9c6e98..000000000 --- a/stripe/events/_v1_source_chargeable_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._source import Source - from stripe._stripe_client import StripeClient - - -class V1SourceChargeableEventNotification(EventNotification): - LOOKUP_TYPE = "v1.source.chargeable" - type: Literal["v1.source.chargeable"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SourceChargeableEvent": - return cast( - "V1SourceChargeableEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Source": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Source", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SourceChargeableEvent": - return cast( - "V1SourceChargeableEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Source": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Source", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SourceChargeableEvent(Event): - LOOKUP_TYPE = "v1.source.chargeable" - type: Literal["v1.source.chargeable"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Source": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Source", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_source_failed_event.py b/stripe/events/_v1_source_failed_event.py deleted file mode 100644 index 6a2e7e8e2..000000000 --- a/stripe/events/_v1_source_failed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._source import Source - from stripe._stripe_client import StripeClient - - -class V1SourceFailedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.source.failed" - type: Literal["v1.source.failed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SourceFailedEvent": - return cast( - "V1SourceFailedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Source": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Source", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SourceFailedEvent": - return cast( - "V1SourceFailedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Source": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Source", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SourceFailedEvent(Event): - LOOKUP_TYPE = "v1.source.failed" - type: Literal["v1.source.failed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Source": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Source", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_source_refund_attributes_required_event.py b/stripe/events/_v1_source_refund_attributes_required_event.py deleted file mode 100644 index 444ce623d..000000000 --- a/stripe/events/_v1_source_refund_attributes_required_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._source import Source - from stripe._stripe_client import StripeClient - - -class V1SourceRefundAttributesRequiredEventNotification(EventNotification): - LOOKUP_TYPE = "v1.source.refund_attributes_required" - type: Literal["v1.source.refund_attributes_required"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SourceRefundAttributesRequiredEvent": - return cast( - "V1SourceRefundAttributesRequiredEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Source": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Source", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1SourceRefundAttributesRequiredEvent": - return cast( - "V1SourceRefundAttributesRequiredEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Source": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Source", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SourceRefundAttributesRequiredEvent(Event): - LOOKUP_TYPE = "v1.source.refund_attributes_required" - type: Literal["v1.source.refund_attributes_required"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Source": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Source", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_subscription_schedule_aborted_event.py b/stripe/events/_v1_subscription_schedule_aborted_event.py deleted file mode 100644 index eda05bbc3..000000000 --- a/stripe/events/_v1_subscription_schedule_aborted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription_schedule import SubscriptionSchedule - - -class V1SubscriptionScheduleAbortedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.subscription_schedule.aborted" - type: Literal["v1.subscription_schedule.aborted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SubscriptionScheduleAbortedEvent": - return cast( - "V1SubscriptionScheduleAbortedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "SubscriptionSchedule": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SubscriptionScheduleAbortedEvent": - return cast( - "V1SubscriptionScheduleAbortedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "SubscriptionSchedule": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SubscriptionScheduleAbortedEvent(Event): - LOOKUP_TYPE = "v1.subscription_schedule.aborted" - type: Literal["v1.subscription_schedule.aborted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "SubscriptionSchedule": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "SubscriptionSchedule", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_subscription_schedule_canceled_event.py b/stripe/events/_v1_subscription_schedule_canceled_event.py deleted file mode 100644 index 60c417cf4..000000000 --- a/stripe/events/_v1_subscription_schedule_canceled_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription_schedule import SubscriptionSchedule - - -class V1SubscriptionScheduleCanceledEventNotification(EventNotification): - LOOKUP_TYPE = "v1.subscription_schedule.canceled" - type: Literal["v1.subscription_schedule.canceled"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SubscriptionScheduleCanceledEvent": - return cast( - "V1SubscriptionScheduleCanceledEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "SubscriptionSchedule": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SubscriptionScheduleCanceledEvent": - return cast( - "V1SubscriptionScheduleCanceledEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "SubscriptionSchedule": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SubscriptionScheduleCanceledEvent(Event): - LOOKUP_TYPE = "v1.subscription_schedule.canceled" - type: Literal["v1.subscription_schedule.canceled"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "SubscriptionSchedule": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "SubscriptionSchedule", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_subscription_schedule_completed_event.py b/stripe/events/_v1_subscription_schedule_completed_event.py deleted file mode 100644 index 8bcf58607..000000000 --- a/stripe/events/_v1_subscription_schedule_completed_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription_schedule import SubscriptionSchedule - - -class V1SubscriptionScheduleCompletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.subscription_schedule.completed" - type: Literal["v1.subscription_schedule.completed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SubscriptionScheduleCompletedEvent": - return cast( - "V1SubscriptionScheduleCompletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "SubscriptionSchedule": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1SubscriptionScheduleCompletedEvent": - return cast( - "V1SubscriptionScheduleCompletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "SubscriptionSchedule": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SubscriptionScheduleCompletedEvent(Event): - LOOKUP_TYPE = "v1.subscription_schedule.completed" - type: Literal["v1.subscription_schedule.completed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "SubscriptionSchedule": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "SubscriptionSchedule", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_subscription_schedule_created_event.py b/stripe/events/_v1_subscription_schedule_created_event.py deleted file mode 100644 index 9c9b84b36..000000000 --- a/stripe/events/_v1_subscription_schedule_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription_schedule import SubscriptionSchedule - - -class V1SubscriptionScheduleCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.subscription_schedule.created" - type: Literal["v1.subscription_schedule.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SubscriptionScheduleCreatedEvent": - return cast( - "V1SubscriptionScheduleCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "SubscriptionSchedule": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SubscriptionScheduleCreatedEvent": - return cast( - "V1SubscriptionScheduleCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "SubscriptionSchedule": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SubscriptionScheduleCreatedEvent(Event): - LOOKUP_TYPE = "v1.subscription_schedule.created" - type: Literal["v1.subscription_schedule.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "SubscriptionSchedule": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "SubscriptionSchedule", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_subscription_schedule_expiring_event.py b/stripe/events/_v1_subscription_schedule_expiring_event.py deleted file mode 100644 index cf28298d8..000000000 --- a/stripe/events/_v1_subscription_schedule_expiring_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription_schedule import SubscriptionSchedule - - -class V1SubscriptionScheduleExpiringEventNotification(EventNotification): - LOOKUP_TYPE = "v1.subscription_schedule.expiring" - type: Literal["v1.subscription_schedule.expiring"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SubscriptionScheduleExpiringEvent": - return cast( - "V1SubscriptionScheduleExpiringEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "SubscriptionSchedule": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SubscriptionScheduleExpiringEvent": - return cast( - "V1SubscriptionScheduleExpiringEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "SubscriptionSchedule": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SubscriptionScheduleExpiringEvent(Event): - LOOKUP_TYPE = "v1.subscription_schedule.expiring" - type: Literal["v1.subscription_schedule.expiring"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "SubscriptionSchedule": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "SubscriptionSchedule", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_subscription_schedule_released_event.py b/stripe/events/_v1_subscription_schedule_released_event.py deleted file mode 100644 index e51a76986..000000000 --- a/stripe/events/_v1_subscription_schedule_released_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription_schedule import SubscriptionSchedule - - -class V1SubscriptionScheduleReleasedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.subscription_schedule.released" - type: Literal["v1.subscription_schedule.released"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SubscriptionScheduleReleasedEvent": - return cast( - "V1SubscriptionScheduleReleasedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "SubscriptionSchedule": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SubscriptionScheduleReleasedEvent": - return cast( - "V1SubscriptionScheduleReleasedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "SubscriptionSchedule": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SubscriptionScheduleReleasedEvent(Event): - LOOKUP_TYPE = "v1.subscription_schedule.released" - type: Literal["v1.subscription_schedule.released"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "SubscriptionSchedule": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "SubscriptionSchedule", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_subscription_schedule_updated_event.py b/stripe/events/_v1_subscription_schedule_updated_event.py deleted file mode 100644 index cf57debb0..000000000 --- a/stripe/events/_v1_subscription_schedule_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._subscription_schedule import SubscriptionSchedule - - -class V1SubscriptionScheduleUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.subscription_schedule.updated" - type: Literal["v1.subscription_schedule.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1SubscriptionScheduleUpdatedEvent": - return cast( - "V1SubscriptionScheduleUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "SubscriptionSchedule": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1SubscriptionScheduleUpdatedEvent": - return cast( - "V1SubscriptionScheduleUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "SubscriptionSchedule": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "SubscriptionSchedule", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1SubscriptionScheduleUpdatedEvent(Event): - LOOKUP_TYPE = "v1.subscription_schedule.updated" - type: Literal["v1.subscription_schedule.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "SubscriptionSchedule": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "SubscriptionSchedule", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_tax_rate_created_event.py b/stripe/events/_v1_tax_rate_created_event.py deleted file mode 100644 index 2ee633f0c..000000000 --- a/stripe/events/_v1_tax_rate_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._tax_rate import TaxRate - - -class V1TaxRateCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.tax_rate.created" - type: Literal["v1.tax_rate.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TaxRateCreatedEvent": - return cast( - "V1TaxRateCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "TaxRate": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TaxRate", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TaxRateCreatedEvent": - return cast( - "V1TaxRateCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "TaxRate": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TaxRate", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TaxRateCreatedEvent(Event): - LOOKUP_TYPE = "v1.tax_rate.created" - type: Literal["v1.tax_rate.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "TaxRate": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "TaxRate", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_tax_rate_updated_event.py b/stripe/events/_v1_tax_rate_updated_event.py deleted file mode 100644 index 16bd32fcb..000000000 --- a/stripe/events/_v1_tax_rate_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._tax_rate import TaxRate - - -class V1TaxRateUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.tax_rate.updated" - type: Literal["v1.tax_rate.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TaxRateUpdatedEvent": - return cast( - "V1TaxRateUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "TaxRate": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TaxRate", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TaxRateUpdatedEvent": - return cast( - "V1TaxRateUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "TaxRate": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TaxRate", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TaxRateUpdatedEvent(Event): - LOOKUP_TYPE = "v1.tax_rate.updated" - type: Literal["v1.tax_rate.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "TaxRate": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "TaxRate", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_terminal_reader_action_failed_event.py b/stripe/events/_v1_terminal_reader_action_failed_event.py deleted file mode 100644 index c7a2e817b..000000000 --- a/stripe/events/_v1_terminal_reader_action_failed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.terminal._reader import Reader - - -class V1TerminalReaderActionFailedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.terminal.reader.action_failed" - type: Literal["v1.terminal.reader.action_failed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TerminalReaderActionFailedEvent": - return cast( - "V1TerminalReaderActionFailedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Reader": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Reader", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TerminalReaderActionFailedEvent": - return cast( - "V1TerminalReaderActionFailedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Reader": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Reader", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TerminalReaderActionFailedEvent(Event): - LOOKUP_TYPE = "v1.terminal.reader.action_failed" - type: Literal["v1.terminal.reader.action_failed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Reader": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Reader", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_terminal_reader_action_succeeded_event.py b/stripe/events/_v1_terminal_reader_action_succeeded_event.py deleted file mode 100644 index 6b024b78f..000000000 --- a/stripe/events/_v1_terminal_reader_action_succeeded_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.terminal._reader import Reader - - -class V1TerminalReaderActionSucceededEventNotification(EventNotification): - LOOKUP_TYPE = "v1.terminal.reader.action_succeeded" - type: Literal["v1.terminal.reader.action_succeeded"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TerminalReaderActionSucceededEvent": - return cast( - "V1TerminalReaderActionSucceededEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Reader": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Reader", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1TerminalReaderActionSucceededEvent": - return cast( - "V1TerminalReaderActionSucceededEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Reader": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Reader", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TerminalReaderActionSucceededEvent(Event): - LOOKUP_TYPE = "v1.terminal.reader.action_succeeded" - type: Literal["v1.terminal.reader.action_succeeded"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Reader": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Reader", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_terminal_reader_action_updated_event.py b/stripe/events/_v1_terminal_reader_action_updated_event.py deleted file mode 100644 index 51072a634..000000000 --- a/stripe/events/_v1_terminal_reader_action_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.terminal._reader import Reader - - -class V1TerminalReaderActionUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.terminal.reader.action_updated" - type: Literal["v1.terminal.reader.action_updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TerminalReaderActionUpdatedEvent": - return cast( - "V1TerminalReaderActionUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Reader": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Reader", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TerminalReaderActionUpdatedEvent": - return cast( - "V1TerminalReaderActionUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Reader": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Reader", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TerminalReaderActionUpdatedEvent(Event): - LOOKUP_TYPE = "v1.terminal.reader.action_updated" - type: Literal["v1.terminal.reader.action_updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Reader": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Reader", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_test_helpers_test_clock_advancing_event.py b/stripe/events/_v1_test_helpers_test_clock_advancing_event.py deleted file mode 100644 index c73cf5f9c..000000000 --- a/stripe/events/_v1_test_helpers_test_clock_advancing_event.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.test_helpers._test_clock import TestClock - - -class V1TestHelpersTestClockAdvancingEventNotification(EventNotification): - LOOKUP_TYPE = "v1.test_helpers.test_clock.advancing" - type: Literal["v1.test_helpers.test_clock.advancing"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TestHelpersTestClockAdvancingEvent": - return cast( - "V1TestHelpersTestClockAdvancingEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "TestClock": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TestClock", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1TestHelpersTestClockAdvancingEvent": - return cast( - "V1TestHelpersTestClockAdvancingEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "TestClock": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TestClock", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TestHelpersTestClockAdvancingEvent(Event): - LOOKUP_TYPE = "v1.test_helpers.test_clock.advancing" - type: Literal["v1.test_helpers.test_clock.advancing"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "TestClock": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "TestClock", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_test_helpers_test_clock_created_event.py b/stripe/events/_v1_test_helpers_test_clock_created_event.py deleted file mode 100644 index dfff90865..000000000 --- a/stripe/events/_v1_test_helpers_test_clock_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.test_helpers._test_clock import TestClock - - -class V1TestHelpersTestClockCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.test_helpers.test_clock.created" - type: Literal["v1.test_helpers.test_clock.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TestHelpersTestClockCreatedEvent": - return cast( - "V1TestHelpersTestClockCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "TestClock": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TestClock", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TestHelpersTestClockCreatedEvent": - return cast( - "V1TestHelpersTestClockCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "TestClock": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TestClock", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TestHelpersTestClockCreatedEvent(Event): - LOOKUP_TYPE = "v1.test_helpers.test_clock.created" - type: Literal["v1.test_helpers.test_clock.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "TestClock": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "TestClock", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_test_helpers_test_clock_deleted_event.py b/stripe/events/_v1_test_helpers_test_clock_deleted_event.py deleted file mode 100644 index cf93a0026..000000000 --- a/stripe/events/_v1_test_helpers_test_clock_deleted_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.test_helpers._test_clock import TestClock - - -class V1TestHelpersTestClockDeletedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.test_helpers.test_clock.deleted" - type: Literal["v1.test_helpers.test_clock.deleted"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TestHelpersTestClockDeletedEvent": - return cast( - "V1TestHelpersTestClockDeletedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "TestClock": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TestClock", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TestHelpersTestClockDeletedEvent": - return cast( - "V1TestHelpersTestClockDeletedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "TestClock": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TestClock", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TestHelpersTestClockDeletedEvent(Event): - LOOKUP_TYPE = "v1.test_helpers.test_clock.deleted" - type: Literal["v1.test_helpers.test_clock.deleted"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "TestClock": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "TestClock", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_test_helpers_test_clock_internal_failure_event.py b/stripe/events/_v1_test_helpers_test_clock_internal_failure_event.py deleted file mode 100644 index 3b41d3b2c..000000000 --- a/stripe/events/_v1_test_helpers_test_clock_internal_failure_event.py +++ /dev/null @@ -1,112 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.test_helpers._test_clock import TestClock - - -class V1TestHelpersTestClockInternalFailureEventNotification( - EventNotification -): - LOOKUP_TYPE = "v1.test_helpers.test_clock.internal_failure" - type: Literal["v1.test_helpers.test_clock.internal_failure"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TestHelpersTestClockInternalFailureEvent": - return cast( - "V1TestHelpersTestClockInternalFailureEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "TestClock": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TestClock", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async( - self, - ) -> "V1TestHelpersTestClockInternalFailureEvent": - return cast( - "V1TestHelpersTestClockInternalFailureEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "TestClock": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TestClock", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TestHelpersTestClockInternalFailureEvent(Event): - LOOKUP_TYPE = "v1.test_helpers.test_clock.internal_failure" - type: Literal["v1.test_helpers.test_clock.internal_failure"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "TestClock": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "TestClock", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_test_helpers_test_clock_ready_event.py b/stripe/events/_v1_test_helpers_test_clock_ready_event.py deleted file mode 100644 index 41bf647cf..000000000 --- a/stripe/events/_v1_test_helpers_test_clock_ready_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe.test_helpers._test_clock import TestClock - - -class V1TestHelpersTestClockReadyEventNotification(EventNotification): - LOOKUP_TYPE = "v1.test_helpers.test_clock.ready" - type: Literal["v1.test_helpers.test_clock.ready"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TestHelpersTestClockReadyEvent": - return cast( - "V1TestHelpersTestClockReadyEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "TestClock": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TestClock", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TestHelpersTestClockReadyEvent": - return cast( - "V1TestHelpersTestClockReadyEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "TestClock": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "TestClock", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TestHelpersTestClockReadyEvent(Event): - LOOKUP_TYPE = "v1.test_helpers.test_clock.ready" - type: Literal["v1.test_helpers.test_clock.ready"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "TestClock": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "TestClock", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_topup_canceled_event.py b/stripe/events/_v1_topup_canceled_event.py deleted file mode 100644 index 2a66e0e9a..000000000 --- a/stripe/events/_v1_topup_canceled_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._topup import Topup - - -class V1TopupCanceledEventNotification(EventNotification): - LOOKUP_TYPE = "v1.topup.canceled" - type: Literal["v1.topup.canceled"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TopupCanceledEvent": - return cast( - "V1TopupCanceledEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Topup": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Topup", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TopupCanceledEvent": - return cast( - "V1TopupCanceledEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Topup": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Topup", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TopupCanceledEvent(Event): - LOOKUP_TYPE = "v1.topup.canceled" - type: Literal["v1.topup.canceled"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Topup": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Topup", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_topup_created_event.py b/stripe/events/_v1_topup_created_event.py deleted file mode 100644 index 8fcad1f50..000000000 --- a/stripe/events/_v1_topup_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._topup import Topup - - -class V1TopupCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.topup.created" - type: Literal["v1.topup.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TopupCreatedEvent": - return cast( - "V1TopupCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Topup": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Topup", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TopupCreatedEvent": - return cast( - "V1TopupCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Topup": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Topup", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TopupCreatedEvent(Event): - LOOKUP_TYPE = "v1.topup.created" - type: Literal["v1.topup.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Topup": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Topup", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_topup_failed_event.py b/stripe/events/_v1_topup_failed_event.py deleted file mode 100644 index f477ef141..000000000 --- a/stripe/events/_v1_topup_failed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._topup import Topup - - -class V1TopupFailedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.topup.failed" - type: Literal["v1.topup.failed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TopupFailedEvent": - return cast( - "V1TopupFailedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Topup": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Topup", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TopupFailedEvent": - return cast( - "V1TopupFailedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Topup": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Topup", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TopupFailedEvent(Event): - LOOKUP_TYPE = "v1.topup.failed" - type: Literal["v1.topup.failed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Topup": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Topup", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_topup_reversed_event.py b/stripe/events/_v1_topup_reversed_event.py deleted file mode 100644 index 6e8f98c64..000000000 --- a/stripe/events/_v1_topup_reversed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._topup import Topup - - -class V1TopupReversedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.topup.reversed" - type: Literal["v1.topup.reversed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TopupReversedEvent": - return cast( - "V1TopupReversedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Topup": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Topup", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TopupReversedEvent": - return cast( - "V1TopupReversedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Topup": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Topup", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TopupReversedEvent(Event): - LOOKUP_TYPE = "v1.topup.reversed" - type: Literal["v1.topup.reversed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Topup": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Topup", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_topup_succeeded_event.py b/stripe/events/_v1_topup_succeeded_event.py deleted file mode 100644 index 83cd6ee65..000000000 --- a/stripe/events/_v1_topup_succeeded_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._topup import Topup - - -class V1TopupSucceededEventNotification(EventNotification): - LOOKUP_TYPE = "v1.topup.succeeded" - type: Literal["v1.topup.succeeded"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TopupSucceededEvent": - return cast( - "V1TopupSucceededEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Topup": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Topup", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TopupSucceededEvent": - return cast( - "V1TopupSucceededEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Topup": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Topup", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TopupSucceededEvent(Event): - LOOKUP_TYPE = "v1.topup.succeeded" - type: Literal["v1.topup.succeeded"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Topup": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Topup", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_transfer_created_event.py b/stripe/events/_v1_transfer_created_event.py deleted file mode 100644 index 9bceec711..000000000 --- a/stripe/events/_v1_transfer_created_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._transfer import Transfer - - -class V1TransferCreatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.transfer.created" - type: Literal["v1.transfer.created"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TransferCreatedEvent": - return cast( - "V1TransferCreatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Transfer": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Transfer", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TransferCreatedEvent": - return cast( - "V1TransferCreatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Transfer": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Transfer", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TransferCreatedEvent(Event): - LOOKUP_TYPE = "v1.transfer.created" - type: Literal["v1.transfer.created"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Transfer": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Transfer", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_transfer_reversed_event.py b/stripe/events/_v1_transfer_reversed_event.py deleted file mode 100644 index fbe85fca1..000000000 --- a/stripe/events/_v1_transfer_reversed_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._transfer import Transfer - - -class V1TransferReversedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.transfer.reversed" - type: Literal["v1.transfer.reversed"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TransferReversedEvent": - return cast( - "V1TransferReversedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Transfer": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Transfer", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TransferReversedEvent": - return cast( - "V1TransferReversedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Transfer": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Transfer", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TransferReversedEvent(Event): - LOOKUP_TYPE = "v1.transfer.reversed" - type: Literal["v1.transfer.reversed"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Transfer": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Transfer", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v1_transfer_updated_event.py b/stripe/events/_v1_transfer_updated_event.py deleted file mode 100644 index c3738cdda..000000000 --- a/stripe/events/_v1_transfer_updated_event.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from stripe._stripe_object import StripeObject -from stripe._util import get_api_mode -from stripe.v2.core._event import Event, EventNotification, RelatedObject -from typing import Any, Dict, cast -from typing_extensions import Literal, TYPE_CHECKING, override - -if TYPE_CHECKING: - from stripe._stripe_client import StripeClient - from stripe._transfer import Transfer - - -class V1TransferUpdatedEventNotification(EventNotification): - LOOKUP_TYPE = "v1.transfer.updated" - type: Literal["v1.transfer.updated"] - related_object: RelatedObject - - def __init__( - self, parsed_body: Dict[str, Any], client: "StripeClient" - ) -> None: - super().__init__( - parsed_body, - client, - ) - self.related_object = RelatedObject(parsed_body["related_object"]) - - @override - def fetch_event(self) -> "V1TransferUpdatedEvent": - return cast( - "V1TransferUpdatedEvent", - super().fetch_event(), - ) - - def fetch_related_object(self) -> "Transfer": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Transfer", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - @override - async def fetch_event_async(self) -> "V1TransferUpdatedEvent": - return cast( - "V1TransferUpdatedEvent", - await super().fetch_event_async(), - ) - - async def fetch_related_object_async(self) -> "Transfer": - response = await self._client.raw_request_async( - "get", - self.related_object.url, - stripe_context=self.context, - usage=["fetch_related_object"], - ) - return cast( - "Transfer", - self._client.deserialize( - response, - api_mode=get_api_mode(self.related_object.url), - ), - ) - - -class V1TransferUpdatedEvent(Event): - LOOKUP_TYPE = "v1.transfer.updated" - type: Literal["v1.transfer.updated"] - - class RelatedObject(StripeObject): - id: str - """ - Unique identifier for the object relevant to the event. - """ - type: str - """ - Type of the object relevant to the event. - """ - url: str - """ - URL to retrieve the resource. - """ - - related_object: RelatedObject - """ - Object containing the reference to API resource relevant to the event - """ - - def fetch_related_object(self) -> "Transfer": - """ - Retrieves the related object from the API. Makes an API request on every call. - """ - return cast( - "Transfer", - self._requestor.request( - "get", - self.related_object.url, - base_address="api", - options={"stripe_context": self.context}, - ), - ) diff --git a/stripe/events/_v2_core_health_api_error_firing_event.py b/stripe/events/_v2_core_health_api_error_firing_event.py index 771cc3ecd..1594a6645 100644 --- a/stripe/events/_v2_core_health_api_error_firing_event.py +++ b/stripe/events/_v2_core_health_api_error_firing_event.py @@ -56,6 +56,10 @@ class Impact(StripeObject): """ The number of impacted requests. """ + impacted_requests_percentage: Optional[str] + """ + The percentage of impacted requests. + """ alert_id: str """ diff --git a/stripe/events/_v2_core_health_api_error_resolved_event.py b/stripe/events/_v2_core_health_api_error_resolved_event.py index 011999d07..f3196b23d 100644 --- a/stripe/events/_v2_core_health_api_error_resolved_event.py +++ b/stripe/events/_v2_core_health_api_error_resolved_event.py @@ -56,6 +56,10 @@ class Impact(StripeObject): """ The number of impacted requests. """ + impacted_requests_percentage: Optional[str] + """ + The percentage of impacted requests. + """ grouping_key: str """ diff --git a/stripe/events/_v2_core_health_api_latency_firing_event.py b/stripe/events/_v2_core_health_api_latency_firing_event.py index 0965431a4..8b17c51f9 100644 --- a/stripe/events/_v2_core_health_api_latency_firing_event.py +++ b/stripe/events/_v2_core_health_api_latency_firing_event.py @@ -52,6 +52,10 @@ class Impact(StripeObject): """ The number of impacted requests. """ + impacted_requests_percentage: Optional[str] + """ + The percentage of impacted requests. + """ alert_id: str """ diff --git a/stripe/events/_v2_core_health_api_latency_resolved_event.py b/stripe/events/_v2_core_health_api_latency_resolved_event.py index 0e4117b6b..58ce33987 100644 --- a/stripe/events/_v2_core_health_api_latency_resolved_event.py +++ b/stripe/events/_v2_core_health_api_latency_resolved_event.py @@ -52,6 +52,10 @@ class Impact(StripeObject): """ The number of impacted requests. """ + impacted_requests_percentage: Optional[str] + """ + The percentage of impacted requests. + """ grouping_key: str """ diff --git a/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py b/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py index 125aee82e..12c4163a6 100644 --- a/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py +++ b/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py @@ -40,26 +40,33 @@ class V2CoreHealthEventGenerationFailureResolvedEvent(Event): class V2CoreHealthEventGenerationFailureResolvedEventData(StripeObject): class Impact(StripeObject): - account: Optional[str] + class RelatedObject(StripeObject): + id: str + """ + The ID of the related object (e.g., "pi_..."). + """ + type: str + """ + The type of the related object (e.g., "payment_intent"). + """ + url: str + """ + The API URL for the related object (e.g., "/v1/payment_intents/pi_..."). + """ + + context: Optional[str] """ - The account id the event should have been generated for. Only present when the account is a connected account. + The context the event should have been generated for. Only present when the account is a connected account. """ event_type: str """ The type of event that Stripe failed to generate. """ - livemode: bool - """ - Indicates if the event was for livemode or not. - """ - missing_delivery_attempts: int - """ - The number of webhooks that Stripe failed to create and deliver. - """ - related_object_id: str + related_object: RelatedObject """ - The related object id. + The related object details. """ + _inner_class_types = {"related_object": RelatedObject} alert_id: str """ diff --git a/stripe/events/_v2_core_health_fraud_rate_increased_event.py b/stripe/events/_v2_core_health_fraud_rate_increased_event.py index a742707a7..5cf867eac 100644 --- a/stripe/events/_v2_core_health_fraud_rate_increased_event.py +++ b/stripe/events/_v2_core_health_fraud_rate_increased_event.py @@ -3,7 +3,6 @@ from stripe._api_mode import ApiMode from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._amount import Amount from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING, override @@ -37,6 +36,16 @@ class V2CoreHealthFraudRateIncreasedEvent(Event): class V2CoreHealthFraudRateIncreasedEventData(StripeObject): class Impact(StripeObject): + class RealizedFraudAmount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + attack_type: Literal["spike", "sustained_attack"] """ Fraud attack type. @@ -45,10 +54,11 @@ class Impact(StripeObject): """ The number of impacted requests which are detected. """ - realized_fraud_amount: Amount + realized_fraud_amount: RealizedFraudAmount """ Estimated aggregated amount for the impacted requests. """ + _inner_class_types = {"realized_fraud_amount": RealizedFraudAmount} alert_id: str """ diff --git a/stripe/events/_v2_core_health_issuing_authorization_request_errors_firing_event.py b/stripe/events/_v2_core_health_issuing_authorization_request_errors_firing_event.py index 886d50373..f0b6c57ee 100644 --- a/stripe/events/_v2_core_health_issuing_authorization_request_errors_firing_event.py +++ b/stripe/events/_v2_core_health_issuing_authorization_request_errors_firing_event.py @@ -3,7 +3,6 @@ from stripe._api_mode import ApiMode from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._amount import Amount from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING, override @@ -45,7 +44,27 @@ class V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventData( StripeObject, ): class Impact(StripeObject): - approved_amount: Optional[Amount] + class ApprovedAmount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + class DeclinedAmount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + approved_amount: Optional[ApprovedAmount] """ Estimated aggregated amount for the approved requests. """ @@ -53,7 +72,7 @@ class Impact(StripeObject): """ The number of approved requests which are impacted. """ - declined_amount: Optional[Amount] + declined_amount: Optional[DeclinedAmount] """ Estimated aggregated amount for the declined requests. """ @@ -61,6 +80,10 @@ class Impact(StripeObject): """ The number of declined requests which are impacted. """ + _inner_class_types = { + "approved_amount": ApprovedAmount, + "declined_amount": DeclinedAmount, + } grouping_key: str """ diff --git a/stripe/events/_v2_core_health_issuing_authorization_request_errors_resolved_event.py b/stripe/events/_v2_core_health_issuing_authorization_request_errors_resolved_event.py index f3c1c4f74..d32294cf0 100644 --- a/stripe/events/_v2_core_health_issuing_authorization_request_errors_resolved_event.py +++ b/stripe/events/_v2_core_health_issuing_authorization_request_errors_resolved_event.py @@ -3,7 +3,6 @@ from stripe._api_mode import ApiMode from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._amount import Amount from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING, override @@ -53,7 +52,27 @@ class V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventData( StripeObject, ): class Impact(StripeObject): - approved_amount: Optional[Amount] + class ApprovedAmount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + class DeclinedAmount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + approved_amount: Optional[ApprovedAmount] """ Estimated aggregated amount for the approved requests. """ @@ -61,7 +80,7 @@ class Impact(StripeObject): """ The number of approved requests which are impacted. """ - declined_amount: Optional[Amount] + declined_amount: Optional[DeclinedAmount] """ Estimated aggregated amount for the declined requests. """ @@ -69,6 +88,10 @@ class Impact(StripeObject): """ The number of declined requests which are impacted. """ + _inner_class_types = { + "approved_amount": ApprovedAmount, + "declined_amount": DeclinedAmount, + } grouping_key: str """ diff --git a/stripe/events/_v2_core_health_issuing_authorization_request_timeout_firing_event.py b/stripe/events/_v2_core_health_issuing_authorization_request_timeout_firing_event.py index b42787484..d5350f40f 100644 --- a/stripe/events/_v2_core_health_issuing_authorization_request_timeout_firing_event.py +++ b/stripe/events/_v2_core_health_issuing_authorization_request_timeout_firing_event.py @@ -3,7 +3,6 @@ from stripe._api_mode import ApiMode from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._amount import Amount from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING, override @@ -49,7 +48,27 @@ class V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventData( StripeObject, ): class Impact(StripeObject): - approved_amount: Optional[Amount] + class ApprovedAmount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + class DeclinedAmount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + approved_amount: Optional[ApprovedAmount] """ Estimated aggregated amount for the approved requests. """ @@ -57,7 +76,7 @@ class Impact(StripeObject): """ The number of approved requests which are impacted. """ - declined_amount: Optional[Amount] + declined_amount: Optional[DeclinedAmount] """ Estimated aggregated amount for the declined requests. """ @@ -65,6 +84,10 @@ class Impact(StripeObject): """ The number of declined requests which are impacted. """ + _inner_class_types = { + "approved_amount": ApprovedAmount, + "declined_amount": DeclinedAmount, + } alert_id: str """ diff --git a/stripe/events/_v2_core_health_issuing_authorization_request_timeout_resolved_event.py b/stripe/events/_v2_core_health_issuing_authorization_request_timeout_resolved_event.py index 0ba247ccf..43739b198 100644 --- a/stripe/events/_v2_core_health_issuing_authorization_request_timeout_resolved_event.py +++ b/stripe/events/_v2_core_health_issuing_authorization_request_timeout_resolved_event.py @@ -3,7 +3,6 @@ from stripe._api_mode import ApiMode from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._amount import Amount from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, TYPE_CHECKING, override @@ -53,7 +52,27 @@ class V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventData( StripeObject, ): class Impact(StripeObject): - approved_amount: Optional[Amount] + class ApprovedAmount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + class DeclinedAmount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + approved_amount: Optional[ApprovedAmount] """ Estimated aggregated amount for the approved requests. """ @@ -61,7 +80,7 @@ class Impact(StripeObject): """ The number of approved requests which are impacted. """ - declined_amount: Optional[Amount] + declined_amount: Optional[DeclinedAmount] """ Estimated aggregated amount for the declined requests. """ @@ -69,6 +88,10 @@ class Impact(StripeObject): """ The number of declined requests which are impacted. """ + _inner_class_types = { + "approved_amount": ApprovedAmount, + "declined_amount": DeclinedAmount, + } grouping_key: str """ diff --git a/stripe/events/_v2_core_health_payment_method_error_firing_event.py b/stripe/events/_v2_core_health_payment_method_error_firing_event.py index 1a1371734..daa8a00c8 100644 --- a/stripe/events/_v2_core_health_payment_method_error_firing_event.py +++ b/stripe/events/_v2_core_health_payment_method_error_firing_event.py @@ -46,6 +46,10 @@ class Impact(StripeObject): """ The number of impacted requests. """ + impacted_requests_percentage: Optional[str] + """ + The percentage of impacted requests. + """ payment_method_type: Literal[ "acss_debit", "affirm", diff --git a/stripe/events/_v2_core_health_payment_method_error_resolved_event.py b/stripe/events/_v2_core_health_payment_method_error_resolved_event.py index e2f38d4bd..67dfb355a 100644 --- a/stripe/events/_v2_core_health_payment_method_error_resolved_event.py +++ b/stripe/events/_v2_core_health_payment_method_error_resolved_event.py @@ -48,6 +48,10 @@ class Impact(StripeObject): """ The number of impacted requests. """ + impacted_requests_percentage: Optional[str] + """ + The percentage of impacted requests. + """ payment_method_type: Literal[ "acss_debit", "affirm", diff --git a/stripe/events/_v1_financial_connections_account_reactivated_event.py b/stripe/events/_v2_payments_off_session_payment_attempt_failed_event.py similarity index 70% rename from stripe/events/_v1_financial_connections_account_reactivated_event.py rename to stripe/events/_v2_payments_off_session_payment_attempt_failed_event.py index 99d93b2b3..6536ffbb9 100644 --- a/stripe/events/_v1_financial_connections_account_reactivated_event.py +++ b/stripe/events/_v2_payments_off_session_payment_attempt_failed_event.py @@ -8,14 +8,14 @@ if TYPE_CHECKING: from stripe._stripe_client import StripeClient - from stripe.financial_connections._account import Account + from stripe.v2.payments._off_session_payment import OffSessionPayment -class V1FinancialConnectionsAccountReactivatedEventNotification( +class V2PaymentsOffSessionPaymentAttemptFailedEventNotification( EventNotification, ): - LOOKUP_TYPE = "v1.financial_connections.account.reactivated" - type: Literal["v1.financial_connections.account.reactivated"] + LOOKUP_TYPE = "v2.payments.off_session_payment.attempt_failed" + type: Literal["v2.payments.off_session_payment.attempt_failed"] related_object: RelatedObject def __init__( @@ -28,13 +28,13 @@ def __init__( self.related_object = RelatedObject(parsed_body["related_object"]) @override - def fetch_event(self) -> "V1FinancialConnectionsAccountReactivatedEvent": + def fetch_event(self) -> "V2PaymentsOffSessionPaymentAttemptFailedEvent": return cast( - "V1FinancialConnectionsAccountReactivatedEvent", + "V2PaymentsOffSessionPaymentAttemptFailedEvent", super().fetch_event(), ) - def fetch_related_object(self) -> "Account": + def fetch_related_object(self) -> "OffSessionPayment": response = self._client.raw_request( "get", self.related_object.url, @@ -42,7 +42,7 @@ def fetch_related_object(self) -> "Account": usage=["fetch_related_object"], ) return cast( - "Account", + "OffSessionPayment", self._client.deserialize( response, api_mode=get_api_mode(self.related_object.url), @@ -52,13 +52,13 @@ def fetch_related_object(self) -> "Account": @override async def fetch_event_async( self, - ) -> "V1FinancialConnectionsAccountReactivatedEvent": + ) -> "V2PaymentsOffSessionPaymentAttemptFailedEvent": return cast( - "V1FinancialConnectionsAccountReactivatedEvent", + "V2PaymentsOffSessionPaymentAttemptFailedEvent", await super().fetch_event_async(), ) - async def fetch_related_object_async(self) -> "Account": + async def fetch_related_object_async(self) -> "OffSessionPayment": response = await self._client.raw_request_async( "get", self.related_object.url, @@ -66,7 +66,7 @@ async def fetch_related_object_async(self) -> "Account": usage=["fetch_related_object"], ) return cast( - "Account", + "OffSessionPayment", self._client.deserialize( response, api_mode=get_api_mode(self.related_object.url), @@ -74,9 +74,9 @@ async def fetch_related_object_async(self) -> "Account": ) -class V1FinancialConnectionsAccountReactivatedEvent(Event): - LOOKUP_TYPE = "v1.financial_connections.account.reactivated" - type: Literal["v1.financial_connections.account.reactivated"] +class V2PaymentsOffSessionPaymentAttemptFailedEvent(Event): + LOOKUP_TYPE = "v2.payments.off_session_payment.attempt_failed" + type: Literal["v2.payments.off_session_payment.attempt_failed"] class RelatedObject(StripeObject): id: str @@ -97,12 +97,12 @@ class RelatedObject(StripeObject): Object containing the reference to API resource relevant to the event """ - def fetch_related_object(self) -> "Account": + def fetch_related_object(self) -> "OffSessionPayment": """ Retrieves the related object from the API. Makes an API request on every call. """ return cast( - "Account", + "OffSessionPayment", self._requestor.request( "get", self.related_object.url, diff --git a/stripe/events/_v1_financial_connections_account_refreshed_balance_event.py b/stripe/events/_v2_payments_off_session_payment_attempt_started_event.py similarity index 72% rename from stripe/events/_v1_financial_connections_account_refreshed_balance_event.py rename to stripe/events/_v2_payments_off_session_payment_attempt_started_event.py index b4b688500..f38fe364f 100644 --- a/stripe/events/_v1_financial_connections_account_refreshed_balance_event.py +++ b/stripe/events/_v2_payments_off_session_payment_attempt_started_event.py @@ -8,14 +8,14 @@ if TYPE_CHECKING: from stripe._stripe_client import StripeClient - from stripe.financial_connections._account import Account + from stripe.v2.payments._off_session_payment import OffSessionPayment -class V1FinancialConnectionsAccountRefreshedBalanceEventNotification( +class V2PaymentsOffSessionPaymentAttemptStartedEventNotification( EventNotification, ): - LOOKUP_TYPE = "v1.financial_connections.account.refreshed_balance" - type: Literal["v1.financial_connections.account.refreshed_balance"] + LOOKUP_TYPE = "v2.payments.off_session_payment.attempt_started" + type: Literal["v2.payments.off_session_payment.attempt_started"] related_object: RelatedObject def __init__( @@ -28,15 +28,13 @@ def __init__( self.related_object = RelatedObject(parsed_body["related_object"]) @override - def fetch_event( - self, - ) -> "V1FinancialConnectionsAccountRefreshedBalanceEvent": + def fetch_event(self) -> "V2PaymentsOffSessionPaymentAttemptStartedEvent": return cast( - "V1FinancialConnectionsAccountRefreshedBalanceEvent", + "V2PaymentsOffSessionPaymentAttemptStartedEvent", super().fetch_event(), ) - def fetch_related_object(self) -> "Account": + def fetch_related_object(self) -> "OffSessionPayment": response = self._client.raw_request( "get", self.related_object.url, @@ -44,7 +42,7 @@ def fetch_related_object(self) -> "Account": usage=["fetch_related_object"], ) return cast( - "Account", + "OffSessionPayment", self._client.deserialize( response, api_mode=get_api_mode(self.related_object.url), @@ -54,13 +52,13 @@ def fetch_related_object(self) -> "Account": @override async def fetch_event_async( self, - ) -> "V1FinancialConnectionsAccountRefreshedBalanceEvent": + ) -> "V2PaymentsOffSessionPaymentAttemptStartedEvent": return cast( - "V1FinancialConnectionsAccountRefreshedBalanceEvent", + "V2PaymentsOffSessionPaymentAttemptStartedEvent", await super().fetch_event_async(), ) - async def fetch_related_object_async(self) -> "Account": + async def fetch_related_object_async(self) -> "OffSessionPayment": response = await self._client.raw_request_async( "get", self.related_object.url, @@ -68,7 +66,7 @@ async def fetch_related_object_async(self) -> "Account": usage=["fetch_related_object"], ) return cast( - "Account", + "OffSessionPayment", self._client.deserialize( response, api_mode=get_api_mode(self.related_object.url), @@ -76,9 +74,9 @@ async def fetch_related_object_async(self) -> "Account": ) -class V1FinancialConnectionsAccountRefreshedBalanceEvent(Event): - LOOKUP_TYPE = "v1.financial_connections.account.refreshed_balance" - type: Literal["v1.financial_connections.account.refreshed_balance"] +class V2PaymentsOffSessionPaymentAttemptStartedEvent(Event): + LOOKUP_TYPE = "v2.payments.off_session_payment.attempt_started" + type: Literal["v2.payments.off_session_payment.attempt_started"] class RelatedObject(StripeObject): id: str @@ -99,12 +97,12 @@ class RelatedObject(StripeObject): Object containing the reference to API resource relevant to the event """ - def fetch_related_object(self) -> "Account": + def fetch_related_object(self) -> "OffSessionPayment": """ Retrieves the related object from the API. Makes an API request on every call. """ return cast( - "Account", + "OffSessionPayment", self._requestor.request( "get", self.related_object.url, diff --git a/stripe/params/v2/billing/__init__.py b/stripe/params/v2/billing/__init__.py index 8f3b659ea..89504bed7 100644 --- a/stripe/params/v2/billing/__init__.py +++ b/stripe/params/v2/billing/__init__.py @@ -290,12 +290,14 @@ ServiceActionCreateParamsCreditGrant as ServiceActionCreateParamsCreditGrant, ServiceActionCreateParamsCreditGrantAmount as ServiceActionCreateParamsCreditGrantAmount, ServiceActionCreateParamsCreditGrantAmountCustomPricingUnit as ServiceActionCreateParamsCreditGrantAmountCustomPricingUnit, + ServiceActionCreateParamsCreditGrantAmountMonetary as ServiceActionCreateParamsCreditGrantAmountMonetary, ServiceActionCreateParamsCreditGrantApplicabilityConfig as ServiceActionCreateParamsCreditGrantApplicabilityConfig, ServiceActionCreateParamsCreditGrantApplicabilityConfigScope as ServiceActionCreateParamsCreditGrantApplicabilityConfigScope, ServiceActionCreateParamsCreditGrantExpiryConfig as ServiceActionCreateParamsCreditGrantExpiryConfig, ServiceActionCreateParamsCreditGrantPerTenant as ServiceActionCreateParamsCreditGrantPerTenant, ServiceActionCreateParamsCreditGrantPerTenantAmount as ServiceActionCreateParamsCreditGrantPerTenantAmount, ServiceActionCreateParamsCreditGrantPerTenantAmountCustomPricingUnit as ServiceActionCreateParamsCreditGrantPerTenantAmountCustomPricingUnit, + ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary as ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary, ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig as ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig, ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfigScope as ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfigScope, ServiceActionCreateParamsCreditGrantPerTenantExpiryConfig as ServiceActionCreateParamsCreditGrantPerTenantExpiryConfig, @@ -944,6 +946,10 @@ "stripe.params.v2.billing._service_action_create_params", False, ), + "ServiceActionCreateParamsCreditGrantAmountMonetary": ( + "stripe.params.v2.billing._service_action_create_params", + False, + ), "ServiceActionCreateParamsCreditGrantApplicabilityConfig": ( "stripe.params.v2.billing._service_action_create_params", False, @@ -968,6 +974,10 @@ "stripe.params.v2.billing._service_action_create_params", False, ), + "ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary": ( + "stripe.params.v2.billing._service_action_create_params", + False, + ), "ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig": ( "stripe.params.v2.billing._service_action_create_params", False, diff --git a/stripe/params/v2/billing/_collection_setting_create_params.py b/stripe/params/v2/billing/_collection_setting_create_params.py index ed39245df..f7d19546a 100644 --- a/stripe/params/v2/billing/_collection_setting_create_params.py +++ b/stripe/params/v2/billing/_collection_setting_create_params.py @@ -144,9 +144,9 @@ class CollectionSettingCreateParamsPaymentMethodOptionsCard(TypedDict): ] """ An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers - for authentication based on risk level and [other requirements](https://docs.corp.stripe.com/strong-customer-authentication). + for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. - Read our guide on [manually requesting 3D Secure](https://docs.corp.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. """ diff --git a/stripe/params/v2/billing/_collection_setting_update_params.py b/stripe/params/v2/billing/_collection_setting_update_params.py index 5faa7ad6e..5478565c5 100644 --- a/stripe/params/v2/billing/_collection_setting_update_params.py +++ b/stripe/params/v2/billing/_collection_setting_update_params.py @@ -150,9 +150,9 @@ class CollectionSettingUpdateParamsPaymentMethodOptionsCard(TypedDict): ] """ An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers - for authentication based on risk level and [other requirements](https://docs.corp.stripe.com/strong-customer-authentication). + for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. - Read our guide on [manually requesting 3D Secure](https://docs.corp.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. """ diff --git a/stripe/params/v2/billing/_service_action_create_params.py b/stripe/params/v2/billing/_service_action_create_params.py index 8402775ae..e72faf140 100644 --- a/stripe/params/v2/billing/_service_action_create_params.py +++ b/stripe/params/v2/billing/_service_action_create_params.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe.v2._amount import AmountParam from typing import List from typing_extensions import Literal, NotRequired, TypedDict @@ -74,7 +73,7 @@ class ServiceActionCreateParamsCreditGrantAmount(TypedDict): """ The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. """ - monetary: NotRequired[AmountParam] + monetary: NotRequired["ServiceActionCreateParamsCreditGrantAmountMonetary"] """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ @@ -91,6 +90,17 @@ class ServiceActionCreateParamsCreditGrantAmountCustomPricingUnit(TypedDict): """ +class ServiceActionCreateParamsCreditGrantAmountMonetary(TypedDict): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + + class ServiceActionCreateParamsCreditGrantApplicabilityConfig(TypedDict): scope: "ServiceActionCreateParamsCreditGrantApplicabilityConfigScope" """ @@ -162,7 +172,9 @@ class ServiceActionCreateParamsCreditGrantPerTenantAmount(TypedDict): """ The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. """ - monetary: NotRequired[AmountParam] + monetary: NotRequired[ + "ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary" + ] """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ @@ -181,6 +193,17 @@ class ServiceActionCreateParamsCreditGrantPerTenantAmountCustomPricingUnit( """ +class ServiceActionCreateParamsCreditGrantPerTenantAmountMonetary(TypedDict): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + + class ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig( TypedDict, ): diff --git a/stripe/params/v2/core/__init__.py b/stripe/params/v2/core/__init__.py index 3a2e424dc..f9f701b67 100644 --- a/stripe/params/v2/core/__init__.py +++ b/stripe/params/v2/core/__init__.py @@ -85,6 +85,12 @@ AccountCreateParamsConfigurationMerchantCapabilitiesZipPayments as AccountCreateParamsConfigurationMerchantCapabilitiesZipPayments, AccountCreateParamsConfigurationMerchantCardPayments as AccountCreateParamsConfigurationMerchantCardPayments, AccountCreateParamsConfigurationMerchantCardPaymentsDeclineOn as AccountCreateParamsConfigurationMerchantCardPaymentsDeclineOn, + AccountCreateParamsConfigurationMerchantKonbiniPayments as AccountCreateParamsConfigurationMerchantKonbiniPayments, + AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport as AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport, + AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupportHours as AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupportHours, + AccountCreateParamsConfigurationMerchantScriptStatementDescriptor as AccountCreateParamsConfigurationMerchantScriptStatementDescriptor, + AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKana as AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKana, + AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji as AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji, AccountCreateParamsConfigurationMerchantStatementDescriptor as AccountCreateParamsConfigurationMerchantStatementDescriptor, AccountCreateParamsConfigurationMerchantSupport as AccountCreateParamsConfigurationMerchantSupport, AccountCreateParamsConfigurationMerchantSupportAddress as AccountCreateParamsConfigurationMerchantSupportAddress, @@ -103,6 +109,7 @@ AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts as AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts, AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesCryptoWallets as AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesCryptoWallets, AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies as AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies, + AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur as AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur, AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp as AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp, AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd as AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd, AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsdc as AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsdc, @@ -161,6 +168,7 @@ AccountCreateParamsIdentityBusinessDetails as AccountCreateParamsIdentityBusinessDetails, AccountCreateParamsIdentityBusinessDetailsAddress as AccountCreateParamsIdentityBusinessDetailsAddress, AccountCreateParamsIdentityBusinessDetailsAnnualRevenue as AccountCreateParamsIdentityBusinessDetailsAnnualRevenue, + AccountCreateParamsIdentityBusinessDetailsAnnualRevenueAmount as AccountCreateParamsIdentityBusinessDetailsAnnualRevenueAmount, AccountCreateParamsIdentityBusinessDetailsDocuments as AccountCreateParamsIdentityBusinessDetailsDocuments, AccountCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification as AccountCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification, AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense as AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense, @@ -175,6 +183,7 @@ AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership as AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership, AccountCreateParamsIdentityBusinessDetailsIdNumber as AccountCreateParamsIdentityBusinessDetailsIdNumber, AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue as AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue, + AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount as AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount, AccountCreateParamsIdentityBusinessDetailsScriptAddresses as AccountCreateParamsIdentityBusinessDetailsScriptAddresses, AccountCreateParamsIdentityBusinessDetailsScriptAddressesKana as AccountCreateParamsIdentityBusinessDetailsScriptAddressesKana, AccountCreateParamsIdentityBusinessDetailsScriptAddressesKanji as AccountCreateParamsIdentityBusinessDetailsScriptAddressesKanji, @@ -217,6 +226,89 @@ from stripe.params.v2.core._account_retrieve_params import ( AccountRetrieveParams as AccountRetrieveParams, ) + from stripe.params.v2.core._account_token_create_params import ( + AccountTokenCreateParams as AccountTokenCreateParams, + AccountTokenCreateParamsIdentity as AccountTokenCreateParamsIdentity, + AccountTokenCreateParamsIdentityAttestations as AccountTokenCreateParamsIdentityAttestations, + AccountTokenCreateParamsIdentityAttestationsDirectorshipDeclaration as AccountTokenCreateParamsIdentityAttestationsDirectorshipDeclaration, + AccountTokenCreateParamsIdentityAttestationsOwnershipDeclaration as AccountTokenCreateParamsIdentityAttestationsOwnershipDeclaration, + AccountTokenCreateParamsIdentityAttestationsPersonsProvided as AccountTokenCreateParamsIdentityAttestationsPersonsProvided, + AccountTokenCreateParamsIdentityAttestationsRepresentativeDeclaration as AccountTokenCreateParamsIdentityAttestationsRepresentativeDeclaration, + AccountTokenCreateParamsIdentityAttestationsTermsOfService as AccountTokenCreateParamsIdentityAttestationsTermsOfService, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceAccount as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceAccount, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreator as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreator, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercial as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercial, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialAccountHolder as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialAccountHolder, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCeltic as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCeltic, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticApplePay as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticApplePay, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCard as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCard, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCardBankTerms as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCardBankTerms, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCardPlatform as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCardPlatform, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCard as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCard, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardBankTerms as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardBankTerms, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardFinancingDisclosures as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardFinancingDisclosures, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardPlatform as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardPlatform, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBank as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBank, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankApplePay as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankApplePay, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCard as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCard, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardBankTerms as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardBankTerms, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardFinancingDisclosures as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardFinancingDisclosures, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardPlatform as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardPlatform, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCard as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCard, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCardBankTerms as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCardBankTerms, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCardFinancingDisclosures as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCardFinancingDisclosures, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCryptoStorer as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCryptoStorer, + AccountTokenCreateParamsIdentityAttestationsTermsOfServiceStorer as AccountTokenCreateParamsIdentityAttestationsTermsOfServiceStorer, + AccountTokenCreateParamsIdentityBusinessDetails as AccountTokenCreateParamsIdentityBusinessDetails, + AccountTokenCreateParamsIdentityBusinessDetailsAddress as AccountTokenCreateParamsIdentityBusinessDetailsAddress, + AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenue as AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenue, + AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenueAmount as AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenueAmount, + AccountTokenCreateParamsIdentityBusinessDetailsDocuments as AccountTokenCreateParamsIdentityBusinessDetailsDocuments, + AccountTokenCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification, + AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense, + AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociation as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociation, + AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecree as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecree, + AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVerification as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVerification, + AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerification as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerification, + AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerification as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerification, + AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack, + AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfAddress as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfAddress, + AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfRegistration as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfRegistration, + AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership as AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership, + AccountTokenCreateParamsIdentityBusinessDetailsIdNumber as AccountTokenCreateParamsIdentityBusinessDetailsIdNumber, + AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue as AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue, + AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount as AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount, + AccountTokenCreateParamsIdentityBusinessDetailsScriptAddresses as AccountTokenCreateParamsIdentityBusinessDetailsScriptAddresses, + AccountTokenCreateParamsIdentityBusinessDetailsScriptAddressesKana as AccountTokenCreateParamsIdentityBusinessDetailsScriptAddressesKana, + AccountTokenCreateParamsIdentityBusinessDetailsScriptAddressesKanji as AccountTokenCreateParamsIdentityBusinessDetailsScriptAddressesKanji, + AccountTokenCreateParamsIdentityBusinessDetailsScriptNames as AccountTokenCreateParamsIdentityBusinessDetailsScriptNames, + AccountTokenCreateParamsIdentityBusinessDetailsScriptNamesKana as AccountTokenCreateParamsIdentityBusinessDetailsScriptNamesKana, + AccountTokenCreateParamsIdentityBusinessDetailsScriptNamesKanji as AccountTokenCreateParamsIdentityBusinessDetailsScriptNamesKanji, + AccountTokenCreateParamsIdentityIndividual as AccountTokenCreateParamsIdentityIndividual, + AccountTokenCreateParamsIdentityIndividualAdditionalAddress as AccountTokenCreateParamsIdentityIndividualAdditionalAddress, + AccountTokenCreateParamsIdentityIndividualAdditionalName as AccountTokenCreateParamsIdentityIndividualAdditionalName, + AccountTokenCreateParamsIdentityIndividualAddress as AccountTokenCreateParamsIdentityIndividualAddress, + AccountTokenCreateParamsIdentityIndividualDateOfBirth as AccountTokenCreateParamsIdentityIndividualDateOfBirth, + AccountTokenCreateParamsIdentityIndividualDocuments as AccountTokenCreateParamsIdentityIndividualDocuments, + AccountTokenCreateParamsIdentityIndividualDocumentsCompanyAuthorization as AccountTokenCreateParamsIdentityIndividualDocumentsCompanyAuthorization, + AccountTokenCreateParamsIdentityIndividualDocumentsPassport as AccountTokenCreateParamsIdentityIndividualDocumentsPassport, + AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerification as AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerification, + AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack as AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack, + AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerification as AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerification, + AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack as AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack, + AccountTokenCreateParamsIdentityIndividualDocumentsVisa as AccountTokenCreateParamsIdentityIndividualDocumentsVisa, + AccountTokenCreateParamsIdentityIndividualIdNumber as AccountTokenCreateParamsIdentityIndividualIdNumber, + AccountTokenCreateParamsIdentityIndividualRelationship as AccountTokenCreateParamsIdentityIndividualRelationship, + AccountTokenCreateParamsIdentityIndividualScriptAddresses as AccountTokenCreateParamsIdentityIndividualScriptAddresses, + AccountTokenCreateParamsIdentityIndividualScriptAddressesKana as AccountTokenCreateParamsIdentityIndividualScriptAddressesKana, + AccountTokenCreateParamsIdentityIndividualScriptAddressesKanji as AccountTokenCreateParamsIdentityIndividualScriptAddressesKanji, + AccountTokenCreateParamsIdentityIndividualScriptNames as AccountTokenCreateParamsIdentityIndividualScriptNames, + AccountTokenCreateParamsIdentityIndividualScriptNamesKana as AccountTokenCreateParamsIdentityIndividualScriptNamesKana, + AccountTokenCreateParamsIdentityIndividualScriptNamesKanji as AccountTokenCreateParamsIdentityIndividualScriptNamesKanji, + ) + from stripe.params.v2.core._account_token_retrieve_params import ( + AccountTokenRetrieveParams as AccountTokenRetrieveParams, + ) from stripe.params.v2.core._account_update_params import ( AccountUpdateParams as AccountUpdateParams, AccountUpdateParamsConfiguration as AccountUpdateParamsConfiguration, @@ -294,6 +386,12 @@ AccountUpdateParamsConfigurationMerchantCapabilitiesZipPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesZipPayments, AccountUpdateParamsConfigurationMerchantCardPayments as AccountUpdateParamsConfigurationMerchantCardPayments, AccountUpdateParamsConfigurationMerchantCardPaymentsDeclineOn as AccountUpdateParamsConfigurationMerchantCardPaymentsDeclineOn, + AccountUpdateParamsConfigurationMerchantKonbiniPayments as AccountUpdateParamsConfigurationMerchantKonbiniPayments, + AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport as AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport, + AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupportHours as AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupportHours, + AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor, + AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKana as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKana, + AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji, AccountUpdateParamsConfigurationMerchantStatementDescriptor as AccountUpdateParamsConfigurationMerchantStatementDescriptor, AccountUpdateParamsConfigurationMerchantSupport as AccountUpdateParamsConfigurationMerchantSupport, AccountUpdateParamsConfigurationMerchantSupportAddress as AccountUpdateParamsConfigurationMerchantSupportAddress, @@ -312,6 +410,7 @@ AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts as AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts, AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesCryptoWallets as AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesCryptoWallets, AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies as AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies, + AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur as AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur, AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp as AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp, AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd as AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsd, AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsdc as AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesUsdc, @@ -370,6 +469,7 @@ AccountUpdateParamsIdentityBusinessDetails as AccountUpdateParamsIdentityBusinessDetails, AccountUpdateParamsIdentityBusinessDetailsAddress as AccountUpdateParamsIdentityBusinessDetailsAddress, AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue as AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue, + AccountUpdateParamsIdentityBusinessDetailsAnnualRevenueAmount as AccountUpdateParamsIdentityBusinessDetailsAnnualRevenueAmount, AccountUpdateParamsIdentityBusinessDetailsDocuments as AccountUpdateParamsIdentityBusinessDetailsDocuments, AccountUpdateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification as AccountUpdateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification, AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyLicense as AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyLicense, @@ -384,6 +484,7 @@ AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership as AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership, AccountUpdateParamsIdentityBusinessDetailsIdNumber as AccountUpdateParamsIdentityBusinessDetailsIdNumber, AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue as AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue, + AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount as AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount, AccountUpdateParamsIdentityBusinessDetailsScriptAddresses as AccountUpdateParamsIdentityBusinessDetailsScriptAddresses, AccountUpdateParamsIdentityBusinessDetailsScriptAddressesKana as AccountUpdateParamsIdentityBusinessDetailsScriptAddressesKana, AccountUpdateParamsIdentityBusinessDetailsScriptAddressesKanji as AccountUpdateParamsIdentityBusinessDetailsScriptAddressesKanji, @@ -448,6 +549,7 @@ ) from stripe.params.v2.core._event_list_params import ( EventListParams as EventListParams, + EventListParamsCreated as EventListParamsCreated, ) from stripe.params.v2.core._event_retrieve_params import ( EventRetrieveParams as EventRetrieveParams, @@ -765,6 +867,30 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationMerchantKonbiniPayments": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupportHours": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantScriptStatementDescriptor": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKana": ( + "stripe.params.v2.core._account_create_params", + False, + ), + "AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationMerchantStatementDescriptor": ( "stripe.params.v2.core._account_create_params", False, @@ -837,6 +963,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp": ( "stripe.params.v2.core._account_create_params", False, @@ -1069,6 +1199,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsIdentityBusinessDetailsAnnualRevenueAmount": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsIdentityBusinessDetailsDocuments": ( "stripe.params.v2.core._account_create_params", False, @@ -1125,6 +1259,10 @@ "stripe.params.v2.core._account_create_params", False, ), + "AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount": ( + "stripe.params.v2.core._account_create_params", + False, + ), "AccountCreateParamsIdentityBusinessDetailsScriptAddresses": ( "stripe.params.v2.core._account_create_params", False, @@ -1262,6 +1400,322 @@ "stripe.params.v2.core._account_retrieve_params", False, ), + "AccountTokenCreateParams": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentity": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestations": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsDirectorshipDeclaration": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsOwnershipDeclaration": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsPersonsProvided": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsRepresentativeDeclaration": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfService": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceAccount": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreator": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercial": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialAccountHolder": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCeltic": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticApplePay": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCard": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCardBankTerms": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCardPlatform": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCard": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardBankTerms": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardFinancingDisclosures": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardPlatform": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBank": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankApplePay": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCard": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardBankTerms": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardFinancingDisclosures": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardPlatform": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCard": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCardBankTerms": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCardFinancingDisclosures": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCryptoStorer": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceStorer": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetails": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsAddress": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenue": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenueAmount": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsDocuments": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociation": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecree": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVerification": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerification": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerification": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfAddress": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfRegistration": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsIdNumber": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsScriptAddresses": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsScriptAddressesKana": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsScriptAddressesKanji": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsScriptNames": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsScriptNamesKana": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityBusinessDetailsScriptNamesKanji": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividual": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualAdditionalAddress": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualAdditionalName": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualAddress": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualDateOfBirth": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualDocuments": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualDocumentsCompanyAuthorization": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualDocumentsPassport": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerification": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerification": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualDocumentsVisa": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualIdNumber": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualRelationship": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualScriptAddresses": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualScriptAddressesKana": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualScriptAddressesKanji": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualScriptNames": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualScriptNamesKana": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenCreateParamsIdentityIndividualScriptNamesKanji": ( + "stripe.params.v2.core._account_token_create_params", + False, + ), + "AccountTokenRetrieveParams": ( + "stripe.params.v2.core._account_token_retrieve_params", + False, + ), "AccountUpdateParams": ( "stripe.params.v2.core._account_update_params", False, @@ -1566,6 +2020,30 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationMerchantKonbiniPayments": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupportHours": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKana": ( + "stripe.params.v2.core._account_update_params", + False, + ), + "AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationMerchantStatementDescriptor": ( "stripe.params.v2.core._account_update_params", False, @@ -1638,6 +2116,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp": ( "stripe.params.v2.core._account_update_params", False, @@ -1870,6 +2352,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsIdentityBusinessDetailsAnnualRevenueAmount": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsIdentityBusinessDetailsDocuments": ( "stripe.params.v2.core._account_update_params", False, @@ -1926,6 +2412,10 @@ "stripe.params.v2.core._account_update_params", False, ), + "AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount": ( + "stripe.params.v2.core._account_update_params", + False, + ), "AccountUpdateParamsIdentityBusinessDetailsScriptAddresses": ( "stripe.params.v2.core._account_update_params", False, @@ -2091,6 +2581,10 @@ False, ), "EventListParams": ("stripe.params.v2.core._event_list_params", False), + "EventListParamsCreated": ( + "stripe.params.v2.core._event_list_params", + False, + ), "EventRetrieveParams": ( "stripe.params.v2.core._event_retrieve_params", False, diff --git a/stripe/params/v2/core/_account_create_params.py b/stripe/params/v2/core/_account_create_params.py index 16cf48be4..93784c153 100644 --- a/stripe/params/v2/core/_account_create_params.py +++ b/stripe/params/v2/core/_account_create_params.py @@ -1,11 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe.v2._amount import AmountParam from typing import Dict, List from typing_extensions import Literal, NotRequired, TypedDict class AccountCreateParams(TypedDict): + account_token: NotRequired[str] + """ + The account token generated by the account token api. + """ configuration: NotRequired["AccountCreateParamsConfiguration"] """ An Account Configuration which allows the Account to take on a key persona across Stripe products. @@ -39,6 +42,7 @@ class AccountCreateParams(TypedDict): "configuration.recipient", "configuration.storer", "defaults", + "future_requirements", "identity", "requirements", ] @@ -293,7 +297,7 @@ class AccountCreateParamsConfigurationCustomerAutomaticIndirectTax(TypedDict): ] ] """ - The data source used to identify the customer's tax location - defaults to 'identity_address'. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions. + The data source used to identify the customer's tax location - defaults to `identity_address`. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions. This behavior is now deprecated for new users. """ @@ -368,7 +372,7 @@ class AccountCreateParamsConfigurationCustomerCapabilities(TypedDict): "AccountCreateParamsConfigurationCustomerCapabilitiesAutomaticIndirectTax" ] """ - Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. Uses the `location_source` field. + Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. """ @@ -448,10 +452,22 @@ class AccountCreateParamsConfigurationMerchant(TypedDict): """ Card payments settings. """ + konbini_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantKonbiniPayments" + ] + """ + Settings specific to Konbini payments on the account. + """ mcc: NotRequired[str] """ The merchant category code for the Merchant Configuration. MCCs are used to classify businesses based on the goods or services they provide. """ + script_statement_descriptor: NotRequired[ + "AccountCreateParamsConfigurationMerchantScriptStatementDescriptor" + ] + """ + Settings for the default text that appears on statements for language variations. + """ statement_descriptor: NotRequired[ "AccountCreateParamsConfigurationMerchantStatementDescriptor" ] @@ -1173,6 +1189,90 @@ class AccountCreateParamsConfigurationMerchantCardPaymentsDeclineOn(TypedDict): """ +class AccountCreateParamsConfigurationMerchantKonbiniPayments(TypedDict): + support: NotRequired[ + "AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport" + ] + """ + Support for Konbini payments. + """ + + +class AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport( + TypedDict +): + email: NotRequired[str] + """ + Support email address for Konbini payments. + """ + hours: NotRequired[ + "AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupportHours" + ] + """ + Support hours for Konbini payments. + """ + phone: NotRequired[str] + """ + Support phone number for Konbini payments. + """ + + +class AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupportHours( + TypedDict, +): + end_time: NotRequired[str] + """ + Support hours end time (JST time of day) for in `HH:MM` format. + """ + start_time: NotRequired[str] + """ + Support hours start time (JST time of day) for in `HH:MM` format. + """ + + +class AccountCreateParamsConfigurationMerchantScriptStatementDescriptor( + TypedDict, +): + kana: NotRequired[ + "AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKana" + ] + """ + The Kana variation of statement_descriptor used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + """ + kanji: NotRequired[ + "AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji" + ] + """ + The Kanji variation of statement_descriptor used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + """ + + +class AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKana( + TypedDict, +): + descriptor: NotRequired[str] + """ + The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a statement_descriptor_prefix, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the statement_descriptor text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + prefix: NotRequired[str] + """ + Default text that appears on statements for card charges outside of Japan, prefixing any dynamic statement_descriptor_suffix specified on the charge. To maximize space for the dynamic part of the descriptor, keep this text short. If you don't specify this value, statement_descriptor is used as the prefix. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + + +class AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji( + TypedDict, +): + descriptor: NotRequired[str] + """ + The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a statement_descriptor_prefix, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the statement_descriptor text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + prefix: NotRequired[str] + """ + Default text that appears on statements for card charges outside of Japan, prefixing any dynamic statement_descriptor_suffix specified on the charge. To maximize space for the dynamic part of the descriptor, keep this text short. If you don't specify this value, statement_descriptor is used as the prefix. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + + class AccountCreateParamsConfigurationMerchantStatementDescriptor(TypedDict): descriptor: NotRequired[str] """ @@ -1516,6 +1616,12 @@ class AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesCrypto class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies( TypedDict, ): + eur: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur" + ] + """ + Can hold storage-type funds on Stripe in EUR. + """ gbp: NotRequired[ "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp" ] @@ -1536,6 +1642,15 @@ class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies( """ +class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( TypedDict, ): @@ -2680,7 +2795,9 @@ class AccountCreateParamsIdentityBusinessDetailsAddress(TypedDict): class AccountCreateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): - amount: NotRequired[AmountParam] + amount: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsAnnualRevenueAmount" + ] """ A non-negative integer representing the amount in the smallest currency unit. """ @@ -2690,6 +2807,17 @@ class AccountCreateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): """ +class AccountCreateParamsIdentityBusinessDetailsAnnualRevenueAmount(TypedDict): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + + class AccountCreateParamsIdentityBusinessDetailsDocuments(TypedDict): bank_account_ownership_verification: NotRequired[ "AccountCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification" @@ -2905,6 +3033,7 @@ class AccountCreateParamsIdentityBusinessDetailsIdNumber(TypedDict): "ae_crn", "ae_vat", "ao_nif", + "ar_cuit", "at_fn", "au_abn", "au_acn", @@ -2987,12 +3116,27 @@ class AccountCreateParamsIdentityBusinessDetailsIdNumber(TypedDict): class AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue( TypedDict, ): - amount: NotRequired[AmountParam] + amount: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount" + ] """ A non-negative integer representing the amount in the smallest currency unit. """ +class AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount( + TypedDict, +): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + + class AccountCreateParamsIdentityBusinessDetailsScriptAddresses(TypedDict): kana: NotRequired[ "AccountCreateParamsIdentityBusinessDetailsScriptAddressesKana" @@ -3408,6 +3552,7 @@ class AccountCreateParamsIdentityIndividualIdNumber(TypedDict): type: Literal[ "ae_eid", "ao_nif", + "ar_dni", "az_tin", "bd_brc", "bd_etin", diff --git a/stripe/params/v2/core/_account_retrieve_params.py b/stripe/params/v2/core/_account_retrieve_params.py index f27dcaa65..e89233c15 100644 --- a/stripe/params/v2/core/_account_retrieve_params.py +++ b/stripe/params/v2/core/_account_retrieve_params.py @@ -14,6 +14,7 @@ class AccountRetrieveParams(TypedDict): "configuration.recipient", "configuration.storer", "defaults", + "future_requirements", "identity", "requirements", ] diff --git a/stripe/params/v2/core/_account_token_create_params.py b/stripe/params/v2/core/_account_token_create_params.py new file mode 100644 index 000000000..b024410e6 --- /dev/null +++ b/stripe/params/v2/core/_account_token_create_params.py @@ -0,0 +1,1534 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List, Optional +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountTokenCreateParams(TypedDict): + contact_email: NotRequired[str] + """ + The default contact email address for the Account. Required when configuring the account as a merchant or recipient. + """ + display_name: NotRequired[str] + """ + A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on any invoices sent to the Account. + """ + identity: "AccountTokenCreateParamsIdentity" + """ + Information about the company, individual, and business represented by the Account. + """ + + +class AccountTokenCreateParamsIdentity(TypedDict): + attestations: NotRequired["AccountTokenCreateParamsIdentityAttestations"] + """ + Attestations from the identity's key people, e.g. owners, executives, directors, representatives. + """ + business_details: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetails" + ] + """ + Information about the company or business. + """ + entity_type: NotRequired[ + Literal["company", "government_entity", "individual", "non_profit"] + ] + """ + The entity type. + """ + individual: NotRequired["AccountTokenCreateParamsIdentityIndividual"] + """ + Information about the person represented by the account. + """ + + +class AccountTokenCreateParamsIdentityAttestations(TypedDict): + directorship_declaration: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsDirectorshipDeclaration" + ] + """ + This hash is used to attest that the directors information provided to Stripe is both current and correct; IP, date, and User Agent are expanded by Stripe. + """ + ownership_declaration: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsOwnershipDeclaration" + ] + """ + This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct; IP, date, and User Agent are expanded by Stripe. + """ + persons_provided: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsPersonsProvided" + ] + """ + Attestation that all Persons with a specific Relationship value have been provided. + """ + representative_declaration: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsRepresentativeDeclaration" + ] + """ + This hash is used to attest that the representative is authorized to act as the representative of their legal entity; IP, date, and User Agent are expanded by Stripe. + """ + terms_of_service: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfService" + ] + """ + Attestations of accepted terms of service agreements. + """ + + +class AccountTokenCreateParamsIdentityAttestationsDirectorshipDeclaration( + TypedDict, +): + attested: NotRequired[bool] + """ + A boolean indicating if the directors information has been attested. + """ + + +class AccountTokenCreateParamsIdentityAttestationsOwnershipDeclaration( + TypedDict, +): + attested: NotRequired[bool] + """ + A boolean indicating if the beneficial owner information has been attested. + """ + + +class AccountTokenCreateParamsIdentityAttestationsPersonsProvided(TypedDict): + directors: NotRequired[bool] + """ + Whether the company's directors have been provided. Set this Boolean to true after creating all the company's directors with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). + """ + executives: NotRequired[bool] + """ + Whether the company's executives have been provided. Set this Boolean to true after creating all the company's executives with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). + """ + owners: NotRequired[bool] + """ + Whether the company's owners have been provided. Set this Boolean to true after creating all the company's owners with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). + """ + ownership_exemption_reason: NotRequired[ + Literal[ + "qualified_entity_exceeds_ownership_threshold", + "qualifies_as_financial_institution", + ] + ] + """ + Reason for why the company is exempt from providing ownership information. + """ + + +class AccountTokenCreateParamsIdentityAttestationsRepresentativeDeclaration( + TypedDict, +): + attested: NotRequired[bool] + """ + A boolean indicating if the representative is authorized to act as the representative of their legal entity. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfService(TypedDict): + account: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceAccount" + ] + """ + Details on the Account's acceptance of the [Stripe Services Agreement]; IP, date, and User Agent are expanded by Stripe. + """ + card_creator: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreator" + ] + """ + Details on the Account's acceptance of Issuing-specific terms of service. + """ + crypto_storer: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCryptoStorer" + ] + """ + Details on the Account's acceptance of Crypto-storer-specific terms of service; IP, date, and User Agent are expanded by Stripe. + """ + storer: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceStorer" + ] + """ + Details on the Account's acceptance of Treasury-specific terms of service; IP, date, and User Agent are expanded by Stripe. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceAccount( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreator( + TypedDict, +): + commercial: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercial" + ] + """ + Terms of service acceptances to create cards for commercial issuing use cases. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercial( + TypedDict, +): + account_holder: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialAccountHolder" + ] + """ + Terms of service acceptances for Stripe commercial card issuing. + """ + celtic: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCeltic" + ] + """ + Terms of service acceptances for commercial issuing cards with Celtic as BIN sponsor. + """ + cross_river_bank: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBank" + ] + """ + Terms of service acceptances for commercial issuing cards with Cross River Bank as BIN sponsor. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialAccountHolder( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCeltic( + TypedDict, +): + apple_pay: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticApplePay" + ] + """ + Terms of service acceptances for commercial issuing Apple Pay cards with Celtic as BIN sponsor. + """ + charge_card: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCard" + ] + """ + Terms of service acceptances for commercial issuing charge cards with Celtic as BIN sponsor. + """ + spend_card: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCard" + ] + """ + Terms of service acceptances for commercial issuing spend cards with Celtic as BIN sponsor. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticApplePay( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCard( + TypedDict, +): + bank_terms: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCardBankTerms" + ] + """ + Bank terms of service acceptance for commercial issuing charge cards with Celtic as BIN sponsor. + """ + platform: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCardPlatform" + ] + """ + Platform terms of service acceptance for commercial issuing charge cards with Celtic as BIN sponsor. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCardBankTerms( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticChargeCardPlatform( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCard( + TypedDict, +): + bank_terms: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardBankTerms" + ] + """ + Bank terms of service acceptance for commercial issuing spend cards with Celtic as BIN sponsor. + """ + financing_disclosures: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardFinancingDisclosures" + ] + """ + Financial disclosures terms of service acceptance for commercial issuing spend cards with Celtic as BIN sponsor. + """ + platform: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardPlatform" + ] + """ + Platform terms of service acceptance for commercial issuing spend cards with Celtic as BIN sponsor. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardBankTerms( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardFinancingDisclosures( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCelticSpendCardPlatform( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBank( + TypedDict, +): + apple_pay: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankApplePay" + ] + """ + Terms of service acceptances for commercial issuing Apple Pay cards with Cross River Bank as BIN sponsor. + """ + charge_card: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCard" + ] + """ + Terms of service acceptances for commercial issuing charge cards with Cross River Bank as BIN sponsor. + """ + spend_card: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCard" + ] + """ + Terms of service acceptances for commercial issuing spend cards with Cross River Bank as BIN sponsor. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankApplePay( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCard( + TypedDict, +): + bank_terms: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardBankTerms" + ] + """ + Bank terms of service acceptance for commercial issuing charge cards with Cross River Bank as BIN sponsor. + """ + financing_disclosures: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardFinancingDisclosures" + ] + """ + Financial disclosures terms of service acceptance for commercial issuing charge cards with Cross River Bank as BIN sponsor. + """ + platform: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardPlatform" + ] + """ + Platform terms of service acceptance for commercial issuing charge cards with Cross River Bank as BIN sponsor. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardBankTerms( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardFinancingDisclosures( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankChargeCardPlatform( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCard( + TypedDict, +): + bank_terms: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCardBankTerms" + ] + """ + Bank terms of service acceptance for commercial issuing spend cards with Cross River Bank as BIN sponsor. + """ + financing_disclosures: NotRequired[ + "AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCardFinancingDisclosures" + ] + """ + Financial disclosures terms of service acceptance for commercial issuing spend cards with Cross River Bank as BIN sponsor. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCardBankTerms( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCardCreatorCommercialCrossRiverBankSpendCardFinancingDisclosures( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceCryptoStorer( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityAttestationsTermsOfServiceStorer( + TypedDict, +): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetails(TypedDict): + address: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsAddress" + ] + """ + The business registration address of the business entity. + """ + annual_revenue: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenue" + ] + """ + The business gross annual revenue for its preceding fiscal year. + """ + compliance_screening_description: NotRequired[str] + """ + A detailed description of the business's compliance and anti-money laundering controls and practices. + """ + documents: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsDocuments" + ] + """ + A document verifying the business. + """ + estimated_worker_count: NotRequired[int] + """ + An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + """ + id_numbers: NotRequired[ + List["AccountTokenCreateParamsIdentityBusinessDetailsIdNumber"] + ] + """ + The ID numbers of a business entity. + """ + monthly_estimated_revenue: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue" + ] + """ + An estimate of the monthly revenue of the business. + """ + phone: NotRequired[str] + """ + The phone number of the Business Entity. + """ + registered_name: NotRequired[str] + """ + The business legal name. + """ + script_addresses: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsScriptAddresses" + ] + """ + The business registration address of the business entity in non latin script. + """ + script_names: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsScriptNames" + ] + """ + The business legal name in non latin script. + """ + structure: NotRequired[ + Literal[ + "cooperative", + "free_zone_establishment", + "free_zone_llc", + "governmental_unit", + "government_instrumentality", + "incorporated_association", + "incorporated_non_profit", + "incorporated_partnership", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_listed_corporation", + "public_partnership", + "registered_charity", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "trust", + "unincorporated_association", + "unincorporated_non_profit", + "unincorporated_partnership", + ] + ] + """ + The category identifying the legal structure of the business. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + 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. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): + amount: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenueAmount" + ] + """ + A non-negative integer representing the amount in the smallest currency unit. + """ + fiscal_year_end: NotRequired[str] + """ + The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsAnnualRevenueAmount( + TypedDict, +): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsDocuments(TypedDict): + bank_account_ownership_verification: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification" + ] + """ + One or more documents that support the bank account ownership verification requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. + """ + company_license: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense" + ] + """ + One or more documents that demonstrate proof of a company's license to operate. + """ + company_memorandum_of_association: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociation" + ] + """ + One or more documents showing the company's Memorandum of Association. + """ + company_ministerial_decree: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecree" + ] + """ + Certain countries only: One or more documents showing the ministerial decree legalizing the company's establishment. + """ + company_registration_verification: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVerification" + ] + """ + One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + """ + company_tax_id_verification: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerification" + ] + """ + One or more documents that demonstrate proof of a company's tax ID. + """ + primary_verification: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerification" + ] + """ + A document verifying the business. + """ + proof_of_address: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfAddress" + ] + """ + One or more documents that demonstrate proof of address. + """ + proof_of_registration: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfRegistration" + ] + """ + One or more documents showing the company's proof of registration with the national business registry. + """ + proof_of_ultimate_beneficial_ownership: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership" + ] + """ + One or more documents that demonstrate proof of ultimate beneficial ownership. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociation( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecree( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVerification( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerification( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerification( + TypedDict, +): + front_back: "AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack( + TypedDict, +): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfAddress( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfRegistration( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsIdNumber(TypedDict): + registrar: NotRequired[str] + """ + The registrar of the ID number (Only valid for DE ID number types). + """ + type: Literal[ + "ae_crn", + "ae_vat", + "ao_nif", + "ar_cuit", + "at_fn", + "au_abn", + "au_acn", + "au_in", + "az_tin", + "bd_etin", + "be_cbe", + "bg_uic", + "br_cnpj", + "ca_cn", + "ca_crarr", + "ca_neq", + "ca_rid", + "ch_chid", + "ch_uid", + "cr_cpj", + "cr_nite", + "cy_tic", + "cz_ico", + "de_hrn", + "de_vat", + "dk_cvr", + "do_rcn", + "ee_rk", + "es_cif", + "fi_yt", + "fr_siren", + "fr_vat", + "gb_crn", + "gi_crn", + "gr_gemi", + "gt_nit", + "hk_br", + "hk_cr", + "hk_mbs", + "hu_cjs", + "ie_crn", + "it_rea", + "it_vat", + "jp_cn", + "kz_bin", + "li_uid", + "lt_ccrn", + "lu_rcs", + "lv_urn", + "mt_crn", + "mx_rfc", + "my_brn", + "my_coid", + "my_sst", + "mz_nuit", + "nl_kvk", + "no_orgnr", + "nz_bn", + "pe_ruc", + "pk_ntn", + "pl_regon", + "pt_vat", + "ro_cui", + "sa_crn", + "sa_tin", + "se_orgnr", + "sg_uen", + "si_msp", + "sk_ico", + "th_crn", + "th_prn", + "th_tin", + "us_ein", + ] + """ + Open Enum. The ID number type of a business entity. + """ + value: str + """ + The value of the ID number. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue( + TypedDict, +): + amount: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount" + ] + """ + A non-negative integer representing the amount in the smallest currency unit. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount( + TypedDict, +): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsScriptAddresses( + TypedDict +): + kana: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsScriptAddressesKana" + ] + """ + Kana Address. + """ + kanji: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsScriptAddressesKanji" + ] + """ + Kanji Address. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsScriptAddressesKana( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + 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. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsScriptAddressesKanji( + TypedDict, +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + 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. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsScriptNames(TypedDict): + kana: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsScriptNamesKana" + ] + """ + Kana name. + """ + kanji: NotRequired[ + "AccountTokenCreateParamsIdentityBusinessDetailsScriptNamesKanji" + ] + """ + Kanji name. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsScriptNamesKana( + TypedDict +): + registered_name: NotRequired[str] + """ + Registered name of the business. + """ + + +class AccountTokenCreateParamsIdentityBusinessDetailsScriptNamesKanji( + TypedDict, +): + registered_name: NotRequired[str] + """ + Registered name of the business. + """ + + +class AccountTokenCreateParamsIdentityIndividual(TypedDict): + additional_addresses: NotRequired[ + List["AccountTokenCreateParamsIdentityIndividualAdditionalAddress"] + ] + """ + Additional addresses associated with the individual. + """ + additional_names: NotRequired[ + List["AccountTokenCreateParamsIdentityIndividualAdditionalName"] + ] + """ + Additional names (e.g. aliases) associated with the individual. + """ + address: NotRequired["AccountTokenCreateParamsIdentityIndividualAddress"] + """ + The individual's residential address. + """ + date_of_birth: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualDateOfBirth" + ] + """ + The individual's date of birth. + """ + documents: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualDocuments" + ] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired[str] + """ + The individual's email address. + """ + given_name: NotRequired[str] + """ + The individual's first name. + """ + id_numbers: NotRequired[ + List["AccountTokenCreateParamsIdentityIndividualIdNumber"] + ] + """ + The identification numbers (e.g., SSN) associated with the individual. + """ + legal_gender: NotRequired[Literal["female", "male"]] + """ + The individual's gender (International regulations require either "male" or "female"). + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + nationalities: NotRequired[List[str]] + """ + The countries where the individual is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + phone: NotRequired[str] + """ + The individual's phone number. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + The individual's political exposure. + """ + relationship: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualRelationship" + ] + """ + The relationship that this individual has with the account's identity. + """ + script_addresses: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualScriptAddresses" + ] + """ + The script addresses (e.g., non-Latin characters) associated with the individual. + """ + script_names: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualScriptNames" + ] + """ + The individuals primary name in non latin script. + """ + surname: NotRequired[str] + """ + The individual's last name. + """ + + +class AccountTokenCreateParamsIdentityIndividualAdditionalAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + 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. + """ + purpose: Literal["registered"] + """ + Purpose of additional address. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountTokenCreateParamsIdentityIndividualAdditionalName(TypedDict): + full_name: NotRequired[str] + """ + The person's full name. + """ + given_name: NotRequired[str] + """ + The person's first or given name. + """ + purpose: Literal["alias", "maiden"] + """ + The purpose or type of the additional name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ + + +class AccountTokenCreateParamsIdentityIndividualAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + 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. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountTokenCreateParamsIdentityIndividualDateOfBirth(TypedDict): + day: int + """ + The day of the birth. + """ + month: int + """ + The month of birth. + """ + year: int + """ + The year of birth. + """ + + +class AccountTokenCreateParamsIdentityIndividualDocuments(TypedDict): + company_authorization: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualDocumentsPassport" + ] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + primary_verification: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerification" + ] + """ + An identifying document showing the person's name, either a passport or local ID card. + """ + secondary_verification: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerification" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + visa: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualDocumentsVisa" + ] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ + + +class AccountTokenCreateParamsIdentityIndividualDocumentsCompanyAuthorization( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountTokenCreateParamsIdentityIndividualDocumentsPassport(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerification( + TypedDict, +): + front_back: "AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class AccountTokenCreateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack( + TypedDict, +): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerification( + TypedDict, +): + front_back: "AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class AccountTokenCreateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack( + TypedDict, +): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountTokenCreateParamsIdentityIndividualDocumentsVisa(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountTokenCreateParamsIdentityIndividualIdNumber(TypedDict): + type: Literal[ + "ae_eid", + "ao_nif", + "ar_dni", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "br_cpf", + "cr_cpf", + "cr_dimex", + "cr_nite", + "de_stn", + "do_rcn", + "gt_nit", + "hk_id", + "kz_iin", + "mx_rfc", + "my_nric", + "mz_nuit", + "nl_bsn", + "pe_dni", + "pk_cnic", + "pk_snic", + "sa_tin", + "sg_fin", + "sg_nric", + "th_lc", + "th_pin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + ] + """ + The ID number type of an individual. + """ + value: str + """ + The value of the ID number. + """ + + +class AccountTokenCreateParamsIdentityIndividualRelationship(TypedDict): + director: NotRequired[bool] + """ + Whether the person is a director of the account's identity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + """ + executive: NotRequired[bool] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + owner: NotRequired[bool] + """ + Whether the person is an owner of the account's identity. + """ + percent_ownership: NotRequired[str] + """ + The percent owned by the person of the account's legal entity. + """ + title: NotRequired[str] + """ + The person's title (e.g., CEO, Support Engineer). + """ + + +class AccountTokenCreateParamsIdentityIndividualScriptAddresses(TypedDict): + kana: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualScriptAddressesKana" + ] + """ + Kana Address. + """ + kanji: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualScriptAddressesKanji" + ] + """ + Kanji Address. + """ + + +class AccountTokenCreateParamsIdentityIndividualScriptAddressesKana(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + 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. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountTokenCreateParamsIdentityIndividualScriptAddressesKanji( + TypedDict +): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + 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. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountTokenCreateParamsIdentityIndividualScriptNames(TypedDict): + kana: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualScriptNamesKana" + ] + """ + Persons name in kana script. + """ + kanji: NotRequired[ + "AccountTokenCreateParamsIdentityIndividualScriptNamesKanji" + ] + """ + Persons name in kanji script. + """ + + +class AccountTokenCreateParamsIdentityIndividualScriptNamesKana(TypedDict): + given_name: NotRequired[str] + """ + The person's first or given name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ + + +class AccountTokenCreateParamsIdentityIndividualScriptNamesKanji(TypedDict): + given_name: NotRequired[str] + """ + The person's first or given name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ diff --git a/stripe/params/v2/core/_account_token_retrieve_params.py b/stripe/params/v2/core/_account_token_retrieve_params.py new file mode 100644 index 000000000..0fd39f322 --- /dev/null +++ b/stripe/params/v2/core/_account_token_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AccountTokenRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py index 94aebfd81..30c45a8c8 100644 --- a/stripe/params/v2/core/_account_update_params.py +++ b/stripe/params/v2/core/_account_update_params.py @@ -1,11 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe.v2._amount import AmountParam from typing import Dict, List, Optional from typing_extensions import Literal, NotRequired, TypedDict class AccountUpdateParams(TypedDict): + account_token: NotRequired[str] + """ + The account token generated by the account token api. + """ configuration: NotRequired["AccountUpdateParamsConfiguration"] """ An Account Configuration which allows the Account to take on a key persona across Stripe products. @@ -39,6 +42,7 @@ class AccountUpdateParams(TypedDict): "configuration.recipient", "configuration.storer", "defaults", + "future_requirements", "identity", "requirements", ] @@ -301,7 +305,7 @@ class AccountUpdateParamsConfigurationCustomerAutomaticIndirectTax(TypedDict): ] ] """ - The data source used to identify the customer's tax location - defaults to 'identity_address'. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions. + The data source used to identify the customer's tax location - defaults to `identity_address`. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions. This behavior is now deprecated for new users. """ validate_location: NotRequired[Literal["auto", "deferred", "immediately"]] """ @@ -384,7 +388,7 @@ class AccountUpdateParamsConfigurationCustomerCapabilities(TypedDict): "AccountUpdateParamsConfigurationCustomerCapabilitiesAutomaticIndirectTax" ] """ - Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. Uses the `location_source` field. + Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. """ @@ -468,10 +472,22 @@ class AccountUpdateParamsConfigurationMerchant(TypedDict): """ Card payments settings. """ + konbini_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantKonbiniPayments" + ] + """ + Settings specific to Konbini payments on the account. + """ mcc: NotRequired[str] """ The merchant category code for the merchant. MCCs are used to classify businesses based on the goods or services they provide. """ + script_statement_descriptor: NotRequired[ + "AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor" + ] + """ + Settings for the default text that appears on statements for language variations. + """ statement_descriptor: NotRequired[ "AccountUpdateParamsConfigurationMerchantStatementDescriptor" ] @@ -1193,6 +1209,90 @@ class AccountUpdateParamsConfigurationMerchantCardPaymentsDeclineOn(TypedDict): """ +class AccountUpdateParamsConfigurationMerchantKonbiniPayments(TypedDict): + support: NotRequired[ + "AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport" + ] + """ + Support for Konbini payments. + """ + + +class AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport( + TypedDict +): + email: NotRequired[str] + """ + Support email address for Konbini payments. + """ + hours: NotRequired[ + "AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupportHours" + ] + """ + Support hours for Konbini payments. + """ + phone: NotRequired[str] + """ + Support phone number for Konbini payments. + """ + + +class AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupportHours( + TypedDict, +): + end_time: NotRequired[str] + """ + Support hours end time (JST time of day) for in `HH:MM` format. + """ + start_time: NotRequired[str] + """ + Support hours start time (JST time of day) for in `HH:MM` format. + """ + + +class AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor( + TypedDict, +): + kana: NotRequired[ + "AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKana" + ] + """ + The Kana variation of statement_descriptor used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + """ + kanji: NotRequired[ + "AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji" + ] + """ + The Kanji variation of statement_descriptor used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + """ + + +class AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKana( + TypedDict, +): + descriptor: NotRequired[str] + """ + The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a statement_descriptor_prefix, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the statement_descriptor text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + prefix: NotRequired[str] + """ + Default text that appears on statements for card charges outside of Japan, prefixing any dynamic statement_descriptor_suffix specified on the charge. To maximize space for the dynamic part of the descriptor, keep this text short. If you don't specify this value, statement_descriptor is used as the prefix. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + + +class AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji( + TypedDict, +): + descriptor: NotRequired[str] + """ + The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a statement_descriptor_prefix, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the statement_descriptor text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + prefix: NotRequired[str] + """ + Default text that appears on statements for card charges outside of Japan, prefixing any dynamic statement_descriptor_suffix specified on the charge. To maximize space for the dynamic part of the descriptor, keep this text short. If you don't specify this value, statement_descriptor is used as the prefix. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + + class AccountUpdateParamsConfigurationMerchantStatementDescriptor(TypedDict): descriptor: NotRequired[str] """ @@ -1269,7 +1369,7 @@ class AccountUpdateParamsConfigurationRecipient(TypedDict): """ default_outbound_destination: NotRequired[str] """ - The payout method id to be used as a default outbound destination. This will allow the PayoutMethod to be omitted on OutboundPayments made through API or sending payouts via dashboard. Can also be explicitly set to `null` to clear the existing default outbound destination. For further details about creating an Outbound Destination, see [Collect recipient's payment details](https://docs.corp.stripe.com/global-payouts-private-preview/quickstart?dashboard-or-api=api#collect-bank-account-details). + The payout method id to be used as a default outbound destination. This will allow the PayoutMethod to be omitted on OutboundPayments made through API or sending payouts via dashboard. Can also be explicitly set to `null` to clear the existing default outbound destination. For further details about creating an Outbound Destination, see [Collect recipient's payment details](https://docs.stripe.com/global-payouts-private-preview/quickstart?dashboard-or-api=api#collect-bank-account-details). """ @@ -1548,6 +1648,12 @@ class AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesCrypto class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies( TypedDict, ): + eur: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur" + ] + """ + Can hold storage-type funds on Stripe in EUR. + """ gbp: NotRequired[ "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp" ] @@ -1568,6 +1674,15 @@ class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies( """ +class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesEur( + TypedDict, +): + 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 AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( TypedDict, ): @@ -2712,7 +2827,9 @@ class AccountUpdateParamsIdentityBusinessDetailsAddress(TypedDict): class AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): - amount: NotRequired[AmountParam] + amount: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsAnnualRevenueAmount" + ] """ A non-negative integer representing the amount in the smallest currency unit. """ @@ -2722,6 +2839,17 @@ class AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): """ +class AccountUpdateParamsIdentityBusinessDetailsAnnualRevenueAmount(TypedDict): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + + class AccountUpdateParamsIdentityBusinessDetailsDocuments(TypedDict): bank_account_ownership_verification: NotRequired[ "AccountUpdateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification" @@ -2937,6 +3065,7 @@ class AccountUpdateParamsIdentityBusinessDetailsIdNumber(TypedDict): "ae_crn", "ae_vat", "ao_nif", + "ar_cuit", "at_fn", "au_abn", "au_acn", @@ -3019,12 +3148,27 @@ class AccountUpdateParamsIdentityBusinessDetailsIdNumber(TypedDict): class AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue( TypedDict, ): - amount: NotRequired[AmountParam] + amount: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount" + ] """ A non-negative integer representing the amount in the smallest currency unit. """ +class AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenueAmount( + TypedDict, +): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + + class AccountUpdateParamsIdentityBusinessDetailsScriptAddresses(TypedDict): kana: NotRequired[ "AccountUpdateParamsIdentityBusinessDetailsScriptAddressesKana" @@ -3440,6 +3584,7 @@ class AccountUpdateParamsIdentityIndividualIdNumber(TypedDict): type: Literal[ "ae_eid", "ao_nif", + "ar_dni", "az_tin", "bd_brc", "bd_etin", diff --git a/stripe/params/v2/core/_event_list_params.py b/stripe/params/v2/core/_event_list_params.py index da7f96049..f143ef764 100644 --- a/stripe/params/v2/core/_event_list_params.py +++ b/stripe/params/v2/core/_event_list_params.py @@ -5,6 +5,25 @@ class EventListParams(TypedDict): + created: NotRequired["EventListParamsCreated"] + """ + Set of filters to query events within a range of `created` timestamps. + """ + limit: NotRequired[int] + """ + The page size. + """ + object_id: NotRequired[str] + """ + Primary object ID used to retrieve related events. + """ + types: NotRequired[List[str]] + """ + An array of up to 20 strings containing specific event names. + """ + + +class EventListParamsCreated(TypedDict): gt: NotRequired[str] """ Filter for events created after the specified timestamp. @@ -13,10 +32,6 @@ class EventListParams(TypedDict): """ Filter for events created at or after the specified timestamp. """ - limit: NotRequired[int] - """ - The page size. - """ lt: NotRequired[str] """ Filter for events created before the specified timestamp. @@ -25,11 +40,3 @@ class EventListParams(TypedDict): """ Filter for events created at or before the specified timestamp. """ - object_id: NotRequired[str] - """ - Primary object ID used to retrieve related events. - """ - types: NotRequired[List[str]] - """ - An array of up to 20 strings containing specific event names. - """ diff --git a/stripe/params/v2/core/accounts/__init__.py b/stripe/params/v2/core/accounts/__init__.py index 8223e6ff4..867be9766 100644 --- a/stripe/params/v2/core/accounts/__init__.py +++ b/stripe/params/v2/core/accounts/__init__.py @@ -38,6 +38,34 @@ from stripe.params.v2.core.accounts._person_retrieve_params import ( PersonRetrieveParams as PersonRetrieveParams, ) + from stripe.params.v2.core.accounts._person_token_create_params import ( + PersonTokenCreateParams as PersonTokenCreateParams, + PersonTokenCreateParamsAdditionalAddress as PersonTokenCreateParamsAdditionalAddress, + PersonTokenCreateParamsAdditionalName as PersonTokenCreateParamsAdditionalName, + PersonTokenCreateParamsAdditionalTermsOfService as PersonTokenCreateParamsAdditionalTermsOfService, + PersonTokenCreateParamsAdditionalTermsOfServiceAccount as PersonTokenCreateParamsAdditionalTermsOfServiceAccount, + PersonTokenCreateParamsAddress as PersonTokenCreateParamsAddress, + PersonTokenCreateParamsDateOfBirth as PersonTokenCreateParamsDateOfBirth, + PersonTokenCreateParamsDocuments as PersonTokenCreateParamsDocuments, + PersonTokenCreateParamsDocumentsCompanyAuthorization as PersonTokenCreateParamsDocumentsCompanyAuthorization, + PersonTokenCreateParamsDocumentsPassport as PersonTokenCreateParamsDocumentsPassport, + PersonTokenCreateParamsDocumentsPrimaryVerification as PersonTokenCreateParamsDocumentsPrimaryVerification, + PersonTokenCreateParamsDocumentsPrimaryVerificationFrontBack as PersonTokenCreateParamsDocumentsPrimaryVerificationFrontBack, + PersonTokenCreateParamsDocumentsSecondaryVerification as PersonTokenCreateParamsDocumentsSecondaryVerification, + PersonTokenCreateParamsDocumentsSecondaryVerificationFrontBack as PersonTokenCreateParamsDocumentsSecondaryVerificationFrontBack, + PersonTokenCreateParamsDocumentsVisa as PersonTokenCreateParamsDocumentsVisa, + PersonTokenCreateParamsIdNumber as PersonTokenCreateParamsIdNumber, + PersonTokenCreateParamsRelationship as PersonTokenCreateParamsRelationship, + PersonTokenCreateParamsScriptAddresses as PersonTokenCreateParamsScriptAddresses, + PersonTokenCreateParamsScriptAddressesKana as PersonTokenCreateParamsScriptAddressesKana, + PersonTokenCreateParamsScriptAddressesKanji as PersonTokenCreateParamsScriptAddressesKanji, + PersonTokenCreateParamsScriptNames as PersonTokenCreateParamsScriptNames, + PersonTokenCreateParamsScriptNamesKana as PersonTokenCreateParamsScriptNamesKana, + PersonTokenCreateParamsScriptNamesKanji as PersonTokenCreateParamsScriptNamesKanji, + ) + from stripe.params.v2.core.accounts._person_token_retrieve_params import ( + PersonTokenRetrieveParams as PersonTokenRetrieveParams, + ) from stripe.params.v2.core.accounts._person_update_params import ( PersonUpdateParams as PersonUpdateParams, PersonUpdateParamsAdditionalAddress as PersonUpdateParamsAdditionalAddress, @@ -170,6 +198,102 @@ "stripe.params.v2.core.accounts._person_retrieve_params", False, ), + "PersonTokenCreateParams": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsAdditionalAddress": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsAdditionalName": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsAdditionalTermsOfService": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsAdditionalTermsOfServiceAccount": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsAddress": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsDateOfBirth": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsDocuments": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsDocumentsCompanyAuthorization": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsDocumentsPassport": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsDocumentsPrimaryVerification": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsDocumentsPrimaryVerificationFrontBack": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsDocumentsSecondaryVerification": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsDocumentsSecondaryVerificationFrontBack": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsDocumentsVisa": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsIdNumber": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsRelationship": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsScriptAddresses": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsScriptAddressesKana": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsScriptAddressesKanji": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsScriptNames": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsScriptNamesKana": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenCreateParamsScriptNamesKanji": ( + "stripe.params.v2.core.accounts._person_token_create_params", + False, + ), + "PersonTokenRetrieveParams": ( + "stripe.params.v2.core.accounts._person_token_retrieve_params", + False, + ), "PersonUpdateParams": ( "stripe.params.v2.core.accounts._person_update_params", False, diff --git a/stripe/params/v2/core/accounts/_person_create_params.py b/stripe/params/v2/core/accounts/_person_create_params.py index 0429995d7..74bdd6bc6 100644 --- a/stripe/params/v2/core/accounts/_person_create_params.py +++ b/stripe/params/v2/core/accounts/_person_create_params.py @@ -57,6 +57,10 @@ class PersonCreateParams(TypedDict): """ The nationalities (countries) this person is associated with. """ + person_token: NotRequired[str] + """ + The person token generated by the person token api. + """ phone: NotRequired[str] """ The phone number for this person. @@ -315,6 +319,7 @@ class PersonCreateParamsIdNumber(TypedDict): type: Literal[ "ae_eid", "ao_nif", + "ar_dni", "az_tin", "bd_brc", "bd_etin", diff --git a/stripe/params/v2/core/accounts/_person_token_create_params.py b/stripe/params/v2/core/accounts/_person_token_create_params.py new file mode 100644 index 000000000..75d4fc894 --- /dev/null +++ b/stripe/params/v2/core/accounts/_person_token_create_params.py @@ -0,0 +1,496 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List, Optional +from typing_extensions import Literal, NotRequired, TypedDict + + +class PersonTokenCreateParams(TypedDict): + additional_addresses: NotRequired[ + List["PersonTokenCreateParamsAdditionalAddress"] + ] + """ + Additional addresses associated with the person. + """ + additional_names: NotRequired[ + List["PersonTokenCreateParamsAdditionalName"] + ] + """ + Additional names (e.g. aliases) associated with the person. + """ + additional_terms_of_service: NotRequired[ + "PersonTokenCreateParamsAdditionalTermsOfService" + ] + """ + Attestations of accepted terms of service agreements. + """ + address: NotRequired["PersonTokenCreateParamsAddress"] + """ + The person's residential address. + """ + date_of_birth: NotRequired["PersonTokenCreateParamsDateOfBirth"] + """ + The person's date of birth. + """ + documents: NotRequired["PersonTokenCreateParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired[str] + """ + Email. + """ + given_name: NotRequired[str] + """ + The person's first name. + """ + id_numbers: NotRequired[List["PersonTokenCreateParamsIdNumber"]] + """ + The identification numbers (e.g., SSN) associated with the person. + """ + legal_gender: NotRequired[Literal["female", "male"]] + """ + The person's gender (International regulations require either "male" or "female"). + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + nationalities: NotRequired[List[str]] + """ + The nationalities (countries) this person is associated with. + """ + phone: NotRequired[str] + """ + The phone number for this person. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + The person's political exposure. + """ + relationship: NotRequired["PersonTokenCreateParamsRelationship"] + """ + The relationship that this person has with the Account's business or legal entity. + """ + script_addresses: NotRequired["PersonTokenCreateParamsScriptAddresses"] + """ + The script addresses (e.g., non-Latin characters) associated with the person. + """ + script_names: NotRequired["PersonTokenCreateParamsScriptNames"] + """ + The script names (e.g. non-Latin characters) associated with the person. + """ + surname: NotRequired[str] + """ + The person's last name. + """ + + +class PersonTokenCreateParamsAdditionalAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + 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. + """ + purpose: Literal["registered"] + """ + Purpose of additional address. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class PersonTokenCreateParamsAdditionalName(TypedDict): + full_name: NotRequired[str] + """ + The person's full name. + """ + given_name: NotRequired[str] + """ + The person's first or given name. + """ + purpose: Literal["alias", "maiden"] + """ + The purpose or type of the additional name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ + + +class PersonTokenCreateParamsAdditionalTermsOfService(TypedDict): + account: NotRequired[ + "PersonTokenCreateParamsAdditionalTermsOfServiceAccount" + ] + """ + Details on the Person's acceptance of the [Stripe Services Agreement]; IP, date, and User Agent are expanded by Stripe. + """ + + +class PersonTokenCreateParamsAdditionalTermsOfServiceAccount(TypedDict): + shown_and_accepted: NotRequired[bool] + """ + The boolean value indicating if the terms of service have been accepted. + """ + + +class PersonTokenCreateParamsAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + 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. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class PersonTokenCreateParamsDateOfBirth(TypedDict): + day: int + """ + The day of the birth. + """ + month: int + """ + The month of birth. + """ + year: int + """ + The year of birth. + """ + + +class PersonTokenCreateParamsDocuments(TypedDict): + company_authorization: NotRequired[ + "PersonTokenCreateParamsDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired["PersonTokenCreateParamsDocumentsPassport"] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + primary_verification: NotRequired[ + "PersonTokenCreateParamsDocumentsPrimaryVerification" + ] + """ + An identifying document showing the person's name, either a passport or local ID card. + """ + secondary_verification: NotRequired[ + "PersonTokenCreateParamsDocumentsSecondaryVerification" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + visa: NotRequired["PersonTokenCreateParamsDocumentsVisa"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ + + +class PersonTokenCreateParamsDocumentsCompanyAuthorization(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class PersonTokenCreateParamsDocumentsPassport(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class PersonTokenCreateParamsDocumentsPrimaryVerification(TypedDict): + front_back: "PersonTokenCreateParamsDocumentsPrimaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class PersonTokenCreateParamsDocumentsPrimaryVerificationFrontBack(TypedDict): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class PersonTokenCreateParamsDocumentsSecondaryVerification(TypedDict): + front_back: ( + "PersonTokenCreateParamsDocumentsSecondaryVerificationFrontBack" + ) + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class PersonTokenCreateParamsDocumentsSecondaryVerificationFrontBack( + TypedDict +): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class PersonTokenCreateParamsDocumentsVisa(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class PersonTokenCreateParamsIdNumber(TypedDict): + type: Literal[ + "ae_eid", + "ao_nif", + "ar_dni", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "br_cpf", + "cr_cpf", + "cr_dimex", + "cr_nite", + "de_stn", + "do_rcn", + "gt_nit", + "hk_id", + "kz_iin", + "mx_rfc", + "my_nric", + "mz_nuit", + "nl_bsn", + "pe_dni", + "pk_cnic", + "pk_snic", + "sa_tin", + "sg_fin", + "sg_nric", + "th_lc", + "th_pin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + ] + """ + The ID number type of an individual. + """ + value: str + """ + The value of the ID number. + """ + + +class PersonTokenCreateParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the individual is an authorizer of the Account's legal entity. + """ + director: NotRequired[bool] + """ + Indicates whether the person is a director of the associated legal entity. + """ + executive: NotRequired[bool] + """ + Indicates whether the person is an executive of the associated legal entity. + """ + legal_guardian: NotRequired[bool] + """ + Indicates whether the person is a legal guardian of the associated legal entity. + """ + owner: NotRequired[bool] + """ + Indicates whether the person is an owner of the associated legal entity. + """ + percent_ownership: NotRequired[str] + """ + The percentage of ownership the person has in the associated legal entity. + """ + representative: NotRequired[bool] + """ + Indicates whether the person is a representative of the associated legal entity. + """ + title: NotRequired[str] + """ + The title or position the person holds in the associated legal entity. + """ + + +class PersonTokenCreateParamsScriptAddresses(TypedDict): + kana: NotRequired["PersonTokenCreateParamsScriptAddressesKana"] + """ + Kana Address. + """ + kanji: NotRequired["PersonTokenCreateParamsScriptAddressesKanji"] + """ + Kanji Address. + """ + + +class PersonTokenCreateParamsScriptAddressesKana(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + 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. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class PersonTokenCreateParamsScriptAddressesKanji(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + 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. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class PersonTokenCreateParamsScriptNames(TypedDict): + kana: NotRequired["PersonTokenCreateParamsScriptNamesKana"] + """ + Persons name in kana script. + """ + kanji: NotRequired["PersonTokenCreateParamsScriptNamesKanji"] + """ + Persons name in kanji script. + """ + + +class PersonTokenCreateParamsScriptNamesKana(TypedDict): + given_name: NotRequired[str] + """ + The person's first or given name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ + + +class PersonTokenCreateParamsScriptNamesKanji(TypedDict): + given_name: NotRequired[str] + """ + The person's first or given name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ diff --git a/stripe/params/v2/core/accounts/_person_token_retrieve_params.py b/stripe/params/v2/core/accounts/_person_token_retrieve_params.py new file mode 100644 index 000000000..3ea625655 --- /dev/null +++ b/stripe/params/v2/core/accounts/_person_token_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PersonTokenRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/accounts/_person_update_params.py b/stripe/params/v2/core/accounts/_person_update_params.py index bca73555c..f6a08b422 100644 --- a/stripe/params/v2/core/accounts/_person_update_params.py +++ b/stripe/params/v2/core/accounts/_person_update_params.py @@ -57,6 +57,10 @@ class PersonUpdateParams(TypedDict): """ The nationalities (countries) this person is associated with. """ + person_token: NotRequired[str] + """ + The person token generated by the person token api. + """ phone: NotRequired[str] """ The phone number for this person. @@ -315,6 +319,7 @@ class PersonUpdateParamsIdNumber(TypedDict): type: Literal[ "ae_eid", "ao_nif", + "ar_dni", "az_tin", "bd_brc", "bd_etin", diff --git a/stripe/params/v2/money_management/__init__.py b/stripe/params/v2/money_management/__init__.py index a7c1be27c..4a493c619 100644 --- a/stripe/params/v2/money_management/__init__.py +++ b/stripe/params/v2/money_management/__init__.py @@ -10,6 +10,19 @@ from stripe.params.v2.money_management._adjustment_retrieve_params import ( AdjustmentRetrieveParams as AdjustmentRetrieveParams, ) + from stripe.params.v2.money_management._currency_conversion_create_params import ( + CurrencyConversionCreateParams as CurrencyConversionCreateParams, + CurrencyConversionCreateParamsFrom as CurrencyConversionCreateParamsFrom, + CurrencyConversionCreateParamsFromAmount as CurrencyConversionCreateParamsFromAmount, + CurrencyConversionCreateParamsTo as CurrencyConversionCreateParamsTo, + CurrencyConversionCreateParamsToAmount as CurrencyConversionCreateParamsToAmount, + ) + from stripe.params.v2.money_management._currency_conversion_list_params import ( + CurrencyConversionListParams as CurrencyConversionListParams, + ) + from stripe.params.v2.money_management._currency_conversion_retrieve_params import ( + CurrencyConversionRetrieveParams as CurrencyConversionRetrieveParams, + ) from stripe.params.v2.money_management._financial_account_close_params import ( FinancialAccountCloseParams as FinancialAccountCloseParams, FinancialAccountCloseParamsForwardingSettings as FinancialAccountCloseParamsForwardingSettings, @@ -39,6 +52,7 @@ ) from stripe.params.v2.money_management._inbound_transfer_create_params import ( InboundTransferCreateParams as InboundTransferCreateParams, + InboundTransferCreateParamsAmount as InboundTransferCreateParamsAmount, InboundTransferCreateParamsFrom as InboundTransferCreateParamsFrom, InboundTransferCreateParamsTo as InboundTransferCreateParamsTo, ) @@ -53,6 +67,7 @@ ) from stripe.params.v2.money_management._outbound_payment_create_params import ( OutboundPaymentCreateParams as OutboundPaymentCreateParams, + OutboundPaymentCreateParamsAmount as OutboundPaymentCreateParamsAmount, OutboundPaymentCreateParamsDeliveryOptions as OutboundPaymentCreateParamsDeliveryOptions, OutboundPaymentCreateParamsFrom as OutboundPaymentCreateParamsFrom, OutboundPaymentCreateParamsRecipientNotification as OutboundPaymentCreateParamsRecipientNotification, @@ -63,6 +78,7 @@ ) from stripe.params.v2.money_management._outbound_payment_quote_create_params import ( OutboundPaymentQuoteCreateParams as OutboundPaymentQuoteCreateParams, + OutboundPaymentQuoteCreateParamsAmount as OutboundPaymentQuoteCreateParamsAmount, OutboundPaymentQuoteCreateParamsDeliveryOptions as OutboundPaymentQuoteCreateParamsDeliveryOptions, OutboundPaymentQuoteCreateParamsFrom as OutboundPaymentQuoteCreateParamsFrom, OutboundPaymentQuoteCreateParamsTo as OutboundPaymentQuoteCreateParamsTo, @@ -100,6 +116,7 @@ ) from stripe.params.v2.money_management._outbound_transfer_create_params import ( OutboundTransferCreateParams as OutboundTransferCreateParams, + OutboundTransferCreateParamsAmount as OutboundTransferCreateParamsAmount, OutboundTransferCreateParamsDeliveryOptions as OutboundTransferCreateParamsDeliveryOptions, OutboundTransferCreateParamsFrom as OutboundTransferCreateParamsFrom, OutboundTransferCreateParamsTo as OutboundTransferCreateParamsTo, @@ -170,6 +187,34 @@ "stripe.params.v2.money_management._adjustment_retrieve_params", False, ), + "CurrencyConversionCreateParams": ( + "stripe.params.v2.money_management._currency_conversion_create_params", + False, + ), + "CurrencyConversionCreateParamsFrom": ( + "stripe.params.v2.money_management._currency_conversion_create_params", + False, + ), + "CurrencyConversionCreateParamsFromAmount": ( + "stripe.params.v2.money_management._currency_conversion_create_params", + False, + ), + "CurrencyConversionCreateParamsTo": ( + "stripe.params.v2.money_management._currency_conversion_create_params", + False, + ), + "CurrencyConversionCreateParamsToAmount": ( + "stripe.params.v2.money_management._currency_conversion_create_params", + False, + ), + "CurrencyConversionListParams": ( + "stripe.params.v2.money_management._currency_conversion_list_params", + False, + ), + "CurrencyConversionRetrieveParams": ( + "stripe.params.v2.money_management._currency_conversion_retrieve_params", + False, + ), "FinancialAccountCloseParams": ( "stripe.params.v2.money_management._financial_account_close_params", False, @@ -218,6 +263,10 @@ "stripe.params.v2.money_management._inbound_transfer_create_params", False, ), + "InboundTransferCreateParamsAmount": ( + "stripe.params.v2.money_management._inbound_transfer_create_params", + False, + ), "InboundTransferCreateParamsFrom": ( "stripe.params.v2.money_management._inbound_transfer_create_params", False, @@ -242,6 +291,10 @@ "stripe.params.v2.money_management._outbound_payment_create_params", False, ), + "OutboundPaymentCreateParamsAmount": ( + "stripe.params.v2.money_management._outbound_payment_create_params", + False, + ), "OutboundPaymentCreateParamsDeliveryOptions": ( "stripe.params.v2.money_management._outbound_payment_create_params", False, @@ -266,6 +319,10 @@ "stripe.params.v2.money_management._outbound_payment_quote_create_params", False, ), + "OutboundPaymentQuoteCreateParamsAmount": ( + "stripe.params.v2.money_management._outbound_payment_quote_create_params", + False, + ), "OutboundPaymentQuoteCreateParamsDeliveryOptions": ( "stripe.params.v2.money_management._outbound_payment_quote_create_params", False, @@ -342,6 +399,10 @@ "stripe.params.v2.money_management._outbound_transfer_create_params", False, ), + "OutboundTransferCreateParamsAmount": ( + "stripe.params.v2.money_management._outbound_transfer_create_params", + False, + ), "OutboundTransferCreateParamsDeliveryOptions": ( "stripe.params.v2.money_management._outbound_transfer_create_params", False, diff --git a/stripe/params/v2/money_management/_currency_conversion_create_params.py b/stripe/params/v2/money_management/_currency_conversion_create_params.py new file mode 100644 index 000000000..d6781e0b2 --- /dev/null +++ b/stripe/params/v2/money_management/_currency_conversion_create_params.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + +_CurrencyConversionCreateParamsBase = TypedDict( + "CurrencyConversionCreateParams", + {"from": "CurrencyConversionCreateParamsFrom"}, +) + + +class CurrencyConversionCreateParams(_CurrencyConversionCreateParamsBase): + financial_account: str + """ + The FinancialAccount id to create the CurrencyConversion on. + """ + to: "CurrencyConversionCreateParamsTo" + """ + To amount object indicating the to currency or optional amount. + """ + + +class CurrencyConversionCreateParamsFrom(TypedDict): + amount: NotRequired["CurrencyConversionCreateParamsFromAmount"] + """ + Amount object. + """ + currency: NotRequired[str] + """ + A lowercase alpha3 currency code like "usd". + """ + + +class CurrencyConversionCreateParamsFromAmount(TypedDict): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + + +class CurrencyConversionCreateParamsTo(TypedDict): + amount: NotRequired["CurrencyConversionCreateParamsToAmount"] + """ + Amount object. + """ + currency: NotRequired[str] + """ + A lowercase alpha3 currency code like "usd". + """ + + +class CurrencyConversionCreateParamsToAmount(TypedDict): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ diff --git a/stripe/params/v2/money_management/_currency_conversion_list_params.py b/stripe/params/v2/money_management/_currency_conversion_list_params.py new file mode 100644 index 000000000..113ab793a --- /dev/null +++ b/stripe/params/v2/money_management/_currency_conversion_list_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class CurrencyConversionListParams(TypedDict): + financial_account: NotRequired[str] + """ + The ID of the FinancialAccount to filter by. + """ + limit: NotRequired[int] + """ + The page limit. + """ diff --git a/stripe/params/v2/money_management/_currency_conversion_retrieve_params.py b/stripe/params/v2/money_management/_currency_conversion_retrieve_params.py new file mode 100644 index 000000000..8a3c4287c --- /dev/null +++ b/stripe/params/v2/money_management/_currency_conversion_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class CurrencyConversionRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_inbound_transfer_create_params.py b/stripe/params/v2/money_management/_inbound_transfer_create_params.py index db5250ed2..6d32f1730 100644 --- a/stripe/params/v2/money_management/_inbound_transfer_create_params.py +++ b/stripe/params/v2/money_management/_inbound_transfer_create_params.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe.v2._amount import AmountParam from typing_extensions import NotRequired, TypedDict _InboundTransferCreateParamsBase = TypedDict( @@ -10,7 +9,7 @@ class InboundTransferCreateParams(_InboundTransferCreateParamsBase): - amount: AmountParam + amount: "InboundTransferCreateParamsAmount" """ The amount, in specified currency, by which the FinancialAccount balance will increase due to the InboundTransfer. """ @@ -24,6 +23,17 @@ class InboundTransferCreateParams(_InboundTransferCreateParamsBase): """ +class InboundTransferCreateParamsAmount(TypedDict): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + + class InboundTransferCreateParamsFrom(TypedDict): currency: NotRequired[str] """ diff --git a/stripe/params/v2/money_management/_outbound_payment_create_params.py b/stripe/params/v2/money_management/_outbound_payment_create_params.py index 4ce845f13..c09488c98 100644 --- a/stripe/params/v2/money_management/_outbound_payment_create_params.py +++ b/stripe/params/v2/money_management/_outbound_payment_create_params.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe.v2._amount import AmountParam from typing import Dict from typing_extensions import Literal, NotRequired, TypedDict @@ -11,7 +10,7 @@ class OutboundPaymentCreateParams(_OutboundPaymentCreateParamsBase): - amount: AmountParam + amount: "OutboundPaymentCreateParamsAmount" """ The "presentment amount" to be sent to the recipient. """ @@ -47,6 +46,17 @@ class OutboundPaymentCreateParams(_OutboundPaymentCreateParamsBase): """ +class OutboundPaymentCreateParamsAmount(TypedDict): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + + class OutboundPaymentCreateParamsDeliveryOptions(TypedDict): bank_account: NotRequired[Literal["automatic", "local", "wire"]] """ diff --git a/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py b/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py index dda1272cd..2164459e5 100644 --- a/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py +++ b/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe.v2._amount import AmountParam from typing_extensions import Literal, NotRequired, TypedDict _OutboundPaymentQuoteCreateParamsBase = TypedDict( @@ -10,7 +9,7 @@ class OutboundPaymentQuoteCreateParams(_OutboundPaymentQuoteCreateParamsBase): - amount: AmountParam + amount: "OutboundPaymentQuoteCreateParamsAmount" """ The "presentment amount" to be sent to the recipient. """ @@ -26,6 +25,17 @@ class OutboundPaymentQuoteCreateParams(_OutboundPaymentQuoteCreateParamsBase): """ +class OutboundPaymentQuoteCreateParamsAmount(TypedDict): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + + class OutboundPaymentQuoteCreateParamsDeliveryOptions(TypedDict): bank_account: NotRequired[Literal["automatic", "local", "wire"]] """ diff --git a/stripe/params/v2/money_management/_outbound_transfer_create_params.py b/stripe/params/v2/money_management/_outbound_transfer_create_params.py index ff999ef3f..72f291255 100644 --- a/stripe/params/v2/money_management/_outbound_transfer_create_params.py +++ b/stripe/params/v2/money_management/_outbound_transfer_create_params.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe.v2._amount import AmountParam from typing import Dict from typing_extensions import Literal, NotRequired, TypedDict @@ -11,7 +10,7 @@ class OutboundTransferCreateParams(_OutboundTransferCreateParamsBase): - amount: AmountParam + amount: "OutboundTransferCreateParamsAmount" """ The "presentment amount" for the OutboundPayment. """ @@ -39,6 +38,17 @@ class OutboundTransferCreateParams(_OutboundTransferCreateParamsBase): """ +class OutboundTransferCreateParamsAmount(TypedDict): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + + class OutboundTransferCreateParamsDeliveryOptions(TypedDict): bank_account: NotRequired[Literal["automatic", "local", "wire"]] """ diff --git a/stripe/params/v2/payments/__init__.py b/stripe/params/v2/payments/__init__.py index f31eb30fd..f23ff35f8 100644 --- a/stripe/params/v2/payments/__init__.py +++ b/stripe/params/v2/payments/__init__.py @@ -13,11 +13,7 @@ ) from stripe.params.v2.payments._off_session_payment_create_params import ( OffSessionPaymentCreateParams as OffSessionPaymentCreateParams, - OffSessionPaymentCreateParamsAmountDetails as OffSessionPaymentCreateParamsAmountDetails, - OffSessionPaymentCreateParamsAmountDetailsLineItem as OffSessionPaymentCreateParamsAmountDetailsLineItem, - OffSessionPaymentCreateParamsAmountDetailsLineItemTax as OffSessionPaymentCreateParamsAmountDetailsLineItemTax, - OffSessionPaymentCreateParamsAmountDetailsShipping as OffSessionPaymentCreateParamsAmountDetailsShipping, - OffSessionPaymentCreateParamsAmountDetailsTax as OffSessionPaymentCreateParamsAmountDetailsTax, + OffSessionPaymentCreateParamsAmount as OffSessionPaymentCreateParamsAmount, OffSessionPaymentCreateParamsCapture as OffSessionPaymentCreateParamsCapture, OffSessionPaymentCreateParamsPaymentMethodOptions as OffSessionPaymentCreateParamsPaymentMethodOptions, OffSessionPaymentCreateParamsPaymentMethodOptionsCard as OffSessionPaymentCreateParamsPaymentMethodOptionsCard, @@ -50,23 +46,7 @@ "stripe.params.v2.payments._off_session_payment_create_params", False, ), - "OffSessionPaymentCreateParamsAmountDetails": ( - "stripe.params.v2.payments._off_session_payment_create_params", - False, - ), - "OffSessionPaymentCreateParamsAmountDetailsLineItem": ( - "stripe.params.v2.payments._off_session_payment_create_params", - False, - ), - "OffSessionPaymentCreateParamsAmountDetailsLineItemTax": ( - "stripe.params.v2.payments._off_session_payment_create_params", - False, - ), - "OffSessionPaymentCreateParamsAmountDetailsShipping": ( - "stripe.params.v2.payments._off_session_payment_create_params", - False, - ), - "OffSessionPaymentCreateParamsAmountDetailsTax": ( + "OffSessionPaymentCreateParamsAmount": ( "stripe.params.v2.payments._off_session_payment_create_params", False, ), diff --git a/stripe/params/v2/payments/_off_session_payment_capture_params.py b/stripe/params/v2/payments/_off_session_payment_capture_params.py index b89bffd41..90b798842 100644 --- a/stripe/params/v2/payments/_off_session_payment_capture_params.py +++ b/stripe/params/v2/payments/_off_session_payment_capture_params.py @@ -5,16 +5,16 @@ class OffSessionPaymentCaptureParams(TypedDict): - amount_to_capture: int + amount_to_capture: NotRequired[int] """ The amount to capture. """ metadata: Dict[str, str] """ - Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can + 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. Learn more about - [storing information in metadata](https://docs.corp.stripe.com/payments/payment-intents#storing-information-in-metadata). + [storing information in metadata](https://docs.stripe.com/payments/payment-intents#storing-information-in-metadata). """ statement_descriptor: NotRequired[str] """ @@ -31,7 +31,7 @@ class OffSessionPaymentCaptureParams(TypedDict): """ transfer_data: NotRequired["OffSessionPaymentCaptureParamsTransferData"] """ - The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.corp.stripe.com/payments/connected-accounts). + The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.stripe.com/payments/connected-accounts). """ @@ -42,12 +42,7 @@ class OffSessionPaymentCaptureParamsTransferData(TypedDict): automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account. The amount must be less than or equal to the - [amount_requested](https://docs.corp.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested), + [amount_requested](https://docs.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested), and must be a positive integer representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00). """ - destination: str - """ - The account (if any) that the payment is attributed to for tax reporting, and - where funds from the payment are transferred to after payment success. - """ diff --git a/stripe/params/v2/payments/_off_session_payment_create_params.py b/stripe/params/v2/payments/_off_session_payment_create_params.py index 575e13832..4000e24b7 100644 --- a/stripe/params/v2/payments/_off_session_payment_create_params.py +++ b/stripe/params/v2/payments/_off_session_payment_create_params.py @@ -1,19 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe.v2._amount import AmountParam -from typing import Dict, List +from typing import Dict from typing_extensions import Literal, NotRequired, TypedDict class OffSessionPaymentCreateParams(TypedDict): - amount: AmountParam + amount: "OffSessionPaymentCreateParamsAmount" """ The “presentment amount” to be collected from the customer. """ - amount_details: NotRequired["OffSessionPaymentCreateParamsAmountDetails"] - """ - Provides industry-specific information about the amount. - """ cadence: Literal["recurring", "unscheduled"] """ The frequency of the underlying payment. @@ -22,20 +17,16 @@ class OffSessionPaymentCreateParams(TypedDict): """ Details about the capture configuration for the OffSessionPayment. """ - capture_method: NotRequired[Literal["automatic", "manual"]] - """ - Whether the OffSessionPayment should be captured automatically or manually. - """ customer: str """ ID of the Customer to which this OffSessionPayment belongs. """ metadata: Dict[str, str] """ - Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can + 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. Learn more about - [storing information in metadata](https://docs.corp.stripe.com/payments/payment-intents#storing-information-in-metadata). + [storing information in metadata](https://docs.stripe.com/payments/payment-intents#storing-information-in-metadata). """ on_behalf_of: NotRequired[str] """ @@ -80,82 +71,18 @@ class OffSessionPaymentCreateParams(TypedDict): """ transfer_data: NotRequired["OffSessionPaymentCreateParamsTransferData"] """ - The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.corp.stripe.com/payments/connected-accounts). - """ - - -class OffSessionPaymentCreateParamsAmountDetails(TypedDict): - discount_amount: NotRequired[int] - """ - The amount the total transaction was discounted for. - """ - line_items: List["OffSessionPaymentCreateParamsAmountDetailsLineItem"] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired["OffSessionPaymentCreateParamsAmountDetailsShipping"] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired["OffSessionPaymentCreateParamsAmountDetailsTax"] - """ - Contains information about the tax portion of the amount. + The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.stripe.com/payments/connected-accounts). """ -class OffSessionPaymentCreateParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int +class OffSessionPaymentCreateParamsAmount(TypedDict): + value: NotRequired[int] """ - Number of items of the product. Positive integer. + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). """ - tax: NotRequired["OffSessionPaymentCreateParamsAmountDetailsLineItemTax"] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - - -class OffSessionPaymentCreateParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: NotRequired[int] - """ - Total portion of the amount that is for tax. - """ - - -class OffSessionPaymentCreateParamsAmountDetailsShipping(TypedDict): - amount: NotRequired[int] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired[str] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired[str] - """ - The postal code that represents the shipping destination. - """ - - -class OffSessionPaymentCreateParamsAmountDetailsTax(TypedDict): - total_tax_amount: NotRequired[int] + currency: NotRequired[str] """ - Total portion of the amount that is for tax. + 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). """ @@ -197,7 +124,7 @@ class OffSessionPaymentCreateParamsRetryDetails(TypedDict): """ The pre-configured retry policy to use for the payment. """ - retry_strategy: Literal["heuristic", "none", "scheduled", "smart"] + retry_strategy: NotRequired[Literal["best_available", "none"]] """ Indicates the strategy for how you want Stripe to retry the payment. """ @@ -210,7 +137,7 @@ class OffSessionPaymentCreateParamsTransferData(TypedDict): automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account. The amount must be less than or equal to the - [amount_requested](https://docs.corp.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested), + [amount_requested](https://docs.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested), and must be a positive integer representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00). """ diff --git a/stripe/params/v2/test_helpers/__init__.py b/stripe/params/v2/test_helpers/__init__.py index ac9619333..2e5c7778a 100644 --- a/stripe/params/v2/test_helpers/__init__.py +++ b/stripe/params/v2/test_helpers/__init__.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from stripe.params.v2.test_helpers._financial_address_credit_params import ( FinancialAddressCreditParams as FinancialAddressCreditParams, + FinancialAddressCreditParamsAmount as FinancialAddressCreditParamsAmount, ) from stripe.params.v2.test_helpers._financial_address_generate_microdeposits_params import ( FinancialAddressGenerateMicrodepositsParams as FinancialAddressGenerateMicrodepositsParams, @@ -20,6 +21,10 @@ "stripe.params.v2.test_helpers._financial_address_credit_params", False, ), + "FinancialAddressCreditParamsAmount": ( + "stripe.params.v2.test_helpers._financial_address_credit_params", + False, + ), "FinancialAddressGenerateMicrodepositsParams": ( "stripe.params.v2.test_helpers._financial_address_generate_microdeposits_params", False, diff --git a/stripe/params/v2/test_helpers/_financial_address_credit_params.py b/stripe/params/v2/test_helpers/_financial_address_credit_params.py index 72931ad01..3f6ae2849 100644 --- a/stripe/params/v2/test_helpers/_financial_address_credit_params.py +++ b/stripe/params/v2/test_helpers/_financial_address_credit_params.py @@ -1,11 +1,10 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe.v2._amount import AmountParam from typing_extensions import Literal, NotRequired, TypedDict class FinancialAddressCreditParams(TypedDict): - amount: AmountParam + amount: "FinancialAddressCreditParamsAmount" """ Object containing the amount value and currency to credit. """ @@ -17,3 +16,14 @@ class FinancialAddressCreditParams(TypedDict): """ String explaining funds flow. Use this field to populate the statement descriptor of the ReceivedCredit created as an eventual result of this simulation. """ + + +class FinancialAddressCreditParamsAmount(TypedDict): + value: NotRequired[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ diff --git a/stripe/v2/_core_service.py b/stripe/v2/_core_service.py index 070c70ce9..f916eabe2 100644 --- a/stripe/v2/_core_service.py +++ b/stripe/v2/_core_service.py @@ -7,6 +7,7 @@ if TYPE_CHECKING: from stripe.v2.core._account_link_service import AccountLinkService from stripe.v2.core._account_service import AccountService + from stripe.v2.core._account_token_service import AccountTokenService from stripe.v2.core._claimable_sandbox_service import ( ClaimableSandboxService, ) @@ -22,6 +23,10 @@ "stripe.v2.core._account_link_service", "AccountLinkService", ], + "account_tokens": [ + "stripe.v2.core._account_token_service", + "AccountTokenService", + ], "claimable_sandboxes": [ "stripe.v2.core._claimable_sandbox_service", "ClaimableSandboxService", @@ -38,6 +43,7 @@ class CoreService(StripeService): accounts: "AccountService" account_links: "AccountLinkService" + account_tokens: "AccountTokenService" claimable_sandboxes: "ClaimableSandboxService" events: "EventService" event_destinations: "EventDestinationService" diff --git a/stripe/v2/_financial_address_generated_microdeposits.py b/stripe/v2/_financial_address_generated_microdeposits.py index 0f082a964..ec75a062c 100644 --- a/stripe/v2/_financial_address_generated_microdeposits.py +++ b/stripe/v2/_financial_address_generated_microdeposits.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount -from typing import ClassVar, List +from typing import ClassVar, List, Optional from typing_extensions import Literal @@ -10,6 +9,17 @@ class FinancialAddressGeneratedMicrodeposits(StripeObject): OBJECT_NAME: ClassVar[ Literal["financial_address_generated_microdeposits"] ] = "financial_address_generated_microdeposits" + + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + amounts: List[Amount] """ The amounts of the microdeposits that were generated. @@ -26,3 +36,4 @@ class FinancialAddressGeneratedMicrodeposits(StripeObject): """ Closed Enum. The status of the request. """ + _inner_class_types = {"amounts": Amount} diff --git a/stripe/v2/_money_management_service.py b/stripe/v2/_money_management_service.py index 96e912c2b..dccb07788 100644 --- a/stripe/v2/_money_management_service.py +++ b/stripe/v2/_money_management_service.py @@ -8,6 +8,9 @@ from stripe.v2.money_management._adjustment_service import ( AdjustmentService, ) + from stripe.v2.money_management._currency_conversion_service import ( + CurrencyConversionService, + ) from stripe.v2.money_management._financial_account_service import ( FinancialAccountService, ) @@ -56,6 +59,10 @@ "stripe.v2.money_management._adjustment_service", "AdjustmentService", ], + "currency_conversions": [ + "stripe.v2.money_management._currency_conversion_service", + "CurrencyConversionService", + ], "financial_accounts": [ "stripe.v2.money_management._financial_account_service", "FinancialAccountService", @@ -117,6 +124,7 @@ class MoneyManagementService(StripeService): adjustments: "AdjustmentService" + currency_conversions: "CurrencyConversionService" financial_accounts: "FinancialAccountService" financial_addresses: "FinancialAddressService" inbound_transfers: "InboundTransferService" diff --git a/stripe/v2/billing/_cadence.py b/stripe/v2/billing/_cadence.py index 32e74273b..5d0da463e 100644 --- a/stripe/v2/billing/_cadence.py +++ b/stripe/v2/billing/_cadence.py @@ -372,9 +372,9 @@ class MandateOptions(StripeObject): ] """ An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers - for authentication based on risk level and [other requirements](https://docs.corp.stripe.com/strong-customer-authentication). + for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. - Read our guide on [manually requesting 3D Secure](https://docs.corp.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. """ _inner_class_types = {"mandate_options": MandateOptions} diff --git a/stripe/v2/billing/_collection_setting.py b/stripe/v2/billing/_collection_setting.py index 1538d6dfd..dba839329 100644 --- a/stripe/v2/billing/_collection_setting.py +++ b/stripe/v2/billing/_collection_setting.py @@ -88,9 +88,9 @@ class MandateOptions(StripeObject): ] """ An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers - for authentication based on risk level and [other requirements](https://docs.corp.stripe.com/strong-customer-authentication). + for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. - Read our guide on [manually requesting 3D Secure](https://docs.corp.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. """ _inner_class_types = {"mandate_options": MandateOptions} diff --git a/stripe/v2/billing/_collection_setting_version.py b/stripe/v2/billing/_collection_setting_version.py index 8a2131009..0827e5e2a 100644 --- a/stripe/v2/billing/_collection_setting_version.py +++ b/stripe/v2/billing/_collection_setting_version.py @@ -84,9 +84,9 @@ class MandateOptions(StripeObject): ] """ An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers - for authentication based on risk level and [other requirements](https://docs.corp.stripe.com/strong-customer-authentication). + for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. - Read our guide on [manually requesting 3D Secure](https://docs.corp.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. """ _inner_class_types = {"mandate_options": MandateOptions} diff --git a/stripe/v2/billing/_meter_event.py b/stripe/v2/billing/_meter_event.py index 9d5a304dd..7ab581a1a 100644 --- a/stripe/v2/billing/_meter_event.py +++ b/stripe/v2/billing/_meter_event.py @@ -37,7 +37,8 @@ class MeterEvent(StripeObject): """ The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and - `value_settings.event_payload_key` (default is `value`). Read more about the payload. + `value_settings.event_payload_key` (default is `value`). Read more about + the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).. """ timestamp: str """ diff --git a/stripe/v2/billing/_service_action.py b/stripe/v2/billing/_service_action.py index a64e0d378..f6edc50d4 100644 --- a/stripe/v2/billing/_service_action.py +++ b/stripe/v2/billing/_service_action.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount as V2AmountResource from typing import ClassVar, List, Optional from typing_extensions import Literal, TYPE_CHECKING @@ -34,11 +33,21 @@ class CustomPricingUnit(StripeObject): The value of the credit grant, decimal value represented as a string. """ + class Monetary(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + custom_pricing_unit: Optional[CustomPricingUnit] """ The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. """ - monetary: Optional[V2AmountResource] + monetary: Optional[Monetary] """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ @@ -46,7 +55,10 @@ class CustomPricingUnit(StripeObject): """ The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. """ - _inner_class_types = {"custom_pricing_unit": CustomPricingUnit} + _inner_class_types = { + "custom_pricing_unit": CustomPricingUnit, + "monetary": Monetary, + } class ApplicabilityConfig(StripeObject): class Scope(StripeObject): @@ -119,11 +131,21 @@ class CustomPricingUnit(StripeObject): The value of the credit grant, decimal value represented as a string. """ + class Monetary(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + custom_pricing_unit: Optional[CustomPricingUnit] """ The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. """ - monetary: Optional[V2AmountResource] + monetary: Optional[Monetary] """ The monetary amount of the credit grant. Required if `type` is `monetary`. """ @@ -131,7 +153,10 @@ class CustomPricingUnit(StripeObject): """ The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. """ - _inner_class_types = {"custom_pricing_unit": CustomPricingUnit} + _inner_class_types = { + "custom_pricing_unit": CustomPricingUnit, + "monetary": Monetary, + } class ApplicabilityConfig(StripeObject): class Scope(StripeObject): diff --git a/stripe/v2/core/__init__.py b/stripe/v2/core/__init__.py index bcbee8f38..7c45b6633 100644 --- a/stripe/v2/core/__init__.py +++ b/stripe/v2/core/__init__.py @@ -19,9 +19,16 @@ AccountLinkService as AccountLinkService, ) from stripe.v2.core._account_person import AccountPerson as AccountPerson + from stripe.v2.core._account_person_token import ( + AccountPersonToken as AccountPersonToken, + ) from stripe.v2.core._account_service import ( AccountService as AccountService, ) + from stripe.v2.core._account_token import AccountToken as AccountToken + from stripe.v2.core._account_token_service import ( + AccountTokenService as AccountTokenService, + ) from stripe.v2.core._claimable_sandbox import ( ClaimableSandbox as ClaimableSandbox, ) @@ -46,7 +53,10 @@ "AccountLink": ("stripe.v2.core._account_link", False), "AccountLinkService": ("stripe.v2.core._account_link_service", False), "AccountPerson": ("stripe.v2.core._account_person", False), + "AccountPersonToken": ("stripe.v2.core._account_person_token", False), "AccountService": ("stripe.v2.core._account_service", False), + "AccountToken": ("stripe.v2.core._account_token", False), + "AccountTokenService": ("stripe.v2.core._account_token_service", False), "ClaimableSandbox": ("stripe.v2.core._claimable_sandbox", False), "ClaimableSandboxService": ( "stripe.v2.core._claimable_sandbox_service", diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py index c7a420963..166b1d801 100644 --- a/stripe/v2/core/_account.py +++ b/stripe/v2/core/_account.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount from typing import ClassVar, Dict, List, Optional from typing_extensions import Literal @@ -435,7 +434,7 @@ class Location(StripeObject): """ location: Optional[Location] """ - The customer's identified tax location - uses `location_source`. Will only be rendered if the `automatic_indirect_tax` feature is requested and `active`. + The [identified](https://docs.stripe.com/tax/customer-locations#address-hierarchy-other) tax location of the customer. Will only be rendered if the `automatic_indirect_tax` feature is requested and `active`. """ location_source: Optional[ Literal[ @@ -446,7 +445,7 @@ class Location(StripeObject): ] ] """ - The data source used to identify the customer's tax location - defaults to 'identity_address'. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions. + The data source used to identify the customer's tax location. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions. """ _inner_class_types = {"location": Location} @@ -549,7 +548,7 @@ class StatusDetail(StripeObject): automatic_indirect_tax: Optional[AutomaticIndirectTax] """ - Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. Uses the `location_source` field. + Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. """ _inner_class_types = { "automatic_indirect_tax": AutomaticIndirectTax, @@ -2576,6 +2575,69 @@ class DeclineOn(StripeObject): """ _inner_class_types = {"decline_on": DeclineOn} + class KonbiniPayments(StripeObject): + class Support(StripeObject): + class Hours(StripeObject): + end_time: Optional[str] + """ + Support hours end time (JST time of day) for in `HH:MM` format. + """ + start_time: Optional[str] + """ + Support hours start time (JST time of day) for in `HH:MM` format. + """ + + email: Optional[str] + """ + Support email address for Konbini payments. + """ + hours: Optional[Hours] + """ + Support hours for Konbini payments. + """ + phone: Optional[str] + """ + Support phone number for Konbini payments. + """ + _inner_class_types = {"hours": Hours} + + support: Optional[Support] + """ + Support for Konbini payments. + """ + _inner_class_types = {"support": Support} + + class ScriptStatementDescriptor(StripeObject): + class Kana(StripeObject): + descriptor: Optional[str] + """ + The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a statement_descriptor_prefix, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the statement_descriptor text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + prefix: Optional[str] + """ + Default text that appears on statements for card charges outside of Japan, prefixing any dynamic statement_descriptor_suffix specified on the charge. To maximize space for the dynamic part of the descriptor, keep this text short. If you don't specify this value, statement_descriptor is used as the prefix. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + + class Kanji(StripeObject): + descriptor: Optional[str] + """ + The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a statement_descriptor_prefix, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the statement_descriptor text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + prefix: Optional[str] + """ + Default text that appears on statements for card charges outside of Japan, prefixing any dynamic statement_descriptor_suffix specified on the charge. To maximize space for the dynamic part of the descriptor, keep this text short. If you don't specify this value, statement_descriptor is used as the prefix. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + + kana: Optional[Kana] + """ + The Kana variation of statement_descriptor used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + """ + kanji: Optional[Kanji] + """ + The Kanji variation of statement_descriptor used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + """ + _inner_class_types = {"kana": Kana, "kanji": Kanji} + class SepaDebitPayments(StripeObject): creditor_id: Optional[str] """ @@ -2661,10 +2723,18 @@ class Address(StripeObject): """ Card payments settings. """ + konbini_payments: Optional[KonbiniPayments] + """ + Settings specific to Konbini payments on the account. + """ mcc: Optional[str] """ The merchant category code for the merchant. MCCs are used to classify businesses based on the goods or services they provide. """ + script_statement_descriptor: Optional[ScriptStatementDescriptor] + """ + Settings for the default text that appears on statements for language variations. + """ sepa_debit_payments: Optional[SepaDebitPayments] """ Settings used for SEPA debit payments. @@ -2682,6 +2752,8 @@ class Address(StripeObject): "branding": Branding, "capabilities": Capabilities, "card_payments": CardPayments, + "konbini_payments": KonbiniPayments, + "script_statement_descriptor": ScriptStatementDescriptor, "sepa_debit_payments": SepaDebitPayments, "statement_descriptor": StatementDescriptor, "support": Support, @@ -3151,6 +3223,45 @@ class StatusDetail(StripeObject): } class HoldsCurrencies(StripeObject): + class Eur(StripeObject): + 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. + """ + + requested: bool + """ + Whether the Capability has been requested. + """ + status: Literal[ + "active", "pending", "restricted", "unsupported" + ] + """ + The status of the Capability. + """ + status_details: List[StatusDetail] + """ + Additional details regarding the status of the Capability. `status_details` will be empty if the Capability's status is `active`. + """ + _inner_class_types = {"status_details": StatusDetail} + class Gbp(StripeObject): class StatusDetail(StripeObject): code: Literal[ @@ -3268,6 +3379,10 @@ class StatusDetail(StripeObject): """ _inner_class_types = {"status_details": StatusDetail} + eur: Optional[Eur] + """ + Can hold storage-type funds on Stripe in EUR. + """ gbp: Optional[Gbp] """ Can hold storage-type funds on Stripe in GBP. @@ -3280,7 +3395,12 @@ class StatusDetail(StripeObject): """ Can hold storage-type funds on Stripe in USDC. """ - _inner_class_types = {"gbp": Gbp, "usd": Usd, "usdc": Usdc} + _inner_class_types = { + "eur": Eur, + "gbp": Gbp, + "usd": Usd, + "usdc": Usdc, + } class InboundTransfers(StripeObject): class BankAccounts(StripeObject): @@ -3851,6 +3971,10 @@ class Responsibilities(StripeObject): """ A value indicating who is responsible for losses when this Account can't pay back negative balances from payments. """ + requirements_collector: Literal["application", "stripe"] + """ + A value indicating responsibility for collecting requirements on this account. + """ currency: Optional[str] """ @@ -3962,6 +4086,316 @@ class Responsibilities(StripeObject): "responsibilities": Responsibilities, } + class FutureRequirements(StripeObject): + class Entry(StripeObject): + class Error(StripeObject): + code: Literal[ + "invalid_address_city_state_postal_code", + "invalid_address_highway_contract_box", + "invalid_address_private_mailbox", + "invalid_business_profile_name", + "invalid_business_profile_name_denylisted", + "invalid_company_name_denylisted", + "invalid_dob_age_over_maximum", + "invalid_dob_age_under_18", + "invalid_dob_age_under_minimum", + "invalid_product_description_length", + "invalid_product_description_url_match", + "invalid_representative_country", + "invalid_statement_descriptor_business_mismatch", + "invalid_statement_descriptor_denylisted", + "invalid_statement_descriptor_length", + "invalid_statement_descriptor_prefix_denylisted", + "invalid_statement_descriptor_prefix_mismatch", + "invalid_street_address", + "invalid_tax_id", + "invalid_tax_id_format", + "invalid_tos_acceptance", + "invalid_url_denylisted", + "invalid_url_format", + "invalid_url_website_business_information_mismatch", + "invalid_url_website_empty", + "invalid_url_website_inaccessible", + "invalid_url_website_inaccessible_geoblocked", + "invalid_url_website_inaccessible_password_protected", + "invalid_url_website_incomplete", + "invalid_url_website_incomplete_cancellation_policy", + "invalid_url_website_incomplete_customer_service_details", + "invalid_url_website_incomplete_legal_restrictions", + "invalid_url_website_incomplete_refund_policy", + "invalid_url_website_incomplete_return_policy", + "invalid_url_website_incomplete_terms_and_conditions", + "invalid_url_website_incomplete_under_construction", + "invalid_url_website_other", + "invalid_url_web_presence_detected", + "invalid_value_other", + "unresolvable_ip_address", + "unresolvable_postal_code", + "verification_directors_mismatch", + "verification_document_address_mismatch", + "verification_document_address_missing", + "verification_document_corrupt", + "verification_document_country_not_supported", + "verification_document_directors_mismatch", + "verification_document_dob_mismatch", + "verification_document_duplicate_type", + "verification_document_expired", + "verification_document_failed_copy", + "verification_document_failed_greyscale", + "verification_document_failed_other", + "verification_document_failed_test_mode", + "verification_document_fraudulent", + "verification_document_id_number_mismatch", + "verification_document_id_number_missing", + "verification_document_incomplete", + "verification_document_invalid", + "verification_document_issue_or_expiry_date_missing", + "verification_document_manipulated", + "verification_document_missing_back", + "verification_document_missing_front", + "verification_document_name_mismatch", + "verification_document_name_missing", + "verification_document_nationality_mismatch", + "verification_document_not_readable", + "verification_document_not_signed", + "verification_document_not_uploaded", + "verification_document_photo_mismatch", + "verification_document_too_large", + "verification_document_type_not_supported", + "verification_extraneous_directors", + "verification_failed_address_match", + "verification_failed_business_iec_number", + "verification_failed_document_match", + "verification_failed_id_number_match", + "verification_failed_keyed_identity", + "verification_failed_keyed_match", + "verification_failed_name_match", + "verification_failed_other", + "verification_failed_representative_authority", + "verification_failed_residential_address", + "verification_failed_tax_id_match", + "verification_failed_tax_id_not_issued", + "verification_missing_directors", + "verification_missing_executives", + "verification_missing_owners", + "verification_requires_additional_memorandum_of_associations", + "verification_requires_additional_proof_of_registration", + "verification_selfie_document_missing_photo", + "verification_selfie_face_mismatch", + "verification_selfie_manipulated", + "verification_selfie_unverified_other", + "verification_supportability", + "verification_token_stale", + ] + """ + Machine-readable code describing the error. + """ + description: str + """ + Human-readable description of the error. + """ + + class Impact(StripeObject): + class RestrictsCapability(StripeObject): + class Deadline(StripeObject): + status: Literal[ + "currently_due", "eventually_due", "past_due" + ] + """ + The current status of the requirement's impact. + """ + + capability: Literal[ + "ach_debit_payments", + "acss_debit_payments", + "affirm_payments", + "afterpay_clearpay_payments", + "alma_payments", + "amazon_pay_payments", + "automatic_indirect_tax", + "au_becs_debit_payments", + "bacs_debit_payments", + "bancontact_payments", + "bank_accounts.local", + "bank_accounts.wire", + "blik_payments", + "boleto_payments", + "cards", + "card_payments", + "cartes_bancaires_payments", + "cashapp_payments", + "commercial.celtic.charge_card", + "commercial.celtic.spend_card", + "commercial.cross_river_bank.charge_card", + "commercial.cross_river_bank.spend_card", + "commercial.lead.prepaid_card", + "commercial.stripe.charge_card", + "commercial.stripe.prepaid_card", + "crypto", + "eps_payments", + "financial_addresses.bank_accounts", + "fpx_payments", + "gb_bank_transfer_payments", + "grabpay_payments", + "holds_currencies.eur", + "holds_currencies.gbp", + "holds_currencies.usd", + "ideal_payments", + "inbound_transfers.financial_accounts", + "jcb_payments", + "jp_bank_transfer_payments", + "kakao_pay_payments", + "klarna_payments", + "konbini_payments", + "kr_card_payments", + "link_payments", + "mobilepay_payments", + "multibanco_payments", + "mx_bank_transfer_payments", + "naver_pay_payments", + "outbound_payments.bank_accounts", + "outbound_payments.cards", + "outbound_payments.financial_accounts", + "outbound_transfers.bank_accounts", + "outbound_transfers.financial_accounts", + "oxxo_payments", + "p24_payments", + "payco_payments", + "paynow_payments", + "pay_by_bank_payments", + "promptpay_payments", + "revolut_pay_payments", + "samsung_pay_payments", + "sepa_bank_transfer_payments", + "sepa_debit_payments", + "stripe_balance.payouts", + "stripe_balance.stripe_transfers", + "swish_payments", + "twint_payments", + "us_bank_transfer_payments", + "zip_payments", + ] + """ + The name of the Capability which will be restricted. + """ + configuration: Literal[ + "card_creator", + "customer", + "merchant", + "recipient", + "storer", + ] + """ + The configuration which specifies the Capability which will be restricted. + """ + deadline: Deadline + """ + Details about when in the account lifecycle the requirement must be collected by the avoid the Capability restriction. + """ + _inner_class_types = {"deadline": Deadline} + + restricts_capabilities: Optional[List[RestrictsCapability]] + """ + The Capabilities that will be restricted if the requirement is not collected and satisfactory to Stripe. + """ + _inner_class_types = { + "restricts_capabilities": RestrictsCapability, + } + + class MinimumDeadline(StripeObject): + status: Literal["currently_due", "eventually_due", "past_due"] + """ + The current status of the requirement's impact. + """ + + class Reference(StripeObject): + inquiry: Optional[str] + """ + If `inquiry` is the type, the inquiry token. + """ + resource: Optional[str] + """ + If `resource` is the type, the resource token. + """ + type: Literal["inquiry", "payment_method", "person"] + """ + The type of the reference. If the type is "inquiry", the inquiry token can be found in the "inquiry" field. + Otherwise the type is an API resource, the token for which can be found in the "resource" field. + """ + + class RequestedReason(StripeObject): + code: Literal["routine_onboarding", "routine_verification"] + """ + Machine-readable description of Stripe's reason for collecting the requirement. + """ + + awaiting_action_from: Literal["stripe", "user"] + """ + Whether the responsibility is with the integrator or with Stripe (to review info, to wait for some condition, etc.) to action the requirement. + """ + description: str + """ + Machine-readable string describing the requirement. + """ + errors: List[Error] + """ + Descriptions of why the requirement must be collected, or why the collected information isn't satisfactory to Stripe. + """ + impact: Impact + """ + A hash describing the impact of not collecting the requirement, or Stripe not being able to verify the collected information. + """ + minimum_deadline: MinimumDeadline + """ + The soonest point when the account will be impacted by not providing the requirement. + """ + reference: Optional[Reference] + """ + A reference to the location of the requirement. + """ + requested_reasons: List[RequestedReason] + """ + A list of reasons why Stripe is collecting the requirement. + """ + _inner_class_types = { + "errors": Error, + "impact": Impact, + "minimum_deadline": MinimumDeadline, + "reference": Reference, + "requested_reasons": RequestedReason, + } + + class Summary(StripeObject): + class MinimumDeadline(StripeObject): + status: Literal["currently_due", "eventually_due", "past_due"] + """ + The current strictest status of all requirements on the Account. + """ + time: Optional[str] + """ + The soonest RFC3339 date & time UTC value a requirement can impact the Account. + """ + + minimum_deadline: Optional[MinimumDeadline] + """ + The soonest date and time a requirement on the Account will become `past due`. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: `2022-09-18T13:22:18.123Z`. + """ + _inner_class_types = {"minimum_deadline": MinimumDeadline} + + entries: Optional[List[Entry]] + """ + A list of requirements for the Account. + """ + minimum_transition_date: Optional[str] + """ + The time at which the future requirements become effective. + """ + summary: Optional[Summary] + """ + An object containing an overview of requirements for the Account. + """ + _inner_class_types = {"entries": Entry, "summary": Summary} + class Identity(StripeObject): class Attestations(StripeObject): class DirectorshipDeclaration(StripeObject): @@ -4635,6 +5069,16 @@ class Address(StripeObject): """ class AnnualRevenue(StripeObject): + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + amount: Optional[Amount] """ A non-negative integer representing the amount in the smallest currency unit. @@ -4643,6 +5087,7 @@ class AnnualRevenue(StripeObject): """ The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. """ + _inner_class_types = {"amount": Amount} class Documents(StripeObject): class BankAccountOwnershipVerification(StripeObject): @@ -4826,6 +5271,7 @@ class IdNumber(StripeObject): "ae_crn", "ae_vat", "ao_nif", + "ar_cuit", "at_fn", "au_abn", "au_acn", @@ -4901,10 +5347,21 @@ class IdNumber(StripeObject): """ class MonthlyEstimatedRevenue(StripeObject): + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + amount: Optional[Amount] """ A non-negative integer representing the amount in the smallest currency unit. """ + _inner_class_types = {"amount": Amount} class ScriptAddresses(StripeObject): class Kana(StripeObject): @@ -5311,6 +5768,7 @@ class IdNumber(StripeObject): type: Literal[ "ae_eid", "ao_nif", + "ar_dni", "az_tin", "bd_brc", "bd_etin", @@ -5765,6 +6223,7 @@ class Deadline(StripeObject): "fpx_payments", "gb_bank_transfer_payments", "grabpay_payments", + "holds_currencies.eur", "holds_currencies.gbp", "holds_currencies.usd", "ideal_payments", @@ -5844,17 +6303,14 @@ class Reference(StripeObject): """ If `resource` is the type, the resource token. """ - type: Literal["inquiry", "resource"] + type: Literal["inquiry", "payment_method", "person"] """ - The type of the reference. An additional hash is included with a name matching the type. It contains additional information specific to the type. + The type of the reference. If the type is "inquiry", the inquiry token can be found in the "inquiry" field. + Otherwise the type is an API resource, the token for which can be found in the "resource" field. """ class RequestedReason(StripeObject): - code: Literal[ - "future_requirements", - "routine_onboarding", - "routine_verification", - ] + code: Literal["routine_onboarding", "routine_verification"] """ Machine-readable description of Stripe's reason for collecting the requirement. """ @@ -5912,10 +6368,6 @@ class MinimumDeadline(StripeObject): """ _inner_class_types = {"minimum_deadline": MinimumDeadline} - collector: Literal["application", "stripe"] - """ - A value indicating responsibility for collecting requirements on this account. - """ entries: Optional[List[Entry]] """ A list of requirements for the Account. @@ -5960,6 +6412,10 @@ class MinimumDeadline(StripeObject): """ A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on any invoices sent to the Account. """ + future_requirements: Optional[FutureRequirements] + """ + Information about the future requirements for the Account that will eventually come into effect, including what information needs to be collected, and by when. + """ id: str """ Unique identifier for the Account. @@ -5982,11 +6438,12 @@ class MinimumDeadline(StripeObject): """ requirements: Optional[Requirements] """ - Information about the requirements for the Account, including what information needs to be collected, and by when. + Information about the active requirements for the Account, including what information needs to be collected, and by when. """ _inner_class_types = { "configuration": Configuration, "defaults": Defaults, + "future_requirements": FutureRequirements, "identity": Identity, "requirements": Requirements, } diff --git a/stripe/v2/core/_account_person.py b/stripe/v2/core/_account_person.py index ff801b764..8cc0c25bc 100644 --- a/stripe/v2/core/_account_person.py +++ b/stripe/v2/core/_account_person.py @@ -236,6 +236,7 @@ class IdNumber(StripeObject): type: Literal[ "ae_eid", "ao_nif", + "ar_dni", "az_tin", "bd_brc", "bd_etin", diff --git a/stripe/v2/core/_account_person_token.py b/stripe/v2/core/_account_person_token.py new file mode 100644 index 000000000..34b07a1e6 --- /dev/null +++ b/stripe/v2/core/_account_person_token.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar +from typing_extensions import Literal + + +class AccountPersonToken(StripeObject): + """ + Person Tokens are single-use tokens which tokenize person information, and are used for creating or updating a Person. + """ + + OBJECT_NAME: ClassVar[Literal["v2.core.account_person_token"]] = ( + "v2.core.account_person_token" + ) + created: str + """ + Time at which the token was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + expires_at: str + """ + Time at which the token will expire. + """ + id: str + """ + Unique identifier for the token. + """ + livemode: bool + """ + Has the value `true` if the token exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.core.account_person_token"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + used: bool + """ + Determines if the token has already been used (tokens can only be used once). + """ diff --git a/stripe/v2/core/_account_service.py b/stripe/v2/core/_account_service.py index 27d89401c..d4f2f6c0c 100644 --- a/stripe/v2/core/_account_service.py +++ b/stripe/v2/core/_account_service.py @@ -22,14 +22,22 @@ from stripe.v2._list_object import ListObject from stripe.v2.core._account import Account from stripe.v2.core.accounts._person_service import PersonService + from stripe.v2.core.accounts._person_token_service import ( + PersonTokenService, + ) _subservices = { "persons": ["stripe.v2.core.accounts._person_service", "PersonService"], + "person_tokens": [ + "stripe.v2.core.accounts._person_token_service", + "PersonTokenService", + ], } class AccountService(StripeService): persons: "PersonService" + person_tokens: "PersonTokenService" def __init__(self, requestor): super().__init__(requestor) diff --git a/stripe/v2/core/_account_token.py b/stripe/v2/core/_account_token.py new file mode 100644 index 000000000..c64b53754 --- /dev/null +++ b/stripe/v2/core/_account_token.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar +from typing_extensions import Literal + + +class AccountToken(StripeObject): + """ + Account tokens are single-use tokens which tokenize company/individual/business information, and are used for creating or updating an Account. + """ + + OBJECT_NAME: ClassVar[Literal["v2.core.account_token"]] = ( + "v2.core.account_token" + ) + created: str + """ + Time at which the token was created. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + expires_at: str + """ + Time at which the token will expire. + """ + id: str + """ + Unique identifier for the token. + """ + livemode: bool + """ + Has the value `true` if the token exists in live mode or the value `false` if the object exists in test mode. + """ + object: Literal["v2.core.account_token"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + used: bool + """ + Determines if the token has already been used (tokens can only be used once). + """ diff --git a/stripe/v2/core/_account_token_service.py b/stripe/v2/core/_account_token_service.py new file mode 100644 index 000000000..a36e8a4ec --- /dev/null +++ b/stripe/v2/core/_account_token_service.py @@ -0,0 +1,96 @@ +# -*- 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._request_options import RequestOptions + from stripe.params.v2.core._account_token_create_params import ( + AccountTokenCreateParams, + ) + from stripe.params.v2.core._account_token_retrieve_params import ( + AccountTokenRetrieveParams, + ) + from stripe.v2.core._account_token import AccountToken + + +class AccountTokenService(StripeService): + def create( + self, + params: "AccountTokenCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "AccountToken": + """ + Creates an Account Token. + """ + return cast( + "AccountToken", + self._request( + "post", + "/v2/core/account_tokens", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "AccountTokenCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "AccountToken": + """ + Creates an Account Token. + """ + return cast( + "AccountToken", + await self._request_async( + "post", + "/v2/core/account_tokens", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: Optional["AccountTokenRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "AccountToken": + """ + Retrieves an Account Token. + """ + return cast( + "AccountToken", + self._request( + "get", + "/v2/core/account_tokens/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["AccountTokenRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "AccountToken": + """ + Retrieves an Account Token. + """ + return cast( + "AccountToken", + await self._request_async( + "get", + "/v2/core/account_tokens/{id}".format(id=sanitize_id(id)), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/core/_event.py b/stripe/v2/core/_event.py index 1d9b8982b..cb7ad021b 100644 --- a/stripe/v2/core/_event.py +++ b/stripe/v2/core/_event.py @@ -74,10 +74,6 @@ class Request(StripeObject): """ The type of the event. """ - v1_event_id: Optional[str] - """ - For interop events, this is the snapshot event ID. - """ _inner_class_types = {"reason": Reason} diff --git a/stripe/v2/core/accounts/__init__.py b/stripe/v2/core/accounts/__init__.py index 6aa8f860c..6cc5ff799 100644 --- a/stripe/v2/core/accounts/__init__.py +++ b/stripe/v2/core/accounts/__init__.py @@ -7,10 +7,17 @@ from stripe.v2.core.accounts._person_service import ( PersonService as PersonService, ) + from stripe.v2.core.accounts._person_token_service import ( + PersonTokenService as PersonTokenService, + ) # name -> (import_target, is_submodule) _import_map = { "PersonService": ("stripe.v2.core.accounts._person_service", False), + "PersonTokenService": ( + "stripe.v2.core.accounts._person_token_service", + False, + ), } if not TYPE_CHECKING: diff --git a/stripe/v2/core/accounts/_person_token_service.py b/stripe/v2/core/accounts/_person_token_service.py new file mode 100644 index 000000000..0868da342 --- /dev/null +++ b/stripe/v2/core/accounts/_person_token_service.py @@ -0,0 +1,110 @@ +# -*- 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._request_options import RequestOptions + from stripe.params.v2.core.accounts._person_token_create_params import ( + PersonTokenCreateParams, + ) + from stripe.params.v2.core.accounts._person_token_retrieve_params import ( + PersonTokenRetrieveParams, + ) + from stripe.v2.core._account_person_token import AccountPersonToken + + +class PersonTokenService(StripeService): + def create( + self, + account_id: str, + params: Optional["PersonTokenCreateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "AccountPersonToken": + """ + Creates a Person Token associated with an Account. + """ + return cast( + "AccountPersonToken", + self._request( + "post", + "/v2/core/accounts/{account_id}/person_tokens".format( + account_id=sanitize_id(account_id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + account_id: str, + params: Optional["PersonTokenCreateParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "AccountPersonToken": + """ + Creates a Person Token associated with an Account. + """ + return cast( + "AccountPersonToken", + await self._request_async( + "post", + "/v2/core/accounts/{account_id}/person_tokens".format( + account_id=sanitize_id(account_id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + account_id: str, + id: str, + params: Optional["PersonTokenRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "AccountPersonToken": + """ + Retrieves a Person Token associated with an Account. + """ + return cast( + "AccountPersonToken", + self._request( + "get", + "/v2/core/accounts/{account_id}/person_tokens/{id}".format( + account_id=sanitize_id(account_id), + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + account_id: str, + id: str, + params: Optional["PersonTokenRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "AccountPersonToken": + """ + Retrieves a Person Token associated with an Account. + """ + return cast( + "AccountPersonToken", + await self._request_async( + "get", + "/v2/core/accounts/{account_id}/person_tokens/{id}".format( + account_id=sanitize_id(account_id), + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/__init__.py b/stripe/v2/money_management/__init__.py index 5f9c2acfd..ede426c8c 100644 --- a/stripe/v2/money_management/__init__.py +++ b/stripe/v2/money_management/__init__.py @@ -8,6 +8,12 @@ from stripe.v2.money_management._adjustment_service import ( AdjustmentService as AdjustmentService, ) + from stripe.v2.money_management._currency_conversion import ( + CurrencyConversion as CurrencyConversion, + ) + from stripe.v2.money_management._currency_conversion_service import ( + CurrencyConversionService as CurrencyConversionService, + ) from stripe.v2.money_management._financial_account import ( FinancialAccount as FinancialAccount, ) @@ -100,6 +106,14 @@ "stripe.v2.money_management._adjustment_service", False, ), + "CurrencyConversion": ( + "stripe.v2.money_management._currency_conversion", + False, + ), + "CurrencyConversionService": ( + "stripe.v2.money_management._currency_conversion_service", + False, + ), "FinancialAccount": ( "stripe.v2.money_management._financial_account", False, diff --git a/stripe/v2/money_management/_adjustment.py b/stripe/v2/money_management/_adjustment.py index 6006e2db5..eef2371e3 100644 --- a/stripe/v2/money_management/_adjustment.py +++ b/stripe/v2/money_management/_adjustment.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount from typing import ClassVar, Optional from typing_extensions import Literal @@ -54,6 +53,16 @@ class AdjustedFlow(StripeObject): Closed Enum. If applicable, the type of flow linked to this Adjustment. The field matching this value will contain the ID of the flow. """ + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + adjusted_flow: Optional[AdjustedFlow] """ If applicable, contains information about the original flow linked to this Adjustment. @@ -90,4 +99,4 @@ class AdjustedFlow(StripeObject): """ A link to the Stripe-hosted receipt that is provided when money movement is considered regulated under Stripe's money transmission licenses. The receipt link remains active for 60 days from the Adjustment creation date. After this period, the link will expire and the receipt url value will be null. """ - _inner_class_types = {"adjusted_flow": AdjustedFlow} + _inner_class_types = {"adjusted_flow": AdjustedFlow, "amount": Amount} diff --git a/stripe/v2/money_management/_currency_conversion.py b/stripe/v2/money_management/_currency_conversion.py new file mode 100644 index 000000000..fce13f58e --- /dev/null +++ b/stripe/v2/money_management/_currency_conversion.py @@ -0,0 +1,84 @@ +# -*- 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 CurrencyConversion(StripeObject): + """ + The CurrencyConversion object. Contains details such as the amount debited and credited and the FinancialAccount the CurrencyConversion was performed on. + """ + + OBJECT_NAME: ClassVar[ + Literal["v2.money_management.currency_conversion"] + ] = "v2.money_management.currency_conversion" + + class From(StripeObject): + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + amount: Amount + """ + Amount object. + """ + _inner_class_types = {"amount": Amount} + + class To(StripeObject): + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + amount: Amount + """ + Amount object. + """ + _inner_class_types = {"amount": Amount} + + created: str + """ + The time the CurrencyConversion was created at. + """ + exchange_rate: str + """ + The exchange rate used when processing the CurrencyConversion. + """ + financial_account: str + """ + The FinancialAccount the CurrencyConversion was performed on. + """ + from_: From + """ + The from block containing what was debited. + """ + id: str + """ + The id of the CurrencyConversion. + """ + livemode: bool + """ + If the CurrencyConversion was performed in livemode or not. + """ + object: Literal["v2.money_management.currency_conversion"] + """ + String representing the object's type. Objects of the same type share the same value of the object field. + """ + to: To + """ + The to block containing what was credited. + """ + _inner_class_types = {"from": From, "to": To} + _field_remappings = {"from_": "from"} diff --git a/stripe/v2/money_management/_currency_conversion_service.py b/stripe/v2/money_management/_currency_conversion_service.py new file mode 100644 index 000000000..93ac94bda --- /dev/null +++ b/stripe/v2/money_management/_currency_conversion_service.py @@ -0,0 +1,144 @@ +# -*- 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._request_options import RequestOptions + from stripe.params.v2.money_management._currency_conversion_create_params import ( + CurrencyConversionCreateParams, + ) + from stripe.params.v2.money_management._currency_conversion_list_params import ( + CurrencyConversionListParams, + ) + from stripe.params.v2.money_management._currency_conversion_retrieve_params import ( + CurrencyConversionRetrieveParams, + ) + from stripe.v2._list_object import ListObject + from stripe.v2.money_management._currency_conversion import ( + CurrencyConversion, + ) + + +class CurrencyConversionService(StripeService): + def list( + self, + params: Optional["CurrencyConversionListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[CurrencyConversion]": + """ + List all CurrencyConversion on an account with the option to filter by FinancialAccount. + """ + return cast( + "ListObject[CurrencyConversion]", + self._request( + "get", + "/v2/money_management/currency_conversions", + base_address="api", + params=params, + options=options, + ), + ) + + async def list_async( + self, + params: Optional["CurrencyConversionListParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "ListObject[CurrencyConversion]": + """ + List all CurrencyConversion on an account with the option to filter by FinancialAccount. + """ + return cast( + "ListObject[CurrencyConversion]", + await self._request_async( + "get", + "/v2/money_management/currency_conversions", + base_address="api", + params=params, + options=options, + ), + ) + + def create( + self, + params: "CurrencyConversionCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "CurrencyConversion": + """ + Create a CurrencyConversion. + """ + return cast( + "CurrencyConversion", + self._request( + "post", + "/v2/money_management/currency_conversions", + base_address="api", + params=params, + options=options, + ), + ) + + async def create_async( + self, + params: "CurrencyConversionCreateParams", + options: Optional["RequestOptions"] = None, + ) -> "CurrencyConversion": + """ + Create a CurrencyConversion. + """ + return cast( + "CurrencyConversion", + await self._request_async( + "post", + "/v2/money_management/currency_conversions", + base_address="api", + params=params, + options=options, + ), + ) + + def retrieve( + self, + id: str, + params: Optional["CurrencyConversionRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "CurrencyConversion": + """ + Retrieve details of a CurrencyConversion by id. + """ + return cast( + "CurrencyConversion", + self._request( + "get", + "/v2/money_management/currency_conversions/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) + + async def retrieve_async( + self, + id: str, + params: Optional["CurrencyConversionRetrieveParams"] = None, + options: Optional["RequestOptions"] = None, + ) -> "CurrencyConversion": + """ + Retrieve details of a CurrencyConversion by id. + """ + return cast( + "CurrencyConversion", + await self._request_async( + "get", + "/v2/money_management/currency_conversions/{id}".format( + id=sanitize_id(id), + ), + base_address="api", + params=params, + options=options, + ), + ) diff --git a/stripe/v2/money_management/_financial_account.py b/stripe/v2/money_management/_financial_account.py index 02561c4f8..b2361c056 100644 --- a/stripe/v2/money_management/_financial_account.py +++ b/stripe/v2/money_management/_financial_account.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount from typing import ClassVar, Dict, List, Optional from typing_extensions import Literal @@ -16,18 +15,58 @@ class FinancialAccount(StripeObject): ) class Balance(StripeObject): - available: Dict[str, Amount] + class Available(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + class InboundPending(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + class OutboundPending(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + available: Dict[str, Available] """ Balance that can be used for money movement. """ - inbound_pending: Dict[str, Amount] + inbound_pending: Dict[str, InboundPending] """ Balance of inbound funds that will later transition to the `available` balance. """ - outbound_pending: Dict[str, Amount] + outbound_pending: Dict[str, OutboundPending] """ Balance of funds that are being used for a pending outbound money movement. """ + _inner_class_types = { + "available": Available, + "inbound_pending": InboundPending, + "outbound_pending": OutboundPending, + } + _inner_class_dicts = [ + "available", + "inbound_pending", + "outbound_pending", + ] class Other(StripeObject): type: str diff --git a/stripe/v2/money_management/_inbound_transfer.py b/stripe/v2/money_management/_inbound_transfer.py index 18ff38e20..46f80f32e 100644 --- a/stripe/v2/money_management/_inbound_transfer.py +++ b/stripe/v2/money_management/_inbound_transfer.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount from typing import ClassVar, Dict, List, Optional from typing_extensions import Literal, TYPE_CHECKING @@ -19,7 +18,27 @@ class InboundTransfer(StripeObject): "v2.money_management.inbound_transfer" ) + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + class From(StripeObject): + class Debited(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + class PaymentMethod(StripeObject): type: str """ @@ -30,7 +49,7 @@ class PaymentMethod(StripeObject): The destination US bank account identifier. eg "usba_***". """ - debited: Amount + debited: Debited """ The amount in specified currency that was debited from the Payment Method. """ @@ -38,10 +57,23 @@ class PaymentMethod(StripeObject): """ The Payment Method object used to create the InboundTransfer. """ - _inner_class_types = {"payment_method": PaymentMethod} + _inner_class_types = { + "debited": Debited, + "payment_method": PaymentMethod, + } class To(StripeObject): - credited: Amount + class Credited(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + credited: Credited """ The amount by which the FinancialAccount balance is credited. """ @@ -49,6 +81,7 @@ class To(StripeObject): """ The FinancialAccount that funds will land in. """ + _inner_class_types = {"credited": Credited} class TransferHistory(StripeObject): class BankDebitFailed(StripeObject): @@ -167,6 +200,7 @@ class BankDebitReturned(StripeObject): A list of history objects, representing changes in the state of the InboundTransfer. """ _inner_class_types = { + "amount": Amount, "from": From, "to": To, "transfer_history": TransferHistory, diff --git a/stripe/v2/money_management/_outbound_payment.py b/stripe/v2/money_management/_outbound_payment.py index dd2bf82c2..b11d2761b 100644 --- a/stripe/v2/money_management/_outbound_payment.py +++ b/stripe/v2/money_management/_outbound_payment.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount from typing import ClassVar, Dict, Optional from typing_extensions import Literal @@ -15,6 +14,16 @@ class OutboundPayment(StripeObject): "v2.money_management.outbound_payment" ) + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + class DeliveryOptions(StripeObject): bank_account: Optional[Literal["automatic", "local", "wire"]] """ @@ -22,7 +31,17 @@ class DeliveryOptions(StripeObject): """ class From(StripeObject): - debited: Amount + class Debited(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + debited: Debited """ The monetary amount debited from the sender, only set on responses. """ @@ -30,6 +49,7 @@ class From(StripeObject): """ The FinancialAccount that funds were pulled from. """ + _inner_class_types = {"debited": Debited} class RecipientNotification(StripeObject): setting: Literal["configured", "none"] @@ -103,7 +123,17 @@ class StatusTransitions(StripeObject): """ class To(StripeObject): - credited: Amount + class Credited(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + credited: Credited """ The monetary amount being credited to the destination. """ @@ -115,6 +145,7 @@ class To(StripeObject): """ To which account the OutboundPayment is sent. """ + _inner_class_types = {"credited": Credited} class TraceId(StripeObject): status: Literal["pending", "supported", "unsupported"] @@ -219,6 +250,7 @@ class TraceId(StripeObject): A unique identifier that can be used to track this OutboundPayment with recipient bank. Banks might call this a “reference number” or something similar. """ _inner_class_types = { + "amount": Amount, "delivery_options": DeliveryOptions, "from": From, "recipient_notification": RecipientNotification, diff --git a/stripe/v2/money_management/_outbound_payment_quote.py b/stripe/v2/money_management/_outbound_payment_quote.py index e918e753a..7e02c1e8a 100644 --- a/stripe/v2/money_management/_outbound_payment_quote.py +++ b/stripe/v2/money_management/_outbound_payment_quote.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount from typing import ClassVar, Dict, List, Optional from typing_extensions import Literal @@ -15,6 +14,16 @@ class OutboundPaymentQuote(StripeObject): Literal["v2.money_management.outbound_payment_quote"] ] = "v2.money_management.outbound_payment_quote" + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + class DeliveryOptions(StripeObject): bank_account: Optional[Literal["automatic", "local", "wire"]] """ @@ -22,6 +31,16 @@ class DeliveryOptions(StripeObject): """ class EstimatedFee(StripeObject): + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + amount: Amount """ The fee amount for corresponding fee type. @@ -36,9 +55,20 @@ class EstimatedFee(StripeObject): """ The fee type. """ + _inner_class_types = {"amount": Amount} class From(StripeObject): - debited: Amount + class Debited(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + debited: Debited """ The monetary amount debited from the sender, only set on responses. """ @@ -46,6 +76,7 @@ class From(StripeObject): """ The FinancialAccount that funds were pulled from. """ + _inner_class_types = {"debited": Debited} class FxQuote(StripeObject): class Rates(StripeObject): @@ -78,7 +109,17 @@ class Rates(StripeObject): _inner_class_dicts = ["rates"] class To(StripeObject): - credited: Amount + class Credited(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + credited: Credited """ The monetary amount being credited to the destination. """ @@ -90,6 +131,7 @@ class To(StripeObject): """ To which account the OutboundPayment is sent. """ + _inner_class_types = {"credited": Credited} amount: Amount """ @@ -133,6 +175,7 @@ class To(StripeObject): Details about the recipient of an OutboundPaymentQuote. """ _inner_class_types = { + "amount": Amount, "delivery_options": DeliveryOptions, "estimated_fees": EstimatedFee, "from": From, diff --git a/stripe/v2/money_management/_outbound_transfer.py b/stripe/v2/money_management/_outbound_transfer.py index 9af249ac3..d0c143bed 100644 --- a/stripe/v2/money_management/_outbound_transfer.py +++ b/stripe/v2/money_management/_outbound_transfer.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount from typing import ClassVar, Dict, Optional from typing_extensions import Literal @@ -15,6 +14,16 @@ class OutboundTransfer(StripeObject): "v2.money_management.outbound_transfer" ) + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + class DeliveryOptions(StripeObject): bank_account: Optional[Literal["automatic", "local", "wire"]] """ @@ -22,7 +31,17 @@ class DeliveryOptions(StripeObject): """ class From(StripeObject): - debited: Amount + class Debited(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + debited: Debited """ The monetary amount debited from the sender, only set on responses. """ @@ -30,6 +49,7 @@ class From(StripeObject): """ The FinancialAccount that funds were pulled from. """ + _inner_class_types = {"debited": Debited} class StatusDetails(StripeObject): class Failed(StripeObject): @@ -96,7 +116,17 @@ class StatusTransitions(StripeObject): """ class To(StripeObject): - credited: Amount + class Credited(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + credited: Credited """ The monetary amount being credited to the destination. """ @@ -104,6 +134,7 @@ class To(StripeObject): """ The payout method which the OutboundTransfer uses to send payout. """ + _inner_class_types = {"credited": Credited} class TraceId(StripeObject): status: Literal["pending", "supported", "unsupported"] @@ -200,6 +231,7 @@ class TraceId(StripeObject): A unique identifier that can be used to track this OutboundTransfer with recipient bank. Banks might call this a “reference number” or something similar. """ _inner_class_types = { + "amount": Amount, "delivery_options": DeliveryOptions, "from": From, "status_details": StatusDetails, diff --git a/stripe/v2/money_management/_received_credit.py b/stripe/v2/money_management/_received_credit.py index 2b83078b5..be81a10ea 100644 --- a/stripe/v2/money_management/_received_credit.py +++ b/stripe/v2/money_management/_received_credit.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount from typing import ClassVar, Optional from typing_extensions import Literal @@ -15,6 +14,16 @@ class ReceivedCredit(StripeObject): "v2.money_management.received_credit" ) + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + class BalanceTransfer(StripeObject): from_account: Optional[str] """ @@ -136,6 +145,16 @@ class UsBankAccount(StripeObject): "us_bank_account": UsBankAccount, } + class ExternalAmount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + class StatusDetails(StripeObject): class Failed(StripeObject): reason: Literal[ @@ -202,7 +221,7 @@ class StatusTransitions(StripeObject): """ Freeform string set by originator of the ReceivedCredit. """ - external_amount: Optional[Amount] + external_amount: Optional[ExternalAmount] """ The amount and currency of the original/external credit request. """ @@ -243,8 +262,10 @@ class StatusTransitions(StripeObject): Open Enum. The type of flow that caused the ReceivedCredit. """ _inner_class_types = { + "amount": Amount, "balance_transfer": BalanceTransfer, "bank_transfer": BankTransfer, + "external_amount": ExternalAmount, "status_details": StatusDetails, "status_transitions": StatusTransitions, } diff --git a/stripe/v2/money_management/_received_debit.py b/stripe/v2/money_management/_received_debit.py index 3b632710e..11d8a223a 100644 --- a/stripe/v2/money_management/_received_debit.py +++ b/stripe/v2/money_management/_received_debit.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount from typing import ClassVar, Optional from typing_extensions import Literal @@ -15,6 +14,16 @@ class ReceivedDebit(StripeObject): "v2.money_management.received_debit" ) + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + class BankTransfer(StripeObject): class UsBankAccount(StripeObject): bank_name: Optional[str] @@ -52,6 +61,16 @@ class UsBankAccount(StripeObject): """ _inner_class_types = {"us_bank_account": UsBankAccount} + class ExternalAmount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + class StatusDetails(StripeObject): class Failed(StripeObject): reason: Literal[ @@ -104,7 +123,7 @@ class StatusTransitions(StripeObject): """ Freeform string sent by the originator of the ReceivedDebit. """ - external_amount: Optional[Amount] + external_amount: Optional[ExternalAmount] """ The amount and currency of the original/external debit request. """ @@ -145,7 +164,9 @@ class StatusTransitions(StripeObject): Open Enum. The type of the ReceivedDebit. """ _inner_class_types = { + "amount": Amount, "bank_transfer": BankTransfer, + "external_amount": ExternalAmount, "status_details": StatusDetails, "status_transitions": StatusTransitions, } diff --git a/stripe/v2/money_management/_transaction.py b/stripe/v2/money_management/_transaction.py index b4fc713f5..a66224280 100644 --- a/stripe/v2/money_management/_transaction.py +++ b/stripe/v2/money_management/_transaction.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount from typing import ClassVar, Optional from typing_extensions import Literal @@ -15,19 +14,64 @@ class Transaction(StripeObject): "v2.money_management.transaction" ) + class Amount(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + class BalanceImpact(StripeObject): - available: Amount + class Available(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + class InboundPending(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + class OutboundPending(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + available: Available """ Impact to the available balance. """ - inbound_pending: Amount + inbound_pending: InboundPending """ Impact to the inbound_pending balance. """ - outbound_pending: Amount + outbound_pending: OutboundPending """ Impact to the outbound_pending balance. """ + _inner_class_types = { + "available": Available, + "inbound_pending": InboundPending, + "outbound_pending": OutboundPending, + } class Flow(StripeObject): adjustment: Optional[str] @@ -146,6 +190,7 @@ class StatusTransitions(StripeObject): Timestamps for when the Transaction transitioned to a particular status. """ _inner_class_types = { + "amount": Amount, "balance_impact": BalanceImpact, "flow": Flow, "status_transitions": StatusTransitions, diff --git a/stripe/v2/money_management/_transaction_entry.py b/stripe/v2/money_management/_transaction_entry.py index 995487444..c3b3bee2d 100644 --- a/stripe/v2/money_management/_transaction_entry.py +++ b/stripe/v2/money_management/_transaction_entry.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount from typing import ClassVar, Optional from typing_extensions import Literal @@ -16,18 +15,53 @@ class TransactionEntry(StripeObject): ) class BalanceImpact(StripeObject): - available: Amount + class Available(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + class InboundPending(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + class OutboundPending(StripeObject): + currency: Optional[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + value: Optional[int] + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). + """ + + available: Available """ Impact to the available balance. """ - inbound_pending: Amount + inbound_pending: InboundPending """ Impact to the inbound_pending balance. """ - outbound_pending: Amount + outbound_pending: OutboundPending """ Impact to the outbound_pending balance. """ + _inner_class_types = { + "available": Available, + "inbound_pending": InboundPending, + "outbound_pending": OutboundPending, + } class TransactionDetails(StripeObject): class Flow(StripeObject): diff --git a/stripe/v2/payments/_off_session_payment.py b/stripe/v2/payments/_off_session_payment.py index 58d1800e5..5f8e9783d 100644 --- a/stripe/v2/payments/_off_session_payment.py +++ b/stripe/v2/payments/_off_session_payment.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from stripe.v2._amount import Amount -from typing import ClassVar, Dict, List, Optional +from typing import ClassVar, Dict, Optional from typing_extensions import Literal @@ -15,81 +14,25 @@ class OffSessionPayment(StripeObject): "v2.payments.off_session_payment" ) - class AmountDetails(StripeObject): - class LineItem(StripeObject): - class Tax(StripeObject): - total_tax_amount: Optional[int] - """ - Total portion of the amount that is for tax. - """ - - discount_amount: Optional[int] - """ - The amount an item was discounted for. Positive integer. - """ - product_code: Optional[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: Optional[Tax] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - _inner_class_types = {"tax": Tax} - - class Shipping(StripeObject): - amount: Optional[int] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: Optional[str] - """ - The postal code that represents the shipping source. - """ - to_postal_code: Optional[str] - """ - The postal code that represents the shipping destination. - """ - - class Tax(StripeObject): - total_tax_amount: Optional[int] - """ - Total portion of the amount that is for tax. - """ - - discount_amount: Optional[int] + class AmountCapturable(StripeObject): + currency: Optional[str] """ - The amount the total transaction was discounted for. + 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). """ - line_items: List[LineItem] + value: Optional[int] """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). """ - shipping: Optional[Shipping] + + class AmountRequested(StripeObject): + currency: Optional[str] """ - Contains information about the shipping portion of the amount. + 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). """ - tax: Optional[Tax] + value: Optional[int] """ - Contains information about the tax portion of the amount. + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#minor-units). """ - _inner_class_types = { - "line_items": LineItem, - "shipping": Shipping, - "tax": Tax, - } class Capture(StripeObject): capture_before: Optional[str] @@ -128,7 +71,7 @@ class TransferData(StripeObject): automatically after the payment succeeds. If no amount is specified, by default the entire payment amount is transferred to the destination account. The amount must be less than or equal to the - [amount_requested](https://docs.corp.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested), + [amount_requested](https://docs.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested), and must be a positive integer representing how much to transfer in the smallest currency unit (e.g., 100 cents to charge $1.00). """ @@ -138,15 +81,11 @@ class TransferData(StripeObject): where funds from the payment are transferred to after payment success. """ - amount_capturable: Optional[Amount] + amount_capturable: Optional[AmountCapturable] """ The amount available to be captured. """ - amount_details: Optional[AmountDetails] - """ - Provides industry-specific information about the amount. - """ - amount_requested: Amount + amount_requested: AmountRequested """ The “presentment amount” to be collected from the customer. """ @@ -158,10 +97,6 @@ class TransferData(StripeObject): """ Details about the capture configuration for the OffSessionPayment. """ - capture_method: Optional[Literal["automatic", "manual"]] - """ - Whether the OffSessionPayment should be captured automatically or manually. - """ compartment_id: str """ ID of the owning compartment. @@ -201,10 +136,10 @@ class TransferData(StripeObject): """ metadata: Dict[str, str] """ - Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can + 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. Learn more about - [storing information in metadata](https://docs.corp.stripe.com/payments/payment-intents#storing-information-in-metadata). + [storing information in metadata](https://docs.stripe.com/payments/payment-intents#storing-information-in-metadata). """ object: Literal["v2.payments.off_session_payment"] """ @@ -262,10 +197,11 @@ class TransferData(StripeObject): """ transfer_data: Optional[TransferData] """ - The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.corp.stripe.com/payments/connected-accounts). + The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.stripe.com/payments/connected-accounts). """ _inner_class_types = { - "amount_details": AmountDetails, + "amount_capturable": AmountCapturable, + "amount_requested": AmountRequested, "capture": Capture, "payments_orchestration": PaymentsOrchestration, "retry_details": RetryDetails, diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 6cdce310d..ef0d0591b 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -45728,6 +45728,51 @@ def test_v2_core_accounts_person_post_2_service( is_json=True, ) + def test_v2_core_accounts_person_token_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/accounts/account_id_123/person_tokens", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.accounts.person_tokens.create("account_id_123") + http_client_mock.assert_requested( + "post", + path="/v2/core/accounts/account_id_123/person_tokens", + query_string="", + api_base="https://api.stripe.com", + post_data="{}", + is_json=True, + ) + + def test_v2_core_accounts_person_token_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/core/accounts/account_id_123/person_tokens/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.accounts.person_tokens.retrieve( + "account_id_123", + "id_123", + ) + http_client_mock.assert_requested( + "get", + path="/v2/core/accounts/account_id_123/person_tokens/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + def test_v2_core_account_link_post_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -45775,6 +45820,328 @@ def test_v2_core_account_link_post_service( is_json=True, ) + def test_v2_core_account_token_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/core/account_tokens", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.account_tokens.create( + { + "identity": { + "attestations": { + "directorship_declaration": {"attested": True}, + "ownership_declaration": {"attested": True}, + "persons_provided": { + "directors": True, + "executives": True, + "owners": True, + "ownership_exemption_reason": "qualified_entity_exceeds_ownership_threshold", + }, + "representative_declaration": {"attested": True}, + "terms_of_service": { + "account": {"shown_and_accepted": True}, + "card_creator": { + "commercial": { + "account_holder": { + "shown_and_accepted": True + }, + "celtic": { + "apple_pay": { + "shown_and_accepted": True + }, + "charge_card": { + "bank_terms": { + "shown_and_accepted": True, + }, + "platform": { + "shown_and_accepted": True, + }, + }, + "spend_card": { + "bank_terms": { + "shown_and_accepted": True, + }, + "financing_disclosures": { + "shown_and_accepted": True, + }, + "platform": { + "shown_and_accepted": True, + }, + }, + }, + "cross_river_bank": { + "apple_pay": { + "shown_and_accepted": True + }, + "charge_card": { + "bank_terms": { + "shown_and_accepted": True, + }, + "financing_disclosures": { + "shown_and_accepted": True, + }, + "platform": { + "shown_and_accepted": True, + }, + }, + "spend_card": { + "bank_terms": { + "shown_and_accepted": True, + }, + "financing_disclosures": { + "shown_and_accepted": True, + }, + }, + }, + }, + }, + "crypto_storer": {"shown_and_accepted": True}, + "storer": {"shown_and_accepted": True}, + }, + }, + "business_details": { + "address": { + "city": "city", + "country": "country", + "line1": "line1", + "line2": "line2", + "postal_code": "postal_code", + "state": "state", + "town": "town", + }, + "annual_revenue": { + "amount": {"value": 111972721, "currency": "usd"}, + "fiscal_year_end": "fiscal_year_end", + }, + "compliance_screening_description": "compliance_screening_description", + "documents": { + "bank_account_ownership_verification": { + "files": ["files"], + "type": "files", + }, + "company_license": { + "files": ["files"], + "type": "files", + }, + "company_memorandum_of_association": { + "files": ["files"], + "type": "files", + }, + "company_ministerial_decree": { + "files": ["files"], + "type": "files", + }, + "company_registration_verification": { + "files": ["files"], + "type": "files", + }, + "company_tax_id_verification": { + "files": ["files"], + "type": "files", + }, + "primary_verification": { + "front_back": { + "back": "back", + "front": "front", + }, + "type": "front_back", + }, + "proof_of_address": { + "files": ["files"], + "type": "files", + }, + "proof_of_registration": { + "files": ["files"], + "type": "files", + }, + "proof_of_ultimate_beneficial_ownership": { + "files": ["files"], + "type": "files", + }, + }, + "estimated_worker_count": 884794319, + "id_numbers": [ + { + "registrar": "registrar", + "type": "th_prn", + "value": "value", + }, + ], + "monthly_estimated_revenue": { + "amount": {"value": 111972721, "currency": "usd"}, + }, + "phone": "phone", + "registered_name": "registered_name", + "script_addresses": { + "kana": { + "city": "city", + "country": "country", + "line1": "line1", + "line2": "line2", + "postal_code": "postal_code", + "state": "state", + "town": "town", + }, + "kanji": { + "city": "city", + "country": "country", + "line1": "line1", + "line2": "line2", + "postal_code": "postal_code", + "state": "state", + "town": "town", + }, + }, + "script_names": { + "kana": {"registered_name": "registered_name"}, + "kanji": {"registered_name": "registered_name"}, + }, + "structure": "public_listed_corporation", + }, + "entity_type": "individual", + "individual": { + "additional_addresses": [ + { + "city": "city", + "country": "country", + "line1": "line1", + "line2": "line2", + "postal_code": "postal_code", + "purpose": "registered", + "state": "state", + "town": "town", + }, + ], + "additional_names": [ + { + "full_name": "full_name", + "given_name": "given_name", + "purpose": "alias", + "surname": "surname", + }, + ], + "address": { + "city": "city", + "country": "country", + "line1": "line1", + "line2": "line2", + "postal_code": "postal_code", + "state": "state", + "town": "town", + }, + "date_of_birth": { + "day": 99228, + "month": 104080000, + "year": 3704893, + }, + "documents": { + "company_authorization": { + "files": ["files"], + "type": "files", + }, + "passport": {"files": ["files"], "type": "files"}, + "primary_verification": { + "front_back": { + "back": "back", + "front": "front", + }, + "type": "front_back", + }, + "secondary_verification": { + "front_back": { + "back": "back", + "front": "front", + }, + "type": "front_back", + }, + "visa": {"files": ["files"], "type": "files"}, + }, + "email": "email", + "given_name": "given_name", + "id_numbers": [{"type": "th_lc", "value": "value"}], + "legal_gender": "male", + "metadata": {"key": "metadata"}, + "nationalities": ["nationalities"], + "phone": "phone", + "political_exposure": "none", + "relationship": { + "director": True, + "executive": True, + "owner": True, + "percent_ownership": "percent_ownership", + "title": "title", + }, + "script_addresses": { + "kana": { + "city": "city", + "country": "country", + "line1": "line1", + "line2": "line2", + "postal_code": "postal_code", + "state": "state", + "town": "town", + }, + "kanji": { + "city": "city", + "country": "country", + "line1": "line1", + "line2": "line2", + "postal_code": "postal_code", + "state": "state", + "town": "town", + }, + }, + "script_names": { + "kana": { + "given_name": "given_name", + "surname": "surname", + }, + "kanji": { + "given_name": "given_name", + "surname": "surname", + }, + }, + "surname": "surname", + }, + }, + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/core/account_tokens", + query_string="", + api_base="https://api.stripe.com", + post_data='{"identity":{"attestations":{"directorship_declaration":{"attested":true},"ownership_declaration":{"attested":true},"persons_provided":{"directors":true,"executives":true,"owners":true,"ownership_exemption_reason":"qualified_entity_exceeds_ownership_threshold"},"representative_declaration":{"attested":true},"terms_of_service":{"account":{"shown_and_accepted":true},"card_creator":{"commercial":{"account_holder":{"shown_and_accepted":true},"celtic":{"apple_pay":{"shown_and_accepted":true},"charge_card":{"bank_terms":{"shown_and_accepted":true},"platform":{"shown_and_accepted":true}},"spend_card":{"bank_terms":{"shown_and_accepted":true},"financing_disclosures":{"shown_and_accepted":true},"platform":{"shown_and_accepted":true}}},"cross_river_bank":{"apple_pay":{"shown_and_accepted":true},"charge_card":{"bank_terms":{"shown_and_accepted":true},"financing_disclosures":{"shown_and_accepted":true},"platform":{"shown_and_accepted":true}},"spend_card":{"bank_terms":{"shown_and_accepted":true},"financing_disclosures":{"shown_and_accepted":true}}}}},"crypto_storer":{"shown_and_accepted":true},"storer":{"shown_and_accepted":true}}},"business_details":{"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"annual_revenue":{"amount":{"value":111972721,"currency":"usd"},"fiscal_year_end":"fiscal_year_end"},"compliance_screening_description":"compliance_screening_description","documents":{"bank_account_ownership_verification":{"files":["files"],"type":"files"},"company_license":{"files":["files"],"type":"files"},"company_memorandum_of_association":{"files":["files"],"type":"files"},"company_ministerial_decree":{"files":["files"],"type":"files"},"company_registration_verification":{"files":["files"],"type":"files"},"company_tax_id_verification":{"files":["files"],"type":"files"},"primary_verification":{"front_back":{"back":"back","front":"front"},"type":"front_back"},"proof_of_address":{"files":["files"],"type":"files"},"proof_of_registration":{"files":["files"],"type":"files"},"proof_of_ultimate_beneficial_ownership":{"files":["files"],"type":"files"}},"estimated_worker_count":884794319,"id_numbers":[{"registrar":"registrar","type":"th_prn","value":"value"}],"monthly_estimated_revenue":{"amount":{"value":111972721,"currency":"usd"}},"phone":"phone","registered_name":"registered_name","script_addresses":{"kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"}},"script_names":{"kana":{"registered_name":"registered_name"},"kanji":{"registered_name":"registered_name"}},"structure":"public_listed_corporation"},"entity_type":"individual","individual":{"additional_addresses":[{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","purpose":"registered","state":"state","town":"town"}],"additional_names":[{"full_name":"full_name","given_name":"given_name","purpose":"alias","surname":"surname"}],"address":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"date_of_birth":{"day":99228,"month":104080000,"year":3704893},"documents":{"company_authorization":{"files":["files"],"type":"files"},"passport":{"files":["files"],"type":"files"},"primary_verification":{"front_back":{"back":"back","front":"front"},"type":"front_back"},"secondary_verification":{"front_back":{"back":"back","front":"front"},"type":"front_back"},"visa":{"files":["files"],"type":"files"}},"email":"email","given_name":"given_name","id_numbers":[{"type":"th_lc","value":"value"}],"legal_gender":"male","metadata":{"key":"metadata"},"nationalities":["nationalities"],"phone":"phone","political_exposure":"none","relationship":{"director":true,"executive":true,"owner":true,"percent_ownership":"percent_ownership","title":"title"},"script_addresses":{"kana":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"},"kanji":{"city":"city","country":"country","line1":"line1","line2":"line2","postal_code":"postal_code","state":"state","town":"town"}},"script_names":{"kana":{"given_name":"given_name","surname":"surname"},"kanji":{"given_name":"given_name","surname":"surname"}},"surname":"surname"}}}', + is_json=True, + ) + + def test_v2_core_account_token_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/core/account_tokens/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.core.account_tokens.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/core/account_tokens/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + def test_v2_core_claimable_sandbox_post_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -46374,6 +46741,80 @@ def test_v2_money_management_adjustment_get_2_service( api_base="https://api.stripe.com", ) + def test_v2_money_management_currency_conversion_get_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/currency_conversions", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.currency_conversions.list() + http_client_mock.assert_requested( + "get", + path="/v2/money_management/currency_conversions", + query_string="", + api_base="https://api.stripe.com", + ) + + def test_v2_money_management_currency_conversion_post_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "post", + "/v2/money_management/currency_conversions", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.currency_conversions.create( + { + "financial_account": "financial_account", + "from": { + "amount": {"value": 111972721, "currency": "usd"}, + "currency": "usd", + }, + "to": { + "amount": {"value": 111972721, "currency": "usd"}, + "currency": "usd", + }, + } + ) + http_client_mock.assert_requested( + "post", + path="/v2/money_management/currency_conversions", + query_string="", + api_base="https://api.stripe.com", + post_data='{"financial_account":"financial_account","from":{"amount":{"value":111972721,"currency":"usd"},"currency":"usd"},"to":{"amount":{"value":111972721,"currency":"usd"},"currency":"usd"}}', + is_json=True, + ) + + def test_v2_money_management_currency_conversion_get_2_service( + self, http_client_mock: HTTPClientMock + ) -> None: + http_client_mock.stub_request( + "get", + "/v2/money_management/currency_conversions/id_123", + ) + client = StripeClient( + "sk_test_123", + http_client=http_client_mock.get_mock_http_client(), + ) + + client.v2.money_management.currency_conversions.retrieve("id_123") + http_client_mock.assert_requested( + "get", + path="/v2/money_management/currency_conversions/id_123", + query_string="", + api_base="https://api.stripe.com", + ) + def test_v2_money_management_financial_account_get_service( self, http_client_mock: HTTPClientMock ) -> None: @@ -46585,7 +47026,7 @@ def test_v2_money_management_inbound_transfer_post_service( client.v2.money_management.inbound_transfers.create( { - "amount": {"currency": "USD", "value": 96}, + "amount": {"value": 111972721, "currency": "usd"}, "from": { "currency": "usd", "payment_method": "payment_method", @@ -46601,7 +47042,7 @@ def test_v2_money_management_inbound_transfer_post_service( path="/v2/money_management/inbound_transfers", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","payment_method":"payment_method"},"to":{"currency":"usd","financial_account":"financial_account"}}', + post_data='{"amount":{"value":111972721,"currency":"usd"},"from":{"currency":"usd","payment_method":"payment_method"},"to":{"currency":"usd","financial_account":"financial_account"}}', is_json=True, ) @@ -46659,7 +47100,7 @@ def test_v2_money_management_outbound_payment_post_service( client.v2.money_management.outbound_payments.create( { - "amount": {"currency": "USD", "value": 96}, + "amount": {"value": 111972721, "currency": "usd"}, "from": { "currency": "usd", "financial_account": "financial_account", @@ -46676,7 +47117,7 @@ def test_v2_money_management_outbound_payment_post_service( path="/v2/money_management/outbound_payments", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","recipient":"recipient"}}', + post_data='{"amount":{"value":111972721,"currency":"usd"},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","recipient":"recipient"}}', is_json=True, ) @@ -46736,7 +47177,7 @@ def test_v2_money_management_outbound_payment_quote_post_service( client.v2.money_management.outbound_payment_quotes.create( { - "amount": {"currency": "USD", "value": 96}, + "amount": {"value": 111972721, "currency": "usd"}, "from": { "currency": "usd", "financial_account": "financial_account", @@ -46753,7 +47194,7 @@ def test_v2_money_management_outbound_payment_quote_post_service( path="/v2/money_management/outbound_payment_quotes", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","recipient":"recipient"}}', + post_data='{"amount":{"value":111972721,"currency":"usd"},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method","recipient":"recipient"}}', is_json=True, ) @@ -46917,7 +47358,7 @@ def test_v2_money_management_outbound_transfer_post_service( client.v2.money_management.outbound_transfers.create( { - "amount": {"currency": "USD", "value": 96}, + "amount": {"value": 111972721, "currency": "usd"}, "from": { "currency": "usd", "financial_account": "financial_account", @@ -46930,7 +47371,7 @@ def test_v2_money_management_outbound_transfer_post_service( path="/v2/money_management/outbound_transfers", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method"}}', + post_data='{"amount":{"value":111972721,"currency":"usd"},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"currency":"usd","payout_method":"payout_method"}}', is_json=True, ) @@ -47344,7 +47785,7 @@ def test_v2_payments_off_session_payment_post_service( client.v2.payments.off_session_payments.create( { - "amount": {"currency": "USD", "value": 96}, + "amount": {"value": 111972721, "currency": "usd"}, "cadence": "unscheduled", "customer": "customer", "metadata": {"key": "metadata"}, @@ -47356,7 +47797,7 @@ def test_v2_payments_off_session_payment_post_service( path="/v2/payments/off_session_payments", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"cadence":"unscheduled","customer":"customer","metadata":{"key":"metadata"},"payment_method":"payment_method"}', + post_data='{"amount":{"value":111972721,"currency":"usd"},"cadence":"unscheduled","customer":"customer","metadata":{"key":"metadata"},"payment_method":"payment_method"}', is_json=True, ) @@ -47416,14 +47857,14 @@ def test_v2_payments_off_session_payment_post_3_service( client.v2.payments.off_session_payments.capture( "id_123", - {"amount_to_capture": 1374310455, "metadata": {"key": "metadata"}}, + {"metadata": {"key": "metadata"}}, ) http_client_mock.assert_requested( "post", path="/v2/payments/off_session_payments/id_123/capture", query_string="", api_base="https://api.stripe.com", - post_data='{"amount_to_capture":1374310455,"metadata":{"key":"metadata"}}', + post_data='{"metadata":{"key":"metadata"}}', is_json=True, ) @@ -47518,14 +47959,17 @@ def test_v2_test_helpers_financial_address_post_service( client.v2.test_helpers.financial_addresses.credit( "id_123", - {"amount": {"currency": "USD", "value": 96}, "network": "ach"}, + { + "amount": {"value": 111972721, "currency": "usd"}, + "network": "ach", + }, ) http_client_mock.assert_requested( "post", path="/v2/test_helpers/financial_addresses/id_123/credit", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"network":"ach"}', + post_data='{"amount":{"value":111972721,"currency":"usd"},"network":"ach"}', is_json=True, ) @@ -47701,7 +48145,7 @@ def test_feature_not_enabled_error_service( ) -> None: http_client_mock.stub_request( "post", - "/v2/money_management/financial_accounts", + "/v2/money_management/currency_conversions", rbody='{"error":{"type":"feature_not_enabled","code":"outbound_flow_from_closed_financial_account_unsupported"}}', rcode=400, ) @@ -47711,19 +48155,21 @@ def test_feature_not_enabled_error_service( ) try: - client.v2.money_management.financial_accounts.create( + client.v2.money_management.currency_conversions.create( { - "type": "storage", + "financial_account": "financial_account", + "from": {}, + "to": {}, } ) except _error.FeatureNotEnabledError: pass http_client_mock.assert_requested( "post", - path="/v2/money_management/financial_accounts", + path="/v2/money_management/currency_conversions", query_string="", api_base="https://api.stripe.com", - post_data='{"type":"storage"}', + post_data='{"financial_account":"financial_account","from":{},"to":{}}', is_json=True, ) @@ -47776,7 +48222,7 @@ def test_insufficient_funds_error_service( try: client.v2.money_management.outbound_payments.create( { - "amount": {"currency": "USD", "value": 96}, + "amount": {}, "from": { "currency": "usd", "financial_account": "financial_account", @@ -47791,7 +48237,7 @@ def test_insufficient_funds_error_service( path="/v2/money_management/outbound_payments", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"recipient":"recipient"}}', + post_data='{"amount":{},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"recipient":"recipient"}}', is_json=True, ) @@ -47980,7 +48426,7 @@ def test_recipient_not_notifiable_error_service( try: client.v2.money_management.outbound_payments.create( { - "amount": {"currency": "USD", "value": 96}, + "amount": {}, "from": { "currency": "usd", "financial_account": "financial_account", @@ -47995,7 +48441,7 @@ def test_recipient_not_notifiable_error_service( path="/v2/money_management/outbound_payments", query_string="", api_base="https://api.stripe.com", - post_data='{"amount":{"currency":"USD","value":96},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"recipient":"recipient"}}', + post_data='{"amount":{},"from":{"currency":"usd","financial_account":"financial_account"},"to":{"recipient":"recipient"}}', is_json=True, )