Skip to content

Commit 3eb6e7e

Browse files
Update generated code for v2200 and
1 parent f9762e4 commit 3eb6e7e

File tree

6 files changed

+550
-2
lines changed

6 files changed

+550
-2
lines changed

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2909a9f94e3392db0c39d4c1c776fe1d4977caab
1+
adcc4a45af6a5ca7926677971ce60771f7803c14

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2198
1+
v2200

src/main/java/com/stripe/model/radar/CustomerEvaluation.java

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
import com.stripe.net.RequestOptions;
1313
import com.stripe.net.StripeResponseGetter;
1414
import com.stripe.param.radar.CustomerEvaluationCreateParams;
15+
import com.stripe.param.radar.CustomerEvaluationUpdateParams;
1516
import java.math.BigDecimal;
17+
import java.util.List;
1618
import java.util.Map;
1719
import lombok.EqualsAndHashCode;
1820
import lombok.Getter;
@@ -35,6 +37,10 @@ public class CustomerEvaluation extends ApiResource implements HasId {
3537
@SerializedName("event_type")
3638
String eventType;
3739

40+
/** A list of events that have been reported on this customer evaluation. */
41+
@SerializedName("events")
42+
List<CustomerEvaluation.Event> events;
43+
3844
/** Unique identifier for the object. */
3945
@Getter(onMethod_ = {@Override})
4046
@SerializedName("id")
@@ -94,6 +100,86 @@ public static CustomerEvaluation create(
94100
return getGlobalResponseGetter().request(request, CustomerEvaluation.class);
95101
}
96102

103+
/** Reports an event on a {@code CustomerEvaluation} object. */
104+
public CustomerEvaluation update(Map<String, Object> params) throws StripeException {
105+
return update(params, (RequestOptions) null);
106+
}
107+
108+
/** Reports an event on a {@code CustomerEvaluation} object. */
109+
public CustomerEvaluation update(Map<String, Object> params, RequestOptions options)
110+
throws StripeException {
111+
String path =
112+
String.format(
113+
"/v1/radar/customer_evaluations/%s/report", ApiResource.urlEncodeId(this.getId()));
114+
ApiRequest request =
115+
new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
116+
return getResponseGetter().request(request, CustomerEvaluation.class);
117+
}
118+
119+
/** Reports an event on a {@code CustomerEvaluation} object. */
120+
public CustomerEvaluation update(CustomerEvaluationUpdateParams params) throws StripeException {
121+
return update(params, (RequestOptions) null);
122+
}
123+
124+
/** Reports an event on a {@code CustomerEvaluation} object. */
125+
public CustomerEvaluation update(CustomerEvaluationUpdateParams params, RequestOptions options)
126+
throws StripeException {
127+
String path =
128+
String.format(
129+
"/v1/radar/customer_evaluations/%s/report", ApiResource.urlEncodeId(this.getId()));
130+
ApiResource.checkNullTypedParams(path, params);
131+
ApiRequest request =
132+
new ApiRequest(
133+
BaseAddress.API,
134+
ApiResource.RequestMethod.POST,
135+
path,
136+
ApiRequestParams.paramsToMap(params),
137+
options);
138+
return getResponseGetter().request(request, CustomerEvaluation.class);
139+
}
140+
141+
/** Event object representing an event reported for a Customer Evaluation via the report API. */
142+
@Getter
143+
@Setter
144+
@EqualsAndHashCode(callSuper = false)
145+
public static class Event extends StripeObject {
146+
/** Data about a failed login event. */
147+
@SerializedName("login_failed")
148+
LoginFailed loginFailed;
149+
150+
/** Time at which the event occurred. Measured in seconds since the Unix epoch. */
151+
@SerializedName("occurred_at")
152+
Long occurredAt;
153+
154+
/** Data about a failed registration event. */
155+
@SerializedName("registration_failed")
156+
RegistrationFailed registrationFailed;
157+
158+
/** The type of event that occurred. */
159+
@SerializedName("type")
160+
String type;
161+
162+
/** Data about a failed login event. */
163+
@Getter
164+
@Setter
165+
@EqualsAndHashCode(callSuper = false)
166+
public static class LoginFailed extends StripeObject {
167+
/** The reason why this login failed. */
168+
@SerializedName("reason")
169+
String reason;
170+
}
171+
172+
/** Data about a failed registration event. */
173+
@Getter
174+
@Setter
175+
@EqualsAndHashCode(callSuper = false)
176+
public static class RegistrationFailed extends StripeObject {
177+
/** The reason why this registration failed. */
178+
@SerializedName("reason")
179+
String reason;
180+
}
181+
}
182+
97183
/** Customer Evaluation Signals resource returned by the Radar Customer Evaluations API. */
98184
@Getter
99185
@Setter

src/main/java/com/stripe/param/radar/CustomerEvaluationCreateParams.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,9 @@ public enum Type implements ApiRequestParams.EnumParam {
542542
}
543543

544544
public enum EventType implements ApiRequestParams.EnumParam {
545+
@SerializedName("login")
546+
LOGIN("login"),
547+
545548
@SerializedName("registration")
546549
REGISTRATION("registration");
547550

0 commit comments

Comments
 (0)