All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.electrum.cardaccount.model.Account Maven / Gradle / Ivy

The newest version!
/*
 * Electrum Gateway Card-Account API
 * The Electrum Gateway Card-Account API defines an interface for card and account management.
 *
 * OpenAPI spec version: 0.0.600
 * 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 io.electrum.cardaccount.model;

import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonProperty;

import io.electrum.sdk.masking2.Masked;
import io.electrum.vas.Utils;
import io.electrum.vas.model.LedgerAmount;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * Represents an account.
 */
@ApiModel(description = "Represents an account.")
public class Account {
   @Masked
   @JsonProperty("accountId")
   private String accountId = null;

   @JsonProperty("issuerId")
   private String issuerId = null;

   @JsonProperty("availableBalance")
   private LedgerAmount availableBalance = null;

   @JsonProperty("ledgerBalance")
   private LedgerAmount ledgerBalance = null;

   @JsonProperty("customerId")
   private String customerId = null;

   @JsonProperty("accountType")
   private AccountType accountType = null;

   public Account accountId(String accountId) {
      this.accountId = accountId;
      return this;
   }

   /**
    * The account id. This field is not required when creating a new account, however it is required when updating an
    * existing account.
    * 
    * @return accountId
    **/
   @JsonProperty("accountId")
   @ApiModelProperty(value = "The account id. This field is not required when creating a new account, however it is required when updating an existing account.")
   public String getAccountId() {
      return accountId;
   }

   public void setAccountId(String accountId) {
      this.accountId = accountId;
   }

   public Account issuerId(String issuerId) {
      this.issuerId = issuerId;
      return this;
   }

   /**
    * The issuer id.
    * 
    * @return issuerId
    **/
   @JsonProperty("issuerId")
   @ApiModelProperty(value = "The issuer id.")
   public String getIssuerId() {
      return issuerId;
   }

   public void setIssuerId(String issuerId) {
      this.issuerId = issuerId;
   }

   public Account availableBalance(LedgerAmount availableBalance) {
      this.availableBalance = availableBalance;
      return this;
   }

   /**
    * Get availableBalance
    * 
    * @return availableBalance
    **/
   @JsonProperty("availableBalance")
   @ApiModelProperty(value = "")
   public LedgerAmount getAvailableBalance() {
      return availableBalance;
   }

   public void setAvailableBalance(LedgerAmount availableBalance) {
      this.availableBalance = availableBalance;
   }

   public Account ledgerBalance(LedgerAmount ledgerBalance) {
      this.ledgerBalance = ledgerBalance;
      return this;
   }

   /**
    * Get ledgerBalance
    * 
    * @return ledgerBalance
    **/
   @JsonProperty("ledgerBalance")
   @ApiModelProperty(value = "")
   public LedgerAmount getLedgerBalance() {
      return ledgerBalance;
   }

   public void setLedgerBalance(LedgerAmount ledgerBalance) {
      this.ledgerBalance = ledgerBalance;
   }

   public Account customerId(String customerId) {
      this.customerId = customerId;
      return this;
   }

   /**
    * The customers id.
    * 
    * @return customerId
    **/
   @JsonProperty("customerId")
   @ApiModelProperty(value = "The customers id.")
   public String getCustomerId() {
      return customerId;
   }

   public void setCustomerId(String customerId) {
      this.customerId = customerId;
   }

   public Account accountType(AccountType accountType) {
      this.accountType = accountType;
      return this;
   }

   /**
    * Get accountType
    * 
    * @return accountType
    **/
   @JsonProperty("accountType")
   @ApiModelProperty(value = "")
   public AccountType getAccountType() {
      return accountType;
   }

   public void setAccountType(AccountType accountType) {
      this.accountType = accountType;
   }

   @Override
   public boolean equals(java.lang.Object o) {
      if (this == o) {
         return true;
      }
      if (o == null || getClass() != o.getClass()) {
         return false;
      }
      Account account = (Account) o;
      return Objects.equals(this.accountId, account.accountId) && Objects.equals(this.issuerId, account.issuerId)
            && Objects.equals(this.availableBalance, account.availableBalance)
            && Objects.equals(this.ledgerBalance, account.ledgerBalance)
            && Objects.equals(this.customerId, account.customerId)
            && Objects.equals(this.accountType, account.accountType);
   }

   @Override
   public int hashCode() {
      return Objects.hash(accountId, issuerId, availableBalance, ledgerBalance, customerId, accountType);
   }

   @Override
   public String toString() {
      StringBuilder sb = new StringBuilder();
      sb.append("class Account {\n");

      // TODO Pretty sure the balances are also sensitive..make sure with Eon.
      sb.append("    accountId: ").append(Utils.toIndentedString(accountId)).append("\n");
      sb.append("    issuerId: ").append(Utils.toIndentedString(issuerId)).append("\n");
      sb.append("    availableBalance: ").append(Utils.toIndentedString(availableBalance)).append("\n");
      sb.append("    ledgerBalance: ").append(Utils.toIndentedString(ledgerBalance)).append("\n");
      sb.append("    customerId: ").append(Utils.toIndentedString(customerId)).append("\n");
      sb.append("    accountType: ").append(Utils.toIndentedString(accountType)).append("\n");
      sb.append("}");
      return sb.toString();
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy