Skip to content

Commit 59878c2

Browse files
Update generated code for v1520
1 parent 1cf6c5b commit 59878c2

File tree

3 files changed

+104
-5
lines changed

3 files changed

+104
-5
lines changed

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1505
1+
v1520

src/main/java/com/stripe/param/v2/core/EventListParams.java

Lines changed: 95 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,37 @@
33

44
import com.google.gson.annotations.SerializedName;
55
import com.stripe.net.ApiRequestParams;
6+
import java.time.Instant;
67
import java.util.HashMap;
78
import java.util.Map;
89
import lombok.Getter;
910

1011
@Getter
1112
public class EventListParams extends ApiRequestParams {
13+
/** Filter for events created after the specified timestamp. */
14+
@SerializedName("created_gt")
15+
Instant createdGt;
16+
17+
/** Filter for events created at or after the specified timestamp. */
18+
@SerializedName("created_gte")
19+
Instant createdGte;
20+
21+
/** Filter for events created before the specified timestamp. */
22+
@SerializedName("created_lt")
23+
Instant createdLt;
24+
25+
/** Filter for events created at or before the specified timestamp. */
26+
@SerializedName("created_lte")
27+
Instant createdLte;
28+
29+
/**
30+
* Filter events based on whether they were successfully delivered to all subscribed event
31+
* destinations. If false, events which are still pending or have failed all delivery attempts to
32+
* a event destination will be returned.
33+
*/
34+
@SerializedName("delivery_success")
35+
Boolean deliverySuccess;
36+
1237
/**
1338
* Map of extra parameters for custom features not available in this client library. The content
1439
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
@@ -22,7 +47,7 @@ public class EventListParams extends ApiRequestParams {
2247
@SerializedName("limit")
2348
Integer limit;
2449

25-
/** <strong>Required.</strong> Primary object ID used to retrieve related events. */
50+
/** Primary object ID used to retrieve related events. */
2651
@SerializedName("object_id")
2752
String objectId;
2853

@@ -31,7 +56,20 @@ public class EventListParams extends ApiRequestParams {
3156
String page;
3257

3358
private EventListParams(
34-
Map<String, Object> extraParams, Integer limit, String objectId, String page) {
59+
Instant createdGt,
60+
Instant createdGte,
61+
Instant createdLt,
62+
Instant createdLte,
63+
Boolean deliverySuccess,
64+
Map<String, Object> extraParams,
65+
Integer limit,
66+
String objectId,
67+
String page) {
68+
this.createdGt = createdGt;
69+
this.createdGte = createdGte;
70+
this.createdLt = createdLt;
71+
this.createdLte = createdLte;
72+
this.deliverySuccess = deliverySuccess;
3573
this.extraParams = extraParams;
3674
this.limit = limit;
3775
this.objectId = objectId;
@@ -43,6 +81,16 @@ public static Builder builder() {
4381
}
4482

4583
public static class Builder {
84+
private Instant createdGt;
85+
86+
private Instant createdGte;
87+
88+
private Instant createdLt;
89+
90+
private Instant createdLte;
91+
92+
private Boolean deliverySuccess;
93+
4694
private Map<String, Object> extraParams;
4795

4896
private Integer limit;
@@ -53,7 +101,50 @@ public static class Builder {
53101

54102
/** Finalize and obtain parameter instance from this builder. */
55103
public EventListParams build() {
56-
return new EventListParams(this.extraParams, this.limit, this.objectId, this.page);
104+
return new EventListParams(
105+
this.createdGt,
106+
this.createdGte,
107+
this.createdLt,
108+
this.createdLte,
109+
this.deliverySuccess,
110+
this.extraParams,
111+
this.limit,
112+
this.objectId,
113+
this.page);
114+
}
115+
116+
/** Filter for events created after the specified timestamp. */
117+
public Builder setCreatedGt(Instant createdGt) {
118+
this.createdGt = createdGt;
119+
return this;
120+
}
121+
122+
/** Filter for events created at or after the specified timestamp. */
123+
public Builder setCreatedGte(Instant createdGte) {
124+
this.createdGte = createdGte;
125+
return this;
126+
}
127+
128+
/** Filter for events created before the specified timestamp. */
129+
public Builder setCreatedLt(Instant createdLt) {
130+
this.createdLt = createdLt;
131+
return this;
132+
}
133+
134+
/** Filter for events created at or before the specified timestamp. */
135+
public Builder setCreatedLte(Instant createdLte) {
136+
this.createdLte = createdLte;
137+
return this;
138+
}
139+
140+
/**
141+
* Filter events based on whether they were successfully delivered to all subscribed event
142+
* destinations. If false, events which are still pending or have failed all delivery attempts
143+
* to a event destination will be returned.
144+
*/
145+
public Builder setDeliverySuccess(Boolean deliverySuccess) {
146+
this.deliverySuccess = deliverySuccess;
147+
return this;
57148
}
58149

59150
/**
@@ -88,7 +179,7 @@ public Builder setLimit(Integer limit) {
88179
return this;
89180
}
90181

91-
/** <strong>Required.</strong> Primary object ID used to retrieve related events. */
182+
/** Primary object ID used to retrieve related events. */
92183
public Builder setObjectId(String objectId) {
93184
this.objectId = objectId;
94185
return this;

src/main/java/com/stripe/service/v2/core/EventService.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ public StripeCollection<Event> list(EventListParams params) throws StripeExcepti
2424
return list(params, (RequestOptions) null);
2525
}
2626
/** List events, going back up to 30 days. */
27+
public StripeCollection<Event> list(RequestOptions options) throws StripeException {
28+
return list((EventListParams) null, options);
29+
}
30+
/** List events, going back up to 30 days. */
31+
public StripeCollection<Event> list() throws StripeException {
32+
return list((EventListParams) null, (RequestOptions) null);
33+
}
34+
/** List events, going back up to 30 days. */
2735
public StripeCollection<Event> list(EventListParams params, RequestOptions options)
2836
throws StripeException {
2937
String path = "/v2/core/events";

0 commit comments

Comments
 (0)