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

io.electrum.cardaccount.model.StatementItem 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 javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.joda.time.DateTime;

import com.fasterxml.jackson.annotation.JsonProperty;

import io.electrum.vas.Utils;
import io.electrum.vas.model.LedgerAmount;
import io.swagger.annotations.ApiModelProperty;

/**
 * AccountStatementItem
 */
public class StatementItem {
   @JsonProperty("tranDate")
   private DateTime tranDate = null;

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

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

   @JsonProperty("tranType")
   private TransactionType tranType = null;

   public StatementItem tranDate(DateTime tranDate) {
      this.tranDate = tranDate;
      return this;
   }

   /**
    * The date and time at which the transaction occurred. The format shall be as defined for date-time in [RFC 3339
    * section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6).
    * 
    * @return tranDate
    **/
   @JsonProperty("tranDate")
   @ApiModelProperty(required = true, value = "The date and time at which the transaction occurred. The format shall be as defined for date-time in [RFC 3339 section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6).")
   @NotNull
   public DateTime getTranDate() {
      return tranDate;
   }

   public void setTranDate(DateTime tranDate) {
      this.tranDate = tranDate;
   }

   public StatementItem tranAmount(LedgerAmount tranAmount) {
      this.tranAmount = tranAmount;
      return this;
   }

   /**
    * Get tranAmount
    * 
    * @return tranAmount
    **/
   @JsonProperty("tranAmount")
   @ApiModelProperty(required = true, value = "")
   @NotNull
   public LedgerAmount getTranAmount() {
      return tranAmount;
   }

   public void setTranAmount(LedgerAmount tranAmount) {
      this.tranAmount = tranAmount;
   }

   public StatementItem description(String description) {
      this.description = description;
      return this;
   }

   /**
    * A description of the transaction. This description should give the account holder more information on why the
    * transaction occurred. e.g. Cheque deposit, or Fuel purchase.
    * 
    * @return description
    **/
   @JsonProperty("description")
   @ApiModelProperty(required = true, value = "A description of the transaction. This description should give the account holder more information on why the transaction occurred. e.g. Cheque deposit, or Fuel purchase.")
   @NotNull
   @Size(min = 0, max = 40)
   public String getDescription() {
      return description;
   }

   public void setDescription(String description) {
      this.description = description;
   }

   public StatementItem tranType(TransactionType tranType) {
      this.tranType = tranType;
      return this;
   }

   /**
    * Get tranType
    * 
    * @return tranType
    **/
   @JsonProperty("tranType")
   @ApiModelProperty(required = true, value = "")
   @NotNull
   public TransactionType getTranType() {
      return tranType;
   }

   public void setTranType(TransactionType tranType) {
      this.tranType = tranType;
   }

   @Override
   public boolean equals(java.lang.Object o) {
      if (this == o) {
         return true;
      }
      if (o == null || getClass() != o.getClass()) {
         return false;
      }
      StatementItem accountStatementItem = (StatementItem) o;
      return Objects.equals(this.tranDate, accountStatementItem.tranDate)
            && Objects.equals(this.tranAmount, accountStatementItem.tranAmount)
            && Objects.equals(this.description, accountStatementItem.description)
            && Objects.equals(this.tranType, accountStatementItem.tranType);
   }

   @Override
   public int hashCode() {
      return Objects.hash(tranDate, tranAmount, description, tranType);
   }

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

      sb.append("    tranDate: ").append(Utils.toIndentedString(tranDate)).append("\n");
      sb.append("    tranAmount: ").append(Utils.toIndentedString(tranAmount)).append("\n");
      sb.append("    description: ").append(Utils.toIndentedString(description)).append("\n");
      sb.append("    tranType: ").append(Utils.toIndentedString(tranType)).append("\n");
      sb.append("}");
      return sb.toString();
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy