@@ -553,9 +553,17 @@ public static class PaymentMethodOptions {
553
553
@ SerializedName (ApiRequestParams .EXTRA_PARAMS_KEY )
554
554
Map <String , Object > extraParams ;
555
555
556
- private PaymentMethodOptions (Card card , Map <String , Object > extraParams ) {
556
+ /**
557
+ * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the Sepa
558
+ * Debit payment method options.
559
+ */
560
+ @ SerializedName ("sepa_debit" )
561
+ SepaDebit sepaDebit ;
562
+
563
+ private PaymentMethodOptions (Card card , Map <String , Object > extraParams , SepaDebit sepaDebit ) {
557
564
this .card = card ;
558
565
this .extraParams = extraParams ;
566
+ this .sepaDebit = sepaDebit ;
559
567
}
560
568
561
569
public static Builder builder () {
@@ -567,9 +575,11 @@ public static class Builder {
567
575
568
576
private Map <String , Object > extraParams ;
569
577
578
+ private SepaDebit sepaDebit ;
579
+
570
580
/** Finalize and obtain parameter instance from this builder. */
571
581
public PaymentMethodOptions build () {
572
- return new PaymentMethodOptions (this .card , this .extraParams );
582
+ return new PaymentMethodOptions (this .card , this .extraParams , this . sepaDebit );
573
583
}
574
584
575
585
/** Configuration for any card setup attempted on this SetupIntent. */
@@ -604,6 +614,15 @@ public Builder putAllExtraParam(Map<String, Object> map) {
604
614
this .extraParams .putAll (map );
605
615
return this ;
606
616
}
617
+
618
+ /**
619
+ * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the Sepa
620
+ * Debit payment method options.
621
+ */
622
+ public Builder setSepaDebit (SepaDebit sepaDebit ) {
623
+ this .sepaDebit = sepaDebit ;
624
+ return this ;
625
+ }
607
626
}
608
627
609
628
@ Getter
@@ -732,5 +751,62 @@ public enum RequestThreeDSecure implements ApiRequestParams.EnumParam {
732
751
}
733
752
}
734
753
}
754
+
755
+ @ Getter
756
+ public static class SepaDebit {
757
+ /**
758
+ * Map of extra parameters for custom features not available in this client library. The
759
+ * content in this map is not serialized under this field's {@code @SerializedName} value.
760
+ * Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
761
+ * name in this param object. Effectively, this map is flattened to its parent instance.
762
+ */
763
+ @ SerializedName (ApiRequestParams .EXTRA_PARAMS_KEY )
764
+ Map <String , Object > extraParams ;
765
+
766
+ private SepaDebit (Map <String , Object > extraParams ) {
767
+ this .extraParams = extraParams ;
768
+ }
769
+
770
+ public static Builder builder () {
771
+ return new Builder ();
772
+ }
773
+
774
+ public static class Builder {
775
+ private Map <String , Object > extraParams ;
776
+
777
+ /** Finalize and obtain parameter instance from this builder. */
778
+ public SepaDebit build () {
779
+ return new SepaDebit (this .extraParams );
780
+ }
781
+
782
+ /**
783
+ * Add a key/value pair to `extraParams` map. A map is initialized for the first
784
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
785
+ * map. See {@link SetupIntentConfirmParams.PaymentMethodOptions.SepaDebit#extraParams} for
786
+ * the field documentation.
787
+ */
788
+ public Builder putExtraParam (String key , Object value ) {
789
+ if (this .extraParams == null ) {
790
+ this .extraParams = new HashMap <>();
791
+ }
792
+ this .extraParams .put (key , value );
793
+ return this ;
794
+ }
795
+
796
+ /**
797
+ * Add all map key/value pairs to `extraParams` map. A map is initialized for the first
798
+ * `put/putAll` call, and subsequent calls add additional key/value pairs to the original
799
+ * map. See {@link SetupIntentConfirmParams.PaymentMethodOptions.SepaDebit#extraParams} for
800
+ * the field documentation.
801
+ */
802
+ public Builder putAllExtraParam (Map <String , Object > map ) {
803
+ if (this .extraParams == null ) {
804
+ this .extraParams = new HashMap <>();
805
+ }
806
+ this .extraParams .putAll (map );
807
+ return this ;
808
+ }
809
+ }
810
+ }
735
811
}
736
812
}
0 commit comments