From 000b6f29d58ce57076cdbe33983c155cde2806eb Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 30 Sep 2026 21:15:14 +0000 Subject: [PATCH 1/3] Update generated code for v2526 and 588801ef34f7b5f7d6a784d3354f5f93d2a26ffb --- ...26-09-30_stripe-openapi_ff2f82f3.change.md | 8 ++ CODEGEN_VERSION | 2 +- stripe/events/_v1_invoice_upcoming_event.py | 90 +------------------ 3 files changed, 12 insertions(+), 88 deletions(-) create mode 100644 .hark/changes/2026-09-30_stripe-openapi_ff2f82f3.change.md diff --git a/.hark/changes/2026-09-30_stripe-openapi_ff2f82f3.change.md b/.hark/changes/2026-09-30_stripe-openapi_ff2f82f3.change.md new file mode 100644 index 000000000..9ae7e0c7a --- /dev/null +++ b/.hark/changes/2026-09-30_stripe-openapi_ff2f82f3.change.md @@ -0,0 +1,8 @@ +--- +title: Update generated code +pr_url: https://github.com/stripe/stripe-python/pull/1932 +semver_level: minor +is_stripe_api_change: true +--- + +* Release specs are identical. diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 316bdd23b..6aca587b4 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -adad04916772f880317eac10d8c026b401863f1d \ No newline at end of file +588801ef34f7b5f7d6a784d3354f5f93d2a26ffb \ No newline at end of file diff --git a/stripe/events/_v1_invoice_upcoming_event.py b/stripe/events/_v1_invoice_upcoming_event.py index 58f2fde2c..91505066c 100644 --- a/stripe/events/_v1_invoice_upcoming_event.py +++ b/stripe/events/_v1_invoice_upcoming_event.py @@ -1,29 +1,13 @@ # -*- 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 +from stripe.v2.core._event import Event, EventNotification +from typing import cast +from typing_extensions import Literal, override 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": @@ -32,22 +16,6 @@ def fetch_event(self) -> "V1InvoiceUpcomingEvent": super().fetch_event(), ) - def fetch_related_object(self) -> "Invoice": - response = self._client.raw_request( - "get", - self.related_object.url, - stripe_context=self.context, - headers={"Stripe-Request-Trigger": f"event={self.id}"}, - 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( @@ -55,59 +23,7 @@ async def fetch_event_async(self) -> "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, - headers={"Stripe-Request-Trigger": f"event={self.id}"}, - 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, - "headers": {"Stripe-Request-Trigger": f"event={self.id}"}, - }, - ), - ) From 797b95942c46ba3424677a234a44456a8b537065 Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Wed, 30 Sep 2026 15:38:53 -0700 Subject: [PATCH 2/3] Add v16 migration guidance links (#1935) --- .hark/migration-guides/v16.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.hark/migration-guides/v16.md b/.hark/migration-guides/v16.md index e333eaa2c..852bab155 100644 --- a/.hark/migration-guides/v16.md +++ b/.hark/migration-guides/v16.md @@ -2,7 +2,9 @@ This version of the SDK uses API version `2026-09-30.endive`. If the format of this API version looks new to you, see our new [API release process](https://stripe.com/blog/introducing-stripes-new-api-release-process). -Please review our API changelog for `2026-09-30.endive` to understand all the breaking changes to the Stripe API, the reasons behind them and potential alternatives. +Please review our API changelog for [`2026-09-30.endive`](https://docs.stripe.com/changelog/2026-09-30.endive) to understand all the breaking changes to the Stripe API, the reasons behind them and potential alternatives. + +The Python SDK specific [changelog for v16](https://github.com/stripe/stripe-python/blob/master/CHANGELOG.md#16-0-0) has the corresponding changes in the SDKs as well as SDK specific breaking changes.