Skip to content

Commit

Permalink
Update generated code for v1505
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Feb 24, 2025
1 parent 483c92f commit 5383186
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 104 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1501
v1505
99 changes: 4 additions & 95 deletions src/main/java/com/stripe/param/v2/core/EventListParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,12 @@

import com.google.gson.annotations.SerializedName;
import com.stripe.net.ApiRequestParams;
import java.time.Instant;
import java.util.HashMap;
import java.util.Map;
import lombok.Getter;

@Getter
public class EventListParams extends ApiRequestParams {
/** Filter for events created after the specified timestamp. */
@SerializedName("created_gt")
Instant createdGt;

/** Filter for events created at or after the specified timestamp. */
@SerializedName("created_gte")
Instant createdGte;

/** Filter for events created before the specified timestamp. */
@SerializedName("created_lt")
Instant createdLt;

/** Filter for events created at or before the specified timestamp. */
@SerializedName("created_lte")
Instant createdLte;

/**
* Filter events based on whether they were successfully delivered to all subscribed event
* destinations. If false, events which are still pending or have failed all delivery attempts to
* a event destination will be returned.
*/
@SerializedName("delivery_success")
Boolean deliverySuccess;

/**
* Map of extra parameters for custom features not available in this client library. The content
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
Expand All @@ -47,7 +22,7 @@ public class EventListParams extends ApiRequestParams {
@SerializedName("limit")
Integer limit;

/** Primary object ID used to retrieve related events. */
/** <strong>Required.</strong> Primary object ID used to retrieve related events. */
@SerializedName("object_id")
String objectId;

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

private EventListParams(
Instant createdGt,
Instant createdGte,
Instant createdLt,
Instant createdLte,
Boolean deliverySuccess,
Map<String, Object> extraParams,
Integer limit,
String objectId,
String page) {
this.createdGt = createdGt;
this.createdGte = createdGte;
this.createdLt = createdLt;
this.createdLte = createdLte;
this.deliverySuccess = deliverySuccess;
Map<String, Object> extraParams, Integer limit, String objectId, String page) {
this.extraParams = extraParams;
this.limit = limit;
this.objectId = objectId;
Expand All @@ -81,16 +43,6 @@ public static Builder builder() {
}

public static class Builder {
private Instant createdGt;

private Instant createdGte;

private Instant createdLt;

private Instant createdLte;

private Boolean deliverySuccess;

private Map<String, Object> extraParams;

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

/** Finalize and obtain parameter instance from this builder. */
public EventListParams build() {
return new EventListParams(
this.createdGt,
this.createdGte,
this.createdLt,
this.createdLte,
this.deliverySuccess,
this.extraParams,
this.limit,
this.objectId,
this.page);
}

/** Filter for events created after the specified timestamp. */
public Builder setCreatedGt(Instant createdGt) {
this.createdGt = createdGt;
return this;
}

/** Filter for events created at or after the specified timestamp. */
public Builder setCreatedGte(Instant createdGte) {
this.createdGte = createdGte;
return this;
}

/** Filter for events created before the specified timestamp. */
public Builder setCreatedLt(Instant createdLt) {
this.createdLt = createdLt;
return this;
}

/** Filter for events created at or before the specified timestamp. */
public Builder setCreatedLte(Instant createdLte) {
this.createdLte = createdLte;
return this;
}

/**
* Filter events based on whether they were successfully delivered to all subscribed event
* destinations. If false, events which are still pending or have failed all delivery attempts
* to a event destination will be returned.
*/
public Builder setDeliverySuccess(Boolean deliverySuccess) {
this.deliverySuccess = deliverySuccess;
return this;
return new EventListParams(this.extraParams, this.limit, this.objectId, this.page);
}

/**
Expand Down Expand Up @@ -179,7 +88,7 @@ public Builder setLimit(Integer limit) {
return this;
}

/** Primary object ID used to retrieve related events. */
/** <strong>Required.</strong> Primary object ID used to retrieve related events. */
public Builder setObjectId(String objectId) {
this.objectId = objectId;
return this;
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/com/stripe/service/v2/core/EventService.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ public StripeCollection<Event> list(EventListParams params) throws StripeExcepti
return list(params, (RequestOptions) null);
}
/** List events, going back up to 30 days. */
public StripeCollection<Event> list(RequestOptions options) throws StripeException {
return list((EventListParams) null, options);
}
/** List events, going back up to 30 days. */
public StripeCollection<Event> list() throws StripeException {
return list((EventListParams) null, (RequestOptions) null);
}
/** List events, going back up to 30 days. */
public StripeCollection<Event> list(EventListParams params, RequestOptions options)
throws StripeException {
String path = "/v2/core/events";
Expand Down

0 comments on commit 5383186

Please sign in to comment.