
com.adyen.model.checkout.CheckoutBankAccount Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of adyen-java-api-library Show documentation
Show all versions of adyen-java-api-library Show documentation
Adyen API Client Library for Java
/*
* Adyen Checkout API
*
* The version of the OpenAPI document: 71
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.adyen.model.checkout;
import java.util.Objects;
import java.util.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.core.JsonProcessingException;
/**
* CheckoutBankAccount
*/
@JsonPropertyOrder({
CheckoutBankAccount.JSON_PROPERTY_ACCOUNT_TYPE,
CheckoutBankAccount.JSON_PROPERTY_BANK_ACCOUNT_NUMBER,
CheckoutBankAccount.JSON_PROPERTY_BANK_CITY,
CheckoutBankAccount.JSON_PROPERTY_BANK_LOCATION_ID,
CheckoutBankAccount.JSON_PROPERTY_BANK_NAME,
CheckoutBankAccount.JSON_PROPERTY_BIC,
CheckoutBankAccount.JSON_PROPERTY_COUNTRY_CODE,
CheckoutBankAccount.JSON_PROPERTY_IBAN,
CheckoutBankAccount.JSON_PROPERTY_OWNER_NAME,
CheckoutBankAccount.JSON_PROPERTY_TAX_ID
})
public class CheckoutBankAccount {
/**
* The type of the bank account.
*/
public enum AccountTypeEnum {
BALANCE(String.valueOf("balance")),
CHECKING(String.valueOf("checking")),
DEPOSIT(String.valueOf("deposit")),
GENERAL(String.valueOf("general")),
OTHER(String.valueOf("other")),
PAYMENT(String.valueOf("payment")),
SAVINGS(String.valueOf("savings"));
private String value;
AccountTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static AccountTypeEnum fromValue(String value) {
for (AccountTypeEnum b : AccountTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ACCOUNT_TYPE = "accountType";
private AccountTypeEnum accountType;
public static final String JSON_PROPERTY_BANK_ACCOUNT_NUMBER = "bankAccountNumber";
private String bankAccountNumber;
public static final String JSON_PROPERTY_BANK_CITY = "bankCity";
private String bankCity;
public static final String JSON_PROPERTY_BANK_LOCATION_ID = "bankLocationId";
private String bankLocationId;
public static final String JSON_PROPERTY_BANK_NAME = "bankName";
private String bankName;
public static final String JSON_PROPERTY_BIC = "bic";
private String bic;
public static final String JSON_PROPERTY_COUNTRY_CODE = "countryCode";
private String countryCode;
public static final String JSON_PROPERTY_IBAN = "iban";
private String iban;
public static final String JSON_PROPERTY_OWNER_NAME = "ownerName";
private String ownerName;
public static final String JSON_PROPERTY_TAX_ID = "taxId";
private String taxId;
public CheckoutBankAccount() {
}
/**
* The type of the bank account.
*
* @param accountType The type of the bank account.
* @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
*/
public CheckoutBankAccount accountType(AccountTypeEnum accountType) {
this.accountType = accountType;
return this;
}
/**
* The type of the bank account.
* @return accountType The type of the bank account.
*/
@JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public AccountTypeEnum getAccountType() {
return accountType;
}
/**
* The type of the bank account.
*
* @param accountType The type of the bank account.
*/
@JsonProperty(JSON_PROPERTY_ACCOUNT_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setAccountType(AccountTypeEnum accountType) {
this.accountType = accountType;
}
/**
* The bank account number (without separators).
*
* @param bankAccountNumber The bank account number (without separators).
* @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
*/
public CheckoutBankAccount bankAccountNumber(String bankAccountNumber) {
this.bankAccountNumber = bankAccountNumber;
return this;
}
/**
* The bank account number (without separators).
* @return bankAccountNumber The bank account number (without separators).
*/
@JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBankAccountNumber() {
return bankAccountNumber;
}
/**
* The bank account number (without separators).
*
* @param bankAccountNumber The bank account number (without separators).
*/
@JsonProperty(JSON_PROPERTY_BANK_ACCOUNT_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBankAccountNumber(String bankAccountNumber) {
this.bankAccountNumber = bankAccountNumber;
}
/**
* The bank city.
*
* @param bankCity The bank city.
* @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
*/
public CheckoutBankAccount bankCity(String bankCity) {
this.bankCity = bankCity;
return this;
}
/**
* The bank city.
* @return bankCity The bank city.
*/
@JsonProperty(JSON_PROPERTY_BANK_CITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBankCity() {
return bankCity;
}
/**
* The bank city.
*
* @param bankCity The bank city.
*/
@JsonProperty(JSON_PROPERTY_BANK_CITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBankCity(String bankCity) {
this.bankCity = bankCity;
}
/**
* The location id of the bank. The field value is `nil` in most cases.
*
* @param bankLocationId The location id of the bank. The field value is `nil` in most cases.
* @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
*/
public CheckoutBankAccount bankLocationId(String bankLocationId) {
this.bankLocationId = bankLocationId;
return this;
}
/**
* The location id of the bank. The field value is `nil` in most cases.
* @return bankLocationId The location id of the bank. The field value is `nil` in most cases.
*/
@JsonProperty(JSON_PROPERTY_BANK_LOCATION_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBankLocationId() {
return bankLocationId;
}
/**
* The location id of the bank. The field value is `nil` in most cases.
*
* @param bankLocationId The location id of the bank. The field value is `nil` in most cases.
*/
@JsonProperty(JSON_PROPERTY_BANK_LOCATION_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBankLocationId(String bankLocationId) {
this.bankLocationId = bankLocationId;
}
/**
* The name of the bank.
*
* @param bankName The name of the bank.
* @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
*/
public CheckoutBankAccount bankName(String bankName) {
this.bankName = bankName;
return this;
}
/**
* The name of the bank.
* @return bankName The name of the bank.
*/
@JsonProperty(JSON_PROPERTY_BANK_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBankName() {
return bankName;
}
/**
* The name of the bank.
*
* @param bankName The name of the bank.
*/
@JsonProperty(JSON_PROPERTY_BANK_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBankName(String bankName) {
this.bankName = bankName;
}
/**
* The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.
*
* @param bic The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.
* @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
*/
public CheckoutBankAccount bic(String bic) {
this.bic = bic;
return this;
}
/**
* The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.
* @return bic The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.
*/
@JsonProperty(JSON_PROPERTY_BIC)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBic() {
return bic;
}
/**
* The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.
*
* @param bic The [Business Identifier Code](https://en.wikipedia.org/wiki/ISO_9362) (BIC) is the SWIFT address assigned to a bank. The field value is `nil` in most cases.
*/
@JsonProperty(JSON_PROPERTY_BIC)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBic(String bic) {
this.bic = bic;
}
/**
* Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL').
*
* @param countryCode Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL').
* @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
*/
public CheckoutBankAccount countryCode(String countryCode) {
this.countryCode = countryCode;
return this;
}
/**
* Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL').
* @return countryCode Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL').
*/
@JsonProperty(JSON_PROPERTY_COUNTRY_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCountryCode() {
return countryCode;
}
/**
* Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL').
*
* @param countryCode Country code where the bank is located. A valid value is an ISO two-character country code (e.g. 'NL').
*/
@JsonProperty(JSON_PROPERTY_COUNTRY_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCountryCode(String countryCode) {
this.countryCode = countryCode;
}
/**
* The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).
*
* @param iban The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).
* @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
*/
public CheckoutBankAccount iban(String iban) {
this.iban = iban;
return this;
}
/**
* The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).
* @return iban The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).
*/
@JsonProperty(JSON_PROPERTY_IBAN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getIban() {
return iban;
}
/**
* The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).
*
* @param iban The [International Bank Account Number](https://en.wikipedia.org/wiki/International_Bank_Account_Number) (IBAN).
*/
@JsonProperty(JSON_PROPERTY_IBAN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setIban(String iban) {
this.iban = iban;
}
/**
* The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.
*
* @param ownerName The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.
* @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
*/
public CheckoutBankAccount ownerName(String ownerName) {
this.ownerName = ownerName;
return this;
}
/**
* The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.
* @return ownerName The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.
*/
@JsonProperty(JSON_PROPERTY_OWNER_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getOwnerName() {
return ownerName;
}
/**
* The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.
*
* @param ownerName The name of the bank account holder. If you submit a name with non-Latin characters, we automatically replace some of them with corresponding Latin characters to meet the FATF recommendations. For example: * χ12 is converted to ch12. * üA is converted to euA. * Peter Møller is converted to Peter Mller, because banks don't accept 'ø'. After replacement, the ownerName must have at least three alphanumeric characters (A-Z, a-z, 0-9), and at least one of them must be a valid Latin character (A-Z, a-z). For example: * John17 - allowed. * J17 - allowed. * 171 - not allowed. * John-7 - allowed. > If provided details don't match the required format, the response returns the error message: 203 'Invalid bank account holder name'.
*/
@JsonProperty(JSON_PROPERTY_OWNER_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOwnerName(String ownerName) {
this.ownerName = ownerName;
}
/**
* The bank account holder's tax ID.
*
* @param taxId The bank account holder's tax ID.
* @return the current {@code CheckoutBankAccount} instance, allowing for method chaining
*/
public CheckoutBankAccount taxId(String taxId) {
this.taxId = taxId;
return this;
}
/**
* The bank account holder's tax ID.
* @return taxId The bank account holder's tax ID.
*/
@JsonProperty(JSON_PROPERTY_TAX_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getTaxId() {
return taxId;
}
/**
* The bank account holder's tax ID.
*
* @param taxId The bank account holder's tax ID.
*/
@JsonProperty(JSON_PROPERTY_TAX_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTaxId(String taxId) {
this.taxId = taxId;
}
/**
* Return true if this CheckoutBankAccount object is equal to o.
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CheckoutBankAccount checkoutBankAccount = (CheckoutBankAccount) o;
return Objects.equals(this.accountType, checkoutBankAccount.accountType) &&
Objects.equals(this.bankAccountNumber, checkoutBankAccount.bankAccountNumber) &&
Objects.equals(this.bankCity, checkoutBankAccount.bankCity) &&
Objects.equals(this.bankLocationId, checkoutBankAccount.bankLocationId) &&
Objects.equals(this.bankName, checkoutBankAccount.bankName) &&
Objects.equals(this.bic, checkoutBankAccount.bic) &&
Objects.equals(this.countryCode, checkoutBankAccount.countryCode) &&
Objects.equals(this.iban, checkoutBankAccount.iban) &&
Objects.equals(this.ownerName, checkoutBankAccount.ownerName) &&
Objects.equals(this.taxId, checkoutBankAccount.taxId);
}
@Override
public int hashCode() {
return Objects.hash(accountType, bankAccountNumber, bankCity, bankLocationId, bankName, bic, countryCode, iban, ownerName, taxId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CheckoutBankAccount {\n");
sb.append(" accountType: ").append(toIndentedString(accountType)).append("\n");
sb.append(" bankAccountNumber: ").append(toIndentedString(bankAccountNumber)).append("\n");
sb.append(" bankCity: ").append(toIndentedString(bankCity)).append("\n");
sb.append(" bankLocationId: ").append(toIndentedString(bankLocationId)).append("\n");
sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n");
sb.append(" bic: ").append(toIndentedString(bic)).append("\n");
sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n");
sb.append(" iban: ").append(toIndentedString(iban)).append("\n");
sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n");
sb.append(" taxId: ").append(toIndentedString(taxId)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
/**
* Create an instance of CheckoutBankAccount given an JSON string
*
* @param jsonString JSON string
* @return An instance of CheckoutBankAccount
* @throws JsonProcessingException if the JSON string is invalid with respect to CheckoutBankAccount
*/
public static CheckoutBankAccount fromJson(String jsonString) throws JsonProcessingException {
return JSON.getMapper().readValue(jsonString, CheckoutBankAccount.class);
}
/**
* Convert an instance of CheckoutBankAccount to an JSON string
*
* @return JSON string
*/
public String toJson() throws JsonProcessingException {
return JSON.getMapper().writeValueAsString(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy