Skip to content

Commit 5c1a5a1

Browse files
Merge pull request #2117 from stripe/latest-codegen-beta
Update generated code for beta
2 parents 93a38f4 + f0b78f1 commit 5c1a5a1

File tree

397 files changed

+12950
-5252
lines changed

Some content is hidden

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

397 files changed

+12950
-5252
lines changed

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
91ef4c6abe8dcdab3a855d81aa624693a6a4da9f
1+
88aa59022b32620f4d66d6196e3b42d5a0f86bbb

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ This release changes the pinned API version to `2025-11-17.clover`.
5353
* Add support for `hooks` on `PaymentIntentCaptureParams`, `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `PaymentIntentIncrementAuthorizationParams`, `PaymentIntentUpdateParams`, and `PaymentIntent`
5454
* Add support for `mbWay` and `twint` on `Refund.destination_details`
5555
* Add support for new values `financial_connections.account.account_numbers_updated` and `financial_connections.account.upcoming_account_number_expiry` on enums `WebhookEndpointCreateParams.enabledEvents` and `WebhookEndpointUpdateParams.enabledEvents`
56-
* Add support for `changes` on `v2.core.Event`
5756
* Add support for snapshot events `financial_connections.account.account_numbers_updated` and `financial_connections.account.upcoming_account_number_expiry` with resource `financialconnections.Account`
5857

5958
## 30.2.0 - 2025-11-05

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2125
1+
v2140

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ jar {
9999
"Implementation-Version": VERSION_NAME,
100100
"Implementation-Vendor": VENDOR_NAME,
101101
"Bundle-SymbolicName": POM_ARTIFACT_ID,
102-
"Export-Package": "com.stripe.*")
102+
"Export-Package": "com.stripe.*",
103+
"Automatic-Module-Name": "stripe.java")
103104

104105
archiveVersion = VERSION_NAME
105106
}

src/main/java/com/stripe/ApiVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
package com.stripe;
33

44
final class ApiVersion {
5-
public static final String CURRENT = "2025-11-17.preview";
5+
public static final String CURRENT = "2025-12-15.preview";
66
}

src/main/java/com/stripe/StripeClient.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,17 @@ public com.stripe.service.ReportingService reporting() {
804804
return new com.stripe.service.ReportingService(this.getResponseGetter());
805805
}
806806

807+
/**
808+
* @deprecated StripeClient.reserve() is deprecated, use StripeClient.v1().reserve() instead. All
809+
* functionality under it has been copied over to StripeClient.v1().reserve(). See <a
810+
* href="https://github.com/stripe/stripe-java/wiki/v1-namespace-in-StripeClient">migration
811+
* guide</a> for more on this and tips on migrating to the new v1 namespace.
812+
*/
813+
@Deprecated
814+
public com.stripe.service.ReserveService reserve() {
815+
return new com.stripe.service.ReserveService(this.getResponseGetter());
816+
}
817+
807818
/**
808819
* @deprecated StripeClient.reviews() is deprecated, use StripeClient.v1().reviews() instead. All
809820
* functionality under it has been copied over to StripeClient.v1().reviews(). See <a
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.core.Event;
7+
import com.stripe.model.v2.core.Event.RelatedObject;
8+
import com.stripe.model.v2.moneymanagement.PayoutMethod;
9+
import lombok.Getter;
10+
11+
@Getter
12+
public final class V2MoneyManagementPayoutMethodCreatedEvent 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 PayoutMethod fetchRelatedObject() throws StripeException {
20+
return (PayoutMethod) super.fetchRelatedObject(this.relatedObject);
21+
}
22+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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.core.Event.RelatedObject;
7+
import com.stripe.model.v2.core.EventNotification;
8+
import com.stripe.model.v2.moneymanagement.PayoutMethod;
9+
import lombok.Getter;
10+
11+
@Getter
12+
public final class V2MoneyManagementPayoutMethodCreatedEventNotification extends EventNotification {
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 PayoutMethod fetchRelatedObject() throws StripeException {
20+
return (PayoutMethod) super.fetchRelatedObject(this.relatedObject);
21+
}
22+
/** Retrieve the corresponding full event from the Stripe API. */
23+
@Override
24+
public V2MoneyManagementPayoutMethodCreatedEvent fetchEvent() throws StripeException {
25+
return (V2MoneyManagementPayoutMethodCreatedEvent) super.fetchEvent();
26+
}
27+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// File generated from our OpenAPI spec
2+
package com.stripe.exception;
3+
4+
import com.google.gson.JsonObject;
5+
import com.stripe.model.StripeError;
6+
import com.stripe.model.StripeObject;
7+
import com.stripe.net.StripeResponseGetter;
8+
9+
/**
10+
* Returned when the PayoutMethod object is controlled by an alternate resource so cannot be
11+
* archived.
12+
*/
13+
public final class ControlledByAlternateResourceException extends ApiException {
14+
private static final long serialVersionUID = 2L;
15+
16+
private ControlledByAlternateResourceException(
17+
String message, String requestId, String code, Integer statusCode, Throwable e) {
18+
super(message, requestId, code, statusCode, e);
19+
}
20+
21+
static ControlledByAlternateResourceException parse(
22+
JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) {
23+
ControlledByAlternateResourceException.ControlledByAlternateResourceError error =
24+
(ControlledByAlternateResourceException.ControlledByAlternateResourceError)
25+
StripeObject.deserializeStripeObject(
26+
body,
27+
ControlledByAlternateResourceException.ControlledByAlternateResourceError.class,
28+
responseGetter);
29+
ControlledByAlternateResourceException exception =
30+
new ControlledByAlternateResourceException(
31+
error.getMessage(), requestId, error.getCode(), statusCode, null);
32+
exception.setStripeError(error);
33+
return exception;
34+
}
35+
36+
public static class ControlledByAlternateResourceError extends StripeError {}
37+
}

src/main/java/com/stripe/exception/StripeException.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ public static StripeException parseV2Exception(
119119
case "blocked_by_stripe":
120120
return com.stripe.exception.BlockedByStripeException.parse(
121121
body, statusCode, requestId, responseGetter);
122+
case "controlled_by_alternate_resource":
123+
return com.stripe.exception.ControlledByAlternateResourceException.parse(
124+
body, statusCode, requestId, responseGetter);
122125
case "controlled_by_dashboard":
123126
return com.stripe.exception.ControlledByDashboardException.parse(
124127
body, statusCode, requestId, responseGetter);
@@ -146,9 +149,6 @@ public static StripeException parseV2Exception(
146149
case "quota_exceeded":
147150
return com.stripe.exception.QuotaExceededException.parse(
148151
body, statusCode, requestId, responseGetter);
149-
case "rate_limit":
150-
return com.stripe.exception.RateLimitException.parse(
151-
body, statusCode, requestId, responseGetter);
152152
case "recipient_not_notifiable":
153153
return com.stripe.exception.RecipientNotNotifiableException.parse(
154154
body, statusCode, requestId, responseGetter);

0 commit comments

Comments
 (0)