From ee230682a95d4b1f2adb7cb2fc53080a7829104e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 4 Mar 2026 22:19:26 +0000 Subject: [PATCH 1/2] Update generated code for v2189 and --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../BalanceTransactionSourceTypeAdapterFactory.java | 11 +++++++---- .../model/ExternalAccountTypeAdapterFactory.java | 9 ++++++--- .../stripe/model/PaymentSourceTypeAdapterFactory.java | 9 ++++++--- 5 files changed, 21 insertions(+), 12 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 17557a68f28..0f9f7f07fc5 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -e65e48569f6dfad2d5f1b58018017856520c3ae6 \ No newline at end of file +46812bb1234aef25ae1070b402c602491ee66f8d \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 58dae793582..4c2310759e9 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2186 \ No newline at end of file +v2189 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/BalanceTransactionSourceTypeAdapterFactory.java b/src/main/java/com/stripe/model/BalanceTransactionSourceTypeAdapterFactory.java index 29e3c7c60be..fc84822c515 100644 --- a/src/main/java/com/stripe/model/BalanceTransactionSourceTypeAdapterFactory.java +++ b/src/main/java/com/stripe/model/BalanceTransactionSourceTypeAdapterFactory.java @@ -25,9 +25,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { } final String discriminator = "object"; final TypeAdapter jsonElementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter balanceTransactionSourceAdapter = - gson.getDelegateAdapter( - this, TypeToken.get(com.stripe.model.BalanceTransactionSource.class)); final TypeAdapter applicationFeeAdapter = gson.getDelegateAdapter(this, TypeToken.get(com.stripe.model.ApplicationFee.class)); final TypeAdapter chargeAdapter = @@ -68,7 +65,13 @@ public TypeAdapter create(Gson gson, TypeToken type) { new TypeAdapter() { @Override public void write(JsonWriter out, BalanceTransactionSource value) throws IOException { - balanceTransactionSourceAdapter.write(out, value); + @SuppressWarnings("unchecked") + TypeAdapter adapter = + (TypeAdapter) + gson.getDelegateAdapter( + BalanceTransactionSourceTypeAdapterFactory.this, + TypeToken.get(value.getClass())); + adapter.write(out, value); } @Override diff --git a/src/main/java/com/stripe/model/ExternalAccountTypeAdapterFactory.java b/src/main/java/com/stripe/model/ExternalAccountTypeAdapterFactory.java index 1d24a1d21a3..a4c99067782 100644 --- a/src/main/java/com/stripe/model/ExternalAccountTypeAdapterFactory.java +++ b/src/main/java/com/stripe/model/ExternalAccountTypeAdapterFactory.java @@ -28,8 +28,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { } final String discriminator = "object"; final TypeAdapter jsonElementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter externalAccountAdapter = - gson.getDelegateAdapter(this, TypeToken.get(com.stripe.model.ExternalAccount.class)); final TypeAdapter bankAccountAdapter = gson.getDelegateAdapter(this, TypeToken.get(com.stripe.model.BankAccount.class)); final TypeAdapter cardAdapter = @@ -39,7 +37,12 @@ public TypeAdapter create(Gson gson, TypeToken type) { new TypeAdapter() { @Override public void write(JsonWriter out, ExternalAccount value) throws IOException { - externalAccountAdapter.write(out, value); + @SuppressWarnings("unchecked") + TypeAdapter adapter = + (TypeAdapter) + gson.getDelegateAdapter( + ExternalAccountTypeAdapterFactory.this, TypeToken.get(value.getClass())); + adapter.write(out, value); } @Override diff --git a/src/main/java/com/stripe/model/PaymentSourceTypeAdapterFactory.java b/src/main/java/com/stripe/model/PaymentSourceTypeAdapterFactory.java index 309770b166e..59a32b6884f 100644 --- a/src/main/java/com/stripe/model/PaymentSourceTypeAdapterFactory.java +++ b/src/main/java/com/stripe/model/PaymentSourceTypeAdapterFactory.java @@ -25,8 +25,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { } final String discriminator = "object"; final TypeAdapter jsonElementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter paymentSourceAdapter = - gson.getDelegateAdapter(this, TypeToken.get(com.stripe.model.PaymentSource.class)); final TypeAdapter accountAdapter = gson.getDelegateAdapter(this, TypeToken.get(com.stripe.model.Account.class)); final TypeAdapter bankAccountAdapter = @@ -40,7 +38,12 @@ public TypeAdapter create(Gson gson, TypeToken type) { new TypeAdapter() { @Override public void write(JsonWriter out, PaymentSource value) throws IOException { - paymentSourceAdapter.write(out, value); + @SuppressWarnings("unchecked") + TypeAdapter adapter = + (TypeAdapter) + gson.getDelegateAdapter( + PaymentSourceTypeAdapterFactory.this, TypeToken.get(value.getClass())); + adapter.write(out, value); } @Override From 61b053fef1c450f0c01f20ddf83e5cca01f2a1d4 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 21:50:10 +0000 Subject: [PATCH 2/2] Update generated code for v2189 and --- CODEGEN_VERSION | 2 +- src/main/java/com/stripe/model/v2/core/Event.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 0f9f7f07fc5..58968e13793 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -46812bb1234aef25ae1070b402c602491ee66f8d \ No newline at end of file +c2fdb8b70a4520e54d461041362bece6a6df54e9 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/v2/core/Event.java b/src/main/java/com/stripe/model/v2/core/Event.java index 1c9b0fed797..17d4f3dfd5a 100644 --- a/src/main/java/com/stripe/model/v2/core/Event.java +++ b/src/main/java/com/stripe/model/v2/core/Event.java @@ -98,12 +98,15 @@ protected StripeObject fetchRelatedObject(RelatedObject relatedObject) throws St objectClass = StripeRawJsonObject.class; } - RequestOptions opts = null; + RequestOptions.RequestOptionsBuilder optsBuilder = new RequestOptions.RequestOptionsBuilder(); + // optsBuilder.setStripeRequestTrigger("event=" + id); // TODO https://go/j/DEVSDK-3018 if (context != null) { - opts = new RequestOptions.RequestOptionsBuilder().setStripeAccount(context).build(); + optsBuilder.setStripeAccount(context); } + RequestOptions opts = optsBuilder.build(); + return this.responseGetter.request( new ApiRequest( BaseAddress.API, ApiResource.RequestMethod.GET, relatedObject.getUrl(), null, opts),