Skip to content

Commit

Permalink
Codegen for openapi v147
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe committed May 23, 2022
1 parent dcea4a6 commit fb4483e
Show file tree
Hide file tree
Showing 4 changed files with 195 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v146
v147
8 changes: 8 additions & 0 deletions src/main/java/com/stripe/model/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,14 @@ public static class Capabilities extends StripeObject {
@SerializedName("transfers")
String transfers;

/**
* The status of the banking capability, or whether the account can have bank accounts.
*
* <p>One of {@code active}, {@code inactive}, or {@code pending}.
*/
@SerializedName("treasury")
String treasury;

/**
* The status of the US bank account ACH payments capability of the account, or whether the
* account can directly process US bank account charges.
Expand Down
93 changes: 93 additions & 0 deletions src/main/java/com/stripe/param/AccountCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,10 @@ public static class Capabilities {
@SerializedName("transfers")
Transfers transfers;

/** The treasury capability. */
@SerializedName("treasury")
Treasury treasury;

/** The us_bank_account_ach_payments capability. */
@SerializedName("us_bank_account_ach_payments")
UsBankAccountAchPayments usBankAccountAchPayments;
Expand Down Expand Up @@ -981,6 +985,7 @@ private Capabilities(
TaxReportingUs1099K taxReportingUs1099K,
TaxReportingUs1099Misc taxReportingUs1099Misc,
Transfers transfers,
Treasury treasury,
UsBankAccountAchPayments usBankAccountAchPayments) {
this.acssDebitPayments = acssDebitPayments;
this.afterpayClearpayPayments = afterpayClearpayPayments;
Expand Down Expand Up @@ -1010,6 +1015,7 @@ private Capabilities(
this.taxReportingUs1099K = taxReportingUs1099K;
this.taxReportingUs1099Misc = taxReportingUs1099Misc;
this.transfers = transfers;
this.treasury = treasury;
this.usBankAccountAchPayments = usBankAccountAchPayments;
}

Expand Down Expand Up @@ -1074,6 +1080,8 @@ public static class Builder {

private Transfers transfers;

private Treasury treasury;

private UsBankAccountAchPayments usBankAccountAchPayments;

/** Finalize and obtain parameter instance from this builder. */
Expand Down Expand Up @@ -1107,6 +1115,7 @@ public Capabilities build() {
this.taxReportingUs1099K,
this.taxReportingUs1099Misc,
this.transfers,
this.treasury,
this.usBankAccountAchPayments);
}

Expand Down Expand Up @@ -1299,6 +1308,12 @@ public Builder setTransfers(Transfers transfers) {
return this;
}

/** The treasury capability. */
public Builder setTreasury(Treasury treasury) {
this.treasury = treasury;
return this;
}

/** The us_bank_account_ach_payments capability. */
public Builder setUsBankAccountAchPayments(
UsBankAccountAchPayments usBankAccountAchPayments) {
Expand Down Expand Up @@ -3413,6 +3428,84 @@ public Builder setRequested(Boolean requested) {
}
}

@Getter
public static class Treasury {
/**
* 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;

/**
* Passing true requests the capability for the account, if it is not already requested. A
* requested capability may not immediately become active. Any requirements to activate the
* capability are returned in the {@code requirements} arrays.
*/
@SerializedName("requested")
Boolean requested;

private Treasury(Map<String, Object> extraParams, Boolean requested) {
this.extraParams = extraParams;
this.requested = requested;
}

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

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

private Boolean requested;

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

/**
* 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 AccountCreateParams.Capabilities.Treasury#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 AccountCreateParams.Capabilities.Treasury#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;
}

/**
* Passing true requests the capability for the account, if it is not already requested. A
* requested capability may not immediately become active. Any requirements to activate the
* capability are returned in the {@code requirements} arrays.
*/
public Builder setRequested(Boolean requested) {
this.requested = requested;
return this;
}
}
}

@Getter
public static class UsBankAccountAchPayments {
/**
Expand Down
93 changes: 93 additions & 0 deletions src/main/java/com/stripe/param/AccountUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -1028,6 +1028,10 @@ public static class Capabilities {
@SerializedName("transfers")
Transfers transfers;

/** The treasury capability. */
@SerializedName("treasury")
Treasury treasury;

/** The us_bank_account_ach_payments capability. */
@SerializedName("us_bank_account_ach_payments")
UsBankAccountAchPayments usBankAccountAchPayments;
Expand Down Expand Up @@ -1061,6 +1065,7 @@ private Capabilities(
TaxReportingUs1099K taxReportingUs1099K,
TaxReportingUs1099Misc taxReportingUs1099Misc,
Transfers transfers,
Treasury treasury,
UsBankAccountAchPayments usBankAccountAchPayments) {
this.acssDebitPayments = acssDebitPayments;
this.afterpayClearpayPayments = afterpayClearpayPayments;
Expand Down Expand Up @@ -1090,6 +1095,7 @@ private Capabilities(
this.taxReportingUs1099K = taxReportingUs1099K;
this.taxReportingUs1099Misc = taxReportingUs1099Misc;
this.transfers = transfers;
this.treasury = treasury;
this.usBankAccountAchPayments = usBankAccountAchPayments;
}

Expand Down Expand Up @@ -1154,6 +1160,8 @@ public static class Builder {

private Transfers transfers;

private Treasury treasury;

private UsBankAccountAchPayments usBankAccountAchPayments;

/** Finalize and obtain parameter instance from this builder. */
Expand Down Expand Up @@ -1187,6 +1195,7 @@ public Capabilities build() {
this.taxReportingUs1099K,
this.taxReportingUs1099Misc,
this.transfers,
this.treasury,
this.usBankAccountAchPayments);
}

Expand Down Expand Up @@ -1379,6 +1388,12 @@ public Builder setTransfers(Transfers transfers) {
return this;
}

/** The treasury capability. */
public Builder setTreasury(Treasury treasury) {
this.treasury = treasury;
return this;
}

/** The us_bank_account_ach_payments capability. */
public Builder setUsBankAccountAchPayments(
UsBankAccountAchPayments usBankAccountAchPayments) {
Expand Down Expand Up @@ -3493,6 +3508,84 @@ public Builder setRequested(Boolean requested) {
}
}

@Getter
public static class Treasury {
/**
* 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;

/**
* Passing true requests the capability for the account, if it is not already requested. A
* requested capability may not immediately become active. Any requirements to activate the
* capability are returned in the {@code requirements} arrays.
*/
@SerializedName("requested")
Boolean requested;

private Treasury(Map<String, Object> extraParams, Boolean requested) {
this.extraParams = extraParams;
this.requested = requested;
}

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

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

private Boolean requested;

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

/**
* 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 AccountUpdateParams.Capabilities.Treasury#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 AccountUpdateParams.Capabilities.Treasury#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;
}

/**
* Passing true requests the capability for the account, if it is not already requested. A
* requested capability may not immediately become active. Any requirements to activate the
* capability are returned in the {@code requirements} arrays.
*/
public Builder setRequested(Boolean requested) {
this.requested = requested;
return this;
}
}
}

@Getter
public static class UsBankAccountAchPayments {
/**
Expand Down

0 comments on commit fb4483e

Please sign in to comment.