Skip to content

Commit b052a51

Browse files
API Updates (#1182)
* Codegen for openapi 04fba1e
1 parent 77e8d9d commit b052a51

8 files changed

+1331
-10
lines changed

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

+9
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,15 @@ public static class BusinessProfile extends StripeObject {
622622
@Setter
623623
@EqualsAndHashCode(callSuper = false)
624624
public static class Capabilities extends StripeObject {
625+
/**
626+
* The status of the Afterpay Clearpay capability of the account, or whether the account can
627+
* directly process Afterpay Clearpay charges.
628+
*
629+
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
630+
*/
631+
@SerializedName("afterpay_clearpay_payments")
632+
String afterpayClearpayPayments;
633+
625634
/**
626635
* The status of the BECS Direct Debit (AU) payments capability of the account, or whether the
627636
* account can directly process BECS Direct Debit (AU) charges.

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

+74
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,9 @@ public class Invoice extends ApiResource implements HasId, MetadataStore<Invoice
360360
@Setter(lombok.AccessLevel.NONE)
361361
ExpandableField<PaymentIntent> paymentIntent;
362362

363+
@SerializedName("payment_settings")
364+
PaymentSettings paymentSettings;
365+
363366
/** End of the usage period during which invoice items were added to this invoice. */
364367
@SerializedName("period_end")
365368
Long periodEnd;
@@ -1430,6 +1433,77 @@ public void setDiscountObject(Discount expandableObject) {
14301433
}
14311434
}
14321435

1436+
@Getter
1437+
@Setter
1438+
@EqualsAndHashCode(callSuper = false)
1439+
public static class PaymentMethodOptions extends StripeObject {
1440+
/**
1441+
* If paying by {@code bancontact}, this sub-hash contains details about the Bancontact payment
1442+
* method options to pass to the invoice’s PaymentIntent.
1443+
*/
1444+
@SerializedName("bancontact")
1445+
Bancontact bancontact;
1446+
1447+
/**
1448+
* If paying by {@code card}, this sub-hash contains details about the Card payment method
1449+
* options to pass to the invoice’s PaymentIntent.
1450+
*/
1451+
@SerializedName("card")
1452+
Card card;
1453+
1454+
@Getter
1455+
@Setter
1456+
@EqualsAndHashCode(callSuper = false)
1457+
public static class Bancontact extends StripeObject {
1458+
/**
1459+
* Preferred language of the Bancontact authorization page that the customer is redirected to.
1460+
*
1461+
* <p>One of {@code de}, {@code en}, {@code fr}, or {@code nl}.
1462+
*/
1463+
@SerializedName("preferred_language")
1464+
String preferredLanguage;
1465+
}
1466+
1467+
@Getter
1468+
@Setter
1469+
@EqualsAndHashCode(callSuper = false)
1470+
public static class Card extends StripeObject {
1471+
/**
1472+
* We strongly recommend that you rely on our SCA Engine to automatically prompt your
1473+
* customers for authentication based on risk level and <a
1474+
* href="https://stripe.com/docs/strong-customer-authentication">other requirements</a>.
1475+
* However, if you wish to request 3D Secure based on logic from your own fraud engine,
1476+
* provide this option. Read our guide on <a
1477+
* href="https://stripe.com/docs/payments/3d-secure#manual-three-ds">manually requesting 3D
1478+
* Secure</a> for more information on how this configuration interacts with Radar and our SCA
1479+
* Engine.
1480+
*
1481+
* <p>One of {@code any}, or {@code automatic}.
1482+
*/
1483+
@SerializedName("request_three_d_secure")
1484+
String requestThreeDSecure;
1485+
}
1486+
}
1487+
1488+
@Getter
1489+
@Setter
1490+
@EqualsAndHashCode(callSuper = false)
1491+
public static class PaymentSettings extends StripeObject {
1492+
/** Payment-method-specific configuration to provide to the invoice’s PaymentIntent. */
1493+
@SerializedName("payment_method_options")
1494+
PaymentMethodOptions paymentMethodOptions;
1495+
1496+
/**
1497+
* The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If
1498+
* not set, Stripe attempts to automatically determine the types to use by looking at the
1499+
* invoice’s default payment method, the subscription’s default payment method, the customer’s
1500+
* default payment method, and your <a
1501+
* href="https://dashboard.stripe.com/settings/billing/invoice">invoice template settings</a>.
1502+
*/
1503+
@SerializedName("payment_method_types")
1504+
List<String> paymentMethodTypes;
1505+
}
1506+
14331507
@Getter
14341508
@Setter
14351509
@EqualsAndHashCode(callSuper = false)

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

+94
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,10 @@ public Builder setState(String state) {
818818

819819
@Getter
820820
public static class Capabilities {
821+
/** The afterpay_clearpay_payments capability. */
822+
@SerializedName("afterpay_clearpay_payments")
823+
AfterpayClearpayPayments afterpayClearpayPayments;
824+
821825
/** The au_becs_debit_payments capability. */
822826
@SerializedName("au_becs_debit_payments")
823827
AuBecsDebitPayments auBecsDebitPayments;
@@ -908,6 +912,7 @@ public static class Capabilities {
908912
Transfers transfers;
909913

910914
private Capabilities(
915+
AfterpayClearpayPayments afterpayClearpayPayments,
911916
AuBecsDebitPayments auBecsDebitPayments,
912917
BacsDebitPayments bacsDebitPayments,
913918
BancontactPayments bancontactPayments,
@@ -929,6 +934,7 @@ private Capabilities(
929934
TaxReportingUs1099K taxReportingUs1099K,
930935
TaxReportingUs1099Misc taxReportingUs1099Misc,
931936
Transfers transfers) {
937+
this.afterpayClearpayPayments = afterpayClearpayPayments;
932938
this.auBecsDebitPayments = auBecsDebitPayments;
933939
this.bacsDebitPayments = bacsDebitPayments;
934940
this.bancontactPayments = bancontactPayments;
@@ -957,6 +963,8 @@ public static Builder builder() {
957963
}
958964

959965
public static class Builder {
966+
private AfterpayClearpayPayments afterpayClearpayPayments;
967+
960968
private AuBecsDebitPayments auBecsDebitPayments;
961969

962970
private BacsDebitPayments bacsDebitPayments;
@@ -1002,6 +1010,7 @@ public static class Builder {
10021010
/** Finalize and obtain parameter instance from this builder. */
10031011
public Capabilities build() {
10041012
return new Capabilities(
1013+
this.afterpayClearpayPayments,
10051014
this.auBecsDebitPayments,
10061015
this.bacsDebitPayments,
10071016
this.bancontactPayments,
@@ -1025,6 +1034,13 @@ public Capabilities build() {
10251034
this.transfers);
10261035
}
10271036

1037+
/** The afterpay_clearpay_payments capability. */
1038+
public Builder setAfterpayClearpayPayments(
1039+
AfterpayClearpayPayments afterpayClearpayPayments) {
1040+
this.afterpayClearpayPayments = afterpayClearpayPayments;
1041+
return this;
1042+
}
1043+
10281044
/** The au_becs_debit_payments capability. */
10291045
public Builder setAuBecsDebitPayments(AuBecsDebitPayments auBecsDebitPayments) {
10301046
this.auBecsDebitPayments = auBecsDebitPayments;
@@ -1172,6 +1188,84 @@ public Builder setTransfers(Transfers transfers) {
11721188
}
11731189
}
11741190

1191+
@Getter
1192+
public static class AfterpayClearpayPayments {
1193+
/**
1194+
* Map of extra parameters for custom features not available in this client library. The
1195+
* content in this map is not serialized under this field's {@code @SerializedName} value.
1196+
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1197+
* name in this param object. Effectively, this map is flattened to its parent instance.
1198+
*/
1199+
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1200+
Map<String, Object> extraParams;
1201+
1202+
/**
1203+
* Passing true requests the capability for the account, if it is not already requested. A
1204+
* requested capability may not immediately become active. Any requirements to activate the
1205+
* capability are returned in the {@code requirements} arrays.
1206+
*/
1207+
@SerializedName("requested")
1208+
Boolean requested;
1209+
1210+
private AfterpayClearpayPayments(Map<String, Object> extraParams, Boolean requested) {
1211+
this.extraParams = extraParams;
1212+
this.requested = requested;
1213+
}
1214+
1215+
public static Builder builder() {
1216+
return new Builder();
1217+
}
1218+
1219+
public static class Builder {
1220+
private Map<String, Object> extraParams;
1221+
1222+
private Boolean requested;
1223+
1224+
/** Finalize and obtain parameter instance from this builder. */
1225+
public AfterpayClearpayPayments build() {
1226+
return new AfterpayClearpayPayments(this.extraParams, this.requested);
1227+
}
1228+
1229+
/**
1230+
* Add a key/value pair to `extraParams` map. A map is initialized for the first
1231+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1232+
* map. See {@link AccountCreateParams.Capabilities.AfterpayClearpayPayments#extraParams}
1233+
* for the field documentation.
1234+
*/
1235+
public Builder putExtraParam(String key, Object value) {
1236+
if (this.extraParams == null) {
1237+
this.extraParams = new HashMap<>();
1238+
}
1239+
this.extraParams.put(key, value);
1240+
return this;
1241+
}
1242+
1243+
/**
1244+
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1245+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1246+
* map. See {@link AccountCreateParams.Capabilities.AfterpayClearpayPayments#extraParams}
1247+
* for the field documentation.
1248+
*/
1249+
public Builder putAllExtraParam(Map<String, Object> map) {
1250+
if (this.extraParams == null) {
1251+
this.extraParams = new HashMap<>();
1252+
}
1253+
this.extraParams.putAll(map);
1254+
return this;
1255+
}
1256+
1257+
/**
1258+
* Passing true requests the capability for the account, if it is not already requested. A
1259+
* requested capability may not immediately become active. Any requirements to activate the
1260+
* capability are returned in the {@code requirements} arrays.
1261+
*/
1262+
public Builder setRequested(Boolean requested) {
1263+
this.requested = requested;
1264+
return this;
1265+
}
1266+
}
1267+
}
1268+
11751269
@Getter
11761270
public static class AuBecsDebitPayments {
11771271
/**

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

+94
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,10 @@ public Builder setState(EmptyParam state) {
911911

912912
@Getter
913913
public static class Capabilities {
914+
/** The afterpay_clearpay_payments capability. */
915+
@SerializedName("afterpay_clearpay_payments")
916+
AfterpayClearpayPayments afterpayClearpayPayments;
917+
914918
/** The au_becs_debit_payments capability. */
915919
@SerializedName("au_becs_debit_payments")
916920
AuBecsDebitPayments auBecsDebitPayments;
@@ -1001,6 +1005,7 @@ public static class Capabilities {
10011005
Transfers transfers;
10021006

10031007
private Capabilities(
1008+
AfterpayClearpayPayments afterpayClearpayPayments,
10041009
AuBecsDebitPayments auBecsDebitPayments,
10051010
BacsDebitPayments bacsDebitPayments,
10061011
BancontactPayments bancontactPayments,
@@ -1022,6 +1027,7 @@ private Capabilities(
10221027
TaxReportingUs1099K taxReportingUs1099K,
10231028
TaxReportingUs1099Misc taxReportingUs1099Misc,
10241029
Transfers transfers) {
1030+
this.afterpayClearpayPayments = afterpayClearpayPayments;
10251031
this.auBecsDebitPayments = auBecsDebitPayments;
10261032
this.bacsDebitPayments = bacsDebitPayments;
10271033
this.bancontactPayments = bancontactPayments;
@@ -1050,6 +1056,8 @@ public static Builder builder() {
10501056
}
10511057

10521058
public static class Builder {
1059+
private AfterpayClearpayPayments afterpayClearpayPayments;
1060+
10531061
private AuBecsDebitPayments auBecsDebitPayments;
10541062

10551063
private BacsDebitPayments bacsDebitPayments;
@@ -1095,6 +1103,7 @@ public static class Builder {
10951103
/** Finalize and obtain parameter instance from this builder. */
10961104
public Capabilities build() {
10971105
return new Capabilities(
1106+
this.afterpayClearpayPayments,
10981107
this.auBecsDebitPayments,
10991108
this.bacsDebitPayments,
11001109
this.bancontactPayments,
@@ -1118,6 +1127,13 @@ public Capabilities build() {
11181127
this.transfers);
11191128
}
11201129

1130+
/** The afterpay_clearpay_payments capability. */
1131+
public Builder setAfterpayClearpayPayments(
1132+
AfterpayClearpayPayments afterpayClearpayPayments) {
1133+
this.afterpayClearpayPayments = afterpayClearpayPayments;
1134+
return this;
1135+
}
1136+
11211137
/** The au_becs_debit_payments capability. */
11221138
public Builder setAuBecsDebitPayments(AuBecsDebitPayments auBecsDebitPayments) {
11231139
this.auBecsDebitPayments = auBecsDebitPayments;
@@ -1265,6 +1281,84 @@ public Builder setTransfers(Transfers transfers) {
12651281
}
12661282
}
12671283

1284+
@Getter
1285+
public static class AfterpayClearpayPayments {
1286+
/**
1287+
* Map of extra parameters for custom features not available in this client library. The
1288+
* content in this map is not serialized under this field's {@code @SerializedName} value.
1289+
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1290+
* name in this param object. Effectively, this map is flattened to its parent instance.
1291+
*/
1292+
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1293+
Map<String, Object> extraParams;
1294+
1295+
/**
1296+
* Passing true requests the capability for the account, if it is not already requested. A
1297+
* requested capability may not immediately become active. Any requirements to activate the
1298+
* capability are returned in the {@code requirements} arrays.
1299+
*/
1300+
@SerializedName("requested")
1301+
Boolean requested;
1302+
1303+
private AfterpayClearpayPayments(Map<String, Object> extraParams, Boolean requested) {
1304+
this.extraParams = extraParams;
1305+
this.requested = requested;
1306+
}
1307+
1308+
public static Builder builder() {
1309+
return new Builder();
1310+
}
1311+
1312+
public static class Builder {
1313+
private Map<String, Object> extraParams;
1314+
1315+
private Boolean requested;
1316+
1317+
/** Finalize and obtain parameter instance from this builder. */
1318+
public AfterpayClearpayPayments build() {
1319+
return new AfterpayClearpayPayments(this.extraParams, this.requested);
1320+
}
1321+
1322+
/**
1323+
* Add a key/value pair to `extraParams` map. A map is initialized for the first
1324+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1325+
* map. See {@link AccountUpdateParams.Capabilities.AfterpayClearpayPayments#extraParams}
1326+
* for the field documentation.
1327+
*/
1328+
public Builder putExtraParam(String key, Object value) {
1329+
if (this.extraParams == null) {
1330+
this.extraParams = new HashMap<>();
1331+
}
1332+
this.extraParams.put(key, value);
1333+
return this;
1334+
}
1335+
1336+
/**
1337+
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1338+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1339+
* map. See {@link AccountUpdateParams.Capabilities.AfterpayClearpayPayments#extraParams}
1340+
* for the field documentation.
1341+
*/
1342+
public Builder putAllExtraParam(Map<String, Object> map) {
1343+
if (this.extraParams == null) {
1344+
this.extraParams = new HashMap<>();
1345+
}
1346+
this.extraParams.putAll(map);
1347+
return this;
1348+
}
1349+
1350+
/**
1351+
* Passing true requests the capability for the account, if it is not already requested. A
1352+
* requested capability may not immediately become active. Any requirements to activate the
1353+
* capability are returned in the {@code requirements} arrays.
1354+
*/
1355+
public Builder setRequested(Boolean requested) {
1356+
this.requested = requested;
1357+
return this;
1358+
}
1359+
}
1360+
}
1361+
12681362
@Getter
12691363
public static class AuBecsDebitPayments {
12701364
/**

0 commit comments

Comments
 (0)