org.openapitools.client.model.AchDebit Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zuora-sdk-java Show documentation
Show all versions of zuora-sdk-java Show documentation
The SDK of JAVA language for Zuora pricing system
/*
* Quickstart API Reference
* Zuora Quickstart API is the API that helps you achieve fundamental use cases.
* It provides a much simplified object model and improved performance, enabling developers to easily learn and use.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.openapitools.client.model.Mandate;
import org.openapitools.client.JSON.CustomFieldAdapter;
import org.openapitools.client.JSON.NullableFieldAdapter;
/**
* If the `type` of the payment method is `ach_debit`, this hash contains details about the ACH bank account.
*/
@ApiModel(description = "If the `type` of the payment method is `ach_debit`, this hash contains details about the ACH bank account.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class AchDebit {
public static final String SERIALIZED_NAME_MANDATE = "mandate";
@SerializedName(SERIALIZED_NAME_MANDATE)
private Mandate mandate;
public static final String SERIALIZED_NAME_BANK_ABA_CODE = "bank_aba_code";
@SerializedName(SERIALIZED_NAME_BANK_ABA_CODE)
private String bankAbaCode;
public static final String SERIALIZED_NAME_BANK_ACCOUNT_NAME = "bank_account_name";
@SerializedName(SERIALIZED_NAME_BANK_ACCOUNT_NAME)
private String bankAccountName;
/**
* The type of bank account associated with the payment method.
*/
@JsonAdapter(BankAccountTypeEnum.Adapter.class)
public enum BankAccountTypeEnum {
BUSINESS_SAVING("business_saving"),
BUSINESS_CHECKING("business_checking"),
CHECKING("checking"),
SAVING("saving"),
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
BankAccountTypeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static BankAccountTypeEnum fromValue(String value) {
for (BankAccountTypeEnum b : BankAccountTypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final BankAccountTypeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public BankAccountTypeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return BankAccountTypeEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_BANK_ACCOUNT_TYPE = "bank_account_type";
@SerializedName(SERIALIZED_NAME_BANK_ACCOUNT_TYPE)
private BankAccountTypeEnum bankAccountType;
public static final String SERIALIZED_NAME_BANK_NAME = "bank_name";
@SerializedName(SERIALIZED_NAME_BANK_NAME)
private String bankName;
public static final String SERIALIZED_NAME_BANK_ACCOUNT_NUMBER = "bank_account_number";
@SerializedName(SERIALIZED_NAME_BANK_ACCOUNT_NUMBER)
private String bankAccountNumber;
public AchDebit() {
}
public AchDebit mandate(Mandate mandate) {
this.mandate = mandate;
return this;
}
/**
* Get mandate
* @return mandate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Mandate getMandate() {
return mandate;
}
public void setMandate(Mandate mandate) {
this.mandate = mandate;
}
public AchDebit bankAbaCode(String bankAbaCode) {
this.bankAbaCode = bankAbaCode;
return this;
}
/**
* The nine-digit routing number or ABA number used by banks.
* @return bankAbaCode
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "The nine-digit routing number or ABA number used by banks.")
public String getBankAbaCode() {
return bankAbaCode;
}
public void setBankAbaCode(String bankAbaCode) {
this.bankAbaCode = bankAbaCode;
}
public AchDebit bankAccountName(String bankAccountName) {
this.bankAccountName = bankAccountName;
return this;
}
/**
* The name of the account holder, which can be either a person or a company.
* @return bankAccountName
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "The name of the account holder, which can be either a person or a company.")
public String getBankAccountName() {
return bankAccountName;
}
public void setBankAccountName(String bankAccountName) {
this.bankAccountName = bankAccountName;
}
public AchDebit bankAccountType(BankAccountTypeEnum bankAccountType) {
this.bankAccountType = bankAccountType;
return this;
}
/**
* The type of bank account associated with the payment method.
* @return bankAccountType
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "The type of bank account associated with the payment method.")
public BankAccountTypeEnum getBankAccountType() {
return bankAccountType;
}
public void setBankAccountType(BankAccountTypeEnum bankAccountType) {
this.bankAccountType = bankAccountType;
}
public AchDebit bankName(String bankName) {
this.bankName = bankName;
return this;
}
/**
* Name of the bank associated with this bank account.
* @return bankName
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "Name of the bank associated with this bank account.")
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
public AchDebit bankAccountNumber(String bankAccountNumber) {
this.bankAccountNumber = bankAccountNumber;
return this;
}
/**
* The bank account number of the account holder.
* @return bankAccountNumber
**/
@javax.annotation.Nonnull
@ApiModelProperty(required = true, value = "The bank account number of the account holder.")
public String getBankAccountNumber() {
return bankAccountNumber;
}
public void setBankAccountNumber(String bankAccountNumber) {
this.bankAccountNumber = bankAccountNumber;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AchDebit achDebit = (AchDebit) o;
return Objects.equals(this.mandate, achDebit.mandate) &&
Objects.equals(this.bankAbaCode, achDebit.bankAbaCode) &&
Objects.equals(this.bankAccountName, achDebit.bankAccountName) &&
Objects.equals(this.bankAccountType, achDebit.bankAccountType) &&
Objects.equals(this.bankName, achDebit.bankName) &&
Objects.equals(this.bankAccountNumber, achDebit.bankAccountNumber);
}
@Override
public int hashCode() {
return Objects.hash(mandate, bankAbaCode, bankAccountName, bankAccountType, bankName, bankAccountNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AchDebit {\n");
sb.append(" mandate: ").append(toIndentedString(mandate)).append("\n");
sb.append(" bankAbaCode: ").append(toIndentedString(bankAbaCode)).append("\n");
sb.append(" bankAccountName: ").append(toIndentedString(bankAccountName)).append("\n");
sb.append(" bankAccountType: ").append(toIndentedString(bankAccountType)).append("\n");
sb.append(" bankName: ").append(toIndentedString(bankName)).append("\n");
sb.append(" bankAccountNumber: ").append(toIndentedString(bankAccountNumber)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy