From 94a085f7439671546a6de9608c665ec668e61549 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 23:08:33 +0000 Subject: [PATCH 1/2] Update generated code for v2254 and --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- stripe/_v2_services.py | 6 +++--- stripe/v2/__init__.py | 4 ++-- stripe/v2/{_datum_service.py => _data_service.py} | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename stripe/v2/{_datum_service.py => _data_service.py} (96%) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 4540bccf0..0a10ecafb 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -826bf48af8bcd391512daeaf283b8486347b14c8 \ No newline at end of file +3ac0dc357d86c95bbba40ca9818f5eacf4d0a405 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 97a293208..1ae2e8d30 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2253 \ No newline at end of file +v2254 \ No newline at end of file diff --git a/stripe/_v2_services.py b/stripe/_v2_services.py index de23db423..17ea0c8c6 100644 --- a/stripe/_v2_services.py +++ b/stripe/_v2_services.py @@ -8,7 +8,7 @@ from stripe.v2._billing_service import BillingService from stripe.v2._commerce_service import CommerceService from stripe.v2._core_service import CoreService - from stripe.v2._datum_service import DatumService + from stripe.v2._data_service import DataService from stripe.v2._extend_service import ExtendService from stripe.v2._iam_service import IamService from stripe.v2._money_management_service import MoneyManagementService @@ -22,7 +22,7 @@ "billing": ["stripe.v2._billing_service", "BillingService"], "commerce": ["stripe.v2._commerce_service", "CommerceService"], "core": ["stripe.v2._core_service", "CoreService"], - "data": ["stripe.v2._datum_service", "DatumService"], + "data": ["stripe.v2._data_service", "DataService"], "extend": ["stripe.v2._extend_service", "ExtendService"], "iam": ["stripe.v2._iam_service", "IamService"], "money_management": [ @@ -42,7 +42,7 @@ class V2Services(StripeService): billing: "BillingService" commerce: "CommerceService" core: "CoreService" - data: "DatumService" + data: "DataService" extend: "ExtendService" iam: "IamService" money_management: "MoneyManagementService" diff --git a/stripe/v2/__init__.py b/stripe/v2/__init__.py index fe5cdea9c..45fc0ea4a 100644 --- a/stripe/v2/__init__.py +++ b/stripe/v2/__init__.py @@ -22,7 +22,7 @@ from stripe.v2._billing_service import BillingService as BillingService from stripe.v2._commerce_service import CommerceService as CommerceService from stripe.v2._core_service import CoreService as CoreService - from stripe.v2._datum_service import DatumService as DatumService + from stripe.v2._data_service import DataService as DataService from stripe.v2._deleted_object import DeletedObject as DeletedObject from stripe.v2._extend_service import ExtendService as ExtendService from stripe.v2._financial_address_credit_simulation import ( @@ -58,7 +58,7 @@ "BillingService": ("stripe.v2._billing_service", False), "CommerceService": ("stripe.v2._commerce_service", False), "CoreService": ("stripe.v2._core_service", False), - "DatumService": ("stripe.v2._datum_service", False), + "DataService": ("stripe.v2._data_service", False), "DeletedObject": ("stripe.v2._deleted_object", False), "ExtendService": ("stripe.v2._extend_service", False), "FinancialAddressCreditSimulation": ( diff --git a/stripe/v2/_datum_service.py b/stripe/v2/_data_service.py similarity index 96% rename from stripe/v2/_datum_service.py rename to stripe/v2/_data_service.py index e654d27ed..6c6d0d19a 100644 --- a/stripe/v2/_datum_service.py +++ b/stripe/v2/_data_service.py @@ -12,7 +12,7 @@ } -class DatumService(StripeService): +class DataService(StripeService): reporting: "ReportingService" def __init__(self, requestor): From d4e94dc9bbd6c7bbaa264ad634efdd044358136b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 18:55:42 +0000 Subject: [PATCH 2/2] Update generated code for v2254 and --- CODEGEN_VERSION | 2 +- examples/event_notification_handler_endpoint.py | 2 ++ examples/event_notification_webhook_handler.py | 2 ++ stripe/_event_notification_handler.py | 2 ++ stripe/events/__init__.py | 2 ++ stripe/v2/core/__init__.py | 2 ++ stripe/v2/core/_event.py | 10 ++++++---- tests/test_event_notification_handler.py | 2 ++ tests/test_v2_event.py | 2 ++ 9 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 0a10ecafb..8c7394453 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -3ac0dc357d86c95bbba40ca9818f5eacf4d0a405 \ No newline at end of file +607324895d7883d4a5f04f3c29c26faa09cd31d3 \ No newline at end of file diff --git a/examples/event_notification_handler_endpoint.py b/examples/event_notification_handler_endpoint.py index 6a794a03d..e7d121c9c 100644 --- a/examples/event_notification_handler_endpoint.py +++ b/examples/event_notification_handler_endpoint.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# File copied from our code generator; changes here will be overwritten. """ event_notification_handler_endpoint.py - receive and process event notifications (AKA thin events) like "v1.billing.meter.error_report_triggered" using EventNotificationHandler. diff --git a/examples/event_notification_webhook_handler.py b/examples/event_notification_webhook_handler.py index f167f138f..0f0946971 100644 --- a/examples/event_notification_webhook_handler.py +++ b/examples/event_notification_webhook_handler.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# File copied from our code generator; changes here will be overwritten. """ event_notification_webhook_handler.py - receive and process event notifications (AKA thin events) like the v1.billing.meter.error_report_triggered and v1.billing.meter.no_meter_found events. diff --git a/stripe/_event_notification_handler.py b/stripe/_event_notification_handler.py index 9db0b9828..1ff1e9abc 100644 --- a/stripe/_event_notification_handler.py +++ b/stripe/_event_notification_handler.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# File copied from our code generator; changes here will be overwritten. from dataclasses import dataclass from typing_extensions import TYPE_CHECKING diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py index 357157b38..9237614f6 100644 --- a/stripe/events/__init__.py +++ b/stripe/events/__init__.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# File copied from our code generator; changes here will be overwritten. +# -*- coding: utf-8 -*- from typing_extensions import TYPE_CHECKING from stripe.v2.core._event import ( diff --git a/stripe/v2/core/__init__.py b/stripe/v2/core/__init__.py index c694e2591..6dc196b95 100644 --- a/stripe/v2/core/__init__.py +++ b/stripe/v2/core/__init__.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# File copied from our code generator; changes here will be overwritten. +# -*- coding: utf-8 -*- from typing_extensions import TYPE_CHECKING from stripe.v2.core._event import ( diff --git a/stripe/v2/core/_event.py b/stripe/v2/core/_event.py index d429dc97d..68030e859 100644 --- a/stripe/v2/core/_event.py +++ b/stripe/v2/core/_event.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# File copied from our code generator; changes here will be overwritten. +# -*- coding: utf-8 -*- import json from typing import Any, ClassVar, Dict, Optional, cast @@ -190,7 +192,7 @@ def from_json(payload: str, client: "StripeClient") -> "EventNotification": def __repr__(self) -> str: return f"" - def fetch_event(self) -> Event: + def fetch_event(self) -> "Event": response = self._client.raw_request( "get", f"/v2/core/events/{self.id}", @@ -198,9 +200,9 @@ def fetch_event(self) -> Event: headers={"Stripe-Request-Trigger": f"event={self.id}"}, usage=["pushed_event_pull"], ) - return cast(Event, self._client.deserialize(response, api_mode="V2")) + return cast("Event", self._client.deserialize(response, api_mode="V2")) - async def fetch_event_async(self) -> Event: + async def fetch_event_async(self) -> "Event": response = await self._client.raw_request_async( "get", f"/v2/core/events/{self.id}", @@ -208,7 +210,7 @@ async def fetch_event_async(self) -> Event: headers={"Stripe-Request-Trigger": f"event={self.id}"}, usage=["pushed_event_pull", "pushed_event_pull_async"], ) - return cast(Event, self._client.deserialize(response, api_mode="V2")) + return cast("Event", self._client.deserialize(response, api_mode="V2")) class UnknownEventNotification(EventNotification): diff --git a/tests/test_event_notification_handler.py b/tests/test_event_notification_handler.py index 568abec09..ddbf4c8fb 100644 --- a/tests/test_event_notification_handler.py +++ b/tests/test_event_notification_handler.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# File copied from our code generator; changes here will be overwritten. import json import pytest from typing import Optional diff --git a/tests/test_v2_event.py b/tests/test_v2_event.py index 9af9b5501..9b8df8bf8 100644 --- a/tests/test_v2_event.py +++ b/tests/test_v2_event.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- +# File copied from our code generator; changes here will be overwritten. import json from typing import Callable from typing_extensions import assert_type