Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #1242

Merged
merged 1 commit into from
Jul 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/main/java/com/stripe/model/BankAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ public class BankAccount extends ApiResource
@SerializedName("account_holder_type")
String accountHolderType;

/**
* The bank account type. This can only be {@code checking} or {@code savings} in most countries.
* In Japan, this can only be {@code futsu} or {@code toza}.
*/
@SerializedName("account_type")
String accountType;

/**
* A set of available payout methods for this bank account. Only values from this set should be
* passed as the {@code method} when creating a payout.
Expand Down
42 changes: 42 additions & 0 deletions src/main/java/com/stripe/param/ExternalAccountUpdateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ public class ExternalAccountUpdateParams extends ApiRequestParams {
@SerializedName("account_holder_type")
EnumParam accountHolderType;

/**
* The bank account type. This can only be {@code checking} or {@code savings} in most countries.
* In Japan, this can only be {@code futsu} or {@code toza}.
*/
@SerializedName("account_type")
AccountType accountType;

/** City/District/Suburb/Town/Village. */
@SerializedName("address_city")
Object addressCity;
Expand Down Expand Up @@ -89,6 +96,7 @@ public class ExternalAccountUpdateParams extends ApiRequestParams {
private ExternalAccountUpdateParams(
Object accountHolderName,
EnumParam accountHolderType,
AccountType accountType,
Object addressCity,
Object addressCountry,
Object addressLine1,
Expand All @@ -104,6 +112,7 @@ private ExternalAccountUpdateParams(
Object name) {
this.accountHolderName = accountHolderName;
this.accountHolderType = accountHolderType;
this.accountType = accountType;
this.addressCity = addressCity;
this.addressCountry = addressCountry;
this.addressLine1 = addressLine1;
Expand All @@ -128,6 +137,8 @@ public static class Builder {

private EnumParam accountHolderType;

private AccountType accountType;

private Object addressCity;

private Object addressCountry;
Expand Down Expand Up @@ -159,6 +170,7 @@ public ExternalAccountUpdateParams build() {
return new ExternalAccountUpdateParams(
this.accountHolderName,
this.accountHolderType,
this.accountType,
this.addressCity,
this.addressCountry,
this.addressLine1,
Expand Down Expand Up @@ -204,6 +216,15 @@ public Builder setAccountHolderType(EmptyParam accountHolderType) {
return this;
}

/**
* The bank account type. This can only be {@code checking} or {@code savings} in most
* countries. In Japan, this can only be {@code futsu} or {@code toza}.
*/
public Builder setAccountType(AccountType accountType) {
this.accountType = accountType;
return this;
}

/** City/District/Suburb/Town/Village. */
public Builder setAddressCity(String addressCity) {
this.addressCity = addressCity;
Expand Down Expand Up @@ -435,4 +456,25 @@ public enum AccountHolderType implements ApiRequestParams.EnumParam {
this.value = value;
}
}

public enum AccountType implements ApiRequestParams.EnumParam {
@SerializedName("checking")
CHECKING("checking"),

@SerializedName("futsu")
FUTSU("futsu"),

@SerializedName("savings")
SAVINGS("savings"),

@SerializedName("toza")
TOZA("toza");

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

AccountType(String value) {
this.value = value;
}
}
}
42 changes: 42 additions & 0 deletions src/main/java/com/stripe/param/TokenCreateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -2856,6 +2856,13 @@ public static class BankAccount {
@SerializedName("account_number")
String accountNumber;

/**
* The bank account type. This can only be {@code checking} or {@code savings} in most
* countries. In Japan, this can only be {@code futsu} or {@code toza}.
*/
@SerializedName("account_type")
AccountType accountType;

/** The country in which the bank account is located. */
@SerializedName("country")
String country;
Expand Down Expand Up @@ -2889,13 +2896,15 @@ private BankAccount(
String accountHolderName,
AccountHolderType accountHolderType,
String accountNumber,
AccountType accountType,
String country,
String currency,
Map<String, Object> extraParams,
String routingNumber) {
this.accountHolderName = accountHolderName;
this.accountHolderType = accountHolderType;
this.accountNumber = accountNumber;
this.accountType = accountType;
this.country = country;
this.currency = currency;
this.extraParams = extraParams;
Expand All @@ -2913,6 +2922,8 @@ public static class Builder {

private String accountNumber;

private AccountType accountType;

private String country;

private String currency;
Expand All @@ -2927,6 +2938,7 @@ public BankAccount build() {
this.accountHolderName,
this.accountHolderType,
this.accountNumber,
this.accountType,
this.country,
this.currency,
this.extraParams,
Expand Down Expand Up @@ -2957,6 +2969,15 @@ public Builder setAccountNumber(String accountNumber) {
return this;
}

/**
* The bank account type. This can only be {@code checking} or {@code savings} in most
* countries. In Japan, this can only be {@code futsu} or {@code toza}.
*/
public Builder setAccountType(AccountType accountType) {
this.accountType = accountType;
return this;
}

/** The country in which the bank account is located. */
public Builder setCountry(String country) {
this.country = country;
Expand Down Expand Up @@ -3024,6 +3045,27 @@ public enum AccountHolderType implements ApiRequestParams.EnumParam {
this.value = value;
}
}

public enum AccountType implements ApiRequestParams.EnumParam {
@SerializedName("checking")
CHECKING("checking"),

@SerializedName("futsu")
FUTSU("futsu"),

@SerializedName("savings")
SAVINGS("savings"),

@SerializedName("toza")
TOZA("toza");

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

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

@Getter
Expand Down