Skip to content

Commit 54fd17d

Browse files
Update generated code for v2174 and
1 parent ec5c132 commit 54fd17d

File tree

4 files changed

+38
-4
lines changed

4 files changed

+38
-4
lines changed

CODEGEN_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9d4f7dc7040d2aee8e0598ba54e93bafcb2103ba
1+
e5a785b8374103d84e609caec05bef6deec02a76

OPENAPI_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2172
1+
v2174

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,6 +1926,14 @@ public static class Custom extends StripeObject {
19261926
@SerializedName("type")
19271927
String type;
19281928

1929+
/**
1930+
* Indicates whether the payment method supports off-session payments.
1931+
*
1932+
* <p>Equal to {@code off_session}.
1933+
*/
1934+
@SerializedName("usage")
1935+
String usage;
1936+
19291937
/**
19301938
* For more details about Logo, please refer to the <a href="https://docs.stripe.com/api">API
19311939
* Reference.</a>

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

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -882,9 +882,14 @@ public static class Custom {
882882
@SerializedName("payment_method_reference")
883883
Object paymentMethodReference;
884884

885-
private Custom(Map<String, Object> extraParams, Object paymentMethodReference) {
885+
/** Indicates whether the payment method supports off-session payments. */
886+
@SerializedName("usage")
887+
Usage usage;
888+
889+
private Custom(Map<String, Object> extraParams, Object paymentMethodReference, Usage usage) {
886890
this.extraParams = extraParams;
887891
this.paymentMethodReference = paymentMethodReference;
892+
this.usage = usage;
888893
}
889894

890895
public static Builder builder() {
@@ -896,9 +901,12 @@ public static class Builder {
896901

897902
private Object paymentMethodReference;
898903

904+
private Usage usage;
905+
899906
/** Finalize and obtain parameter instance from this builder. */
900907
public PaymentMethodUpdateParams.Custom build() {
901-
return new PaymentMethodUpdateParams.Custom(this.extraParams, this.paymentMethodReference);
908+
return new PaymentMethodUpdateParams.Custom(
909+
this.extraParams, this.paymentMethodReference, this.usage);
902910
}
903911

904912
/**
@@ -938,6 +946,24 @@ public Builder setPaymentMethodReference(EmptyParam paymentMethodReference) {
938946
this.paymentMethodReference = paymentMethodReference;
939947
return this;
940948
}
949+
950+
/** Indicates whether the payment method supports off-session payments. */
951+
public Builder setUsage(PaymentMethodUpdateParams.Custom.Usage usage) {
952+
this.usage = usage;
953+
return this;
954+
}
955+
}
956+
957+
public enum Usage implements ApiRequestParams.EnumParam {
958+
@SerializedName("off_session")
959+
OFF_SESSION("off_session");
960+
961+
@Getter(onMethod_ = {@Override})
962+
private final String value;
963+
964+
Usage(String value) {
965+
this.value = value;
966+
}
941967
}
942968
}
943969

0 commit comments

Comments
 (0)