Skip to content

Commit 957bf6d

Browse files
Merge pull request #2210 from stripe/latest-codegen-beta
Update generated code for beta
2 parents 51f1b5d + c5b0bbe commit 957bf6d

104 files changed

Lines changed: 5583 additions & 394 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,40 @@ This release changes the pinned API version to 2026-04-22.private.
1717
* Add support for `admissionsTax`, `attendanceTax`, `entertainmentTax`, `grossReceiptsTax`, `hospitalityTax`, `luxuryTax`, `resortTax`, and `tourismTax` on `tax.RegistrationCreateParams.country_options.us`
1818
* Add support for `purpose` on `treasury.OutboundPaymentCreateParams` and `treasury.OutboundPayment`
1919

20+
## 32.1.0 - 2026-04-23
21+
This release changes the pinned API version to 2026-04-22.dahlia.
22+
23+
* [#2203](https://github.com/stripe/stripe-java/pull/2203) Update generated code
24+
* Add support for `balanceReport` and `payoutReconciliationReport` on `AccountSession.components` and `AccountSessionCreateParams.components`
25+
* Add support for `appDistribution` and `sunbitPayments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities`
26+
* Add support for `sunbit` on `Charge.payment_method_details`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.payment_method_data`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, and `SetupIntentUpdateParams.payment_method_data`
27+
* Add support for `location` and `reader` on `Charge.payment_method_details.klarna`, `PaymentAttemptRecord.payment_method_details.klarna`, and `PaymentRecord.payment_method_details.klarna`
28+
* Add support for `mandate` on `Charge.payment_method_details.pix`, `PaymentAttemptRecord.payment_method_details.pix`, and `PaymentRecord.payment_method_details.pix`
29+
* Add support for `managedPayments` on `PaymentIntent`, `PaymentLinkCreateParams`, `PaymentLink`, `SetupIntent`, `Subscription`, `checkout.SessionCreateParams`, and `checkout.Session`
30+
* Add support for new value `sunbit` on enums `PaymentIntentConfirmParams.excludedPaymentMethodTypes`, `PaymentIntentCreateParams.excludedPaymentMethodTypes`, `PaymentIntentUpdateParams.excludedPaymentMethodTypes`, `SetupIntentCreateParams.excludedPaymentMethodTypes`, `SetupIntentUpdateParams.excludedPaymentMethodTypes`, and `checkout.SessionCreateParams.excludedPaymentMethodTypes`
31+
* Add support for `mandateOptions` on `PaymentIntent.payment_method_options.pix`, `PaymentIntentConfirmParams.payment_method_options.pix`, `PaymentIntentCreateParams.payment_method_options.pix`, `PaymentIntentUpdateParams.payment_method_options.pix`, `checkout.Session.payment_method_options.pix`, and `checkout.SessionCreateParams.payment_method_options.pix`
32+
* Change type of `PaymentIntentConfirmParams.payment_method_options.pix.setupFutureUsage`, `PaymentIntentCreateParams.payment_method_options.pix.setupFutureUsage`, `PaymentIntentUpdateParams.payment_method_options.pix.setupFutureUsage`, and `checkout.SessionCreateParams.payment_method_options.pix.setupFutureUsage` from `literal('none')` to `enum('none'|'off_session')`
33+
* Add support for new value `sunbit` on enum `checkout.SessionCreateParams.paymentMethodTypes`
34+
* ⚠️ Change type of `PaymentIntent.payment_method_options.pix.setupFutureUsage` and `checkout.Session.payment_method_options.pix.setupFutureUsage` from `literal('none')` to `enum('none'|'off_session')`
35+
* Add support for new value `sunbit` 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`
36+
* Add support for new values `fo_vat`, `gi_tin`, `it_cf`, and `py_ruc` on enums `CustomerCreateParams.tax_id_data[].type`, `InvoiceCreatePreviewParams.customer_details.tax_ids[].type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParams.customer_details.tax_ids[].type`
37+
* Add support for new value `sunbit` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type`
38+
* Add support for `pix` on `Invoice.payment_settings.payment_method_options`, `InvoiceCreateParams.payment_settings.payment_method_options`, `InvoiceUpdateParams.payment_settings.payment_method_options`, `Mandate.payment_method_details`, `SetupAttempt.payment_method_details`, `SetupIntent.payment_method_options`, `SetupIntentConfirmParams.payment_method_options`, `SetupIntentCreateParams.payment_method_options`, `SetupIntentUpdateParams.payment_method_options`, `Subscription.payment_settings.payment_method_options`, `SubscriptionCreateParams.payment_settings.payment_method_options`, and `SubscriptionUpdateParams.payment_settings.payment_method_options`
39+
* Add support for `upi` on `Invoice.payment_settings.payment_method_options`, `InvoiceCreateParams.payment_settings.payment_method_options`, `InvoiceUpdateParams.payment_settings.payment_method_options`, `Subscription.payment_settings.payment_method_options`, `SubscriptionCreateParams.payment_settings.payment_method_options`, and `SubscriptionUpdateParams.payment_settings.payment_method_options`
40+
* Add support for new values `pix` and `upi` on enums `InvoiceCreateParams.payment_settings.paymentMethodTypes`, `InvoiceUpdateParams.payment_settings.paymentMethodTypes`, `SubscriptionCreateParams.payment_settings.paymentMethodTypes`, and `SubscriptionUpdateParams.payment_settings.paymentMethodTypes`
41+
* Add support for `cardPresence` on `issuing.Authorization`
42+
* Add support for `allowedCardPresences` and `blockedCardPresences` on `issuing.Card.spending_controls`, `issuing.CardCreateParams.spending_controls`, `issuing.CardUpdateParams.spending_controls`, `issuing.Cardholder.spending_controls`, `issuing.CardholderCreateParams.spending_controls`, and `issuing.CardholderUpdateParams.spending_controls`
43+
* Add support for `amount` and `currency` on `Mandate.multi_use`
44+
* Add support for `amountToConfirm` on `PaymentIntentConfirmParams`
45+
* Add support for `klarnaDisplayQrCode` on `PaymentIntent.next_action`
46+
* Add support for new value `sunbit` on enums `PaymentLinkCreateParams.paymentMethodTypes` and `PaymentLinkUpdateParams.paymentMethodTypes`
47+
* Add support for new value `account` on enum `radar.ValueListCreateParams.itemType`
48+
* Add support for `moto` on `SetupAttempt.payment_method_details.card`
49+
* Add support for `pixDisplayQrCode` on `SetupIntent.next_action`
50+
* Add support for new value `2026-04-22.dahlia` on enum `WebhookEndpointCreateParams.apiVersion`
51+
* [#2208](https://github.com/stripe/stripe-java/pull/2208) Fix missing stripeContext in RequestOptions.toBuilderFullCopy()
52+
- Fixes a bug where an existing `stripeContext` was being reset to `null` when calling `RequestOptions#toBuilderFullCopy()`
53+
2054
## 32.1.0-beta.1 - 2026-03-25
2155

2256
This release changes the pinned API version to `2026-03-25.preview`. It is built on top of SDK version 32.0.0 which contains breaking changes. Please review the [changelog for 32.0.0](https://github.com/stripe/stripe-java/blob/master/CHANGELOG.md#3200---2026-03-25) if upgrading from older SDK versions.

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c7b078fa024c2a69032f464e75a24aa13d9befc8
1+
826bf48af8bcd391512daeaf283b8486347b14c8

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2249
1+
v2253

src/main/java/com/stripe/StripeEventNotificationHandler.java

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
// - as do these comments, explaining the whole thing
77
import com.stripe.events.V1BillingMeterErrorReportTriggeredEventNotification;
88
import com.stripe.events.V1BillingMeterNoMeterFoundEventNotification;
9+
import com.stripe.events.V2CommerceProductCatalogImportsFailedEventNotification;
10+
import com.stripe.events.V2CommerceProductCatalogImportsProcessingEventNotification;
11+
import com.stripe.events.V2CommerceProductCatalogImportsSucceededEventNotification;
12+
import com.stripe.events.V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification;
913
import com.stripe.events.V2CoreAccountClosedEventNotification;
1014
import com.stripe.events.V2CoreAccountCreatedEventNotification;
1115
import com.stripe.events.V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification;
@@ -37,6 +41,13 @@
3741
import com.stripe.events.V2CoreBatchJobValidationFailedEventNotification;
3842
import com.stripe.events.V2CoreEventDestinationPingEventNotification;
3943
import com.stripe.events.V2CoreHealthEventGenerationFailureResolvedEventNotification;
44+
import com.stripe.events.V2DataReportingQueryRunCreatedEventNotification;
45+
import com.stripe.events.V2DataReportingQueryRunFailedEventNotification;
46+
import com.stripe.events.V2DataReportingQueryRunSucceededEventNotification;
47+
import com.stripe.events.V2DataReportingQueryRunUpdatedEventNotification;
48+
import com.stripe.events.V2ExtendWorkflowRunFailedEventNotification;
49+
import com.stripe.events.V2ExtendWorkflowRunStartedEventNotification;
50+
import com.stripe.events.V2ExtendWorkflowRunSucceededEventNotification;
4051
import com.stripe.events.V2MoneyManagementAdjustmentCreatedEventNotification;
4152
import com.stripe.events.V2MoneyManagementFinancialAccountCreatedEventNotification;
4253
import com.stripe.events.V2MoneyManagementFinancialAccountUpdatedEventNotification;
@@ -73,6 +84,10 @@
7384
import com.stripe.events.V2MoneyManagementReceivedDebitUpdatedEventNotification;
7485
import com.stripe.events.V2MoneyManagementTransactionCreatedEventNotification;
7586
import com.stripe.events.V2MoneyManagementTransactionUpdatedEventNotification;
87+
import com.stripe.events.V2OrchestratedCommerceAgreementConfirmedEventNotification;
88+
import com.stripe.events.V2OrchestratedCommerceAgreementCreatedEventNotification;
89+
import com.stripe.events.V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification;
90+
import com.stripe.events.V2OrchestratedCommerceAgreementTerminatedEventNotification;
7691
import com.stripe.exception.SignatureVerificationException;
7792
import com.stripe.model.v2.core.EventNotification;
7893
import java.util.ArrayList;
@@ -203,6 +218,30 @@ public StripeEventNotificationHandler onV1BillingMeterNoMeterFound(
203218
return this;
204219
}
205220

221+
public StripeEventNotificationHandler onV2CommerceProductCatalogImportsFailed(
222+
Callback<V2CommerceProductCatalogImportsFailedEventNotification> callback) {
223+
this.register("v2.commerce.product_catalog.imports.failed", callback);
224+
return this;
225+
}
226+
227+
public StripeEventNotificationHandler onV2CommerceProductCatalogImportsProcessing(
228+
Callback<V2CommerceProductCatalogImportsProcessingEventNotification> callback) {
229+
this.register("v2.commerce.product_catalog.imports.processing", callback);
230+
return this;
231+
}
232+
233+
public StripeEventNotificationHandler onV2CommerceProductCatalogImportsSucceeded(
234+
Callback<V2CommerceProductCatalogImportsSucceededEventNotification> callback) {
235+
this.register("v2.commerce.product_catalog.imports.succeeded", callback);
236+
return this;
237+
}
238+
239+
public StripeEventNotificationHandler onV2CommerceProductCatalogImportsSucceededWithErrors(
240+
Callback<V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification> callback) {
241+
this.register("v2.commerce.product_catalog.imports.succeeded_with_errors", callback);
242+
return this;
243+
}
244+
206245
public StripeEventNotificationHandler onV2CoreAccountClosed(
207246
Callback<V2CoreAccountClosedEventNotification> callback) {
208247
this.register("v2.core.account.closed", callback);
@@ -401,6 +440,48 @@ public StripeEventNotificationHandler onV2CoreHealthEventGenerationFailureResolv
401440
return this;
402441
}
403442

443+
public StripeEventNotificationHandler onV2DataReportingQueryRunCreated(
444+
Callback<V2DataReportingQueryRunCreatedEventNotification> callback) {
445+
this.register("v2.data.reporting.query_run.created", callback);
446+
return this;
447+
}
448+
449+
public StripeEventNotificationHandler onV2DataReportingQueryRunFailed(
450+
Callback<V2DataReportingQueryRunFailedEventNotification> callback) {
451+
this.register("v2.data.reporting.query_run.failed", callback);
452+
return this;
453+
}
454+
455+
public StripeEventNotificationHandler onV2DataReportingQueryRunSucceeded(
456+
Callback<V2DataReportingQueryRunSucceededEventNotification> callback) {
457+
this.register("v2.data.reporting.query_run.succeeded", callback);
458+
return this;
459+
}
460+
461+
public StripeEventNotificationHandler onV2DataReportingQueryRunUpdated(
462+
Callback<V2DataReportingQueryRunUpdatedEventNotification> callback) {
463+
this.register("v2.data.reporting.query_run.updated", callback);
464+
return this;
465+
}
466+
467+
public StripeEventNotificationHandler onV2ExtendWorkflowRunFailed(
468+
Callback<V2ExtendWorkflowRunFailedEventNotification> callback) {
469+
this.register("v2.extend.workflow_run.failed", callback);
470+
return this;
471+
}
472+
473+
public StripeEventNotificationHandler onV2ExtendWorkflowRunStarted(
474+
Callback<V2ExtendWorkflowRunStartedEventNotification> callback) {
475+
this.register("v2.extend.workflow_run.started", callback);
476+
return this;
477+
}
478+
479+
public StripeEventNotificationHandler onV2ExtendWorkflowRunSucceeded(
480+
Callback<V2ExtendWorkflowRunSucceededEventNotification> callback) {
481+
this.register("v2.extend.workflow_run.succeeded", callback);
482+
return this;
483+
}
484+
404485
public StripeEventNotificationHandler onV2MoneyManagementAdjustmentCreated(
405486
Callback<V2MoneyManagementAdjustmentCreatedEventNotification> callback) {
406487
this.register("v2.money_management.adjustment.created", callback);
@@ -616,6 +697,30 @@ public StripeEventNotificationHandler onV2MoneyManagementTransactionUpdated(
616697
this.register("v2.money_management.transaction.updated", callback);
617698
return this;
618699
}
700+
701+
public StripeEventNotificationHandler onV2OrchestratedCommerceAgreementConfirmed(
702+
Callback<V2OrchestratedCommerceAgreementConfirmedEventNotification> callback) {
703+
this.register("v2.orchestrated_commerce.agreement.confirmed", callback);
704+
return this;
705+
}
706+
707+
public StripeEventNotificationHandler onV2OrchestratedCommerceAgreementCreated(
708+
Callback<V2OrchestratedCommerceAgreementCreatedEventNotification> callback) {
709+
this.register("v2.orchestrated_commerce.agreement.created", callback);
710+
return this;
711+
}
712+
713+
public StripeEventNotificationHandler onV2OrchestratedCommerceAgreementPartiallyConfirmed(
714+
Callback<V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification> callback) {
715+
this.register("v2.orchestrated_commerce.agreement.partially_confirmed", callback);
716+
return this;
717+
}
718+
719+
public StripeEventNotificationHandler onV2OrchestratedCommerceAgreementTerminated(
720+
Callback<V2OrchestratedCommerceAgreementTerminatedEventNotification> callback) {
721+
this.register("v2.orchestrated_commerce.agreement.terminated", callback);
722+
return this;
723+
}
619724
// notification-handler-methods: The end of the section generated from our OpenAPI spec
620725

621726
/**

src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEvent.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ public static final class ErrorType {
4747
*
4848
* <p>One of {@code archived_meter}, {@code meter_event_customer_not_found}, {@code
4949
* meter_event_dimension_count_too_high}, {@code meter_event_invalid_value}, {@code
50-
* meter_event_no_customer_defined}, {@code missing_dimension_payload_keys}, {@code
51-
* no_meter}, {@code timestamp_in_future}, or {@code timestamp_too_far_in_past}.
50+
* meter_event_no_customer_defined}, {@code meter_event_value_too_many_digits}, {@code
51+
* missing_dimension_payload_keys}, {@code no_meter}, {@code timestamp_in_future}, or {@code
52+
* timestamp_too_far_in_past}.
5253
*/
5354
@SerializedName("code")
5455
String code;

src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEvent.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ public static final class ErrorType {
4444
*
4545
* <p>One of {@code archived_meter}, {@code meter_event_customer_not_found}, {@code
4646
* meter_event_dimension_count_too_high}, {@code meter_event_invalid_value}, {@code
47-
* meter_event_no_customer_defined}, {@code missing_dimension_payload_keys}, {@code
48-
* no_meter}, {@code timestamp_in_future}, or {@code timestamp_too_far_in_past}.
47+
* meter_event_no_customer_defined}, {@code meter_event_value_too_many_digits}, {@code
48+
* missing_dimension_payload_keys}, {@code no_meter}, {@code timestamp_in_future}, or {@code
49+
* timestamp_too_far_in_past}.
4950
*/
5051
@SerializedName("code")
5152
String code;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// File generated from our OpenAPI spec
2+
package com.stripe.events;
3+
4+
import com.google.gson.annotations.SerializedName;
5+
import com.stripe.exception.StripeException;
6+
import com.stripe.model.v2.commerce.ProductCatalogImport;
7+
import com.stripe.model.v2.core.Event;
8+
import com.stripe.model.v2.core.Event.RelatedObject;
9+
import lombok.Getter;
10+
11+
@Getter
12+
public final class V2CommerceProductCatalogImportsFailedEvent extends Event {
13+
@SerializedName("related_object")
14+
15+
/** Object containing the reference to API resource relevant to the event. */
16+
RelatedObject relatedObject;
17+
18+
/** Retrieves the related object from the API. Make an API request on every call. */
19+
public ProductCatalogImport fetchRelatedObject() throws StripeException {
20+
return (ProductCatalogImport) super.fetchRelatedObject(this.relatedObject);
21+
}
22+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// File generated from our OpenAPI spec
2+
package com.stripe.events;
3+
4+
import com.google.gson.annotations.SerializedName;
5+
import com.stripe.exception.StripeException;
6+
import com.stripe.model.v2.commerce.ProductCatalogImport;
7+
import com.stripe.model.v2.core.Event.RelatedObject;
8+
import com.stripe.model.v2.core.EventNotification;
9+
import lombok.Getter;
10+
11+
@Getter
12+
public final class V2CommerceProductCatalogImportsFailedEventNotification
13+
extends EventNotification {
14+
@SerializedName("related_object")
15+
16+
/** Object containing the reference to API resource relevant to the event. */
17+
RelatedObject relatedObject;
18+
19+
/** Retrieves the related object from the API. Make an API request on every call. */
20+
public ProductCatalogImport fetchRelatedObject() throws StripeException {
21+
return (ProductCatalogImport) super.fetchRelatedObject(this.relatedObject);
22+
}
23+
/** Retrieve the corresponding full event from the Stripe API. */
24+
@Override
25+
public V2CommerceProductCatalogImportsFailedEvent fetchEvent() throws StripeException {
26+
return (V2CommerceProductCatalogImportsFailedEvent) super.fetchEvent();
27+
}
28+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// File generated from our OpenAPI spec
2+
package com.stripe.events;
3+
4+
import com.google.gson.annotations.SerializedName;
5+
import com.stripe.exception.StripeException;
6+
import com.stripe.model.v2.commerce.ProductCatalogImport;
7+
import com.stripe.model.v2.core.Event;
8+
import com.stripe.model.v2.core.Event.RelatedObject;
9+
import lombok.Getter;
10+
11+
@Getter
12+
public final class V2CommerceProductCatalogImportsProcessingEvent extends Event {
13+
@SerializedName("related_object")
14+
15+
/** Object containing the reference to API resource relevant to the event. */
16+
RelatedObject relatedObject;
17+
18+
/** Retrieves the related object from the API. Make an API request on every call. */
19+
public ProductCatalogImport fetchRelatedObject() throws StripeException {
20+
return (ProductCatalogImport) super.fetchRelatedObject(this.relatedObject);
21+
}
22+
}

0 commit comments

Comments
 (0)