Skip to content

Commit c5f1ad0

Browse files
Update generated code for v2110 and
1 parent ad70d81 commit c5f1ad0

File tree

8 files changed

+320
-2
lines changed

8 files changed

+320
-2
lines changed

API_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
07c094f7c1f64823539941252667a6620cc6bb44
1+
a9b4d5059aeb24192ebc26c24160bb6e495bd6cb

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2109
1+
v2110

src/main/java/com/stripe/model/Charge.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
@Setter
3232
@EqualsAndHashCode(callSuper = false)
3333
public class Charge extends ApiResource implements MetadataStore<Charge>, BalanceTransactionSource {
34+
/** Funds that are in transit and destined for another balance or another connected account. */
35+
@SerializedName("allocated_funds")
36+
TransitBalance allocatedFunds;
37+
3438
/**
3539
* Amount intended to be collected by this payment. A positive integer representing how much to
3640
* charge in the <a href="https://stripe.com/docs/currencies#zero-decimal">smallest currency
@@ -4383,6 +4387,7 @@ public void setDestinationObject(Account expandableObject) {
43834387
@Override
43844388
public void setResponseGetter(StripeResponseGetter responseGetter) {
43854389
super.setResponseGetter(responseGetter);
4390+
trySetResponseGetter(allocatedFunds, responseGetter);
43864391
trySetResponseGetter(application, responseGetter);
43874392
trySetResponseGetter(applicationFee, responseGetter);
43884393
trySetResponseGetter(balanceTransaction, responseGetter);

src/main/java/com/stripe/model/EventDataClassLookup.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ public final class EventDataClassLookup {
108108
classLookup.put("topup", com.stripe.model.Topup.class);
109109
classLookup.put("transfer", com.stripe.model.Transfer.class);
110110
classLookup.put("transfer_reversal", com.stripe.model.TransferReversal.class);
111+
classLookup.put("transit_balance", com.stripe.model.TransitBalance.class);
111112
classLookup.put("webhook_endpoint", com.stripe.model.WebhookEndpoint.class);
112113

113114
classLookup.put("apps.secret", com.stripe.model.apps.Secret.class);
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// File generated from our OpenAPI spec
2+
package com.stripe.model;
3+
4+
import com.google.gson.annotations.SerializedName;
5+
import lombok.EqualsAndHashCode;
6+
import lombok.Getter;
7+
import lombok.Setter;
8+
9+
/** Funds that are in transit and destined for another balance or another connected account. */
10+
@Getter
11+
@Setter
12+
@EqualsAndHashCode(callSuper = false)
13+
public class TransitBalance extends StripeObject {
14+
@SerializedName("balance")
15+
Balance balance;
16+
17+
/** Time at which the object was created. Measured in seconds since the Unix epoch. */
18+
@SerializedName("created")
19+
Long created;
20+
21+
/**
22+
* Three-letter <a href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code</a>,
23+
* in lowercase. Must be a <a href="https://stripe.com/docs/currencies">supported currency</a>.
24+
*/
25+
@SerializedName("currency")
26+
String currency;
27+
28+
/**
29+
* Has the value {@code true} if the object exists in live mode or the value {@code false} if the
30+
* object exists in test mode.
31+
*/
32+
@SerializedName("livemode")
33+
Boolean livemode;
34+
35+
/**
36+
* String representing the object's type. Objects of the same type share the same value.
37+
*
38+
* <p>Equal to {@code transit_balance}.
39+
*/
40+
@SerializedName("object")
41+
String object;
42+
43+
/**
44+
* For more details about Balance, please refer to the <a href="https://docs.stripe.com/api">API
45+
* Reference.</a>
46+
*/
47+
@Getter
48+
@Setter
49+
@EqualsAndHashCode(callSuper = false)
50+
public static class Balance extends StripeObject {
51+
@SerializedName("available")
52+
Long available;
53+
54+
@SerializedName("pending")
55+
Long pending;
56+
}
57+
}

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

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
@Getter
1515
@EqualsAndHashCode(callSuper = false)
1616
public class PaymentIntentConfirmParams extends ApiRequestParams {
17+
/** Allocated Funds configuration for this PaymentIntent. */
18+
@SerializedName("allocated_funds")
19+
AllocatedFunds allocatedFunds;
20+
1721
/** Provides industry-specific information about the amount. */
1822
@SerializedName("amount_details")
1923
Object amountDetails;
@@ -194,6 +198,7 @@ public class PaymentIntentConfirmParams extends ApiRequestParams {
194198
Boolean useStripeSdk;
195199

196200
private PaymentIntentConfirmParams(
201+
AllocatedFunds allocatedFunds,
197202
Object amountDetails,
198203
Object applicationFeeAmount,
199204
CaptureMethod captureMethod,
@@ -218,6 +223,7 @@ private PaymentIntentConfirmParams(
218223
ApiRequestParams.EnumParam setupFutureUsage,
219224
Object shipping,
220225
Boolean useStripeSdk) {
226+
this.allocatedFunds = allocatedFunds;
221227
this.amountDetails = amountDetails;
222228
this.applicationFeeAmount = applicationFeeAmount;
223229
this.captureMethod = captureMethod;
@@ -249,6 +255,8 @@ public static Builder builder() {
249255
}
250256

251257
public static class Builder {
258+
private AllocatedFunds allocatedFunds;
259+
252260
private Object amountDetails;
253261

254262
private Object applicationFeeAmount;
@@ -300,6 +308,7 @@ public static class Builder {
300308
/** Finalize and obtain parameter instance from this builder. */
301309
public PaymentIntentConfirmParams build() {
302310
return new PaymentIntentConfirmParams(
311+
this.allocatedFunds,
303312
this.amountDetails,
304313
this.applicationFeeAmount,
305314
this.captureMethod,
@@ -326,6 +335,12 @@ public PaymentIntentConfirmParams build() {
326335
this.useStripeSdk);
327336
}
328337

338+
/** Allocated Funds configuration for this PaymentIntent. */
339+
public Builder setAllocatedFunds(PaymentIntentConfirmParams.AllocatedFunds allocatedFunds) {
340+
this.allocatedFunds = allocatedFunds;
341+
return this;
342+
}
343+
329344
/** Provides industry-specific information about the amount. */
330345
public Builder setAmountDetails(PaymentIntentConfirmParams.AmountDetails amountDetails) {
331346
this.amountDetails = amountDetails;
@@ -735,6 +750,76 @@ public Builder setUseStripeSdk(Boolean useStripeSdk) {
735750
}
736751
}
737752

753+
@Getter
754+
@EqualsAndHashCode(callSuper = false)
755+
public static class AllocatedFunds {
756+
/** Whether Allocated Funds creation is enabled for this PaymentIntent. */
757+
@SerializedName("enabled")
758+
Boolean enabled;
759+
760+
/**
761+
* Map of extra parameters for custom features not available in this client library. The content
762+
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
763+
* key/value pair is serialized as if the key is a root-level field (serialized) name in this
764+
* param object. Effectively, this map is flattened to its parent instance.
765+
*/
766+
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
767+
Map<String, Object> extraParams;
768+
769+
private AllocatedFunds(Boolean enabled, Map<String, Object> extraParams) {
770+
this.enabled = enabled;
771+
this.extraParams = extraParams;
772+
}
773+
774+
public static Builder builder() {
775+
return new Builder();
776+
}
777+
778+
public static class Builder {
779+
private Boolean enabled;
780+
781+
private Map<String, Object> extraParams;
782+
783+
/** Finalize and obtain parameter instance from this builder. */
784+
public PaymentIntentConfirmParams.AllocatedFunds build() {
785+
return new PaymentIntentConfirmParams.AllocatedFunds(this.enabled, this.extraParams);
786+
}
787+
788+
/** Whether Allocated Funds creation is enabled for this PaymentIntent. */
789+
public Builder setEnabled(Boolean enabled) {
790+
this.enabled = enabled;
791+
return this;
792+
}
793+
794+
/**
795+
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
796+
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
797+
* PaymentIntentConfirmParams.AllocatedFunds#extraParams} for the field documentation.
798+
*/
799+
public Builder putExtraParam(String key, Object value) {
800+
if (this.extraParams == null) {
801+
this.extraParams = new HashMap<>();
802+
}
803+
this.extraParams.put(key, value);
804+
return this;
805+
}
806+
807+
/**
808+
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
809+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
810+
* See {@link PaymentIntentConfirmParams.AllocatedFunds#extraParams} for the field
811+
* documentation.
812+
*/
813+
public Builder putAllExtraParam(Map<String, Object> map) {
814+
if (this.extraParams == null) {
815+
this.extraParams = new HashMap<>();
816+
}
817+
this.extraParams.putAll(map);
818+
return this;
819+
}
820+
}
821+
}
822+
738823
@Getter
739824
@EqualsAndHashCode(callSuper = false)
740825
public static class AmountDetails {

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

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
@Getter
1515
@EqualsAndHashCode(callSuper = false)
1616
public class PaymentIntentCreateParams extends ApiRequestParams {
17+
/** Allocated Funds configuration for this PaymentIntent. */
18+
@SerializedName("allocated_funds")
19+
AllocatedFunds allocatedFunds;
20+
1721
/**
1822
* <strong>Required.</strong> Amount intended to be collected by this PaymentIntent. A positive
1923
* integer representing how much to charge in the <a
@@ -361,6 +365,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams {
361365
Boolean useStripeSdk;
362366

363367
private PaymentIntentCreateParams(
368+
AllocatedFunds allocatedFunds,
364369
Long amount,
365370
AmountDetails amountDetails,
366371
Long applicationFeeAmount,
@@ -401,6 +406,7 @@ private PaymentIntentCreateParams(
401406
TransferData transferData,
402407
String transferGroup,
403408
Boolean useStripeSdk) {
409+
this.allocatedFunds = allocatedFunds;
404410
this.amount = amount;
405411
this.amountDetails = amountDetails;
406412
this.applicationFeeAmount = applicationFeeAmount;
@@ -448,6 +454,8 @@ public static Builder builder() {
448454
}
449455

450456
public static class Builder {
457+
private AllocatedFunds allocatedFunds;
458+
451459
private Long amount;
452460

453461
private AmountDetails amountDetails;
@@ -531,6 +539,7 @@ public static class Builder {
531539
/** Finalize and obtain parameter instance from this builder. */
532540
public PaymentIntentCreateParams build() {
533541
return new PaymentIntentCreateParams(
542+
this.allocatedFunds,
534543
this.amount,
535544
this.amountDetails,
536545
this.applicationFeeAmount,
@@ -573,6 +582,12 @@ public PaymentIntentCreateParams build() {
573582
this.useStripeSdk);
574583
}
575584

585+
/** Allocated Funds configuration for this PaymentIntent. */
586+
public Builder setAllocatedFunds(PaymentIntentCreateParams.AllocatedFunds allocatedFunds) {
587+
this.allocatedFunds = allocatedFunds;
588+
return this;
589+
}
590+
576591
/**
577592
* <strong>Required.</strong> Amount intended to be collected by this PaymentIntent. A positive
578593
* integer representing how much to charge in the <a
@@ -1120,6 +1135,76 @@ public Builder setUseStripeSdk(Boolean useStripeSdk) {
11201135
}
11211136
}
11221137

1138+
@Getter
1139+
@EqualsAndHashCode(callSuper = false)
1140+
public static class AllocatedFunds {
1141+
/** Whether Allocated Funds creation is enabled for this PaymentIntent. */
1142+
@SerializedName("enabled")
1143+
Boolean enabled;
1144+
1145+
/**
1146+
* Map of extra parameters for custom features not available in this client library. The content
1147+
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1148+
* key/value pair is serialized as if the key is a root-level field (serialized) name in this
1149+
* param object. Effectively, this map is flattened to its parent instance.
1150+
*/
1151+
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1152+
Map<String, Object> extraParams;
1153+
1154+
private AllocatedFunds(Boolean enabled, Map<String, Object> extraParams) {
1155+
this.enabled = enabled;
1156+
this.extraParams = extraParams;
1157+
}
1158+
1159+
public static Builder builder() {
1160+
return new Builder();
1161+
}
1162+
1163+
public static class Builder {
1164+
private Boolean enabled;
1165+
1166+
private Map<String, Object> extraParams;
1167+
1168+
/** Finalize and obtain parameter instance from this builder. */
1169+
public PaymentIntentCreateParams.AllocatedFunds build() {
1170+
return new PaymentIntentCreateParams.AllocatedFunds(this.enabled, this.extraParams);
1171+
}
1172+
1173+
/** Whether Allocated Funds creation is enabled for this PaymentIntent. */
1174+
public Builder setEnabled(Boolean enabled) {
1175+
this.enabled = enabled;
1176+
return this;
1177+
}
1178+
1179+
/**
1180+
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1181+
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
1182+
* PaymentIntentCreateParams.AllocatedFunds#extraParams} for the field documentation.
1183+
*/
1184+
public Builder putExtraParam(String key, Object value) {
1185+
if (this.extraParams == null) {
1186+
this.extraParams = new HashMap<>();
1187+
}
1188+
this.extraParams.put(key, value);
1189+
return this;
1190+
}
1191+
1192+
/**
1193+
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1194+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1195+
* See {@link PaymentIntentCreateParams.AllocatedFunds#extraParams} for the field
1196+
* documentation.
1197+
*/
1198+
public Builder putAllExtraParam(Map<String, Object> map) {
1199+
if (this.extraParams == null) {
1200+
this.extraParams = new HashMap<>();
1201+
}
1202+
this.extraParams.putAll(map);
1203+
return this;
1204+
}
1205+
}
1206+
}
1207+
11231208
@Getter
11241209
@EqualsAndHashCode(callSuper = false)
11251210
public static class AmountDetails {

0 commit comments

Comments
 (0)