Skip to content

Commit b60d575

Browse files
Update generated code for v2262 and
1 parent e0ba17c commit b60d575

8 files changed

Lines changed: 418 additions & 18 deletions

File tree

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6a1eb046657923602071d7707e99ce8a004a8216
1+
f6277c5b9c4dae4c92fd7ed4943a368df7ac9b05

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2261
1+
v2262

src/main/java/com/stripe/model/issuing/Dispute.java

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import com.stripe.param.issuing.DisputeCreateParams;
1919
import com.stripe.param.issuing.DisputeListParams;
2020
import com.stripe.param.issuing.DisputeRetrieveParams;
21+
import com.stripe.param.issuing.DisputeSimulateNetworkLifecycleDisputeResponseParams;
2122
import com.stripe.param.issuing.DisputeSimulateNetworkLifecyclePreArbitrationResponseParams;
2223
import com.stripe.param.issuing.DisputeSimulateNetworkLifecyclePreArbitrationSubmissionParams;
2324
import com.stripe.param.issuing.DisputeSubmitParams;
@@ -1296,6 +1297,61 @@ private TestHelpers(Dispute resource) {
12961297
this.resource = resource;
12971298
}
12981299

1300+
/**
1301+
* Test helper: populates {@code network_lifecycle.dispute_response} on a test-mode Visa Issuing
1302+
* Dispute using placeholder file tokens. Only supported for Visa disputes.
1303+
*/
1304+
public Dispute simulateNetworkLifecycleDisputeResponse(Map<String, Object> params)
1305+
throws StripeException {
1306+
return simulateNetworkLifecycleDisputeResponse(params, (RequestOptions) null);
1307+
}
1308+
1309+
/**
1310+
* Test helper: populates {@code network_lifecycle.dispute_response} on a test-mode Visa Issuing
1311+
* Dispute using placeholder file tokens. Only supported for Visa disputes.
1312+
*/
1313+
public Dispute simulateNetworkLifecycleDisputeResponse(
1314+
Map<String, Object> params, RequestOptions options) throws StripeException {
1315+
String path =
1316+
String.format(
1317+
"/v1/test_helpers/issuing/disputes/%s/simulate_network_lifecycle_dispute_response",
1318+
ApiResource.urlEncodeId(this.resource.getId()));
1319+
ApiRequest request =
1320+
new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options);
1321+
return resource.getResponseGetter().request(request, Dispute.class);
1322+
}
1323+
1324+
/**
1325+
* Test helper: populates {@code network_lifecycle.dispute_response} on a test-mode Visa Issuing
1326+
* Dispute using placeholder file tokens. Only supported for Visa disputes.
1327+
*/
1328+
public Dispute simulateNetworkLifecycleDisputeResponse(
1329+
DisputeSimulateNetworkLifecycleDisputeResponseParams params) throws StripeException {
1330+
return simulateNetworkLifecycleDisputeResponse(params, (RequestOptions) null);
1331+
}
1332+
1333+
/**
1334+
* Test helper: populates {@code network_lifecycle.dispute_response} on a test-mode Visa Issuing
1335+
* Dispute using placeholder file tokens. Only supported for Visa disputes.
1336+
*/
1337+
public Dispute simulateNetworkLifecycleDisputeResponse(
1338+
DisputeSimulateNetworkLifecycleDisputeResponseParams params, RequestOptions options)
1339+
throws StripeException {
1340+
String path =
1341+
String.format(
1342+
"/v1/test_helpers/issuing/disputes/%s/simulate_network_lifecycle_dispute_response",
1343+
ApiResource.urlEncodeId(this.resource.getId()));
1344+
ApiResource.checkNullTypedParams(path, params);
1345+
ApiRequest request =
1346+
new ApiRequest(
1347+
BaseAddress.API,
1348+
ApiResource.RequestMethod.POST,
1349+
path,
1350+
ApiRequestParams.paramsToMap(params),
1351+
options);
1352+
return resource.getResponseGetter().request(request, Dispute.class);
1353+
}
1354+
12991355
/**
13001356
* Test helper: populates {@code network_lifecycle.pre_arbitration_response} on a test-mode Visa
13011357
* Issuing Dispute using placeholder file tokens. Only supported for Visa disputes in the

src/main/java/com/stripe/param/PaymentAttemptRecordReportCanceledParams.java

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,21 @@ public class PaymentAttemptRecordReportCanceledParams extends ApiRequestParams {
4040
@SerializedName("metadata")
4141
Object metadata;
4242

43+
/** Payment evaluations associated with this reported payment. */
44+
@SerializedName("payment_evaluations")
45+
List<String> paymentEvaluations;
46+
4347
private PaymentAttemptRecordReportCanceledParams(
44-
Long canceledAt, List<String> expand, Map<String, Object> extraParams, Object metadata) {
48+
Long canceledAt,
49+
List<String> expand,
50+
Map<String, Object> extraParams,
51+
Object metadata,
52+
List<String> paymentEvaluations) {
4553
this.canceledAt = canceledAt;
4654
this.expand = expand;
4755
this.extraParams = extraParams;
4856
this.metadata = metadata;
57+
this.paymentEvaluations = paymentEvaluations;
4958
}
5059

5160
public static Builder builder() {
@@ -61,10 +70,12 @@ public static class Builder {
6170

6271
private Object metadata;
6372

73+
private List<String> paymentEvaluations;
74+
6475
/** Finalize and obtain parameter instance from this builder. */
6576
public PaymentAttemptRecordReportCanceledParams build() {
6677
return new PaymentAttemptRecordReportCanceledParams(
67-
this.canceledAt, this.expand, this.extraParams, this.metadata);
78+
this.canceledAt, this.expand, this.extraParams, this.metadata, this.paymentEvaluations);
6879
}
6980

7081
/** When the reported payment was canceled. Measured in seconds since the Unix epoch. */
@@ -174,5 +185,32 @@ public Builder setMetadata(Map<String, String> metadata) {
174185
this.metadata = metadata;
175186
return this;
176187
}
188+
189+
/**
190+
* Add an element to `paymentEvaluations` list. A list is initialized for the first `add/addAll`
191+
* call, and subsequent calls adds additional elements to the original list. See {@link
192+
* PaymentAttemptRecordReportCanceledParams#paymentEvaluations} for the field documentation.
193+
*/
194+
public Builder addPaymentEvaluation(String element) {
195+
if (this.paymentEvaluations == null) {
196+
this.paymentEvaluations = new ArrayList<>();
197+
}
198+
this.paymentEvaluations.add(element);
199+
return this;
200+
}
201+
202+
/**
203+
* Add all elements to `paymentEvaluations` list. A list is initialized for the first
204+
* `add/addAll` call, and subsequent calls adds additional elements to the original list. See
205+
* {@link PaymentAttemptRecordReportCanceledParams#paymentEvaluations} for the field
206+
* documentation.
207+
*/
208+
public Builder addAllPaymentEvaluation(List<String> elements) {
209+
if (this.paymentEvaluations == null) {
210+
this.paymentEvaluations = new ArrayList<>();
211+
}
212+
this.paymentEvaluations.addAll(elements);
213+
return this;
214+
}
177215
}
178216
}

src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,21 @@ public class PaymentRecordReportPaymentAttemptCanceledParams extends ApiRequestP
4040
@SerializedName("metadata")
4141
Object metadata;
4242

43+
/** Payment evaluations associated with this reported payment. */
44+
@SerializedName("payment_evaluations")
45+
List<String> paymentEvaluations;
46+
4347
private PaymentRecordReportPaymentAttemptCanceledParams(
44-
Long canceledAt, List<String> expand, Map<String, Object> extraParams, Object metadata) {
48+
Long canceledAt,
49+
List<String> expand,
50+
Map<String, Object> extraParams,
51+
Object metadata,
52+
List<String> paymentEvaluations) {
4553
this.canceledAt = canceledAt;
4654
this.expand = expand;
4755
this.extraParams = extraParams;
4856
this.metadata = metadata;
57+
this.paymentEvaluations = paymentEvaluations;
4958
}
5059

5160
public static Builder builder() {
@@ -61,10 +70,12 @@ public static class Builder {
6170

6271
private Object metadata;
6372

73+
private List<String> paymentEvaluations;
74+
6475
/** Finalize and obtain parameter instance from this builder. */
6576
public PaymentRecordReportPaymentAttemptCanceledParams build() {
6677
return new PaymentRecordReportPaymentAttemptCanceledParams(
67-
this.canceledAt, this.expand, this.extraParams, this.metadata);
78+
this.canceledAt, this.expand, this.extraParams, this.metadata, this.paymentEvaluations);
6879
}
6980

7081
/** When the reported payment was canceled. Measured in seconds since the Unix epoch. */
@@ -176,5 +187,33 @@ public Builder setMetadata(Map<String, String> metadata) {
176187
this.metadata = metadata;
177188
return this;
178189
}
190+
191+
/**
192+
* Add an element to `paymentEvaluations` list. A list is initialized for the first `add/addAll`
193+
* call, and subsequent calls adds additional elements to the original list. See {@link
194+
* PaymentRecordReportPaymentAttemptCanceledParams#paymentEvaluations} for the field
195+
* documentation.
196+
*/
197+
public Builder addPaymentEvaluation(String element) {
198+
if (this.paymentEvaluations == null) {
199+
this.paymentEvaluations = new ArrayList<>();
200+
}
201+
this.paymentEvaluations.add(element);
202+
return this;
203+
}
204+
205+
/**
206+
* Add all elements to `paymentEvaluations` list. A list is initialized for the first
207+
* `add/addAll` call, and subsequent calls adds additional elements to the original list. See
208+
* {@link PaymentRecordReportPaymentAttemptCanceledParams#paymentEvaluations} for the field
209+
* documentation.
210+
*/
211+
public Builder addAllPaymentEvaluation(List<String> elements) {
212+
if (this.paymentEvaluations == null) {
213+
this.paymentEvaluations = new ArrayList<>();
214+
}
215+
this.paymentEvaluations.addAll(elements);
216+
return this;
217+
}
179218
}
180219
}

src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
@Getter
1515
@EqualsAndHashCode(callSuper = false)
1616
public class RequestedSessionUpdateParams extends ApiRequestParams {
17-
/** The discount codes to apply to this requested session. */
17+
/**
18+
* The discount codes to apply to this requested session. Pass an empty value to remove all
19+
* applied discounts.
20+
*/
1821
@SerializedName("discounts")
1922
Discounts discounts;
2023

@@ -113,7 +116,10 @@ public RequestedSessionUpdateParams build() {
113116
this.sharedMetadata);
114117
}
115118

116-
/** The discount codes to apply to this requested session. */
119+
/**
120+
* The discount codes to apply to this requested session. Pass an empty value to remove all
121+
* applied discounts.
122+
*/
117123
public Builder setDiscounts(RequestedSessionUpdateParams.Discounts discounts) {
118124
this.discounts = discounts;
119125
return this;
@@ -308,9 +314,12 @@ public Builder setSharedMetadata(Map<String, String> sharedMetadata) {
308314
@Getter
309315
@EqualsAndHashCode(callSuper = false)
310316
public static class Discounts {
311-
/** <strong>Required.</strong> Array of discount codes to apply. */
317+
/**
318+
* <strong>Required.</strong> Array of discount codes to apply. Pass an empty value to remove
319+
* all applied discounts.
320+
*/
312321
@SerializedName("codes")
313-
List<String> codes;
322+
Object codes;
314323

315324
/**
316325
* Whether to enforce strict eligibility for discount codes. Defaults to true. When false,
@@ -329,7 +338,7 @@ public static class Discounts {
329338
Map<String, Object> extraParams;
330339

331340
private Discounts(
332-
List<String> codes, Boolean enforceStrictEligibility, Map<String, Object> extraParams) {
341+
Object codes, Boolean enforceStrictEligibility, Map<String, Object> extraParams) {
333342
this.codes = codes;
334343
this.enforceStrictEligibility = enforceStrictEligibility;
335344
this.extraParams = extraParams;
@@ -340,7 +349,7 @@ public static Builder builder() {
340349
}
341350

342351
public static class Builder {
343-
private List<String> codes;
352+
private Object codes;
344353

345354
private Boolean enforceStrictEligibility;
346355

@@ -357,11 +366,12 @@ public RequestedSessionUpdateParams.Discounts build() {
357366
* subsequent calls adds additional elements to the original list. See {@link
358367
* RequestedSessionUpdateParams.Discounts#codes} for the field documentation.
359368
*/
369+
@SuppressWarnings("unchecked")
360370
public Builder addCode(String element) {
361-
if (this.codes == null) {
362-
this.codes = new ArrayList<>();
371+
if (this.codes == null || this.codes instanceof EmptyParam) {
372+
this.codes = new ArrayList<String>();
363373
}
364-
this.codes.add(element);
374+
((List<String>) this.codes).add(element);
365375
return this;
366376
}
367377

@@ -370,11 +380,30 @@ public Builder addCode(String element) {
370380
* and subsequent calls adds additional elements to the original list. See {@link
371381
* RequestedSessionUpdateParams.Discounts#codes} for the field documentation.
372382
*/
383+
@SuppressWarnings("unchecked")
373384
public Builder addAllCode(List<String> elements) {
374-
if (this.codes == null) {
375-
this.codes = new ArrayList<>();
385+
if (this.codes == null || this.codes instanceof EmptyParam) {
386+
this.codes = new ArrayList<String>();
376387
}
377-
this.codes.addAll(elements);
388+
((List<String>) this.codes).addAll(elements);
389+
return this;
390+
}
391+
392+
/**
393+
* <strong>Required.</strong> Array of discount codes to apply. Pass an empty value to remove
394+
* all applied discounts.
395+
*/
396+
public Builder setCodes(EmptyParam codes) {
397+
this.codes = codes;
398+
return this;
399+
}
400+
401+
/**
402+
* <strong>Required.</strong> Array of discount codes to apply. Pass an empty value to remove
403+
* all applied discounts.
404+
*/
405+
public Builder setCodes(List<String> codes) {
406+
this.codes = codes;
378407
return this;
379408
}
380409

0 commit comments

Comments
 (0)