Skip to content

Commit 0861840

Browse files
Merge pull request #1152 from stripe/ctrudeau/codegen-5a94a49
[codegen] Multiple API changes
2 parents 3e6e1f4 + 388106a commit 0861840

9 files changed

+269
-27
lines changed

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ public class Card extends ApiResource
125125
Boolean deleted;
126126

127127
/**
128-
* Card description. (For internal use only and not typically available in standard API requests.)
128+
* A high-level description of the type of cards issued in this range. (For internal use only and
129+
* not typically available in standard API requests.)
129130
*/
130131
@SerializedName("description")
131132
String description;
@@ -170,8 +171,8 @@ public class Card extends ApiResource
170171
String iin;
171172

172173
/**
173-
* Issuer bank name of the card. (For internal use only and not typically available in standard
174-
* API requests.)
174+
* The name of the card's issuing bank. (For internal use only and not typically available in
175+
* standard API requests.)
175176
*/
176177
@SerializedName("issuer")
177178
String issuer;

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

+9-9
Original file line numberDiff line numberDiff line change
@@ -1350,8 +1350,8 @@ public static class Card extends StripeObject {
13501350
String country;
13511351

13521352
/**
1353-
* Card description. (For internal use only and not typically available in standard API
1354-
* requests.)
1353+
* A high-level description of the type of cards issued in this range. (For internal use only
1354+
* and not typically available in standard API requests.)
13551355
*/
13561356
@SerializedName("description")
13571357
String description;
@@ -1397,7 +1397,7 @@ public static class Card extends StripeObject {
13971397
Installments installments;
13981398

13991399
/**
1400-
* Issuer bank name of the card. (For internal use only and not typically available in
1400+
* The name of the card's issuing bank. (For internal use only and not typically available in
14011401
* standard API requests.)
14021402
*/
14031403
@SerializedName("issuer")
@@ -1657,8 +1657,8 @@ public static class CardPresent extends StripeObject {
16571657
String country;
16581658

16591659
/**
1660-
* Card description. (For internal use only and not typically available in standard API
1661-
* requests.)
1660+
* A high-level description of the type of cards issued in this range. (For internal use only
1661+
* and not typically available in standard API requests.)
16621662
*/
16631663
@SerializedName("description")
16641664
String description;
@@ -1707,7 +1707,7 @@ public static class CardPresent extends StripeObject {
17071707
String iin;
17081708

17091709
/**
1710-
* Issuer bank name of the card. (For internal use only and not typically available in
1710+
* The name of the card's issuing bank. (For internal use only and not typically available in
17111711
* standard API requests.)
17121712
*/
17131713
@SerializedName("issuer")
@@ -1963,8 +1963,8 @@ public static class InteracPresent extends StripeObject {
19631963
String country;
19641964

19651965
/**
1966-
* Card description. (For internal use only and not typically available in standard API
1967-
* requests.)
1966+
* A high-level description of the type of cards issued in this range. (For internal use only
1967+
* and not typically available in standard API requests.)
19681968
*/
19691969
@SerializedName("description")
19701970
String description;
@@ -2013,7 +2013,7 @@ public static class InteracPresent extends StripeObject {
20132013
String iin;
20142014

20152015
/**
2016-
* Issuer bank name of the card. (For internal use only and not typically available in
2016+
* The name of the card's issuing bank. (For internal use only and not typically available in
20172017
* standard API requests.)
20182018
*/
20192019
@SerializedName("issuer")

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

+6-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore<P
5050
ExpandableField<Application> application;
5151

5252
/**
53-
* The amount of the application fee (if any) requested for the resulting payment. See the
53+
* The amount of the application fee (if any) that will be requested to be applied to the payment
54+
* and transferred to the application owner's Stripe account. The amount of the application fee
55+
* collected will be capped at the total payment amount. For more information, see the
5456
* PaymentIntents <a href="https://stripe.com/docs/payments/connected-accounts">use case for
55-
* connected accounts</a> for details.
57+
* connected accounts</a>.
5658
*/
5759
@SerializedName("application_fee_amount")
5860
Long applicationFeeAmount;
@@ -95,7 +97,8 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore<P
9597
* stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that
9698
* you have TLS enabled on any page that includes the client secret.
9799
*
98-
* <p>Refer to our docs to <a href="https://stripe.com/docs/payments/accept-a-payment">accept a
100+
* <p>Refer to our docs to <a
101+
* href="https://stripe.com/docs/payments/accept-a-payment?integration=elements">accept a
99102
* payment</a> and learn about how {@code client_secret} should be handled.
100103
*/
101104
@SerializedName("client_secret")

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,8 @@ public static class Card extends StripeObject {
517517
String country;
518518

519519
/**
520-
* Card description. (For internal use only and not typically available in standard API
521-
* requests.)
520+
* A high-level description of the type of cards issued in this range. (For internal use only
521+
* and not typically available in standard API requests.)
522522
*/
523523
@SerializedName("description")
524524
String description;
@@ -554,8 +554,8 @@ public static class Card extends StripeObject {
554554
String iin;
555555

556556
/**
557-
* Issuer bank name of the card. (For internal use only and not typically available in standard
558-
* API requests.)
557+
* The name of the card's issuing bank. (For internal use only and not typically available in
558+
* standard API requests.)
559559
*/
560560
@SerializedName("issuer")
561561
String issuer;

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

+8
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,9 @@ public static class PaymentMethodOptions extends StripeObject {
711711
@SerializedName("card")
712712
Card card;
713713

714+
@SerializedName("sepa_debit")
715+
SepaDebit sepaDebit;
716+
714717
@Getter
715718
@Setter
716719
@EqualsAndHashCode(callSuper = false)
@@ -731,5 +734,10 @@ public static class Card extends StripeObject {
731734
@SerializedName("request_three_d_secure")
732735
String requestThreeDSecure;
733736
}
737+
738+
@Getter
739+
@Setter
740+
@EqualsAndHashCode(callSuper = false)
741+
public static class SepaDebit extends StripeObject {}
734742
}
735743
}

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public class CustomerListParams extends ApiRequestParams {
1515
Object created;
1616

1717
/**
18-
* A filter on the list based on the customer's {@code email} field. The value must be a string.
18+
* A case-sensitive filter on the list based on the customer's {@code email} field. The value must
19+
* be a string.
1920
*/
2021
@SerializedName("email")
2122
String email;
@@ -117,7 +118,8 @@ public Builder setCreated(Long created) {
117118
}
118119

119120
/**
120-
* A filter on the list based on the customer's {@code email} field. The value must be a string.
121+
* A case-sensitive filter on the list based on the customer's {@code email} field. The value
122+
* must be a string.
121123
*/
122124
public Builder setEmail(String email) {
123125
this.email = email;

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

+78-2
Original file line numberDiff line numberDiff line change
@@ -553,9 +553,17 @@ public static class PaymentMethodOptions {
553553
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
554554
Map<String, Object> extraParams;
555555

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) {
557564
this.card = card;
558565
this.extraParams = extraParams;
566+
this.sepaDebit = sepaDebit;
559567
}
560568

561569
public static Builder builder() {
@@ -567,9 +575,11 @@ public static class Builder {
567575

568576
private Map<String, Object> extraParams;
569577

578+
private SepaDebit sepaDebit;
579+
570580
/** Finalize and obtain parameter instance from this builder. */
571581
public PaymentMethodOptions build() {
572-
return new PaymentMethodOptions(this.card, this.extraParams);
582+
return new PaymentMethodOptions(this.card, this.extraParams, this.sepaDebit);
573583
}
574584

575585
/** Configuration for any card setup attempted on this SetupIntent. */
@@ -604,6 +614,15 @@ public Builder putAllExtraParam(Map<String, Object> map) {
604614
this.extraParams.putAll(map);
605615
return this;
606616
}
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+
}
607626
}
608627

609628
@Getter
@@ -732,5 +751,62 @@ public enum RequestThreeDSecure implements ApiRequestParams.EnumParam {
732751
}
733752
}
734753
}
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+
}
735811
}
736812
}

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

+78-2
Original file line numberDiff line numberDiff line change
@@ -758,9 +758,17 @@ public static class PaymentMethodOptions {
758758
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
759759
Map<String, Object> extraParams;
760760

761-
private PaymentMethodOptions(Card card, Map<String, Object> extraParams) {
761+
/**
762+
* If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the Sepa
763+
* Debit payment method options.
764+
*/
765+
@SerializedName("sepa_debit")
766+
SepaDebit sepaDebit;
767+
768+
private PaymentMethodOptions(Card card, Map<String, Object> extraParams, SepaDebit sepaDebit) {
762769
this.card = card;
763770
this.extraParams = extraParams;
771+
this.sepaDebit = sepaDebit;
764772
}
765773

766774
public static Builder builder() {
@@ -772,9 +780,11 @@ public static class Builder {
772780

773781
private Map<String, Object> extraParams;
774782

783+
private SepaDebit sepaDebit;
784+
775785
/** Finalize and obtain parameter instance from this builder. */
776786
public PaymentMethodOptions build() {
777-
return new PaymentMethodOptions(this.card, this.extraParams);
787+
return new PaymentMethodOptions(this.card, this.extraParams, this.sepaDebit);
778788
}
779789

780790
/** Configuration for any card setup attempted on this SetupIntent. */
@@ -809,6 +819,15 @@ public Builder putAllExtraParam(Map<String, Object> map) {
809819
this.extraParams.putAll(map);
810820
return this;
811821
}
822+
823+
/**
824+
* If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the Sepa
825+
* Debit payment method options.
826+
*/
827+
public Builder setSepaDebit(SepaDebit sepaDebit) {
828+
this.sepaDebit = sepaDebit;
829+
return this;
830+
}
812831
}
813832

814833
@Getter
@@ -937,6 +956,63 @@ public enum RequestThreeDSecure implements ApiRequestParams.EnumParam {
937956
}
938957
}
939958
}
959+
960+
@Getter
961+
public static class SepaDebit {
962+
/**
963+
* Map of extra parameters for custom features not available in this client library. The
964+
* content in this map is not serialized under this field's {@code @SerializedName} value.
965+
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
966+
* name in this param object. Effectively, this map is flattened to its parent instance.
967+
*/
968+
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
969+
Map<String, Object> extraParams;
970+
971+
private SepaDebit(Map<String, Object> extraParams) {
972+
this.extraParams = extraParams;
973+
}
974+
975+
public static Builder builder() {
976+
return new Builder();
977+
}
978+
979+
public static class Builder {
980+
private Map<String, Object> extraParams;
981+
982+
/** Finalize and obtain parameter instance from this builder. */
983+
public SepaDebit build() {
984+
return new SepaDebit(this.extraParams);
985+
}
986+
987+
/**
988+
* Add a key/value pair to `extraParams` map. A map is initialized for the first
989+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
990+
* map. See {@link SetupIntentCreateParams.PaymentMethodOptions.SepaDebit#extraParams} for
991+
* the field documentation.
992+
*/
993+
public Builder putExtraParam(String key, Object value) {
994+
if (this.extraParams == null) {
995+
this.extraParams = new HashMap<>();
996+
}
997+
this.extraParams.put(key, value);
998+
return this;
999+
}
1000+
1001+
/**
1002+
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
1003+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
1004+
* map. See {@link SetupIntentCreateParams.PaymentMethodOptions.SepaDebit#extraParams} for
1005+
* the field documentation.
1006+
*/
1007+
public Builder putAllExtraParam(Map<String, Object> map) {
1008+
if (this.extraParams == null) {
1009+
this.extraParams = new HashMap<>();
1010+
}
1011+
this.extraParams.putAll(map);
1012+
return this;
1013+
}
1014+
}
1015+
}
9401016
}
9411017

9421018
@Getter

0 commit comments

Comments
 (0)