Skip to content

Commit d66b816

Browse files
jar-stripeclaude
andcommitted
Regenerate with decimal_string enabled for v2 APIs
V2 API fields with `format: decimal` now generate as `BigDecimal` instead of `String`, matching v1 behavior. This is driven by a codegen change that removes a v2-specific workaround (sdk-codegen#3369). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Committed-By-Agent: claude
1 parent e3ff4a9 commit d66b816

File tree

66 files changed

+2091
-2095
lines changed

Some content is hidden

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

66 files changed

+2091
-2095
lines changed

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

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@
2525
import com.stripe.events.V2CoreAccountPersonDeletedEventNotification;
2626
import com.stripe.events.V2CoreAccountPersonUpdatedEventNotification;
2727
import com.stripe.events.V2CoreAccountUpdatedEventNotification;
28+
import com.stripe.events.V2CoreBatchJobBatchFailedEventNotification;
29+
import com.stripe.events.V2CoreBatchJobCanceledEventNotification;
30+
import com.stripe.events.V2CoreBatchJobCompletedEventNotification;
31+
import com.stripe.events.V2CoreBatchJobCreatedEventNotification;
32+
import com.stripe.events.V2CoreBatchJobReadyForUploadEventNotification;
33+
import com.stripe.events.V2CoreBatchJobTimeoutEventNotification;
34+
import com.stripe.events.V2CoreBatchJobUpdatedEventNotification;
35+
import com.stripe.events.V2CoreBatchJobUploadTimeoutEventNotification;
36+
import com.stripe.events.V2CoreBatchJobValidatingEventNotification;
37+
import com.stripe.events.V2CoreBatchJobValidationFailedEventNotification;
2838
import com.stripe.events.V2CoreEventDestinationPingEventNotification;
2939
import com.stripe.events.V2CoreHealthEventGenerationFailureResolvedEventNotification;
3040
import com.stripe.events.V2MoneyManagementAdjustmentCreatedEventNotification;
@@ -319,6 +329,66 @@ public StripeEventNotificationHandler onV2CoreAccountPersonUpdated(
319329
return this;
320330
}
321331

332+
public StripeEventNotificationHandler onV2CoreBatchJobBatchFailed(
333+
Callback<V2CoreBatchJobBatchFailedEventNotification> callback) {
334+
this.register("v2.core.batch_job.batch_failed", callback);
335+
return this;
336+
}
337+
338+
public StripeEventNotificationHandler onV2CoreBatchJobCanceled(
339+
Callback<V2CoreBatchJobCanceledEventNotification> callback) {
340+
this.register("v2.core.batch_job.canceled", callback);
341+
return this;
342+
}
343+
344+
public StripeEventNotificationHandler onV2CoreBatchJobCompleted(
345+
Callback<V2CoreBatchJobCompletedEventNotification> callback) {
346+
this.register("v2.core.batch_job.completed", callback);
347+
return this;
348+
}
349+
350+
public StripeEventNotificationHandler onV2CoreBatchJobCreated(
351+
Callback<V2CoreBatchJobCreatedEventNotification> callback) {
352+
this.register("v2.core.batch_job.created", callback);
353+
return this;
354+
}
355+
356+
public StripeEventNotificationHandler onV2CoreBatchJobReadyForUpload(
357+
Callback<V2CoreBatchJobReadyForUploadEventNotification> callback) {
358+
this.register("v2.core.batch_job.ready_for_upload", callback);
359+
return this;
360+
}
361+
362+
public StripeEventNotificationHandler onV2CoreBatchJobTimeout(
363+
Callback<V2CoreBatchJobTimeoutEventNotification> callback) {
364+
this.register("v2.core.batch_job.timeout", callback);
365+
return this;
366+
}
367+
368+
public StripeEventNotificationHandler onV2CoreBatchJobUpdated(
369+
Callback<V2CoreBatchJobUpdatedEventNotification> callback) {
370+
this.register("v2.core.batch_job.updated", callback);
371+
return this;
372+
}
373+
374+
public StripeEventNotificationHandler onV2CoreBatchJobUploadTimeout(
375+
Callback<V2CoreBatchJobUploadTimeoutEventNotification> callback) {
376+
this.register("v2.core.batch_job.upload_timeout", callback);
377+
return this;
378+
}
379+
380+
public StripeEventNotificationHandler onV2CoreBatchJobValidating(
381+
Callback<V2CoreBatchJobValidatingEventNotification> callback) {
382+
this.register("v2.core.batch_job.validating", callback);
383+
return this;
384+
}
385+
386+
public StripeEventNotificationHandler onV2CoreBatchJobValidationFailed(
387+
Callback<V2CoreBatchJobValidationFailedEventNotification> callback) {
388+
this.register("v2.core.batch_job.validation_failed", callback);
389+
return this;
390+
}
391+
322392
public StripeEventNotificationHandler onV2CoreEventDestinationPing(
323393
Callback<V2CoreEventDestinationPingEventNotification> callback) {
324394
this.register("v2.core.event_destination.ping", callback);
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.BatchJob;
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 V2CoreBatchJobBatchFailedEvent 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 BatchJob fetchRelatedObject() throws StripeException {
20+
return (BatchJob) 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.BatchJob;
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 V2CoreBatchJobBatchFailedEventNotification 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 BatchJob fetchRelatedObject() throws StripeException {
20+
return (BatchJob) super.fetchRelatedObject(this.relatedObject);
21+
}
22+
/** Retrieve the corresponding full event from the Stripe API. */
23+
@Override
24+
public V2CoreBatchJobBatchFailedEvent fetchEvent() throws StripeException {
25+
return (V2CoreBatchJobBatchFailedEvent) super.fetchEvent();
26+
}
27+
}
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.BatchJob;
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 V2CoreBatchJobCanceledEvent 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 BatchJob fetchRelatedObject() throws StripeException {
20+
return (BatchJob) 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.BatchJob;
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 V2CoreBatchJobCanceledEventNotification 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 BatchJob fetchRelatedObject() throws StripeException {
20+
return (BatchJob) super.fetchRelatedObject(this.relatedObject);
21+
}
22+
/** Retrieve the corresponding full event from the Stripe API. */
23+
@Override
24+
public V2CoreBatchJobCanceledEvent fetchEvent() throws StripeException {
25+
return (V2CoreBatchJobCanceledEvent) super.fetchEvent();
26+
}
27+
}
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.BatchJob;
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 V2CoreBatchJobCompletedEvent 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 BatchJob fetchRelatedObject() throws StripeException {
20+
return (BatchJob) 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.BatchJob;
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 V2CoreBatchJobCompletedEventNotification 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 BatchJob fetchRelatedObject() throws StripeException {
20+
return (BatchJob) super.fetchRelatedObject(this.relatedObject);
21+
}
22+
/** Retrieve the corresponding full event from the Stripe API. */
23+
@Override
24+
public V2CoreBatchJobCompletedEvent fetchEvent() throws StripeException {
25+
return (V2CoreBatchJobCompletedEvent) super.fetchEvent();
26+
}
27+
}
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.BatchJob;
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 V2CoreBatchJobCreatedEvent 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 BatchJob fetchRelatedObject() throws StripeException {
20+
return (BatchJob) 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.BatchJob;
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 V2CoreBatchJobCreatedEventNotification 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 BatchJob fetchRelatedObject() throws StripeException {
20+
return (BatchJob) super.fetchRelatedObject(this.relatedObject);
21+
}
22+
/** Retrieve the corresponding full event from the Stripe API. */
23+
@Override
24+
public V2CoreBatchJobCreatedEvent fetchEvent() throws StripeException {
25+
return (V2CoreBatchJobCreatedEvent) super.fetchEvent();
26+
}
27+
}
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.BatchJob;
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 V2CoreBatchJobReadyForUploadEvent 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 BatchJob fetchRelatedObject() throws StripeException {
20+
return (BatchJob) super.fetchRelatedObject(this.relatedObject);
21+
}
22+
}

0 commit comments

Comments
 (0)