Skip to content

Commit 8becffb

Browse files
Merge pull request #2076 from stripe/latest-codegen-beta
Update generated code for beta
2 parents 66d47dc + c967c24 commit 8becffb

File tree

2 files changed

+74
-1
lines changed

2 files changed

+74
-1
lines changed

CHANGELOG.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,78 @@
11
# Changelog
22

3+
## 30.0.0 - 2025-09-30
4+
This release changes the pinned API version to `2025-09-30.clover` and contains breaking changes (prefixed with ⚠️ below)
5+
6+
* [#2036](https://github.com/stripe/stripe-java/pull/2036) ⚠️ Add strongly typed EventNotifications
7+
We've overhauled how V2 Events are handled in the SDK! This approach should provide a lot more information at authoring and compile time, leading to more robust integrations. As part of this process, there are a number of changes to be aware of.
8+
- Added matching `EventNotification` classes to every v2 `Event`. For example, there's now a `V1BillingMeterErrorReportTriggeredEventNotification` to match the existing `V1BillingMeterErrorReportTriggeredEvent`. Each notification class defines a `fetchEvent()` method to retrieve its corresponding event. For events with related objects, there's a `fetchRelatedObject()` method that performs the API call and casts the response to the correct type.
9+
- ⚠️ Rename function `StripeClient.parseThinEvent` to `StripeClient.parseEventNotification` and remove the `Stripe.ThinEvent` class.
10+
- This function now returns a `Stripe.V2.Core.EventNotification` (which is the shared base class that all of the more specific `Stripe.Events.*EventNotification` classes share) instead of `Stripe.ThinEvent`. When applicable, these event notifications will have the `relatedObject` property and a `fetchRelatedObject()` function. They also have a `fetchEvent()` method to retrieve their corresponding `Stripe.Event.*Event` instance.
11+
- If you parse an event the SDK doesn't have types for (e.g. it's newer than the SDK you're using), you'll get an instance of `Stripe.Events.UnknownEventNotification` instead of a more specific type. It has both the `relatedObject` property and the `fetchRelatedObject()` function (but they may be/return `null`)
12+
* [#2069](https://github.com/stripe/stripe-java/pull/2069) Move `V2.Event` API resources to `V2.Core.Events`
13+
- ⚠️ Move the below event related classes from `com.stripe.model.v2` to `com.stripe.model.v2.core`. This enables us to correctly match the API path to the namespace
14+
- `com.stripe.model.v2.Event` -> `com.stripe.model.v2.core.Event`
15+
- `com.stripe.model.v2.EventDestination` -> `com.stripe.model.v2.core.EventDestination`
16+
* [#2057](https://github.com/stripe/stripe-java/pull/2057) Add `StripeContext` object
17+
- Add the `StripeContext` class. Previously, you could set the stripe context only as a string via `StripeClientBuilder .setStripeContext()`. The same method can now take an instance of the `StripeContext` class as well
18+
- ⚠️ Change `EventNotification` (formerly known as `ThinEvent`)'s `context` property from `string` to `StripeContext`
19+
* [#2041](https://github.com/stripe/stripe-java/pull/2041) Throw `ApiKeyMissingException` instead of `IllegalArgumentException` for unset API keys
20+
- ⚠️ throw `ApiKeyMissingException` instead of `IllegalArgumentException` when making a request before setting an API key initializing a client without an API key. Tweak the wording of that message to better indicate how to fix.
21+
* [#2039](https://github.com/stripe/stripe-java/pull/2039) ⚠️ Build SDK w/ V2 OpenAPI spec
22+
- ⚠️ The delete methods for v2 APIs (the ones in the `StripeClient.v2` namespace) now return a `V2DeletedObject` which has the id of the object that has been deleted and a string representing the type of the object that has been deleted.
23+
- ⚠️ Query params on v2 APIs (like `limit`) are now `Long` instead of `Integer` (to match v1 APIs)
24+
- ⚠️ Deeply nested param hashes with no properties no longer have classes generated for them. Instead, they're typed as `Map<String, Object>`. Because there were no params, it's unlikely you were using these classes.
25+
* ⚠️ Deprecated the V1 service accessors living directly under StripeClient(e.g. customers, products) as they were copied under the new V1 service in our [last release](https://github.com/stripe/stripe-java/releases/tag/v29.5.0). Service accessors living directly under StripeClient(e.g. customers, products) will be removed from StripeClient in a future release. E.g.
26+
```diff
27+
StripeClient client = new StripeClient("sk_test...")
28+
29+
# Accessing V1 Stripe services on a StripeClient should be through the V1 namespace
30+
- client.customers().list()
31+
+ client.v1().customers().list()
32+
```
33+
Refer to the [migration guide](https://github.com/stripe/stripe-java/wiki/v1-namespace-in-StripeClient) for help upgrading.
34+
* [#2046](https://github.com/stripe/stripe-java/pull/2046) Adds v2 support to RateLimitException
35+
* ⚠️ The base class of `RateLimitException` has been changed from `InvalidRequestException` to `ApiException`. There is no change to the public interface for the `RateLimitException` class.
36+
* [#2037](https://github.com/stripe/stripe-java/pull/2037) Fix type bounds on request
37+
* ⚠️ Changes the signature of `LiveResponseGetter#request`, `ApiService#request`, and `StripeResponseGetter#request` to return `<T extends StripeObject>` instead of `<T extends StripeObjectInterface>`. This only affects advanced use cases where users are extending `StripeObjectInterface` with their own objects to deserialize Stripe responses. Those objects will now need to extend `StripeObject`.
38+
39+
* [#2040](https://github.com/stripe/stripe-java/pull/2040), [#2058](https://github.com/stripe/stripe-java/pull/2058), [#2059](https://github.com/stripe/stripe-java/pull/2059), [#2073](https://github.com/stripe/stripe-java/pull/2073) Update generated code based on incoming API changes in the `2025-09-30.clover` API version.
40+
* ⚠️ Remove support for `balanceReport` and `payoutReconciliationReport` on `AccountSession.components` and `AccountSessionCreateParams.components`
41+
* ⚠️ Change type of `InvoiceCreatePreviewParams.subscription_details.cancelAt`, `SubscriptionCreateParams.cancelAt` and `SubscriptionUpdateParams.cancelAt` from `DateTime` to `DateTime | enum('max_period_end'|'min_period_end')`
42+
* ⚠️ Remove support for values `saturday` and `sunday` from enums `AccountCreateParams.settings.payouts.schedule.weeklyPayoutDays` and `AccountUpdateParams.settings.payouts.schedule.weeklyPayoutDays`
43+
* ⚠️ Remove support for `iterations` on `InvoiceCreatePreviewParams.schedule_details.phases[]`, `SubscriptionScheduleCreateParams.phases[]`, and `SubscriptionScheduleUpdateParams.phases[]`
44+
* ⚠️ Remove support for `link` and `payByBank` on `PaymentMethodUpdateParams`
45+
* ⚠️ Remove support for `coupon` on `Discount`, `PromotionCodeCreateParams`, and `PromotionCode`. Use `Discount.source.coupon`, `PromotionCodeCreateParams.promotion.coupon`, and `PromotionCode.promotion.coupon` instead
46+
* Add support for new resource `BalanceSettings`
47+
* Add support for `retrieve` and `update` methods on resource `BalanceSettings`
48+
* Add support for `source` on `Discount`
49+
* Add support for `mbWayPayments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
50+
* Add support for `trialUpdateBehavior` on `billingportal.Configuration.features.subscription_update`, `billingportal.ConfigurationCreateParams.features.subscription_update`, and `billingportal.ConfigurationUpdateParams.features.subscription_update`
51+
* Add support for `mbWay` on `Charge.payment_method_details`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.payment_method_data`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodCreateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, and `SetupIntentUpdateParams.payment_method_data`
52+
* Add support for `brandingSettings` and `nameCollection` on `checkout.SessionCreateParams` and `checkout.Session`
53+
* Add support for `excludedPaymentMethodTypes` on `PaymentIntentConfirmParams`, `PaymentIntentUpdateParams`, `checkout.SessionCreateParams`, and `checkout.Session`
54+
* Add support for `unitLabel` on `InvoiceAddLinesParams.lines[].price_data.product_data`, `InvoiceLineItemUpdateParams.price_data.product_data`, `InvoiceUpdateLinesParams.lines[].price_data.product_data`, `PaymentLinkCreateParams.line_items[].price_data.product_data`, and `checkout.SessionCreateParams.line_items[].price_data.product_data`
55+
* Add support for `alma`, `billie`, and `satispay` on `checkout.Session.payment_method_options` and `checkout.SessionCreateParams.payment_method_options`
56+
* Add support for `demoPay` on `checkout.SessionCreateParams.payment_method_options`
57+
* Add support for `captureMethod` on `checkout.Session.payment_method_options.affirm`, `checkout.Session.payment_method_options.afterpay_clearpay`, `checkout.Session.payment_method_options.amazon_pay`, `checkout.Session.payment_method_options.card`, `checkout.Session.payment_method_options.cashapp`, `checkout.Session.payment_method_options.klarna`, `checkout.Session.payment_method_options.link`, `checkout.Session.payment_method_options.mobilepay`, `checkout.Session.payment_method_options.revolut_pay`, `checkout.SessionCreateParams.payment_method_options.affirm`, `checkout.SessionCreateParams.payment_method_options.afterpay_clearpay`, `checkout.SessionCreateParams.payment_method_options.amazon_pay`, `checkout.SessionCreateParams.payment_method_options.card`, `checkout.SessionCreateParams.payment_method_options.cashapp`, `checkout.SessionCreateParams.payment_method_options.klarna`, `checkout.SessionCreateParams.payment_method_options.link`, `checkout.SessionCreateParams.payment_method_options.mobilepay`, and `checkout.SessionCreateParams.payment_method_options.revolut_pay`
58+
* Add support for `flexible` on `InvoiceCreatePreviewParams.schedule_details.billing_mode`, `InvoiceCreatePreviewParams.subscription_details.billing_mode`, `Quote.subscription_data.billing_mode`, `QuoteCreateParams.subscription_data.billing_mode`, `Subscription.billing_mode`, `SubscriptionCreateParams.billing_mode`, `SubscriptionMigrateParams.billing_mode`, `SubscriptionSchedule.billing_mode`, `SubscriptionScheduleCreateParams.billing_mode`, and `checkout.SessionCreateParams.subscription_data.billing_mode`
59+
* Add support for `businessName` and `individualName` on `CustomerCreateParams`, `CustomerUpdateParams`, `Customer`, `checkout.Session.collected_information`, and `checkout.Session.customer_details`
60+
* Add support for new values `mb_way`on enums `ConfirmationTokenCreateParams.payment_method_data.type`, `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type`
61+
* Add support for new values `mb_way`on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type`
62+
* Add support for `chargebackLossReasonCode` on `Dispute.payment_method_details.klarna`
63+
* Add support for `netAmount` and `prorationDetails` on `InvoiceItem`
64+
* Add support for `fraudDisputabilityLikelihood` and `riskAssessment` on `issuing.AuthorizationCreateParams`
65+
* Add support for `secondLine` on `issuing.Card`
66+
* Add support for new values `mb_way`on enum `PaymentIntentCreateParams.excludedPaymentMethodTypes`
67+
* Add support for `frMealVoucherConecs` on `PaymentMethodConfigurationCreateParams` and `PaymentMethodConfigurationUpdateParams`
68+
* Add support for `promotion` on `PromotionCodeCreateParams` and `PromotionCode`
69+
* Add support for `provider` on `tax.Settings.defaults`
70+
* Add support for `bbposWisepad3` on `terminal.ConfigurationCreateParams`, `terminal.ConfigurationUpdateParams`, and `terminal.Configuration`
71+
* Add support for `addressKana`, `addressKanji`, `displayNameKana`, `displayNameKanji`, and `phone` on `terminal.LocationCreateParams`, `terminal.LocationUpdateParams`, and `terminal.Location`
72+
* Change `terminal.LocationCreateParams.address` to be optional
73+
* Change `terminal.LocationCreateParams.displayName` to be optional
74+
* Add support for new value `2025-09-30.clover` on enum `WebhookEndpointCreateParams.apiVersion`
75+
376
## 29.6.0-beta.1 - 2025-08-27
477
This release changes the pinned API version to `2025-08-27.preview`.
578

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2027
1+
v2028

0 commit comments

Comments
 (0)