Skip to content

Commit 208cef8

Browse files
Update generated code for v2132 and
1 parent 20089d1 commit 208cef8

File tree

8 files changed

+336
-17
lines changed

8 files changed

+336
-17
lines changed

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
da57cbebb9d2476793b4d2b33cd1baf035a39595
1+
1307ab81356642fb1bf890524815d5cb6997a34d

src/main/java/com/stripe/model/v2/core/Event.java

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ public static class Reason extends StripeObject {
161161
@Setter
162162
@EqualsAndHashCode(callSuper = false)
163163
public static class Request extends StripeObject implements HasId {
164+
/** The client details that made the request. */
165+
@SerializedName("client")
166+
Client client;
167+
164168
/** ID of the API request that caused the event. */
165169
@Getter(onMethod_ = {@Override})
166170
@SerializedName("id")
@@ -169,6 +173,61 @@ public static class Request extends StripeObject implements HasId {
169173
/** The idempotency key transmitted during the request. */
170174
@SerializedName("idempotency_key")
171175
String idempotencyKey;
176+
177+
/** The client details that made the request. */
178+
@Getter
179+
@Setter
180+
@EqualsAndHashCode(callSuper = false)
181+
public static class Client extends StripeObject {
182+
/** API key that triggered the event. */
183+
@SerializedName("api_key")
184+
ApiKey apiKey;
185+
186+
/** Dashboard user that triggered the event. */
187+
@SerializedName("dashboard_user")
188+
DashboardUser dashboardUser;
189+
190+
/** Stripe action that triggered the event. */
191+
@SerializedName("stripe_action")
192+
Map<String, Object> stripeAction;
193+
194+
/**
195+
* The type of the client.
196+
*
197+
* <p>One of {@code api_key}, {@code dashboard_user}, or {@code stripe_action}.
198+
*/
199+
@SerializedName("type")
200+
String type;
201+
202+
/** API key that triggered the event. */
203+
@Getter
204+
@Setter
205+
@EqualsAndHashCode(callSuper = false)
206+
public static class ApiKey extends StripeObject implements HasId {
207+
/** The ID of the API key. */
208+
@Getter(onMethod_ = {@Override})
209+
@SerializedName("id")
210+
String id;
211+
}
212+
213+
/** Dashboard user that triggered the event. */
214+
@Getter
215+
@Setter
216+
@EqualsAndHashCode(callSuper = false)
217+
public static class DashboardUser extends StripeObject {
218+
/** The email of the dashboard user. */
219+
@SerializedName("email")
220+
String email;
221+
222+
/** The IP address of the user. */
223+
@SerializedName("ip_address")
224+
String ipAddress;
225+
226+
/** The machine identifier of the user. */
227+
@SerializedName("machine_identifier")
228+
String machineIdentifier;
229+
}
230+
}
172231
}
173232
}
174233
}

src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,18 @@ public class ReceivedCredit extends StripeObject implements HasId {
101101
@SerializedName("status_transitions")
102102
StatusTransitions statusTransitions;
103103

104+
/**
105+
* This object stores details about the stripe balance pay refund that resulted in the
106+
* ReceivedCredit. Present if {@code type} field value is {@code stripe_balance_payment}.
107+
*/
108+
@SerializedName("stripe_balance_payment")
109+
StripeBalancePayment stripeBalancePayment;
110+
104111
/**
105112
* Open Enum. The type of flow that caused the ReceivedCredit.
106113
*
107-
* <p>One of {@code balance_transfer}, {@code bank_transfer}, or {@code external_credit}.
114+
* <p>One of {@code balance_transfer}, {@code bank_transfer}, {@code external_credit}, or {@code
115+
* stripe_balance_payment}.
108116
*/
109117
@SerializedName("type")
110118
String type;
@@ -416,4 +424,17 @@ public static class StatusTransitions extends StripeObject {
416424
@SerializedName("succeeded_at")
417425
Instant succeededAt;
418426
}
427+
428+
/**
429+
* This object stores details about the stripe balance pay refund that resulted in the
430+
* ReceivedCredit. Present if {@code type} field value is {@code stripe_balance_payment}.
431+
*/
432+
@Getter
433+
@Setter
434+
@EqualsAndHashCode(callSuper = false)
435+
public static class StripeBalancePayment extends StripeObject {
436+
/** Statement descriptor for the Stripe Balance Payment. */
437+
@SerializedName("statement_descriptor")
438+
String statementDescriptor;
439+
}
419440
}

src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ public class ReceivedDebit extends StripeObject implements HasId {
1818
@SerializedName("amount")
1919
Amount amount;
2020

21+
/**
22+
* This object stores details about the balance transfer object that resulted in the
23+
* ReceivedDebit.
24+
*/
25+
@SerializedName("balance_transfer")
26+
BalanceTransfer balanceTransfer;
27+
2128
/**
2229
* This object stores details about the originating banking transaction that resulted in the
2330
* ReceivedDebit. Present if {@code type} field value is {@code bank_transfer}.
@@ -87,9 +94,16 @@ public class ReceivedDebit extends StripeObject implements HasId {
8794
StatusTransitions statusTransitions;
8895

8996
/**
90-
* Open Enum. The type of the ReceivedDebit.
97+
* This object stores details about the Stripe Balance Payment that resulted in the ReceivedDebit.
98+
*/
99+
@SerializedName("stripe_balance_payment")
100+
StripeBalancePayment stripeBalancePayment;
101+
102+
/**
103+
* Open enum, the type of the received debit.
91104
*
92-
* <p>One of {@code bank_transfer}, or {@code external_debit}.
105+
* <p>One of {@code balance_transfer}, {@code bank_transfer}, {@code external_debit}, or {@code
106+
* stripe_balance_payment}.
93107
*/
94108
@SerializedName("type")
95109
String type;
@@ -115,6 +129,27 @@ public static class Amount extends StripeObject {
115129
Long value;
116130
}
117131

132+
/**
133+
* This object stores details about the balance transfer object that resulted in the
134+
* ReceivedDebit.
135+
*/
136+
@Getter
137+
@Setter
138+
@EqualsAndHashCode(callSuper = false)
139+
public static class BalanceTransfer extends StripeObject {
140+
/** The ID of the topup object that originated the ReceivedDebit. */
141+
@SerializedName("topup")
142+
String topup;
143+
144+
/**
145+
* Open Enum. The type of balance transfer that originated the ReceivedDebit.
146+
*
147+
* <p>Equal to {@code topup}.
148+
*/
149+
@SerializedName("type")
150+
String type;
151+
}
152+
118153
/**
119154
* This object stores details about the originating banking transaction that resulted in the
120155
* ReceivedDebit. Present if {@code type} field value is {@code bank_transfer}.
@@ -254,4 +289,20 @@ public static class StatusTransitions extends StripeObject {
254289
@SerializedName("succeeded_at")
255290
Instant succeededAt;
256291
}
292+
293+
/**
294+
* This object stores details about the Stripe Balance Payment that resulted in the ReceivedDebit.
295+
*/
296+
@Getter
297+
@Setter
298+
@EqualsAndHashCode(callSuper = false)
299+
public static class StripeBalancePayment extends StripeObject {
300+
/** ID of the debit agreement associated with this payment. */
301+
@SerializedName("debit_agreement")
302+
String debitAgreement;
303+
304+
/** Statement descriptor for the Stripe Balance Payment. */
305+
@SerializedName("statement_descriptor")
306+
String statementDescriptor;
307+
}
257308
}

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

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ public class EventListParams extends ApiRequestParams {
2727
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2828
Map<String, Object> extraParams;
2929

30+
/** Additional fields to include in the response. */
31+
@SerializedName("include")
32+
List<EventListParams.Include> include;
33+
3034
/** The page size. */
3135
@SerializedName("limit")
3236
Long limit;
@@ -42,11 +46,13 @@ public class EventListParams extends ApiRequestParams {
4246
private EventListParams(
4347
Created created,
4448
Map<String, Object> extraParams,
49+
List<EventListParams.Include> include,
4550
Long limit,
4651
String objectId,
4752
List<String> types) {
4853
this.created = created;
4954
this.extraParams = extraParams;
55+
this.include = include;
5056
this.limit = limit;
5157
this.objectId = objectId;
5258
this.types = types;
@@ -61,6 +67,8 @@ public static class Builder {
6167

6268
private Map<String, Object> extraParams;
6369

70+
private List<EventListParams.Include> include;
71+
6472
private Long limit;
6573

6674
private String objectId;
@@ -70,7 +78,7 @@ public static class Builder {
7078
/** Finalize and obtain parameter instance from this builder. */
7179
public EventListParams build() {
7280
return new EventListParams(
73-
this.created, this.extraParams, this.limit, this.objectId, this.types);
81+
this.created, this.extraParams, this.include, this.limit, this.objectId, this.types);
7482
}
7583

7684
/** Set of filters to query events within a range of {@code created} timestamps. */
@@ -105,6 +113,32 @@ public Builder putAllExtraParam(Map<String, Object> map) {
105113
return this;
106114
}
107115

116+
/**
117+
* Add an element to `include` list. A list is initialized for the first `add/addAll` call, and
118+
* subsequent calls adds additional elements to the original list. See {@link
119+
* EventListParams#include} for the field documentation.
120+
*/
121+
public Builder addInclude(EventListParams.Include element) {
122+
if (this.include == null) {
123+
this.include = new ArrayList<>();
124+
}
125+
this.include.add(element);
126+
return this;
127+
}
128+
129+
/**
130+
* Add all elements to `include` list. A list is initialized for the first `add/addAll` call,
131+
* and subsequent calls adds additional elements to the original list. See {@link
132+
* EventListParams#include} for the field documentation.
133+
*/
134+
public Builder addAllInclude(List<EventListParams.Include> elements) {
135+
if (this.include == null) {
136+
this.include = new ArrayList<>();
137+
}
138+
this.include.addAll(elements);
139+
return this;
140+
}
141+
108142
/** The page size. */
109143
public Builder setLimit(Long limit) {
110144
this.limit = limit;
@@ -252,4 +286,16 @@ public Builder setLte(Instant lte) {
252286
}
253287
}
254288
}
289+
290+
public enum Include implements ApiRequestParams.EnumParam {
291+
@SerializedName("reason.request.client")
292+
REASON__REQUEST__CLIENT("reason.request.client");
293+
294+
@Getter(onMethod_ = {@Override})
295+
private final String value;
296+
297+
Include(String value) {
298+
this.value = value;
299+
}
300+
}
255301
}

0 commit comments

Comments
 (0)