Skip to content

Commit 6ff3053

Browse files
Update generated code for v2217 and
1 parent 9bd73a3 commit 6ff3053

4 files changed

Lines changed: 534 additions & 2 deletions

File tree

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fe06273fa0f51dfa4ebc3a79dd02a23cb072d810
1+
70d7443c72304ad3165194e362954948b9744def

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2215
1+
v2217

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

Lines changed: 266 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ public class RequestedSessionCreateParams extends ApiRequestParams {
5454
@SerializedName("payment_method")
5555
String paymentMethod;
5656

57+
/** The payment method options for this requested session. */
58+
@SerializedName("payment_method_options")
59+
PaymentMethodOptions paymentMethodOptions;
60+
5761
/** <strong>Required.</strong> The details of the seller. */
5862
@SerializedName("seller_details")
5963
SellerDetails sellerDetails;
@@ -76,6 +80,7 @@ private RequestedSessionCreateParams(
7680
List<RequestedSessionCreateParams.LineItemDetail> lineItemDetails,
7781
Map<String, String> metadata,
7882
String paymentMethod,
83+
PaymentMethodOptions paymentMethodOptions,
7984
SellerDetails sellerDetails,
8085
SetupFutureUsage setupFutureUsage,
8186
Map<String, String> sharedMetadata) {
@@ -88,6 +93,7 @@ private RequestedSessionCreateParams(
8893
this.lineItemDetails = lineItemDetails;
8994
this.metadata = metadata;
9095
this.paymentMethod = paymentMethod;
96+
this.paymentMethodOptions = paymentMethodOptions;
9197
this.sellerDetails = sellerDetails;
9298
this.setupFutureUsage = setupFutureUsage;
9399
this.sharedMetadata = sharedMetadata;
@@ -116,6 +122,8 @@ public static class Builder {
116122

117123
private String paymentMethod;
118124

125+
private PaymentMethodOptions paymentMethodOptions;
126+
119127
private SellerDetails sellerDetails;
120128

121129
private SetupFutureUsage setupFutureUsage;
@@ -134,6 +142,7 @@ public RequestedSessionCreateParams build() {
134142
this.lineItemDetails,
135143
this.metadata,
136144
this.paymentMethod,
145+
this.paymentMethodOptions,
137146
this.sellerDetails,
138147
this.setupFutureUsage,
139148
this.sharedMetadata);
@@ -276,6 +285,13 @@ public Builder setPaymentMethod(String paymentMethod) {
276285
return this;
277286
}
278287

288+
/** The payment method options for this requested session. */
289+
public Builder setPaymentMethodOptions(
290+
RequestedSessionCreateParams.PaymentMethodOptions paymentMethodOptions) {
291+
this.paymentMethodOptions = paymentMethodOptions;
292+
return this;
293+
}
294+
279295
/** <strong>Required.</strong> The details of the seller. */
280296
public Builder setSellerDetails(RequestedSessionCreateParams.SellerDetails sellerDetails) {
281297
this.sellerDetails = sellerDetails;
@@ -1060,6 +1076,256 @@ public Builder setSkuId(String skuId) {
10601076
}
10611077
}
10621078

1079+
@Getter
1080+
@EqualsAndHashCode(callSuper = false)
1081+
public static class PaymentMethodOptions {
1082+
/** Card-specific payment method options. */
1083+
@SerializedName("card")
1084+
Card card;
1085+
1086+
/** The payment method types to exclude from the session. */
1087+
@SerializedName("excluded_payment_method_types")
1088+
List<RequestedSessionCreateParams.PaymentMethodOptions.ExcludedPaymentMethodType>
1089+
excludedPaymentMethodTypes;
1090+
1091+
/**
1092+
* Map of extra parameters for custom features not available in this client library. The content
1093+
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
1094+
* key/value pair is serialized as if the key is a root-level field (serialized) name in this
1095+
* param object. Effectively, this map is flattened to its parent instance.
1096+
*/
1097+
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1098+
Map<String, Object> extraParams;
1099+
1100+
private PaymentMethodOptions(
1101+
Card card,
1102+
List<RequestedSessionCreateParams.PaymentMethodOptions.ExcludedPaymentMethodType>
1103+
excludedPaymentMethodTypes,
1104+
Map<String, Object> extraParams) {
1105+
this.card = card;
1106+
this.excludedPaymentMethodTypes = excludedPaymentMethodTypes;
1107+
this.extraParams = extraParams;
1108+
}
1109+
1110+
public static Builder builder() {
1111+
return new Builder();
1112+
}
1113+
1114+
public static class Builder {
1115+
private Card card;
1116+
1117+
private List<RequestedSessionCreateParams.PaymentMethodOptions.ExcludedPaymentMethodType>
1118+
excludedPaymentMethodTypes;
1119+
1120+
private Map<String, Object> extraParams;
1121+
1122+
/** Finalize and obtain parameter instance from this builder. */
1123+
public RequestedSessionCreateParams.PaymentMethodOptions build() {
1124+
return new RequestedSessionCreateParams.PaymentMethodOptions(
1125+
this.card, this.excludedPaymentMethodTypes, this.extraParams);
1126+
}
1127+
1128+
/** Card-specific payment method options. */
1129+
public Builder setCard(RequestedSessionCreateParams.PaymentMethodOptions.Card card) {
1130+
this.card = card;
1131+
return this;
1132+
}
1133+
1134+
/**
1135+
* Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first
1136+
* `add/addAll` call, and subsequent calls adds additional elements to the original list. See
1137+
* {@link RequestedSessionCreateParams.PaymentMethodOptions#excludedPaymentMethodTypes} for
1138+
* the field documentation.
1139+
*/
1140+
public Builder addExcludedPaymentMethodType(
1141+
RequestedSessionCreateParams.PaymentMethodOptions.ExcludedPaymentMethodType element) {
1142+
if (this.excludedPaymentMethodTypes == null) {
1143+
this.excludedPaymentMethodTypes = new ArrayList<>();
1144+
}
1145+
this.excludedPaymentMethodTypes.add(element);
1146+
return this;
1147+
}
1148+
1149+
/**
1150+
* Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first
1151+
* `add/addAll` call, and subsequent calls adds additional elements to the original list. See
1152+
* {@link RequestedSessionCreateParams.PaymentMethodOptions#excludedPaymentMethodTypes} for
1153+
* the field documentation.
1154+
*/
1155+
public Builder addAllExcludedPaymentMethodType(
1156+
List<RequestedSessionCreateParams.PaymentMethodOptions.ExcludedPaymentMethodType>
1157+
elements) {
1158+
if (this.excludedPaymentMethodTypes == null) {
1159+
this.excludedPaymentMethodTypes = new ArrayList<>();
1160+
}
1161+
this.excludedPaymentMethodTypes.addAll(elements);
1162+
return this;
1163+
}
1164+
1165+
/**
1166+
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
1167+
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
1168+
* RequestedSessionCreateParams.PaymentMethodOptions#extraParams} for the field documentation.
1169+
*/
1170+
public Builder putExtraParam(String key, Object value) {
1171+
if (this.extraParams == null) {
1172+
this.extraParams = new HashMap<>();
1173+
}
1174+
this.extraParams.put(key, value);
1175+
return this;
1176+
}
1177+
1178+
/**
1179+
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1180+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
1181+
* See {@link RequestedSessionCreateParams.PaymentMethodOptions#extraParams} for the field
1182+
* documentation.
1183+
*/
1184+
public Builder putAllExtraParam(Map<String, Object> map) {
1185+
if (this.extraParams == null) {
1186+
this.extraParams = new HashMap<>();
1187+
}
1188+
this.extraParams.putAll(map);
1189+
return this;
1190+
}
1191+
}
1192+
1193+
@Getter
1194+
@EqualsAndHashCode(callSuper = false)
1195+
public static class Card {
1196+
/** The card brands to exclude from the session. */
1197+
@SerializedName("brands_blocked")
1198+
List<RequestedSessionCreateParams.PaymentMethodOptions.Card.BrandsBlocked> brandsBlocked;
1199+
1200+
/**
1201+
* Map of extra parameters for custom features not available in this client library. The
1202+
* content in this map is not serialized under this field's {@code @SerializedName} value.
1203+
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
1204+
* name in this param object. Effectively, this map is flattened to its parent instance.
1205+
*/
1206+
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
1207+
Map<String, Object> extraParams;
1208+
1209+
private Card(
1210+
List<RequestedSessionCreateParams.PaymentMethodOptions.Card.BrandsBlocked> brandsBlocked,
1211+
Map<String, Object> extraParams) {
1212+
this.brandsBlocked = brandsBlocked;
1213+
this.extraParams = extraParams;
1214+
}
1215+
1216+
public static Builder builder() {
1217+
return new Builder();
1218+
}
1219+
1220+
public static class Builder {
1221+
private List<RequestedSessionCreateParams.PaymentMethodOptions.Card.BrandsBlocked>
1222+
brandsBlocked;
1223+
1224+
private Map<String, Object> extraParams;
1225+
1226+
/** Finalize and obtain parameter instance from this builder. */
1227+
public RequestedSessionCreateParams.PaymentMethodOptions.Card build() {
1228+
return new RequestedSessionCreateParams.PaymentMethodOptions.Card(
1229+
this.brandsBlocked, this.extraParams);
1230+
}
1231+
1232+
/**
1233+
* Add an element to `brandsBlocked` list. A list is initialized for the first `add/addAll`
1234+
* call, and subsequent calls adds additional elements to the original list. See {@link
1235+
* RequestedSessionCreateParams.PaymentMethodOptions.Card#brandsBlocked} for the field
1236+
* documentation.
1237+
*/
1238+
public Builder addBrandsBlocked(
1239+
RequestedSessionCreateParams.PaymentMethodOptions.Card.BrandsBlocked element) {
1240+
if (this.brandsBlocked == null) {
1241+
this.brandsBlocked = new ArrayList<>();
1242+
}
1243+
this.brandsBlocked.add(element);
1244+
return this;
1245+
}
1246+
1247+
/**
1248+
* Add all elements to `brandsBlocked` list. A list is initialized for the first
1249+
* `add/addAll` call, and subsequent calls adds additional elements to the original list.
1250+
* See {@link RequestedSessionCreateParams.PaymentMethodOptions.Card#brandsBlocked} for the
1251+
* field documentation.
1252+
*/
1253+
public Builder addAllBrandsBlocked(
1254+
List<RequestedSessionCreateParams.PaymentMethodOptions.Card.BrandsBlocked> elements) {
1255+
if (this.brandsBlocked == null) {
1256+
this.brandsBlocked = new ArrayList<>();
1257+
}
1258+
this.brandsBlocked.addAll(elements);
1259+
return this;
1260+
}
1261+
1262+
/**
1263+
* Add a key/value pair to `extraParams` map. A map is initialized for the first
1264+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1265+
* map. See {@link RequestedSessionCreateParams.PaymentMethodOptions.Card#extraParams} for
1266+
* the field documentation.
1267+
*/
1268+
public Builder putExtraParam(String key, Object value) {
1269+
if (this.extraParams == null) {
1270+
this.extraParams = new HashMap<>();
1271+
}
1272+
this.extraParams.put(key, value);
1273+
return this;
1274+
}
1275+
1276+
/**
1277+
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1278+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1279+
* map. See {@link RequestedSessionCreateParams.PaymentMethodOptions.Card#extraParams} for
1280+
* the field documentation.
1281+
*/
1282+
public Builder putAllExtraParam(Map<String, Object> map) {
1283+
if (this.extraParams == null) {
1284+
this.extraParams = new HashMap<>();
1285+
}
1286+
this.extraParams.putAll(map);
1287+
return this;
1288+
}
1289+
}
1290+
1291+
public enum BrandsBlocked implements ApiRequestParams.EnumParam {
1292+
@SerializedName("american_express")
1293+
AMERICAN_EXPRESS("american_express"),
1294+
1295+
@SerializedName("mastercard")
1296+
MASTERCARD("mastercard"),
1297+
1298+
@SerializedName("visa")
1299+
VISA("visa");
1300+
1301+
@Getter(onMethod_ = {@Override})
1302+
private final String value;
1303+
1304+
BrandsBlocked(String value) {
1305+
this.value = value;
1306+
}
1307+
}
1308+
}
1309+
1310+
public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam {
1311+
@SerializedName("affirm")
1312+
AFFIRM("affirm"),
1313+
1314+
@SerializedName("card")
1315+
CARD("card"),
1316+
1317+
@SerializedName("klarna")
1318+
KLARNA("klarna");
1319+
1320+
@Getter(onMethod_ = {@Override})
1321+
private final String value;
1322+
1323+
ExcludedPaymentMethodType(String value) {
1324+
this.value = value;
1325+
}
1326+
}
1327+
}
1328+
10631329
@Getter
10641330
@EqualsAndHashCode(callSuper = false)
10651331
public static class SellerDetails {

0 commit comments

Comments
 (0)