Skip to content

Commit

Permalink
Update generated code for v992
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Apr 25, 2024
1 parent 3abe76c commit 6226891
Show file tree
Hide file tree
Showing 4 changed files with 432 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v991
v992
47 changes: 47 additions & 0 deletions src/main/java/com/stripe/model/PaymentMethodConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId {
@SerializedName("livemode")
Boolean livemode;

@SerializedName("mobilepay")
Mobilepay mobilepay;

@SerializedName("multibanco")
Multibanco multibanco;

Expand Down Expand Up @@ -1444,6 +1447,49 @@ public static class DisplayPreference extends StripeObject {
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class Mobilepay extends StripeObject {
/**
* Whether this payment method may be offered at checkout. True if {@code display_preference} is
* {@code on} and the payment method's capability is active.
*/
@SerializedName("available")
Boolean available;

@SerializedName("display_preference")
DisplayPreference displayPreference;

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class DisplayPreference extends StripeObject {
/**
* For child configs, whether or not the account's preference will be observed. If {@code
* false}, the parent configuration's default is used.
*/
@SerializedName("overridable")
Boolean overridable;

/**
* The account's display preference.
*
* <p>One of {@code none}, {@code off}, or {@code on}.
*/
@SerializedName("preference")
String preference;

/**
* The effective display preference value.
*
* <p>One of {@code off}, or {@code on}.
*/
@SerializedName("value")
String value;
}
}

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
Expand Down Expand Up @@ -2031,6 +2077,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(klarna, responseGetter);
trySetResponseGetter(konbini, responseGetter);
trySetResponseGetter(link, responseGetter);
trySetResponseGetter(mobilepay, responseGetter);
trySetResponseGetter(multibanco, responseGetter);
trySetResponseGetter(oxxo, responseGetter);
trySetResponseGetter(p24, responseGetter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,16 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams {
@SerializedName("link")
Link link;

/**
* MobilePay is a <a href="https://stripe.com/docs/payments/payment-methods#usage">single-use</a>
* card wallet payment method used in Denmark and Finland. It allows customers to <a
* href="https://stripe.com/docs/payments/payment-methods#customer-actions">authenticate and
* approve</a> payments using the MobilePay app. Check this <a
* href="https://stripe.com/docs/payments/mobilepay">page</a> for more details.
*/
@SerializedName("mobilepay")
Mobilepay mobilepay;

/**
* Stripe users in Europe and the United States can accept Multibanco payments from customers in
* Portugal using <a href="https://stripe.com/docs/sources">Sources</a>—a single integration path
Expand Down Expand Up @@ -409,6 +419,7 @@ private PaymentMethodConfigurationCreateParams(
Klarna klarna,
Konbini konbini,
Link link,
Mobilepay mobilepay,
Multibanco multibanco,
String name,
Oxxo oxxo,
Expand Down Expand Up @@ -452,6 +463,7 @@ private PaymentMethodConfigurationCreateParams(
this.klarna = klarna;
this.konbini = konbini;
this.link = link;
this.mobilepay = mobilepay;
this.multibanco = multibanco;
this.name = name;
this.oxxo = oxxo;
Expand Down Expand Up @@ -530,6 +542,8 @@ public static class Builder {

private Link link;

private Mobilepay mobilepay;

private Multibanco multibanco;

private String name;
Expand Down Expand Up @@ -591,6 +605,7 @@ public PaymentMethodConfigurationCreateParams build() {
this.klarna,
this.konbini,
this.link,
this.mobilepay,
this.multibanco,
this.name,
this.oxxo,
Expand Down Expand Up @@ -950,6 +965,19 @@ public Builder setLink(PaymentMethodConfigurationCreateParams.Link link) {
return this;
}

/**
* MobilePay is a <a
* href="https://stripe.com/docs/payments/payment-methods#usage">single-use</a> card wallet
* payment method used in Denmark and Finland. It allows customers to <a
* href="https://stripe.com/docs/payments/payment-methods#customer-actions">authenticate and
* approve</a> payments using the MobilePay app. Check this <a
* href="https://stripe.com/docs/payments/mobilepay">page</a> for more details.
*/
public Builder setMobilepay(PaymentMethodConfigurationCreateParams.Mobilepay mobilepay) {
this.mobilepay = mobilepay;
return this;
}

/**
* Stripe users in Europe and the United States can accept Multibanco payments from customers in
* Portugal using <a href="https://stripe.com/docs/sources">Sources</a>—a single integration
Expand Down Expand Up @@ -5361,6 +5389,170 @@ public enum Preference implements ApiRequestParams.EnumParam {
}
}

@Getter
public static class Mobilepay {
/** Whether or not the payment method should be displayed. */
@SerializedName("display_preference")
DisplayPreference displayPreference;

/**
* Map of extra parameters for custom features not available in this client library. The content
* in this map is not serialized under this field's {@code @SerializedName} value. Instead, each
* key/value pair is serialized as if the key is a root-level field (serialized) name in this
* param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map<String, Object> extraParams;

private Mobilepay(DisplayPreference displayPreference, Map<String, Object> extraParams) {
this.displayPreference = displayPreference;
this.extraParams = extraParams;
}

public static Builder builder() {
return new Builder();
}

public static class Builder {
private DisplayPreference displayPreference;

private Map<String, Object> extraParams;

/** Finalize and obtain parameter instance from this builder. */
public PaymentMethodConfigurationCreateParams.Mobilepay build() {
return new PaymentMethodConfigurationCreateParams.Mobilepay(
this.displayPreference, this.extraParams);
}

/** Whether or not the payment method should be displayed. */
public Builder setDisplayPreference(
PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference displayPreference) {
this.displayPreference = displayPreference;
return this;
}

/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll`
* call, and subsequent calls add additional key/value pairs to the original map. See {@link
* PaymentMethodConfigurationCreateParams.Mobilepay#extraParams} for the field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}

/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original map.
* See {@link PaymentMethodConfigurationCreateParams.Mobilepay#extraParams} for the field
* documentation.
*/
public Builder putAllExtraParam(Map<String, Object> map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}
}

@Getter
public static class DisplayPreference {
/**
* Map of extra parameters for custom features not available in this client library. The
* content in this map is not serialized under this field's {@code @SerializedName} value.
* Instead, each key/value pair is serialized as if the key is a root-level field (serialized)
* name in this param object. Effectively, this map is flattened to its parent instance.
*/
@SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY)
Map<String, Object> extraParams;

/** The account's preference for whether or not to display this payment method. */
@SerializedName("preference")
Preference preference;

private DisplayPreference(Map<String, Object> extraParams, Preference preference) {
this.extraParams = extraParams;
this.preference = preference;
}

public static Builder builder() {
return new Builder();
}

public static class Builder {
private Map<String, Object> extraParams;

private Preference preference;

/** Finalize and obtain parameter instance from this builder. */
public PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference build() {
return new PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference(
this.extraParams, this.preference);
}

/**
* Add a key/value pair to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference#extraParams} for the
* field documentation.
*/
public Builder putExtraParam(String key, Object value) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.put(key, value);
return this;
}

/**
* Add all map key/value pairs to `extraParams` map. A map is initialized for the first
* `put/putAll` call, and subsequent calls add additional key/value pairs to the original
* map. See {@link
* PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference#extraParams} for the
* field documentation.
*/
public Builder putAllExtraParam(Map<String, Object> map) {
if (this.extraParams == null) {
this.extraParams = new HashMap<>();
}
this.extraParams.putAll(map);
return this;
}

/** The account's preference for whether or not to display this payment method. */
public Builder setPreference(
PaymentMethodConfigurationCreateParams.Mobilepay.DisplayPreference.Preference
preference) {
this.preference = preference;
return this;
}
}

public enum Preference implements ApiRequestParams.EnumParam {
@SerializedName("none")
NONE("none"),

@SerializedName("off")
OFF("off"),

@SerializedName("on")
ON("on");

@Getter(onMethod_ = {@Override})
private final String value;

Preference(String value) {
this.value = value;
}
}
}
}

@Getter
public static class Multibanco {
/** Whether or not the payment method should be displayed. */
Expand Down

0 comments on commit 6226891

Please sign in to comment.