Skip to content

Commit

Permalink
Update generated code for v763
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Jan 17, 2024
1 parent 6ad6cc4 commit 0b5c685
Show file tree
Hide file tree
Showing 136 changed files with 891 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v762
v763
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 @@ -100,6 +100,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId {
@SerializedName("cashapp")
Cashapp cashapp;

@SerializedName("customer_balance")
CustomerBalance customerBalance;

@SerializedName("eps")
Eps eps;

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

@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
public static class CustomerBalance 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 @@ -2019,6 +2065,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) {
trySetResponseGetter(card, responseGetter);
trySetResponseGetter(cartesBancaires, responseGetter);
trySetResponseGetter(cashapp, responseGetter);
trySetResponseGetter(customerBalance, responseGetter);
trySetResponseGetter(eps, responseGetter);
trySetResponseGetter(fpx, responseGetter);
trySetResponseGetter(giropay, responseGetter);
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/com/stripe/param/AccountUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,26 @@ public Builder setExternalAccount(AccountUpdateParams.Card externalAccount) {
return this;
}

/**
* A card or bank account to attach to the account for receiving <a
* href="https://stripe.com/docs/connect/bank-debit-card-payouts">payouts</a> (you won’t be able
* to use it for top-ups). You can provide either a token, like the ones returned by <a
* href="https://stripe.com/docs/js">Stripe.js</a>, or a dictionary, as documented in the {@code
* external_account} parameter for <a
* href="https://stripe.com/docs/api#account_create_bank_account">bank account</a> creation.
* <br>
* <br>
* By default, providing an external account sets it as the new default external account for its
* currency, and deletes the old default if one exists. To add additional external accounts
* without replacing the existing default for the currency, use the <a
* href="https://stripe.com/docs/api#account_create_bank_account">bank account</a> or <a
* href="https://stripe.com/docs/api#account_create_card">card creation</a> APIs.
*/
public Builder setExternalAccount(EmptyParam externalAccount) {
this.externalAccount = externalAccount;
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams {
@SerializedName("cashapp")
Cashapp cashapp;

/**
* Uses a customer’s <a href="https://stripe.com/docs/payments/customer-balance">cash balance</a>
* for the payment. The cash balance can be funded via a bank transfer. Check this <a
* href="https://stripe.com/docs/payments/bank-transfers">page</a> for more details.
*/
@SerializedName("customer_balance")
CustomerBalance customerBalance;

/**
* EPS is an Austria-based payment method that allows customers to complete transactions online
* using their bank credentials. EPS is supported by all Austrian banks and is accepted by over
Expand Down Expand Up @@ -354,6 +362,7 @@ private PaymentMethodConfigurationCreateParams(
Card card,
CartesBancaires cartesBancaires,
Cashapp cashapp,
CustomerBalance customerBalance,
Eps eps,
List<String> expand,
Map<String, Object> extraParams,
Expand Down Expand Up @@ -392,6 +401,7 @@ private PaymentMethodConfigurationCreateParams(
this.card = card;
this.cartesBancaires = cartesBancaires;
this.cashapp = cashapp;
this.customerBalance = customerBalance;
this.eps = eps;
this.expand = expand;
this.extraParams = extraParams;
Expand Down Expand Up @@ -451,6 +461,8 @@ public static class Builder {

private Cashapp cashapp;

private CustomerBalance customerBalance;

private Eps eps;

private List<String> expand;
Expand Down Expand Up @@ -516,6 +528,7 @@ public PaymentMethodConfigurationCreateParams build() {
this.card,
this.cartesBancaires,
this.cashapp,
this.customerBalance,
this.eps,
this.expand,
this.extraParams,
Expand Down Expand Up @@ -694,6 +707,17 @@ public Builder setCashapp(PaymentMethodConfigurationCreateParams.Cashapp cashapp
return this;
}

/**
* Uses a customer’s <a href="https://stripe.com/docs/payments/customer-balance">cash
* balance</a> for the payment. The cash balance can be funded via a bank transfer. Check this
* <a href="https://stripe.com/docs/payments/bank-transfers">page</a> for more details.
*/
public Builder setCustomerBalance(
PaymentMethodConfigurationCreateParams.CustomerBalance customerBalance) {
this.customerBalance = customerBalance;
return this;
}

/**
* EPS is an Austria-based payment method that allows customers to complete transactions online
* using their bank credentials. EPS is supported by all Austrian banks and is accepted by over
Expand Down Expand Up @@ -3285,6 +3309,172 @@ public enum Preference implements ApiRequestParams.EnumParam {
}
}

@Getter
public static class CustomerBalance {
/** 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 CustomerBalance(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.CustomerBalance build() {
return new PaymentMethodConfigurationCreateParams.CustomerBalance(
this.displayPreference, this.extraParams);
}

/** Whether or not the payment method should be displayed. */
public Builder setDisplayPreference(
PaymentMethodConfigurationCreateParams.CustomerBalance.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.CustomerBalance#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.CustomerBalance#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.CustomerBalance.DisplayPreference build() {
return new PaymentMethodConfigurationCreateParams.CustomerBalance.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.CustomerBalance.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.CustomerBalance.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.CustomerBalance.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 Eps {
/** Whether or not the payment method should be displayed. */
Expand Down
Loading

0 comments on commit 0b5c685

Please sign in to comment.