Skip to content

Commit ad43ef7

Browse files
Codegen for openapi bb9e55d (#1154)
1 parent 19ff603 commit ad43ef7

8 files changed

+350
-2
lines changed

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

+12
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,9 @@ public static class PaymentMethodDetails extends StripeObject {
10381038
@SerializedName("giropay")
10391039
Giropay giropay;
10401040

1041+
@SerializedName("grabpay")
1042+
Grabpay grabpay;
1043+
10411044
@SerializedName("ideal")
10421045
Ideal ideal;
10431046

@@ -1850,6 +1853,15 @@ public static class Giropay extends StripeObject {
18501853
String verifiedName;
18511854
}
18521855

1856+
@Getter
1857+
@Setter
1858+
@EqualsAndHashCode(callSuper = false)
1859+
public static class Grabpay extends StripeObject {
1860+
/** Unique transaction id generated by GrabPay. */
1861+
@SerializedName("transaction_id")
1862+
String transactionId;
1863+
}
1864+
18531865
@Getter
18541866
@Setter
18551867
@EqualsAndHashCode(callSuper = false)

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

+10-2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
6565
@SerializedName("giropay")
6666
Giropay giropay;
6767

68+
@SerializedName("grabpay")
69+
Grabpay grabpay;
70+
6871
/** Unique identifier for the object. */
6972
@Getter(onMethod_ = {@Override})
7073
@SerializedName("id")
@@ -117,8 +120,8 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore<P
117120
* matching this value. It contains additional information specific to the PaymentMethod type.
118121
*
119122
* <p>One of {@code alipay}, {@code au_becs_debit}, {@code bacs_debit}, {@code bancontact}, {@code
120-
* card}, {@code eps}, {@code fpx}, {@code giropay}, {@code ideal}, {@code oxxo}, {@code p24},
121-
* {@code sepa_debit}, or {@code sofort}.
123+
* card}, {@code eps}, {@code fpx}, {@code giropay}, {@code grabpay}, {@code ideal}, {@code oxxo},
124+
* {@code p24}, {@code sepa_debit}, or {@code sofort}.
122125
*/
123126
@SerializedName("type")
124127
String type;
@@ -781,6 +784,11 @@ public static class Fpx extends StripeObject {
781784
@EqualsAndHashCode(callSuper = false)
782785
public static class Giropay extends StripeObject {}
783786

787+
@Getter
788+
@Setter
789+
@EqualsAndHashCode(callSuper = false)
790+
public static class Grabpay extends StripeObject {}
791+
784792
@Getter
785793
@Setter
786794
@EqualsAndHashCode(callSuper = false)

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

+81
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,13 @@ public static class PaymentMethodData {
858858
@SerializedName("giropay")
859859
Giropay giropay;
860860

861+
/**
862+
* If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay
863+
* payment method.
864+
*/
865+
@SerializedName("grabpay")
866+
Grabpay grabpay;
867+
861868
/**
862869
* If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment
863870
* method.
@@ -927,6 +934,7 @@ private PaymentMethodData(
927934
Map<String, Object> extraParams,
928935
Fpx fpx,
929936
Giropay giropay,
937+
Grabpay grabpay,
930938
Ideal ideal,
931939
InteracPresent interacPresent,
932940
Map<String, String> metadata,
@@ -944,6 +952,7 @@ private PaymentMethodData(
944952
this.extraParams = extraParams;
945953
this.fpx = fpx;
946954
this.giropay = giropay;
955+
this.grabpay = grabpay;
947956
this.ideal = ideal;
948957
this.interacPresent = interacPresent;
949958
this.metadata = metadata;
@@ -977,6 +986,8 @@ public static class Builder {
977986

978987
private Giropay giropay;
979988

989+
private Grabpay grabpay;
990+
980991
private Ideal ideal;
981992

982993
private InteracPresent interacPresent;
@@ -1005,6 +1016,7 @@ public PaymentMethodData build() {
10051016
this.extraParams,
10061017
this.fpx,
10071018
this.giropay,
1019+
this.grabpay,
10081020
this.ideal,
10091021
this.interacPresent,
10101022
this.metadata,
@@ -1114,6 +1126,15 @@ public Builder setGiropay(Giropay giropay) {
11141126
return this;
11151127
}
11161128

1129+
/**
1130+
* If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay
1131+
* payment method.
1132+
*/
1133+
public Builder setGrabpay(Grabpay grabpay) {
1134+
this.grabpay = grabpay;
1135+
return this;
1136+
}
1137+
11171138
/**
11181139
* If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL
11191140
* payment method.
@@ -2046,6 +2067,63 @@ public Builder putAllExtraParam(Map<String, Object> map) {
20462067
}
20472068
}
20482069

2070+
@Getter
2071+
public static class Grabpay {
2072+
/**
2073+
* Map of extra parameters for custom features not available in this client library. The
2074+
* content in this map is not serialized under this field's {@code @SerializedName} value.
2075+
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
2076+
* name in this param object. Effectively, this map is flattened to its parent instance.
2077+
*/
2078+
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2079+
Map<String, Object> extraParams;
2080+
2081+
private Grabpay(Map<String, Object> extraParams) {
2082+
this.extraParams = extraParams;
2083+
}
2084+
2085+
public static Builder builder() {
2086+
return new Builder();
2087+
}
2088+
2089+
public static class Builder {
2090+
private Map<String, Object> extraParams;
2091+
2092+
/** Finalize and obtain parameter instance from this builder. */
2093+
public Grabpay build() {
2094+
return new Grabpay(this.extraParams);
2095+
}
2096+
2097+
/**
2098+
* Add a key/value pair to `extraParams` map. A map is initialized for the first
2099+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2100+
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Grabpay#extraParams} for the
2101+
* field documentation.
2102+
*/
2103+
public Builder putExtraParam(String key, Object value) {
2104+
if (this.extraParams == null) {
2105+
this.extraParams = new HashMap<>();
2106+
}
2107+
this.extraParams.put(key, value);
2108+
return this;
2109+
}
2110+
2111+
/**
2112+
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2113+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2114+
* map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Grabpay#extraParams} for the
2115+
* field documentation.
2116+
*/
2117+
public Builder putAllExtraParam(Map<String, Object> map) {
2118+
if (this.extraParams == null) {
2119+
this.extraParams = new HashMap<>();
2120+
}
2121+
this.extraParams.putAll(map);
2122+
return this;
2123+
}
2124+
}
2125+
}
2126+
20492127
@Getter
20502128
public static class Ideal {
20512129
/** The customer's bank. */
@@ -2618,6 +2696,9 @@ public enum Type implements ApiRequestParams.EnumParam {
26182696
@SerializedName("giropay")
26192697
GIROPAY("giropay"),
26202698

2699+
@SerializedName("grabpay")
2700+
GRABPAY("grabpay"),
2701+
26212702
@SerializedName("ideal")
26222703
IDEAL("ideal"),
26232704

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

+81
Original file line numberDiff line numberDiff line change
@@ -1231,6 +1231,13 @@ public static class PaymentMethodData {
12311231
@SerializedName("giropay")
12321232
Giropay giropay;
12331233

1234+
/**
1235+
* If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay
1236+
* payment method.
1237+
*/
1238+
@SerializedName("grabpay")
1239+
Grabpay grabpay;
1240+
12341241
/**
12351242
* If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL payment
12361243
* method.
@@ -1300,6 +1307,7 @@ private PaymentMethodData(
13001307
Map<String, Object> extraParams,
13011308
Fpx fpx,
13021309
Giropay giropay,
1310+
Grabpay grabpay,
13031311
Ideal ideal,
13041312
InteracPresent interacPresent,
13051313
Map<String, String> metadata,
@@ -1317,6 +1325,7 @@ private PaymentMethodData(
13171325
this.extraParams = extraParams;
13181326
this.fpx = fpx;
13191327
this.giropay = giropay;
1328+
this.grabpay = grabpay;
13201329
this.ideal = ideal;
13211330
this.interacPresent = interacPresent;
13221331
this.metadata = metadata;
@@ -1350,6 +1359,8 @@ public static class Builder {
13501359

13511360
private Giropay giropay;
13521361

1362+
private Grabpay grabpay;
1363+
13531364
private Ideal ideal;
13541365

13551366
private InteracPresent interacPresent;
@@ -1378,6 +1389,7 @@ public PaymentMethodData build() {
13781389
this.extraParams,
13791390
this.fpx,
13801391
this.giropay,
1392+
this.grabpay,
13811393
this.ideal,
13821394
this.interacPresent,
13831395
this.metadata,
@@ -1487,6 +1499,15 @@ public Builder setGiropay(Giropay giropay) {
14871499
return this;
14881500
}
14891501

1502+
/**
1503+
* If this is a {@code grabpay} PaymentMethod, this hash contains details about the GrabPay
1504+
* payment method.
1505+
*/
1506+
public Builder setGrabpay(Grabpay grabpay) {
1507+
this.grabpay = grabpay;
1508+
return this;
1509+
}
1510+
14901511
/**
14911512
* If this is an {@code ideal} PaymentMethod, this hash contains details about the iDEAL
14921513
* payment method.
@@ -2419,6 +2440,63 @@ public Builder putAllExtraParam(Map<String, Object> map) {
24192440
}
24202441
}
24212442

2443+
@Getter
2444+
public static class Grabpay {
2445+
/**
2446+
* Map of extra parameters for custom features not available in this client library. The
2447+
* content in this map is not serialized under this field's {@code @SerializedName} value.
2448+
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
2449+
* name in this param object. Effectively, this map is flattened to its parent instance.
2450+
*/
2451+
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
2452+
Map<String, Object> extraParams;
2453+
2454+
private Grabpay(Map<String, Object> extraParams) {
2455+
this.extraParams = extraParams;
2456+
}
2457+
2458+
public static Builder builder() {
2459+
return new Builder();
2460+
}
2461+
2462+
public static class Builder {
2463+
private Map<String, Object> extraParams;
2464+
2465+
/** Finalize and obtain parameter instance from this builder. */
2466+
public Grabpay build() {
2467+
return new Grabpay(this.extraParams);
2468+
}
2469+
2470+
/**
2471+
* Add a key/value pair to `extraParams` map. A map is initialized for the first
2472+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2473+
* map. See {@link PaymentIntentCreateParams.PaymentMethodData.Grabpay#extraParams} for the
2474+
* field documentation.
2475+
*/
2476+
public Builder putExtraParam(String key, Object value) {
2477+
if (this.extraParams == null) {
2478+
this.extraParams = new HashMap<>();
2479+
}
2480+
this.extraParams.put(key, value);
2481+
return this;
2482+
}
2483+
2484+
/**
2485+
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
2486+
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
2487+
* map. See {@link PaymentIntentCreateParams.PaymentMethodData.Grabpay#extraParams} for the
2488+
* field documentation.
2489+
*/
2490+
public Builder putAllExtraParam(Map<String, Object> map) {
2491+
if (this.extraParams == null) {
2492+
this.extraParams = new HashMap<>();
2493+
}
2494+
this.extraParams.putAll(map);
2495+
return this;
2496+
}
2497+
}
2498+
}
2499+
24222500
@Getter
24232501
public static class Ideal {
24242502
/** The customer's bank. */
@@ -2991,6 +3069,9 @@ public enum Type implements ApiRequestParams.EnumParam {
29913069
@SerializedName("giropay")
29923070
GIROPAY("giropay"),
29933071

3072+
@SerializedName("grabpay")
3073+
GRABPAY("grabpay"),
3074+
29943075
@SerializedName("ideal")
29953076
IDEAL("ideal"),
29963077

0 commit comments

Comments
 (0)