Skip to content

Commit d5bfc24

Browse files
Merge pull request #1685 from stripe/latest-codegen-private-preview
Update generated code for private-preview
2 parents c16ad1b + 7d6aaf9 commit d5bfc24

19 files changed

+486
-56
lines changed

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7f436e73385732b1c5502f408a6fe37f7b6b0612
1+
368be7755d15d02a1038325c7d159703b01662b0

CHANGELOG.md

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# Changelog
22

3+
## 14.1.0b1 - 2025-11-18
4+
This release changes the pinned API version to `2025-11-17.preview`.
5+
6+
* [#1663](https://github.com/stripe/stripe-python/pull/1663) Update generated code for beta
7+
* Add support for new resources `v2.core.AccountPersonToken` and `v2.core.AccountToken`
8+
* Remove support for resource `v2.payments.OffSessionPayment`
9+
* Add support for `create` and `retrieve` methods on resources `v2.core.AccountPersonToken` and `v2.core.AccountToken`
10+
* Remove support for `cancel`, `capture`, `create`, `list`, and `retrieve` methods on resource `v2.payments.OffSessionPayment`
11+
* Change `Tax.Association.tax_transaction_attempts` to be required
12+
* Add support for `specified_commercial_transactions_act_url` on `Account.BusinessProfile`, `AccountCreateParamsBusinessProfile`, and `AccountModifyParamsBusinessProfile`
13+
* Add support for `paypay_payments` on `Account.Setting`, `AccountCreateParamsSetting`, and `AccountModifyParamsSetting`
14+
* Change type of `billing.analytics.MeterUsageRetrieveParamsMeter.dimension_filters` from `string` to `array(string)`
15+
* Change type of `billing.analytics.MeterUsageRetrieveParamsMeter.tenant_filters` from `string` to `array(string)`
16+
* Add support for `car_rental_data`, `flight_data`, and `lodging_data` on `ChargeCaptureParamsPaymentDetail`, `ChargeModifyParamsPaymentDetail`, `PaymentIntentCaptureParamsPaymentDetail`, `PaymentIntentConfirmParamsPaymentDetail`, `PaymentIntentCreateParamsPaymentDetail`, and `PaymentIntentModifyParamsPaymentDetail`
17+
* Add support for `supplementary_purchase_data` on `OrderCreateParamsPaymentSettingPaymentMethodOptionKlarna`, `OrderModifyParamsPaymentSettingPaymentMethodOptionKlarna`, `PaymentIntentConfirmParamsPaymentMethodOptionKlarna`, `PaymentIntentCreateParamsPaymentMethodOptionKlarna`, and `PaymentIntentModifyParamsPaymentMethodOptionKlarna`
18+
* Add support for `allow_redisplay` and `customer_account` on `PaymentMethodListParams`
19+
* Add support for `future_requirements` on `V2.Core.Account`
20+
* Add support for `konbini_payments` and `script_statement_descriptor` on `V2.Core.Account.Configuration.Merchant`, `v2.core.AccountCreateParamsConfigurationMerchant`, and `v2.core.AccountModifyParamsConfigurationMerchant`
21+
* Add support for `eur` on `V2.Core.Account.Configuration.Storer.Capability.HoldsCurrency`, `v2.core.AccountCreateParamsConfigurationStorerCapabilityHoldsCurrency`, and `v2.core.AccountModifyParamsConfigurationStorerCapabilityHoldsCurrency`
22+
* Add support for `requirements_collector` on `V2.Core.Account.Default.Responsibility`
23+
* Add support for new value `ar_cuit` on enums `V2.Core.Account.Identity.BusinessDetail.IdNumber.type`, `v2.core.AccountCreateParamsIdentityBusinessDetailIdNumber.type`, and `v2.core.AccountModifyParamsIdentityBusinessDetailIdNumber.type`
24+
* Add support for new value `ar_dni` on enums `V2.Core.Account.Identity.Individual.IdNumber.type`, `V2.Core.AccountPerson.IdNumber.type`, `v2.core.AccountCreateParamsIdentityIndividualIdNumber.type`, `v2.core.AccountModifyParamsIdentityIndividualIdNumber.type`, `v2.core.AccountPersonCreateParamsIdNumber.type`, and `v2.core.AccountPersonModifyParamsIdNumber.type`
25+
* Remove support for `collector` on `V2.Core.Account.Requirement`
26+
* Add support for new value `holds_currencies.eur` on enum `V2.Core.Account.Requirement.Entry.Impact.RestrictsCapability.capability`
27+
* Add support for new values `payment_method` and `person` on enum `V2.Core.Account.Requirement.Entry.Reference.type`
28+
* Remove support for value `resource` from enum `V2.Core.Account.Requirement.Entry.Reference.type`
29+
* Remove support for value `future_requirements` from enum `V2.Core.Account.Requirement.Entry.RequestedReason.code`
30+
* Add support for `changes` on `V2.Core.Event`
31+
* Remove support for value `sepa_bank_account` from enums `V2.MoneyManagement.FinancialAddress.Credential.type` and `v2.money_management.FinancialAddressCreateParams.type`
32+
* Add support for `account_token` on `v2.core.AccountCreateParams` and `v2.core.AccountModifyParams`
33+
* Add support for new value `future_requirements` on enums `v2.core.AccountCreateParams.include`, `v2.core.AccountModifyParams.include`, and `v2.core.AccountRetrieveParams.include`
34+
* Add support for `person_token` on `v2.core.AccountPersonCreateParams` and `v2.core.AccountPersonModifyParams`
35+
* Add support for thin event `V2CoreHealthEventGenerationFailureResolvedEvent`
36+
* Remove support for thin events `V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent`, `V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent`, `V2PaymentsOffSessionPaymentCanceledEvent`, `V2PaymentsOffSessionPaymentCreatedEvent`, `V2PaymentsOffSessionPaymentFailedEvent`, `V2PaymentsOffSessionPaymentRequiresCaptureEvent`, and `V2PaymentsOffSessionPaymentSucceededEvent` with related object `v2.payments.OffSessionPayment`
37+
338
## 14.1.0a2 - 2025-11-20
439
This release changes the pinned API version to `2025-11-17.preview`.
540

@@ -147,40 +182,10 @@ This release changes the pinned API version to `2025-11-17.preview`.
147182
* Add support for new value `2025-11-17.clover` on enum `WebhookEndpointCreateParams.api_version`
148183
* Add support for snapshot events `financial_connections.account.account_numbers_updated` and `financial_connections.account.upcoming_account_number_expiry` with resource `financial_connections.Account`
149184

150-
## 14.1.0b1 - 2025-11-18
151-
This release changes the pinned API version to `2025-11-17.preview`.
152-
153-
* [#1663](https://github.com/stripe/stripe-python/pull/1663) Update generated code for beta
154-
* Add support for new resources `v2.core.AccountPersonToken` and `v2.core.AccountToken`
155-
* Remove support for resource `v2.payments.OffSessionPayment`
156-
* Add support for `create` and `retrieve` methods on resources `v2.core.AccountPersonToken` and `v2.core.AccountToken`
157-
* Remove support for `cancel`, `capture`, `create`, `list`, and `retrieve` methods on resource `v2.payments.OffSessionPayment`
158-
* Change `Tax.Association.tax_transaction_attempts` to be required
159-
* Add support for `specified_commercial_transactions_act_url` on `Account.BusinessProfile`, `AccountCreateParamsBusinessProfile`, and `AccountModifyParamsBusinessProfile`
160-
* Add support for `paypay_payments` on `Account.Setting`, `AccountCreateParamsSetting`, and `AccountModifyParamsSetting`
161-
* Change type of `billing.analytics.MeterUsageRetrieveParamsMeter.dimension_filters` from `string` to `array(string)`
162-
* Change type of `billing.analytics.MeterUsageRetrieveParamsMeter.tenant_filters` from `string` to `array(string)`
163-
* Add support for `car_rental_data`, `flight_data`, and `lodging_data` on `ChargeCaptureParamsPaymentDetail`, `ChargeModifyParamsPaymentDetail`, `PaymentIntentCaptureParamsPaymentDetail`, `PaymentIntentConfirmParamsPaymentDetail`, `PaymentIntentCreateParamsPaymentDetail`, and `PaymentIntentModifyParamsPaymentDetail`
164-
* Add support for `supplementary_purchase_data` on `OrderCreateParamsPaymentSettingPaymentMethodOptionKlarna`, `OrderModifyParamsPaymentSettingPaymentMethodOptionKlarna`, `PaymentIntentConfirmParamsPaymentMethodOptionKlarna`, `PaymentIntentCreateParamsPaymentMethodOptionKlarna`, and `PaymentIntentModifyParamsPaymentMethodOptionKlarna`
165-
* Add support for `allow_redisplay` and `customer_account` on `PaymentMethodListParams`
166-
* Add support for `future_requirements` on `V2.Core.Account`
167-
* Add support for `konbini_payments` and `script_statement_descriptor` on `V2.Core.Account.Configuration.Merchant`, `v2.core.AccountCreateParamsConfigurationMerchant`, and `v2.core.AccountModifyParamsConfigurationMerchant`
168-
* Add support for `eur` on `V2.Core.Account.Configuration.Storer.Capability.HoldsCurrency`, `v2.core.AccountCreateParamsConfigurationStorerCapabilityHoldsCurrency`, and `v2.core.AccountModifyParamsConfigurationStorerCapabilityHoldsCurrency`
169-
* Add support for `requirements_collector` on `V2.Core.Account.Default.Responsibility`
170-
* Add support for new value `ar_cuit` on enums `V2.Core.Account.Identity.BusinessDetail.IdNumber.type`, `v2.core.AccountCreateParamsIdentityBusinessDetailIdNumber.type`, and `v2.core.AccountModifyParamsIdentityBusinessDetailIdNumber.type`
171-
* Add support for new value `ar_dni` on enums `V2.Core.Account.Identity.Individual.IdNumber.type`, `V2.Core.AccountPerson.IdNumber.type`, `v2.core.AccountCreateParamsIdentityIndividualIdNumber.type`, `v2.core.AccountModifyParamsIdentityIndividualIdNumber.type`, `v2.core.AccountPersonCreateParamsIdNumber.type`, and `v2.core.AccountPersonModifyParamsIdNumber.type`
172-
* Remove support for `collector` on `V2.Core.Account.Requirement`
173-
* Add support for new value `holds_currencies.eur` on enum `V2.Core.Account.Requirement.Entry.Impact.RestrictsCapability.capability`
174-
* Add support for new values `payment_method` and `person` on enum `V2.Core.Account.Requirement.Entry.Reference.type`
175-
* Remove support for value `resource` from enum `V2.Core.Account.Requirement.Entry.Reference.type`
176-
* Remove support for value `future_requirements` from enum `V2.Core.Account.Requirement.Entry.RequestedReason.code`
177-
* Add support for `changes` on `V2.Core.Event`
178-
* Remove support for value `sepa_bank_account` from enums `V2.MoneyManagement.FinancialAddress.Credential.type` and `v2.money_management.FinancialAddressCreateParams.type`
179-
* Add support for `account_token` on `v2.core.AccountCreateParams` and `v2.core.AccountModifyParams`
180-
* Add support for new value `future_requirements` on enums `v2.core.AccountCreateParams.include`, `v2.core.AccountModifyParams.include`, and `v2.core.AccountRetrieveParams.include`
181-
* Add support for `person_token` on `v2.core.AccountPersonCreateParams` and `v2.core.AccountPersonModifyParams`
182-
* Add support for thin event `V2CoreHealthEventGenerationFailureResolvedEvent`
183-
* Remove support for thin events `V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent`, `V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent`, `V2PaymentsOffSessionPaymentCanceledEvent`, `V2PaymentsOffSessionPaymentCreatedEvent`, `V2PaymentsOffSessionPaymentFailedEvent`, `V2PaymentsOffSessionPaymentRequiresCaptureEvent`, and `V2PaymentsOffSessionPaymentSucceededEvent` with related object `v2.payments.OffSessionPayment`
185+
## 14.0.1 - 2025-11-21
186+
* [#1684](https://github.com/stripe/stripe-python/pull/1684) Update generated code
187+
* `stripe.error` module is now accessible globally. Fixes [#1682](https://github.com/stripe/stripe-python/issues/1682)
188+
* [#1681](https://github.com/stripe/stripe-python/pull/1681) Throw a specific error when accessing `payment_intent` property on `Invoice` object to ease debugging.
184189

185190
## 14.0.0 - 2025-11-18
186191
This release changes the pinned API version to `2025-11-17.clover`.

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2128
1+
v2129

stripe/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ def add_beta_version(
143143

144144
if TYPE_CHECKING:
145145
from stripe import (
146+
_error as error,
146147
apps as apps,
147148
billing as billing,
148149
billing_portal as billing_portal,
@@ -158,6 +159,7 @@ def add_beta_version(
158159
issuing as issuing,
159160
params as params,
160161
privacy as privacy,
162+
product_catalog as product_catalog,
161163
radar as radar,
162164
reporting as reporting,
163165
sigma as sigma,
@@ -483,6 +485,9 @@ def add_beta_version(
483485
from stripe._price_service import PriceService as PriceService
484486
from stripe._privacy_service import PrivacyService as PrivacyService
485487
from stripe._product import Product as Product
488+
from stripe._product_catalog_service import (
489+
ProductCatalogService as ProductCatalogService,
490+
)
486491
from stripe._product_feature import ProductFeature as ProductFeature
487492
from stripe._product_feature_service import (
488493
ProductFeatureService as ProductFeatureService,
@@ -630,6 +635,7 @@ def add_beta_version(
630635

631636
# name -> (import_target, is_submodule)
632637
_import_map = {
638+
"error": ("stripe._error", True),
633639
"apps": ("stripe.apps", True),
634640
"billing": ("stripe.billing", True),
635641
"billing_portal": ("stripe.billing_portal", True),
@@ -645,6 +651,7 @@ def add_beta_version(
645651
"issuing": ("stripe.issuing", True),
646652
"params": ("stripe.params", True),
647653
"privacy": ("stripe.privacy", True),
654+
"product_catalog": ("stripe.product_catalog", True),
648655
"radar": ("stripe.radar", True),
649656
"reporting": ("stripe.reporting", True),
650657
"sigma": ("stripe.sigma", True),
@@ -903,6 +910,7 @@ def add_beta_version(
903910
"PriceService": ("stripe._price_service", False),
904911
"PrivacyService": ("stripe._privacy_service", False),
905912
"Product": ("stripe._product", False),
913+
"ProductCatalogService": ("stripe._product_catalog_service", False),
906914
"ProductFeature": ("stripe._product_feature", False),
907915
"ProductFeatureService": ("stripe._product_feature_service", False),
908916
"ProductService": ("stripe._product_service", False),

stripe/_object_classes.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@
256256
"RedactionJobValidationError",
257257
),
258258
"product": ("stripe._product", "Product"),
259+
"product_catalog.trial_offer": (
260+
"stripe.product_catalog._trial_offer",
261+
"TrialOffer",
262+
),
259263
"product_feature": ("stripe._product_feature", "ProductFeature"),
260264
"promotion_code": ("stripe._promotion_code", "PromotionCode"),
261265
"quote": ("stripe._quote", "Quote"),

stripe/_payment_intent.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3308,6 +3308,12 @@ class Zip(StripeObject):
33083308
"zip": Zip,
33093309
}
33103310

3311+
class PaymentsOrchestration(StripeObject):
3312+
enabled: bool
3313+
"""
3314+
Whether this feature is enabled.
3315+
"""
3316+
33113317
class PresentmentDetails(StripeObject):
33123318
presentment_amount: int
33133319
"""
@@ -3613,6 +3619,10 @@ class TransferData(StripeObject):
36133619
"""
36143620
The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. A comprehensive list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).
36153621
"""
3622+
payments_orchestration: Optional[PaymentsOrchestration]
3623+
"""
3624+
When you enable this parameter, this PaymentIntent will route your payment to processors that you configure in the dashboard.
3625+
"""
36163626
presentment_details: Optional[PresentmentDetails]
36173627
processing: Optional[Processing]
36183628
"""
@@ -5441,6 +5451,7 @@ async def list_amount_details_line_items_async(
54415451
"payment_details": PaymentDetails,
54425452
"payment_method_configuration_details": PaymentMethodConfigurationDetails,
54435453
"payment_method_options": PaymentMethodOptions,
5454+
"payments_orchestration": PaymentsOrchestration,
54445455
"presentment_details": PresentmentDetails,
54455456
"processing": Processing,
54465457
"shipping": Shipping,

stripe/_product_catalog_service.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# -*- coding: utf-8 -*-
2+
# File generated from our OpenAPI spec
3+
from stripe._stripe_service import StripeService
4+
from importlib import import_module
5+
from typing_extensions import TYPE_CHECKING
6+
7+
if TYPE_CHECKING:
8+
from stripe.product_catalog._trial_offer_service import TrialOfferService
9+
10+
_subservices = {
11+
"trial_offers": [
12+
"stripe.product_catalog._trial_offer_service",
13+
"TrialOfferService",
14+
],
15+
}
16+
17+
18+
class ProductCatalogService(StripeService):
19+
trial_offers: "TrialOfferService"
20+
21+
def __init__(self, requestor):
22+
super().__init__(requestor)
23+
24+
def __getattr__(self, name):
25+
try:
26+
import_from, service = _subservices[name]
27+
service_class = getattr(
28+
import_module(import_from),
29+
service,
30+
)
31+
setattr(
32+
self,
33+
name,
34+
service_class(self._requestor),
35+
)
36+
return getattr(self, name)
37+
except KeyError:
38+
raise AttributeError()

stripe/_stripe_client.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
from stripe._price_service import PriceService
109109
from stripe._privacy_service import PrivacyService
110110
from stripe._product_service import ProductService
111+
from stripe._product_catalog_service import ProductCatalogService
111112
from stripe._promotion_code_service import PromotionCodeService
112113
from stripe._quote_service import QuoteService
113114
from stripe._radar_service import RadarService
@@ -947,6 +948,17 @@ def privacy(self) -> "PrivacyService":
947948
def products(self) -> "ProductService":
948949
return self.v1.products
949950

951+
@property
952+
@deprecated(
953+
"""
954+
StripeClient.product_catalog is deprecated, use StripeClient.v1.product_catalog instead.
955+
All functionality under it has been copied over to StripeClient.v1.product_catalog.
956+
See [migration guide](https://github.com/stripe/stripe-python/wiki/v1-namespace-in-StripeClient) for more on this and tips on migrating to the new v1 namespace.
957+
""",
958+
)
959+
def product_catalog(self) -> "ProductCatalogService":
960+
return self.v1.product_catalog
961+
950962
@property
951963
@deprecated(
952964
"""

stripe/_stripe_object.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,15 @@ def __getitem__(self, k: str) -> Any:
216216
% (k, k, ", ".join(list(self.keys())))
217217
)
218218
else:
219+
from stripe._invoice import Invoice
220+
221+
# super specific one-off case to help users debug this property disappearing
222+
# see also: https://go/j/DEVSDK-2835
223+
if isinstance(self, Invoice) and k == "payment_intent":
224+
raise KeyError(
225+
"The 'payment_intent' attribute is no longer available on Invoice objects. See the docs for more details: https://docs.stripe.com/changelog/basil/2025-03-31/add-support-for-multiple-partial-payments-on-invoices#why-is-this-a-breaking-change"
226+
)
227+
219228
raise err
220229

221230
def __delitem__(self, k: str) -> None:

stripe/_v1_services.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
from stripe._plan_service import PlanService
7171
from stripe._price_service import PriceService
7272
from stripe._privacy_service import PrivacyService
73+
from stripe._product_catalog_service import ProductCatalogService
7374
from stripe._product_service import ProductService
7475
from stripe._promotion_code_service import PromotionCodeService
7576
from stripe._quote_service import QuoteService
@@ -219,6 +220,10 @@
219220
"prices": ["stripe._price_service", "PriceService"],
220221
"privacy": ["stripe._privacy_service", "PrivacyService"],
221222
"products": ["stripe._product_service", "ProductService"],
223+
"product_catalog": [
224+
"stripe._product_catalog_service",
225+
"ProductCatalogService",
226+
],
222227
"promotion_codes": [
223228
"stripe._promotion_code_service",
224229
"PromotionCodeService",
@@ -316,6 +321,7 @@ class V1Services(StripeService):
316321
prices: "PriceService"
317322
privacy: "PrivacyService"
318323
products: "ProductService"
324+
product_catalog: "ProductCatalogService"
319325
promotion_codes: "PromotionCodeService"
320326
quotes: "QuoteService"
321327
radar: "RadarService"

0 commit comments

Comments
 (0)