From 7bae5cee42820d7c18f39420c96e5ce337e4174d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 19:54:18 +0000 Subject: [PATCH 01/10] Update generated code for v1235 --- OPENAPI_VERSION | 2 +- stripe/_invoice.py | 6 +- stripe/_invoice_service.py | 4 +- stripe/_invoice_upcoming_lines_service.py | 2 +- stripe/_object_classes.py | 1 + stripe/_payment_intent.py | 24 +++++ stripe/_payment_intent_service.py | 6 ++ stripe/api_resources/billing/__init__.py | 3 + .../billing/meter_error_report.py | 21 ++++ stripe/billing/__init__.py | 3 + stripe/billing/_alert.py | 53 +++++++++- stripe/billing/_alert_service.py | 28 +++++- stripe/billing/_meter_error_report.py | 85 ++++++++++++++++ stripe/checkout/_session.py | 99 ++++++++++++++++++- 14 files changed, 324 insertions(+), 13 deletions(-) create mode 100644 stripe/api_resources/billing/meter_error_report.py create mode 100644 stripe/billing/_meter_error_report.py diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f019592ce..aaa1c3795 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1226 +v1235 \ No newline at end of file diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 88992efa5..12d4ceb42 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -2115,7 +2115,7 @@ class CreatePreviewParams(RequestOptions): List["Invoice.CreatePreviewParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["Invoice.CreatePreviewParamsIssuer"] """ @@ -4865,7 +4865,7 @@ class UpcomingLinesParams(RequestOptions): List["Invoice.UpcomingLinesParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["Invoice.UpcomingLinesParamsIssuer"] """ @@ -6939,7 +6939,7 @@ class UpcomingParams(RequestOptions): """ invoice_items: NotRequired[List["Invoice.UpcomingParamsInvoiceItem"]] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["Invoice.UpcomingParamsIssuer"] """ diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 477f54b06..da6f1b301 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -1060,7 +1060,7 @@ class CreatePreviewParams(TypedDict): List["InvoiceService.CreatePreviewParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["InvoiceService.CreatePreviewParamsIssuer"] """ @@ -3108,7 +3108,7 @@ class UpcomingParams(TypedDict): List["InvoiceService.UpcomingParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["InvoiceService.UpcomingParamsIssuer"] """ diff --git a/stripe/_invoice_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index 352bb07b3..eb66a8c32 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -52,7 +52,7 @@ class ListParams(TypedDict): List["InvoiceUpcomingLinesService.ListParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["InvoiceUpcomingLinesService.ListParamsIssuer"] """ diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index c7f999ed2..90d763fe2 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -24,6 +24,7 @@ stripe.billing.Alert.OBJECT_NAME: stripe.billing.Alert, stripe.billing.AlertTriggered.OBJECT_NAME: stripe.billing.AlertTriggered, stripe.billing.Meter.OBJECT_NAME: stripe.billing.Meter, + stripe.billing.MeterErrorReport.OBJECT_NAME: stripe.billing.MeterErrorReport, stripe.billing.MeterEvent.OBJECT_NAME: stripe.billing.MeterEvent, stripe.billing.MeterEventAdjustment.OBJECT_NAME: stripe.billing.MeterEventAdjustment, stripe.billing.MeterEventSummary.OBJECT_NAME: stripe.billing.MeterEventSummary, diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 60338852a..ef6161c94 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -13864,6 +13864,9 @@ def _cls_confirm( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( "PaymentIntent", @@ -13904,6 +13907,9 @@ def confirm( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ ... @@ -13934,6 +13940,9 @@ def confirm( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ ... @@ -13964,6 +13973,9 @@ def confirm( # pyright: ignore[reportGeneralTypeIssues] after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( "PaymentIntent", @@ -14003,6 +14015,9 @@ async def _cls_confirm_async( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( "PaymentIntent", @@ -14043,6 +14058,9 @@ async def confirm_async( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ ... @@ -14073,6 +14091,9 @@ async def confirm_async( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ ... @@ -14103,6 +14124,9 @@ async def confirm_async( # pyright: ignore[reportGeneralTypeIssues] after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( "PaymentIntent", diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 44d9d6c99..28b3ac35c 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -11301,6 +11301,9 @@ def confirm( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( PaymentIntent, @@ -11344,6 +11347,9 @@ async def confirm_async( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( PaymentIntent, diff --git a/stripe/api_resources/billing/__init__.py b/stripe/api_resources/billing/__init__.py index e469ff8d7..88630976a 100644 --- a/stripe/api_resources/billing/__init__.py +++ b/stripe/api_resources/billing/__init__.py @@ -19,6 +19,9 @@ from stripe.api_resources.billing.alert import Alert from stripe.api_resources.billing.alert_triggered import AlertTriggered from stripe.api_resources.billing.meter import Meter + from stripe.api_resources.billing.meter_error_report import ( + MeterErrorReport, + ) from stripe.api_resources.billing.meter_event import MeterEvent from stripe.api_resources.billing.meter_event_adjustment import ( MeterEventAdjustment, diff --git a/stripe/api_resources/billing/meter_error_report.py b/stripe/api_resources/billing/meter_error_report.py new file mode 100644 index 000000000..72928e54b --- /dev/null +++ b/stripe/api_resources/billing/meter_error_report.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TYPE_CHECKING +from warnings import warn + +warn( + """ + The stripe.api_resources.billing.meter_error_report package is deprecated, please change your + imports to import from stripe.billing directly. + From: + from stripe.api_resources.billing.meter_error_report import MeterErrorReport + To: + from stripe.billing import MeterErrorReport + """, + DeprecationWarning, + stacklevel=2, +) +if not TYPE_CHECKING: + from stripe.billing._meter_error_report import ( # noqa + MeterErrorReport, + ) diff --git a/stripe/billing/__init__.py b/stripe/billing/__init__.py index a6aea1532..2ac8965b7 100644 --- a/stripe/billing/__init__.py +++ b/stripe/billing/__init__.py @@ -4,6 +4,9 @@ from stripe.billing._alert_service import AlertService as AlertService from stripe.billing._alert_triggered import AlertTriggered as AlertTriggered from stripe.billing._meter import Meter as Meter +from stripe.billing._meter_error_report import ( + MeterErrorReport as MeterErrorReport, +) from stripe.billing._meter_event import MeterEvent as MeterEvent from stripe.billing._meter_event_adjustment import ( MeterEventAdjustment as MeterEventAdjustment, diff --git a/stripe/billing/_alert.py b/stripe/billing/_alert.py index d2a2ddbac..2b0cc335d 100644 --- a/stripe/billing/_alert.py +++ b/stripe/billing/_alert.py @@ -34,6 +34,24 @@ class Filter(StripeObject): Limit the scope of the alert to this customer ID """ + class SpendThresholdConfig(StripeObject): + aggregation: Literal["subscription", "subscription_item"] + """ + Defines if the alert will fire on spend aggregated across a subscription, or on individual subscription items. + """ + currency: str + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + """ + gte: int + """ + The value at which this alert will trigger. + """ + recurrence: Literal["one_time"] + """ + Defines how the alert will behave. + """ + class UsageThresholdConfig(StripeObject): gte: int """ @@ -61,7 +79,7 @@ class ArchiveParams(RequestOptions): """ class CreateParams(RequestOptions): - alert_type: Literal["usage_threshold"] + alert_type: Literal["spend_threshold", "usage_threshold"] """ The type of alert to create. """ @@ -73,6 +91,12 @@ class CreateParams(RequestOptions): """ Filters to limit the scope of an alert. """ + spend_threshold_config: NotRequired[ + "Alert.CreateParamsSpendThresholdConfig" + ] + """ + The configuration of the spend threshold. + """ title: str """ The title of the alert. @@ -90,6 +114,24 @@ class CreateParamsFilter(TypedDict): Limit the scope to this alert only to this customer. """ + class CreateParamsSpendThresholdConfig(TypedDict): + aggregation: Literal["subscription", "subscription_item"] + """ + Whether the spend should be aggregated across items in a subscription or whether each subscription item is considered alone. + """ + currency: str + """ + Currency for which this spend alert is configured. This alert will only trigger for subscriptions matching this currency. + """ + gte: int + """ + Defines at which value the alert will fire. + """ + recurrence: Literal["one_time"] + """ + Whether the alert should only fire only once, or once per billing cycle. + """ + class CreateParamsUsageThresholdConfig(TypedDict): gte: int """ @@ -111,7 +153,7 @@ class DeactivateParams(RequestOptions): """ class ListParams(RequestOptions): - alert_type: NotRequired[Literal["usage_threshold"]] + alert_type: NotRequired[Literal["spend_threshold", "usage_threshold"]] """ Filter results to only include this type of alert. """ @@ -142,7 +184,7 @@ class RetrieveParams(RequestOptions): Specifies which fields in the response should be expanded. """ - alert_type: Literal["usage_threshold"] + alert_type: Literal["spend_threshold", "usage_threshold"] """ Defines the type of the alert. """ @@ -162,6 +204,10 @@ class RetrieveParams(RequestOptions): """ String representing the object's type. Objects of the same type share the same value. """ + spend_threshold_config: Optional[SpendThresholdConfig] + """ + Encapsulates configuration of the spend to monitoring spend on a [Subscription](https://stripe.com/docs/api/subscriptions/object) or [Subscription item](https://stripe.com/docs/api/subscription_items/object). + """ status: Optional[Literal["active", "archived", "inactive"]] """ Status of the alert. This can be active, inactive or archived. @@ -581,5 +627,6 @@ async def retrieve_async( _inner_class_types = { "filter": Filter, + "spend_threshold_config": SpendThresholdConfig, "usage_threshold_config": UsageThresholdConfig, } diff --git a/stripe/billing/_alert_service.py b/stripe/billing/_alert_service.py index 31bda7bdb..c46c70827 100644 --- a/stripe/billing/_alert_service.py +++ b/stripe/billing/_alert_service.py @@ -23,7 +23,7 @@ class ArchiveParams(TypedDict): """ class CreateParams(TypedDict): - alert_type: Literal["usage_threshold"] + alert_type: Literal["spend_threshold", "usage_threshold"] """ The type of alert to create. """ @@ -35,6 +35,12 @@ class CreateParams(TypedDict): """ Filters to limit the scope of an alert. """ + spend_threshold_config: NotRequired[ + "AlertService.CreateParamsSpendThresholdConfig" + ] + """ + The configuration of the spend threshold. + """ title: str """ The title of the alert. @@ -52,6 +58,24 @@ class CreateParamsFilter(TypedDict): Limit the scope to this alert only to this customer. """ + class CreateParamsSpendThresholdConfig(TypedDict): + aggregation: Literal["subscription", "subscription_item"] + """ + Whether the spend should be aggregated across items in a subscription or whether each subscription item is considered alone. + """ + currency: str + """ + Currency for which this spend alert is configured. This alert will only trigger for subscriptions matching this currency. + """ + gte: int + """ + Defines at which value the alert will fire. + """ + recurrence: Literal["one_time"] + """ + Whether the alert should only fire only once, or once per billing cycle. + """ + class CreateParamsUsageThresholdConfig(TypedDict): gte: int """ @@ -73,7 +97,7 @@ class DeactivateParams(TypedDict): """ class ListParams(TypedDict): - alert_type: NotRequired[Literal["usage_threshold"]] + alert_type: NotRequired[Literal["spend_threshold", "usage_threshold"]] """ Filter results to only include this type of alert. """ diff --git a/stripe/billing/_meter_error_report.py b/stripe/billing/_meter_error_report.py new file mode 100644 index 000000000..b0a566e00 --- /dev/null +++ b/stripe/billing/_meter_error_report.py @@ -0,0 +1,85 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._stripe_object import StripeObject +from typing import ClassVar, List, Optional +from typing_extensions import Literal + + +class MeterErrorReport(StripeObject): + OBJECT_NAME: ClassVar[Literal["billing.meter_error_report"]] = ( + "billing.meter_error_report" + ) + + class Reason(StripeObject): + class ErrorType(StripeObject): + class SampleError(StripeObject): + class ApiRequest(StripeObject): + id: str + """ + Unique identifier for the object. + """ + idempotency_key: str + """ + idempotency_key of the request + """ + + api_request: Optional[ApiRequest] + error_message: str + """ + message of the error + """ + _inner_class_types = {"api_request": ApiRequest} + + sample_errors: List[SampleError] + _inner_class_types = {"sample_errors": SampleError} + + error_count: int + """ + The number of errors generated + """ + error_types: List[ErrorType] + """ + More information about errors + """ + _inner_class_types = {"error_types": ErrorType} + + class RelatedObject(StripeObject): + id: str + """ + Unique identifier for the object. + """ + object: str + """ + The type of meter error related object. Should be 'meter' + """ + url: str + """ + The url of the meter object + """ + + id: str + """ + Unique identifier for the object. + """ + object: Literal["billing.meter_error_report"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + reason: Reason + related_object: Optional[RelatedObject] + """ + The related objects about the error + """ + summary: str + """ + Summary of invalid events + """ + validation_end: int + """ + Time when validation ended. Measured in seconds since the Unix epoch + """ + validation_start: int + """ + Time when validation started. Measured in seconds since the Unix epoch + """ + _inner_class_types = {"reason": Reason, "related_object": RelatedObject} diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index a9192f201..16f76dbb9 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -157,6 +157,96 @@ class Address(StripeObject): """ _inner_class_types = {"address": Address} + class TaxId(StripeObject): + type: Literal[ + "ad_nrt", + "ae_trn", + "ar_cuit", + "au_abn", + "au_arn", + "bg_uic", + "bh_vat", + "bo_tin", + "br_cnpj", + "br_cpf", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "ch_uid", + "ch_vat", + "cl_tin", + "cn_tin", + "co_nit", + "cr_tin", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "hk_br", + "hr_oib", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kr_brn", + "kz_bin", + "li_uid", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "ng_tin", + "no_vat", + "no_voec", + "nz_gst", + "om_vat", + "pe_ruc", + "ph_tin", + "ro_tin", + "rs_pib", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "sv_nit", + "th_vat", + "tr_tin", + "tw_vat", + "ua_vat", + "unknown", + "us_ein", + "uy_ruc", + "ve_rif", + "vn_tin", + "za_vat", + ] + """ + The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, or `unknown` + """ + value: Optional[str] + """ + The value of the tax ID. + """ + + business_name: Optional[str] + """ + Customer's business name for this Checkout Session + """ email: Optional[str] """ Customer's email for this Checkout Session @@ -169,7 +259,14 @@ class Address(StripeObject): """ Shipping information for this Checkout Session. """ - _inner_class_types = {"shipping_details": ShippingDetails} + tax_ids: Optional[List[TaxId]] + """ + Customer's tax ids for this Checkout Session. + """ + _inner_class_types = { + "shipping_details": ShippingDetails, + "tax_ids": TaxId, + } class Consent(StripeObject): promotions: Optional[Literal["opt_in", "opt_out"]] From 214e7a22dabf5299f07429d9b6b924197a340f61 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 20:21:03 +0000 Subject: [PATCH 02/10] Update generated code for v1236 --- OPENAPI_VERSION | 2 +- stripe/_payment_link.py | 4 +++- stripe/_payment_link_service.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index aaa1c3795..f2b360b3d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1235 \ No newline at end of file +v1236 \ No newline at end of file diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index 4e645ce96..cfcfde3e5 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -789,6 +789,7 @@ class CreateParams(RequestOptions): "klarna", "konbini", "link", + "mb_way", "mobilepay", "multibanco", "oxxo", @@ -1674,7 +1675,7 @@ class ModifyParams(RequestOptions): If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). @@ -2437,6 +2438,7 @@ class RetrieveParams(RequestOptions): "klarna", "konbini", "link", + "mb_way", "mobilepay", "multibanco", "oxxo", diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index 74e5f7c83..e74d57178 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -131,6 +131,7 @@ class CreateParams(TypedDict): "klarna", "konbini", "link", + "mb_way", "mobilepay", "multibanco", "oxxo", @@ -1018,7 +1019,7 @@ class UpdateParams(TypedDict): If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). """ payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'paynow', 'paypal', 'payto', 'pix', 'promptpay', 'sepa_debit', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" ] """ The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). From cbb5a9d8d6b1a1d34476e405d0867d1e3a3cc524 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 21:03:34 +0000 Subject: [PATCH 03/10] Update generated code for v1238 --- OPENAPI_VERSION | 2 +- stripe/_transfer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f2b360b3d..cf9ff03af 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1236 \ No newline at end of file +v1238 \ No newline at end of file diff --git a/stripe/_transfer.py b/stripe/_transfer.py index 75512a1c9..17e743f78 100644 --- a/stripe/_transfer.py +++ b/stripe/_transfer.py @@ -265,7 +265,7 @@ class RetrieveReversalParams(RequestOptions): """ source_transaction: Optional[ExpandableField["Charge"]] """ - ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. + ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. """ source_type: Optional[str] """ From 0f5add689c2ea2425834ff60910f8b60bcecde7e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:23:10 +0000 Subject: [PATCH 04/10] Update generated code for v1243 --- OPENAPI_VERSION | 2 +- stripe/checkout/_session.py | 4 ++-- stripe/checkout/_session_service.py | 2 +- stripe/terminal/_reader.py | 2 +- stripe/terminal/_reader_service.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index cf9ff03af..1023f9e1c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1238 \ No newline at end of file +v1243 \ No newline at end of file diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 16f76dbb9..14a147b5b 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -2165,7 +2165,7 @@ class CreateParams(RequestOptions): Literal["always", "if_required", "never"] ] """ - This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`. + This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. """ return_url: NotRequired[str] """ @@ -4685,7 +4685,7 @@ class RetrieveParams(RequestOptions): """ redirect_on_completion: Optional[Literal["always", "if_required", "never"]] """ - This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`. + This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. """ return_url: Optional[str] """ diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index dff48ecb9..0d8e5320d 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -296,7 +296,7 @@ class CreateParams(TypedDict): Literal["always", "if_required", "never"] ] """ - This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`. + This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. """ return_url: NotRequired[str] """ diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index 0677c5765..c73b2f246 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -762,7 +762,7 @@ class ProcessPaymentIntentParamsProcessConfigTipping(TypedDict): """ class ProcessSetupIntentParams(RequestOptions): - customer_consent_collected: bool + customer_consent_collected: NotRequired[bool] """ Customer Consent Collected """ diff --git a/stripe/terminal/_reader_service.py b/stripe/terminal/_reader_service.py index 6ffc54f38..344700421 100644 --- a/stripe/terminal/_reader_service.py +++ b/stripe/terminal/_reader_service.py @@ -263,7 +263,7 @@ class ProcessPaymentIntentParamsProcessConfigTipping(TypedDict): """ class ProcessSetupIntentParams(TypedDict): - customer_consent_collected: bool + customer_consent_collected: NotRequired[bool] """ Customer Consent Collected """ From f25faa98e1954b0c7673ecd08d28ca5f69e6574e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 17:14:56 +0000 Subject: [PATCH 05/10] Update generated code for v1244 --- OPENAPI_VERSION | 2 +- stripe/billing/_alert.py | 53 ++------------------------------ stripe/billing/_alert_service.py | 28 ++--------------- 3 files changed, 6 insertions(+), 77 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1023f9e1c..02835b066 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1243 \ No newline at end of file +v1244 \ No newline at end of file diff --git a/stripe/billing/_alert.py b/stripe/billing/_alert.py index 2b0cc335d..d2a2ddbac 100644 --- a/stripe/billing/_alert.py +++ b/stripe/billing/_alert.py @@ -34,24 +34,6 @@ class Filter(StripeObject): Limit the scope of the alert to this customer ID """ - class SpendThresholdConfig(StripeObject): - aggregation: Literal["subscription", "subscription_item"] - """ - Defines if the alert will fire on spend aggregated across a subscription, or on individual subscription items. - """ - currency: str - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - """ - gte: int - """ - The value at which this alert will trigger. - """ - recurrence: Literal["one_time"] - """ - Defines how the alert will behave. - """ - class UsageThresholdConfig(StripeObject): gte: int """ @@ -79,7 +61,7 @@ class ArchiveParams(RequestOptions): """ class CreateParams(RequestOptions): - alert_type: Literal["spend_threshold", "usage_threshold"] + alert_type: Literal["usage_threshold"] """ The type of alert to create. """ @@ -91,12 +73,6 @@ class CreateParams(RequestOptions): """ Filters to limit the scope of an alert. """ - spend_threshold_config: NotRequired[ - "Alert.CreateParamsSpendThresholdConfig" - ] - """ - The configuration of the spend threshold. - """ title: str """ The title of the alert. @@ -114,24 +90,6 @@ class CreateParamsFilter(TypedDict): Limit the scope to this alert only to this customer. """ - class CreateParamsSpendThresholdConfig(TypedDict): - aggregation: Literal["subscription", "subscription_item"] - """ - Whether the spend should be aggregated across items in a subscription or whether each subscription item is considered alone. - """ - currency: str - """ - Currency for which this spend alert is configured. This alert will only trigger for subscriptions matching this currency. - """ - gte: int - """ - Defines at which value the alert will fire. - """ - recurrence: Literal["one_time"] - """ - Whether the alert should only fire only once, or once per billing cycle. - """ - class CreateParamsUsageThresholdConfig(TypedDict): gte: int """ @@ -153,7 +111,7 @@ class DeactivateParams(RequestOptions): """ class ListParams(RequestOptions): - alert_type: NotRequired[Literal["spend_threshold", "usage_threshold"]] + alert_type: NotRequired[Literal["usage_threshold"]] """ Filter results to only include this type of alert. """ @@ -184,7 +142,7 @@ class RetrieveParams(RequestOptions): Specifies which fields in the response should be expanded. """ - alert_type: Literal["spend_threshold", "usage_threshold"] + alert_type: Literal["usage_threshold"] """ Defines the type of the alert. """ @@ -204,10 +162,6 @@ class RetrieveParams(RequestOptions): """ String representing the object's type. Objects of the same type share the same value. """ - spend_threshold_config: Optional[SpendThresholdConfig] - """ - Encapsulates configuration of the spend to monitoring spend on a [Subscription](https://stripe.com/docs/api/subscriptions/object) or [Subscription item](https://stripe.com/docs/api/subscription_items/object). - """ status: Optional[Literal["active", "archived", "inactive"]] """ Status of the alert. This can be active, inactive or archived. @@ -627,6 +581,5 @@ async def retrieve_async( _inner_class_types = { "filter": Filter, - "spend_threshold_config": SpendThresholdConfig, "usage_threshold_config": UsageThresholdConfig, } diff --git a/stripe/billing/_alert_service.py b/stripe/billing/_alert_service.py index c46c70827..31bda7bdb 100644 --- a/stripe/billing/_alert_service.py +++ b/stripe/billing/_alert_service.py @@ -23,7 +23,7 @@ class ArchiveParams(TypedDict): """ class CreateParams(TypedDict): - alert_type: Literal["spend_threshold", "usage_threshold"] + alert_type: Literal["usage_threshold"] """ The type of alert to create. """ @@ -35,12 +35,6 @@ class CreateParams(TypedDict): """ Filters to limit the scope of an alert. """ - spend_threshold_config: NotRequired[ - "AlertService.CreateParamsSpendThresholdConfig" - ] - """ - The configuration of the spend threshold. - """ title: str """ The title of the alert. @@ -58,24 +52,6 @@ class CreateParamsFilter(TypedDict): Limit the scope to this alert only to this customer. """ - class CreateParamsSpendThresholdConfig(TypedDict): - aggregation: Literal["subscription", "subscription_item"] - """ - Whether the spend should be aggregated across items in a subscription or whether each subscription item is considered alone. - """ - currency: str - """ - Currency for which this spend alert is configured. This alert will only trigger for subscriptions matching this currency. - """ - gte: int - """ - Defines at which value the alert will fire. - """ - recurrence: Literal["one_time"] - """ - Whether the alert should only fire only once, or once per billing cycle. - """ - class CreateParamsUsageThresholdConfig(TypedDict): gte: int """ @@ -97,7 +73,7 @@ class DeactivateParams(TypedDict): """ class ListParams(TypedDict): - alert_type: NotRequired[Literal["spend_threshold", "usage_threshold"]] + alert_type: NotRequired[Literal["usage_threshold"]] """ Filter results to only include this type of alert. """ From 6df6daf02b9806f3f8d8cd37ef087269e239b4e3 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 22:53:30 +0000 Subject: [PATCH 06/10] Update generated code for v1244 --- stripe/_api_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stripe/_api_version.py b/stripe/_api_version.py index e9dd76eb8..2bb2b0c76 100644 --- a/stripe/_api_version.py +++ b/stripe/_api_version.py @@ -2,4 +2,4 @@ # File generated from our OpenAPI spec class _ApiVersion: CURRENT = "2024-06-20" - PREVIEW = "2024-08-21.preview-v2" + PREVIEW = "2024-09-04.preview-v2" From 9289aeb57b419b3cae4f30451bace86db0034041 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 23:52:31 +0000 Subject: [PATCH 07/10] Update generated code for v1245 --- OPENAPI_VERSION | 2 +- stripe/billing/_alert.py | 8 ++++++++ stripe/billing/_alert_service.py | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 02835b066..5ad854d14 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1244 \ No newline at end of file +v1245 \ No newline at end of file diff --git a/stripe/billing/_alert.py b/stripe/billing/_alert.py index d2a2ddbac..02aecb7da 100644 --- a/stripe/billing/_alert.py +++ b/stripe/billing/_alert.py @@ -89,6 +89,14 @@ class CreateParamsFilter(TypedDict): """ Limit the scope to this alert only to this customer. """ + subscription: NotRequired[str] + """ + Limit the scope of this rated usage alert to this subscription. + """ + subscription_item: NotRequired[str] + """ + Limit the scope of this rated usage alert to this subscription item. + """ class CreateParamsUsageThresholdConfig(TypedDict): gte: int diff --git a/stripe/billing/_alert_service.py b/stripe/billing/_alert_service.py index 31bda7bdb..39649a26a 100644 --- a/stripe/billing/_alert_service.py +++ b/stripe/billing/_alert_service.py @@ -51,6 +51,14 @@ class CreateParamsFilter(TypedDict): """ Limit the scope to this alert only to this customer. """ + subscription: NotRequired[str] + """ + Limit the scope of this rated usage alert to this subscription. + """ + subscription_item: NotRequired[str] + """ + Limit the scope of this rated usage alert to this subscription item. + """ class CreateParamsUsageThresholdConfig(TypedDict): gte: int From 146cbf463daed57840c6e38a60f7ba9108e137fd Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 17:56:26 +0000 Subject: [PATCH 08/10] Update generated code for v1246 --- OPENAPI_VERSION | 2 +- stripe/_event.py | 1 + stripe/_webhook_endpoint.py | 2 ++ stripe/_webhook_endpoint_service.py | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 5ad854d14..340c4578c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1245 \ No newline at end of file +v1246 \ No newline at end of file diff --git a/stripe/_event.py b/stripe/_event.py index dbda3b295..1a08cd591 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -218,6 +218,7 @@ class RetrieveParams(RequestOptions): "application_fee.refunded", "balance.available", "billing.alert.triggered", + "billing.meter_error_report.triggered", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index c7e96486e..1559ed78b 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -163,6 +163,7 @@ class CreateParams(RequestOptions): "application_fee.refunded", "balance.available", "billing.alert.triggered", + "billing.meter_error_report.triggered", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -479,6 +480,7 @@ class ModifyParams(RequestOptions): "application_fee.refunded", "balance.available", "billing.alert.triggered", + "billing.meter_error_report.triggered", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index 4eeeb7850..54bb9c59f 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -144,6 +144,7 @@ class CreateParams(TypedDict): "application_fee.refunded", "balance.available", "billing.alert.triggered", + "billing.meter_error_report.triggered", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", @@ -466,6 +467,7 @@ class UpdateParams(TypedDict): "application_fee.refunded", "balance.available", "billing.alert.triggered", + "billing.meter_error_report.triggered", "billing_portal.configuration.created", "billing_portal.configuration.updated", "billing_portal.session.created", From be9ed01d03cbc9764b0701f47e929205edd2aed7 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 18:07:19 +0000 Subject: [PATCH 09/10] Update generated code for v1247 --- OPENAPI_VERSION | 2 +- stripe/_account_session.py | 18 ++++++++++++++++++ stripe/_account_session_service.py | 18 ++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 340c4578c..b7ea530db 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1246 \ No newline at end of file +v1247 \ No newline at end of file diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 16d48dd10..10ac106ec 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -404,6 +404,9 @@ class CreateParamsComponents(TypedDict): """ Configuration for the payouts list embedded component. """ + recipients: NotRequired[ + "AccountSession.CreateParamsComponentsRecipients" + ] tax_registrations: NotRequired[ "AccountSession.CreateParamsComponentsTaxRegistrations" ] @@ -805,6 +808,21 @@ class CreateParamsComponentsPayoutsList(TypedDict): class CreateParamsComponentsPayoutsListFeatures(TypedDict): pass + class CreateParamsComponentsRecipients(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSession.CreateParamsComponentsRecipientsFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + class CreateParamsComponentsRecipientsFeatures(TypedDict): + pass + class CreateParamsComponentsTaxRegistrations(TypedDict): enabled: bool """ diff --git a/stripe/_account_session_service.py b/stripe/_account_session_service.py index 043efd487..2da730f61 100644 --- a/stripe/_account_session_service.py +++ b/stripe/_account_session_service.py @@ -143,6 +143,9 @@ class CreateParamsComponents(TypedDict): """ Configuration for the payouts list embedded component. """ + recipients: NotRequired[ + "AccountSessionService.CreateParamsComponentsRecipients" + ] tax_registrations: NotRequired[ "AccountSessionService.CreateParamsComponentsTaxRegistrations" ] @@ -544,6 +547,21 @@ class CreateParamsComponentsPayoutsList(TypedDict): class CreateParamsComponentsPayoutsListFeatures(TypedDict): pass + class CreateParamsComponentsRecipients(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionService.CreateParamsComponentsRecipientsFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + class CreateParamsComponentsRecipientsFeatures(TypedDict): + pass + class CreateParamsComponentsTaxRegistrations(TypedDict): enabled: bool """ From 90f59fc89808b1cbc824887deb0389d8219abd4b Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 13:50:42 -0700 Subject: [PATCH 10/10] Update generated code (#1376) * Update generated code for v1232 * Update generated code for v1233 * Update generated code for v1235 * Update generated code for v1238 * Update generated code for v1243 * Update generated code for v1244 * Update generated code for v1245 * Update generated code for v1246 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- stripe/_invoice.py | 6 +++--- stripe/_invoice_service.py | 4 ++-- stripe/_invoice_upcoming_lines_service.py | 2 +- stripe/_payment_intent.py | 24 +++++++++++++++++++++++ stripe/_payment_intent_service.py | 6 ++++++ stripe/_transfer.py | 2 +- stripe/billing/_alert.py | 8 ++++++++ stripe/billing/_alert_service.py | 8 ++++++++ stripe/checkout/_session.py | 4 ++-- stripe/checkout/_session_service.py | 2 +- stripe/terminal/_reader.py | 2 +- stripe/terminal/_reader_service.py | 2 +- 13 files changed, 59 insertions(+), 13 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a02063ef6..340c4578c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1230 +v1246 \ No newline at end of file diff --git a/stripe/_invoice.py b/stripe/_invoice.py index d07fda707..60d4947ea 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -1871,7 +1871,7 @@ class CreatePreviewParams(RequestOptions): List["Invoice.CreatePreviewParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["Invoice.CreatePreviewParamsIssuer"] """ @@ -3647,7 +3647,7 @@ class UpcomingLinesParams(RequestOptions): List["Invoice.UpcomingLinesParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["Invoice.UpcomingLinesParamsIssuer"] """ @@ -4794,7 +4794,7 @@ class UpcomingParams(RequestOptions): """ invoice_items: NotRequired[List["Invoice.UpcomingParamsInvoiceItem"]] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["Invoice.UpcomingParamsIssuer"] """ diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index 510e62407..340514e9e 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -891,7 +891,7 @@ class CreatePreviewParams(TypedDict): List["InvoiceService.CreatePreviewParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["InvoiceService.CreatePreviewParamsIssuer"] """ @@ -2060,7 +2060,7 @@ class UpcomingParams(TypedDict): List["InvoiceService.UpcomingParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["InvoiceService.UpcomingParamsIssuer"] """ diff --git a/stripe/_invoice_upcoming_lines_service.py b/stripe/_invoice_upcoming_lines_service.py index a42d6a464..12e58adf8 100644 --- a/stripe/_invoice_upcoming_lines_service.py +++ b/stripe/_invoice_upcoming_lines_service.py @@ -52,7 +52,7 @@ class ListParams(TypedDict): List["InvoiceUpcomingLinesService.ListParamsInvoiceItem"] ] """ - List of invoice items to add or update in the upcoming invoice preview. + List of invoice items to add or update in the upcoming invoice preview (up to 250). """ issuer: NotRequired["InvoiceUpcomingLinesService.ListParamsIssuer"] """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index f2c006c3a..78fdab4ed 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -9767,6 +9767,9 @@ def _cls_confirm( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( "PaymentIntent", @@ -9807,6 +9810,9 @@ def confirm( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ ... @@ -9837,6 +9843,9 @@ def confirm( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ ... @@ -9867,6 +9876,9 @@ def confirm( # pyright: ignore[reportGeneralTypeIssues] after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( "PaymentIntent", @@ -9906,6 +9918,9 @@ async def _cls_confirm_async( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( "PaymentIntent", @@ -9946,6 +9961,9 @@ async def confirm_async( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ ... @@ -9976,6 +9994,9 @@ async def confirm_async( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ ... @@ -10006,6 +10027,9 @@ async def confirm_async( # pyright: ignore[reportGeneralTypeIssues] after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( "PaymentIntent", diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index 29e858261..9be12ae19 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -7630,6 +7630,9 @@ def confirm( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( PaymentIntent, @@ -7673,6 +7676,9 @@ async def confirm_async( after those actions are completed. Your server needs to then explicitly re-confirm the PaymentIntent to initiate the next payment attempt. + There is a variable upper limit on how many times a PaymentIntent can be confirmed. + After this limit is reached, any further calls to this endpoint will + transition the PaymentIntent to the canceled state. """ return cast( PaymentIntent, diff --git a/stripe/_transfer.py b/stripe/_transfer.py index 75512a1c9..17e743f78 100644 --- a/stripe/_transfer.py +++ b/stripe/_transfer.py @@ -265,7 +265,7 @@ class RetrieveReversalParams(RequestOptions): """ source_transaction: Optional[ExpandableField["Charge"]] """ - ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. + ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. """ source_type: Optional[str] """ diff --git a/stripe/billing/_alert.py b/stripe/billing/_alert.py index d2a2ddbac..02aecb7da 100644 --- a/stripe/billing/_alert.py +++ b/stripe/billing/_alert.py @@ -89,6 +89,14 @@ class CreateParamsFilter(TypedDict): """ Limit the scope to this alert only to this customer. """ + subscription: NotRequired[str] + """ + Limit the scope of this rated usage alert to this subscription. + """ + subscription_item: NotRequired[str] + """ + Limit the scope of this rated usage alert to this subscription item. + """ class CreateParamsUsageThresholdConfig(TypedDict): gte: int diff --git a/stripe/billing/_alert_service.py b/stripe/billing/_alert_service.py index 31bda7bdb..39649a26a 100644 --- a/stripe/billing/_alert_service.py +++ b/stripe/billing/_alert_service.py @@ -51,6 +51,14 @@ class CreateParamsFilter(TypedDict): """ Limit the scope to this alert only to this customer. """ + subscription: NotRequired[str] + """ + Limit the scope of this rated usage alert to this subscription. + """ + subscription_item: NotRequired[str] + """ + Limit the scope of this rated usage alert to this subscription item. + """ class CreateParamsUsageThresholdConfig(TypedDict): gte: int diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 5b1c4b8f4..a447c8af4 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -1886,7 +1886,7 @@ class CreateParams(RequestOptions): Literal["always", "if_required", "never"] ] """ - This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`. + This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. """ return_url: NotRequired[str] """ @@ -4109,7 +4109,7 @@ class RetrieveParams(RequestOptions): """ redirect_on_completion: Optional[Literal["always", "if_required", "never"]] """ - This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`. + This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. """ return_url: Optional[str] """ diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index a484a7081..628f7f237 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -288,7 +288,7 @@ class CreateParams(TypedDict): Literal["always", "if_required", "never"] ] """ - This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-redirect-behavior) of embedded sessions. Defaults to `always`. + This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. """ return_url: NotRequired[str] """ diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index 867dd6fe4..6d7553865 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -398,7 +398,7 @@ class ProcessPaymentIntentParamsProcessConfigTipping(TypedDict): """ class ProcessSetupIntentParams(RequestOptions): - customer_consent_collected: bool + customer_consent_collected: NotRequired[bool] """ Customer Consent Collected """ diff --git a/stripe/terminal/_reader_service.py b/stripe/terminal/_reader_service.py index 7b8739b94..362d89162 100644 --- a/stripe/terminal/_reader_service.py +++ b/stripe/terminal/_reader_service.py @@ -125,7 +125,7 @@ class ProcessPaymentIntentParamsProcessConfigTipping(TypedDict): """ class ProcessSetupIntentParams(TypedDict): - customer_consent_collected: bool + customer_consent_collected: NotRequired[bool] """ Customer Consent Collected """