com.squareup.connect.models.V1BankAccount Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connect Show documentation
Show all versions of connect Show documentation
Java client library for the Square Connect API
/*
* Square Connect API
* Client library for accessing the Square Connect APIs
*
* OpenAPI spec version: 2.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.squareup.connect.models;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* V1BankAccount
*/
public class V1BankAccount {
@JsonProperty("id")
private String id = null;
@JsonProperty("merchant_id")
private String merchantId = null;
@JsonProperty("bank_name")
private String bankName = null;
@JsonProperty("name")
private String name = null;
@JsonProperty("routing_number")
private String routingNumber = null;
@JsonProperty("account_number_suffix")
private String accountNumberSuffix = null;
@JsonProperty("currency_code")
private String currencyCode = null;
/**
* The bank account's type (for example, savings or checking).
*/
public enum TypeEnum {
BUSINESS_CHECKING("BUSINESS_CHECKING"),
CHECKING("CHECKING"),
INVESTMENT("INVESTMENT"),
LOAN("LOAN"),
SAVINGS("SAVINGS"),
OTHER("OTHER");
private String value;
TypeEnum(String value) {
this.value = value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypeEnum fromValue(String text) {
for (TypeEnum b : TypeEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("type")
private TypeEnum type = null;
public V1BankAccount id(String id) {
this.id = id;
return this;
}
/**
* The bank account's Square-issued ID.
* @return id
**/
@ApiModelProperty(value = "The bank account's Square-issued ID.")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public V1BankAccount merchantId(String merchantId) {
this.merchantId = merchantId;
return this;
}
/**
* The Square-issued ID of the merchant associated with the bank account.
* @return merchantId
**/
@ApiModelProperty(value = "The Square-issued ID of the merchant associated with the bank account.")
public String getMerchantId() {
return merchantId;
}
public void setMerchantId(String merchantId) {
this.merchantId = merchantId;
}
public V1BankAccount bankName(String bankName) {
this.bankName = bankName;
return this;
}
/**
* The name of the bank that manages the account.
* @return bankName
**/
@ApiModelProperty(value = "The name of the bank that manages the account.")
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
public V1BankAccount name(String name) {
this.name = name;
return this;
}
/**
* The name associated with the bank account.
* @return name
**/
@ApiModelProperty(value = "The name associated with the bank account.")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public V1BankAccount routingNumber(String routingNumber) {
this.routingNumber = routingNumber;
return this;
}
/**
* The bank account's routing number.
* @return routingNumber
**/
@ApiModelProperty(value = "The bank account's routing number.")
public String getRoutingNumber() {
return routingNumber;
}
public void setRoutingNumber(String routingNumber) {
this.routingNumber = routingNumber;
}
public V1BankAccount accountNumberSuffix(String accountNumberSuffix) {
this.accountNumberSuffix = accountNumberSuffix;
return this;
}
/**
* The last few digits of the bank account number.
* @return accountNumberSuffix
**/
@ApiModelProperty(value = "The last few digits of the bank account number.")
public String getAccountNumberSuffix() {
return accountNumberSuffix;
}
public void setAccountNumberSuffix(String accountNumberSuffix) {
this.accountNumberSuffix = accountNumberSuffix;
}
public V1BankAccount currencyCode(String currencyCode) {
this.currencyCode = currencyCode;
return this;
}
/**
* The currency code of the currency associated with the bank account, in ISO 4217 format. For example, the currency code for US dollars is USD.
* @return currencyCode
**/
@ApiModelProperty(value = "The currency code of the currency associated with the bank account, in ISO 4217 format. For example, the currency code for US dollars is USD.")
public String getCurrencyCode() {
return currencyCode;
}
public void setCurrencyCode(String currencyCode) {
this.currencyCode = currencyCode;
}
public V1BankAccount type(TypeEnum type) {
this.type = type;
return this;
}
/**
* The bank account's type (for example, savings or checking).
* @return type
**/
@ApiModelProperty(value = "The bank account's type (for example, savings or checking).")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1BankAccount v1BankAccount = (V1BankAccount) o;
return Objects.equals(this.id, v1BankAccount.id) &&
Objects.equals(this.merchantId, v1BankAccount.merchantId) &&
Objects.equals(this.bankName, v1BankAccount.bankName) &&
Objects.equals(this.name, v1BankAccount.name) &&
Objects.equals(this.routingNumber, v1BankAccount.routingNumber) &&
Objects.equals(this.accountNumberSuffix, v1BankAccount.accountNumberSuffix) &&
Objects.equals(this.currencyCode, v1BankAccount.currencyCode) &&
Objects.equals(this.type, v1BankAccount.type);
}
@Override
public int hashCode() {
return Objects.hash(id, merchantId, bankName, name, routingNumber, accountNumberSuffix, currencyCode, type);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1BankAccount {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" merchantId: ").append(toIndentedString(merchantId)).append("\n");
sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" routingNumber: ").append(toIndentedString(routingNumber)).append("\n");
sb.append(" accountNumberSuffix: ").append(toIndentedString(accountNumberSuffix)).append("\n");
sb.append(" currencyCode: ").append(toIndentedString(currencyCode)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}