@@ -132,6 +132,14 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams {
132
132
@ SerializedName ("cashapp" )
133
133
Cashapp cashapp ;
134
134
135
+ /**
136
+ * Uses a customer’s <a href="https://stripe.com/docs/payments/customer-balance">cash balance</a>
137
+ * for the payment. The cash balance can be funded via a bank transfer. Check this <a
138
+ * href="https://stripe.com/docs/payments/bank-transfers">page</a> for more details.
139
+ */
140
+ @ SerializedName ("customer_balance" )
141
+ CustomerBalance customerBalance ;
142
+
135
143
/**
136
144
* EPS is an Austria-based payment method that allows customers to complete transactions online
137
145
* using their bank credentials. EPS is supported by all Austrian banks and is accepted by over
@@ -354,6 +362,7 @@ private PaymentMethodConfigurationCreateParams(
354
362
Card card ,
355
363
CartesBancaires cartesBancaires ,
356
364
Cashapp cashapp ,
365
+ CustomerBalance customerBalance ,
357
366
Eps eps ,
358
367
List <String > expand ,
359
368
Map <String , Object > extraParams ,
@@ -392,6 +401,7 @@ private PaymentMethodConfigurationCreateParams(
392
401
this .card = card ;
393
402
this .cartesBancaires = cartesBancaires ;
394
403
this .cashapp = cashapp ;
404
+ this .customerBalance = customerBalance ;
395
405
this .eps = eps ;
396
406
this .expand = expand ;
397
407
this .extraParams = extraParams ;
@@ -451,6 +461,8 @@ public static class Builder {
451
461
452
462
private Cashapp cashapp ;
453
463
464
+ private CustomerBalance customerBalance ;
465
+
454
466
private Eps eps ;
455
467
456
468
private List <String > expand ;
@@ -516,6 +528,7 @@ public PaymentMethodConfigurationCreateParams build() {
516
528
this .card ,
517
529
this .cartesBancaires ,
518
530
this .cashapp ,
531
+ this .customerBalance ,
519
532
this .eps ,
520
533
this .expand ,
521
534
this .extraParams ,
@@ -694,6 +707,17 @@ public Builder setCashapp(PaymentMethodConfigurationCreateParams.Cashapp cashapp
694
707
return this ;
695
708
}
696
709
710
+ /**
711
+ * Uses a customer’s <a href="https://stripe.com/docs/payments/customer-balance">cash
712
+ * balance</a> for the payment. The cash balance can be funded via a bank transfer. Check this
713
+ * <a href="https://stripe.com/docs/payments/bank-transfers">page</a> for more details.
714
+ */
715
+ public Builder setCustomerBalance (
716
+ PaymentMethodConfigurationCreateParams .CustomerBalance customerBalance ) {
717
+ this .customerBalance = customerBalance ;
718
+ return this ;
719
+ }
720
+
697
721
/**
698
722
* EPS is an Austria-based payment method that allows customers to complete transactions online
699
723
* using their bank credentials. EPS is supported by all Austrian banks and is accepted by over
@@ -3285,6 +3309,172 @@ public enum Preference implements ApiRequestParams.EnumParam {
3285
3309
}
3286
3310
}
3287
3311
3312
+ @ Getter
3313
+ public static class CustomerBalance {
3314
+ /** Whether or not the payment method should be displayed. */
3315
+ @ SerializedName ("display_preference" )
3316
+ DisplayPreference displayPreference ;
3317
+
3318
+ /**
3319
+ * Map of extra parameters for custom features not available in this client library. The content
3320
+ * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
3321
+ * key/value pair is serialized as if the key is a root-level field (serialized) name in this
3322
+ * param object. Effectively, this map is flattened to its parent instance.
3323
+ */
3324
+ @ SerializedName (ApiRequestParams .EXTRA_PARAMS_KEY )
3325
+ Map <String , Object > extraParams ;
3326
+
3327
+ private CustomerBalance (DisplayPreference displayPreference , Map <String , Object > extraParams ) {
3328
+ this .displayPreference = displayPreference ;
3329
+ this .extraParams = extraParams ;
3330
+ }
3331
+
3332
+ public static Builder builder () {
3333
+ return new Builder ();
3334
+ }
3335
+
3336
+ public static class Builder {
3337
+ private DisplayPreference displayPreference ;
3338
+
3339
+ private Map <String , Object > extraParams ;
3340
+
3341
+ /** Finalize and obtain parameter instance from this builder. */
3342
+ public PaymentMethodConfigurationCreateParams .CustomerBalance build () {
3343
+ return new PaymentMethodConfigurationCreateParams .CustomerBalance (
3344
+ this .displayPreference , this .extraParams );
3345
+ }
3346
+
3347
+ /** Whether or not the payment method should be displayed. */
3348
+ public Builder setDisplayPreference (
3349
+ PaymentMethodConfigurationCreateParams .CustomerBalance .DisplayPreference
3350
+ displayPreference ) {
3351
+ this .displayPreference = displayPreference ;
3352
+ return this ;
3353
+ }
3354
+
3355
+ /**
3356
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
3357
+ * call, and subsequent calls add additional key/value pairs to the original map. See {@link
3358
+ * PaymentMethodConfigurationCreateParams.CustomerBalance#extraParams} for the field
3359
+ * documentation.
3360
+ */
3361
+ public Builder putExtraParam (String key , Object value ) {
3362
+ if (this .extraParams == null ) {
3363
+ this .extraParams = new HashMap <>();
3364
+ }
3365
+ this .extraParams .put (key , value );
3366
+ return this ;
3367
+ }
3368
+
3369
+ /**
3370
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3371
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
3372
+ * See {@link PaymentMethodConfigurationCreateParams.CustomerBalance#extraParams} for the
3373
+ * field documentation.
3374
+ */
3375
+ public Builder putAllExtraParam (Map <String , Object > map ) {
3376
+ if (this .extraParams == null ) {
3377
+ this .extraParams = new HashMap <>();
3378
+ }
3379
+ this .extraParams .putAll (map );
3380
+ return this ;
3381
+ }
3382
+ }
3383
+
3384
+ @ Getter
3385
+ public static class DisplayPreference {
3386
+ /**
3387
+ * Map of extra parameters for custom features not available in this client library. The
3388
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
3389
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
3390
+ * name in this param object. Effectively, this map is flattened to its parent instance.
3391
+ */
3392
+ @ SerializedName (ApiRequestParams .EXTRA_PARAMS_KEY )
3393
+ Map <String , Object > extraParams ;
3394
+
3395
+ /** The account's preference for whether or not to display this payment method. */
3396
+ @ SerializedName ("preference" )
3397
+ Preference preference ;
3398
+
3399
+ private DisplayPreference (Map <String , Object > extraParams , Preference preference ) {
3400
+ this .extraParams = extraParams ;
3401
+ this .preference = preference ;
3402
+ }
3403
+
3404
+ public static Builder builder () {
3405
+ return new Builder ();
3406
+ }
3407
+
3408
+ public static class Builder {
3409
+ private Map <String , Object > extraParams ;
3410
+
3411
+ private Preference preference ;
3412
+
3413
+ /** Finalize and obtain parameter instance from this builder. */
3414
+ public PaymentMethodConfigurationCreateParams .CustomerBalance .DisplayPreference build () {
3415
+ return new PaymentMethodConfigurationCreateParams .CustomerBalance .DisplayPreference (
3416
+ this .extraParams , this .preference );
3417
+ }
3418
+
3419
+ /**
3420
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
3421
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3422
+ * map. See {@link
3423
+ * PaymentMethodConfigurationCreateParams.CustomerBalance.DisplayPreference#extraParams} for
3424
+ * the field documentation.
3425
+ */
3426
+ public Builder putExtraParam (String key , Object value ) {
3427
+ if (this .extraParams == null ) {
3428
+ this .extraParams = new HashMap <>();
3429
+ }
3430
+ this .extraParams .put (key , value );
3431
+ return this ;
3432
+ }
3433
+
3434
+ /**
3435
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
3436
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
3437
+ * map. See {@link
3438
+ * PaymentMethodConfigurationCreateParams.CustomerBalance.DisplayPreference#extraParams} for
3439
+ * the field documentation.
3440
+ */
3441
+ public Builder putAllExtraParam (Map <String , Object > map ) {
3442
+ if (this .extraParams == null ) {
3443
+ this .extraParams = new HashMap <>();
3444
+ }
3445
+ this .extraParams .putAll (map );
3446
+ return this ;
3447
+ }
3448
+
3449
+ /** The account's preference for whether or not to display this payment method. */
3450
+ public Builder setPreference (
3451
+ PaymentMethodConfigurationCreateParams .CustomerBalance .DisplayPreference .Preference
3452
+ preference ) {
3453
+ this .preference = preference ;
3454
+ return this ;
3455
+ }
3456
+ }
3457
+
3458
+ public enum Preference implements ApiRequestParams .EnumParam {
3459
+ @ SerializedName ("none" )
3460
+ NONE ("none" ),
3461
+
3462
+ @ SerializedName ("off" )
3463
+ OFF ("off" ),
3464
+
3465
+ @ SerializedName ("on" )
3466
+ ON ("on" );
3467
+
3468
+ @ Getter (onMethod_ = {@ Override })
3469
+ private final String value ;
3470
+
3471
+ Preference (String value ) {
3472
+ this .value = value ;
3473
+ }
3474
+ }
3475
+ }
3476
+ }
3477
+
3288
3478
@ Getter
3289
3479
public static class Eps {
3290
3480
/** Whether or not the payment method should be displayed. */
0 commit comments