tech.carpentum.sdk.payment.internal.generated.model.AccountResponseDetailImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of payment-client-v2 Show documentation
Show all versions of payment-client-v2 Show documentation
Carpentum Payment system Java SDK
//THE FILE IS GENERATED, DO NOT MODIFY IT MANUALLY!!!
package tech.carpentum.sdk.payment.internal.generated.model;
import com.squareup.moshi.JsonClass;
import java.util.Objects;
import java.util.Optional;
import org.jetbrains.annotations.NotNull;
import tech.carpentum.sdk.payment.internal.generated.model.*;
import tech.carpentum.sdk.payment.model.*;
/** AccountResponseDetail
*
*
*
*
*
* The model class is immutable.
* Use static {@link #builder} method to create a new {@link Builder} instance to build the model class instance.
*
*/
@JsonClass(generateAdapter = false)
public class AccountResponseDetailImpl implements AccountResponseDetail {
/** Name of the bank account. */
private final Optional accountName;
@Override
public Optional getAccountName() {
return accountName;
}
/** Number of the bank account. */
private final Optional accountNumber;
@Override
public Optional getAccountNumber() {
return accountNumber;
}
/** Type of the bank account. */
private final Optional accountType;
@Override
public Optional getAccountType() {
return accountType;
}
/** Bank code of the bank. */
private final Optional bankCode;
@Override
public Optional getBankCode() {
return bankCode;
}
private final Optional paymentOperator;
@Override
public Optional getPaymentOperator() {
return paymentOperator;
}
/** Name of the bank. */
private final Optional bankName;
@Override
public Optional getBankName() {
return bankName;
}
/** Branch name of the bank. */
private final Optional bankBranch;
@Override
public Optional getBankBranch() {
return bankBranch;
}
/** City of the bank. */
private final Optional bankCity;
@Override
public Optional getBankCity() {
return bankCity;
}
/** Province of the bank. */
private final Optional bankProvince;
@Override
public Optional getBankProvince() {
return bankProvince;
}
private final int hashCode;
private final String toString;
private AccountResponseDetailImpl(BuilderImpl builder) {
this.accountName = Optional.ofNullable(builder.accountName);
this.accountNumber = Optional.ofNullable(builder.accountNumber);
this.accountType = Optional.ofNullable(builder.accountType);
this.bankCode = Optional.ofNullable(builder.bankCode);
this.paymentOperator = Optional.ofNullable(builder.paymentOperator);
this.bankName = Optional.ofNullable(builder.bankName);
this.bankBranch = Optional.ofNullable(builder.bankBranch);
this.bankCity = Optional.ofNullable(builder.bankCity);
this.bankProvince = Optional.ofNullable(builder.bankProvince);
this.hashCode = Objects.hash(accountName, accountNumber, accountType, bankCode, paymentOperator, bankName, bankBranch, bankCity, bankProvince);
this.toString = builder.type + "(" +
"accountName=" + accountName +
", accountNumber=" + accountNumber +
", accountType=" + accountType +
", bankCode=" + bankCode +
", paymentOperator=" + paymentOperator +
", bankName=" + bankName +
", bankBranch=" + bankBranch +
", bankCity=" + bankCity +
", bankProvince=" + bankProvince +
')';
}
@Override
public int hashCode() {
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (!(obj instanceof AccountResponseDetailImpl)) {
return false;
}
AccountResponseDetailImpl that = (AccountResponseDetailImpl) obj;
if (!Objects.equals(this.accountName, that.accountName)) return false;
if (!Objects.equals(this.accountNumber, that.accountNumber)) return false;
if (!Objects.equals(this.accountType, that.accountType)) return false;
if (!Objects.equals(this.bankCode, that.bankCode)) return false;
if (!Objects.equals(this.paymentOperator, that.paymentOperator)) return false;
if (!Objects.equals(this.bankName, that.bankName)) return false;
if (!Objects.equals(this.bankBranch, that.bankBranch)) return false;
if (!Objects.equals(this.bankCity, that.bankCity)) return false;
if (!Objects.equals(this.bankProvince, that.bankProvince)) return false;
return true;
}
@Override
public String toString() {
return toString;
}
/** Builder for {@link AccountResponseDetail} model class. */
public static class BuilderImpl implements AccountResponseDetail.Builder {
private String accountName = null;
private String accountNumber = null;
private String accountType = null;
private String bankCode = null;
private PaymentOperatorIncoming paymentOperator = null;
private String bankName = null;
private String bankBranch = null;
private String bankCity = null;
private String bankProvince = null;
private final String type;
public BuilderImpl(String type) {
this.type = type;
}
public BuilderImpl() {
this("AccountResponseDetail");
}
/**
* Set {@link AccountResponseDetail#getAccountName} property.
*
* Name of the bank account.
*/
@Override
public BuilderImpl accountName(String accountName) {
this.accountName = accountName;
return this;
}
/**
* Set {@link AccountResponseDetail#getAccountNumber} property.
*
* Number of the bank account.
*/
@Override
public BuilderImpl accountNumber(String accountNumber) {
this.accountNumber = accountNumber;
return this;
}
/**
* Set {@link AccountResponseDetail#getAccountType} property.
*
* Type of the bank account.
*/
@Override
public BuilderImpl accountType(String accountType) {
this.accountType = accountType;
return this;
}
/**
* Set {@link AccountResponseDetail#getBankCode} property.
*
* Bank code of the bank.
*/
@Override
public BuilderImpl bankCode(String bankCode) {
this.bankCode = bankCode;
return this;
}
/**
* Set {@link AccountResponseDetail#getPaymentOperator} property.
*
*
*/
@Override
public BuilderImpl paymentOperator(PaymentOperatorIncoming paymentOperator) {
this.paymentOperator = paymentOperator;
return this;
}
/**
* Set {@link AccountResponseDetail#getBankName} property.
*
* Name of the bank.
*/
@Override
public BuilderImpl bankName(String bankName) {
this.bankName = bankName;
return this;
}
/**
* Set {@link AccountResponseDetail#getBankBranch} property.
*
* Branch name of the bank.
*/
@Override
public BuilderImpl bankBranch(String bankBranch) {
this.bankBranch = bankBranch;
return this;
}
/**
* Set {@link AccountResponseDetail#getBankCity} property.
*
* City of the bank.
*/
@Override
public BuilderImpl bankCity(String bankCity) {
this.bankCity = bankCity;
return this;
}
/**
* Set {@link AccountResponseDetail#getBankProvince} property.
*
* Province of the bank.
*/
@Override
public BuilderImpl bankProvince(String bankProvince) {
this.bankProvince = bankProvince;
return this;
}
/**
* Create new instance of {@link AccountResponseDetail} model class with the builder instance properties.
*
* @throws NullPointerException in case required properties are not specified.
*/
@Override
public AccountResponseDetailImpl build() {
return new AccountResponseDetailImpl(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy