Skip to content

Commit 308763f

Browse files
Codegen for openapi ef061d9 (#1271)
1 parent 4727b5a commit 308763f

11 files changed

+1355
-8
lines changed

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

+18-1
Original file line numberDiff line numberDiff line change
@@ -2181,7 +2181,24 @@ public static class Receipt extends StripeObject {
21812181
@Getter
21822182
@Setter
21832183
@EqualsAndHashCode(callSuper = false)
2184-
public static class Klarna extends StripeObject {}
2184+
public static class Klarna extends StripeObject {
2185+
/**
2186+
* The Klarna payment method used for this transaction. Can be one of {@code pay_later},
2187+
* {@code pay_now}, {@code pay_with_financing}, or {@code pay_in_installments}
2188+
*/
2189+
@SerializedName("payment_method_category")
2190+
String paymentMethodCategory;
2191+
2192+
/**
2193+
* Preferred language of the Klarna authorization page that the customer is redirected to. Can
2194+
* be one of {@code de-AT}, {@code en-AT}, {@code nl-BE}, {@code fr-BE}, {@code de-DE}, {@code
2195+
* en-DE}, {@code da-DK}, {@code en-DK}, {@code es-ES}, {@code fi-FI}, {@code sv-FI}, {@code
2196+
* en-FI}, {@code en-GB}, {@code it-IT}, {@code nl-NL}, {@code en-NL}, {@code nb-NO}, {@code
2197+
* en-NO}, {@code sv-SE}, {@code en-SE}, {@code en-US}, {@code fr-FR}, or {@code en-FR}
2198+
*/
2199+
@SerializedName("preferred_locale")
2200+
String preferredLocale;
2201+
}
21852202

21862203
@Getter
21872204
@Setter

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

+12
Original file line numberDiff line numberDiff line change
@@ -1295,6 +1295,9 @@ public static class PaymentMethodOptions extends StripeObject {
12951295
@SerializedName("ideal")
12961296
Ideal ideal;
12971297

1298+
@SerializedName("klarna")
1299+
Klarna klarna;
1300+
12981301
@SerializedName("oxxo")
12991302
Oxxo oxxo;
13001303

@@ -1490,6 +1493,15 @@ public static class CardPresent extends StripeObject {}
14901493
@EqualsAndHashCode(callSuper = false)
14911494
public static class Ideal extends StripeObject {}
14921495

1496+
@Getter
1497+
@Setter
1498+
@EqualsAndHashCode(callSuper = false)
1499+
public static class Klarna extends StripeObject {
1500+
/** Preferred locale of the Klarna checkout page that the customer is redirected to. */
1501+
@SerializedName("preferred_locale")
1502+
String preferredLocale;
1503+
}
1504+
14931505
@Getter
14941506
@Setter
14951507
@EqualsAndHashCode(callSuper = false)

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

+31-2
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
8888
@SerializedName("interac_present")
8989
InteracPresent interacPresent;
9090

91+
@SerializedName("klarna")
92+
Klarna klarna;
93+
9194
/**
9295
* Has the value {@code true} if the object exists in live mode or the value {@code false} if the
9396
* object exists in test mode.
@@ -131,8 +134,8 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
131134
* <p>One of {@code acss_debit}, {@code afterpay_clearpay}, {@code alipay}, {@code au_becs_debit},
132135
* {@code bacs_debit}, {@code bancontact}, {@code boleto}, {@code card}, {@code card_present},
133136
* {@code eps}, {@code fpx}, {@code giropay}, {@code grabpay}, {@code ideal}, {@code
134-
* interac_present}, {@code oxxo}, {@code p24}, {@code sepa_debit}, {@code sofort}, or {@code
135-
* wechat_pay}.
137+
* interac_present}, {@code klarna}, {@code oxxo}, {@code p24}, {@code sepa_debit}, {@code
138+
* sofort}, or {@code wechat_pay}.
136139
*/
137140
@SerializedName("type")
138141
String type;
@@ -917,6 +920,32 @@ public static class Ideal extends StripeObject {
917920
@EqualsAndHashCode(callSuper = false)
918921
public static class InteracPresent extends StripeObject {}
919922

923+
@Getter
924+
@Setter
925+
@EqualsAndHashCode(callSuper = false)
926+
public static class Klarna extends StripeObject {
927+
/** The customer's date of birth, if provided. */
928+
@SerializedName("dob")
929+
DateOfBirth dob;
930+
931+
@Getter
932+
@Setter
933+
@EqualsAndHashCode(callSuper = false)
934+
public static class DateOfBirth extends StripeObject {
935+
/** The day of birth, between 1 and 31. */
936+
@SerializedName("day")
937+
Long day;
938+
939+
/** The month of birth, between 1 and 12. */
940+
@SerializedName("month")
941+
Long month;
942+
943+
/** The four-digit year of birth. */
944+
@SerializedName("year")
945+
Long year;
946+
}
947+
}
948+
920949
@Getter
921950
@Setter
922951
@EqualsAndHashCode(callSuper = false)

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public class AccountCreateParams extends ApiRequestParams {
6767

6868
/**
6969
* The email address of the account holder. This is only to make the account easier to identify to
70-
* you. Stripe will never directly email Custom accounts.
70+
* you. Stripe only emails Custom accounts with your consent.
7171
*/
7272
@SerializedName("email")
7373
String email;
@@ -309,7 +309,7 @@ public Builder setDocuments(Documents documents) {
309309

310310
/**
311311
* The email address of the account holder. This is only to make the account easier to identify
312-
* to you. Stripe will never directly email Custom accounts.
312+
* to you. Stripe only emails Custom accounts with your consent.
313313
*/
314314
public Builder setEmail(String email) {
315315
this.email = email;

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class AccountUpdateParams extends ApiRequestParams {
5858

5959
/**
6060
* The email address of the account holder. This is only to make the account easier to identify to
61-
* you. Stripe will never directly email Custom accounts.
61+
* you. Stripe only emails Custom accounts with your consent.
6262
*/
6363
@SerializedName("email")
6464
Object email;
@@ -297,7 +297,7 @@ public Builder setDocuments(Documents documents) {
297297

298298
/**
299299
* The email address of the account holder. This is only to make the account easier to identify
300-
* to you. Stripe will never directly email Custom accounts.
300+
* to you. Stripe only emails Custom accounts with your consent.
301301
*/
302302
public Builder setEmail(String email) {
303303
this.email = email;
@@ -306,7 +306,7 @@ public Builder setEmail(String email) {
306306

307307
/**
308308
* The email address of the account holder. This is only to make the account easier to identify
309-
* to you. Stripe will never directly email Custom accounts.
309+
* to you. Stripe only emails Custom accounts with your consent.
310310
*/
311311
public Builder setEmail(EmptyParam email) {
312312
this.email = email;

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

+3
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ public enum Type implements ApiRequestParams.EnumParam {
229229
@SerializedName("ideal")
230230
IDEAL("ideal"),
231231

232+
@SerializedName("klarna")
233+
KLARNA("klarna"),
234+
232235
@SerializedName("oxxo")
233236
OXXO("oxxo"),
234237

0 commit comments

Comments
 (0)