package com.github.devnied.emvnfccard.model;

import java.io.Serializable;
import java.util.Date;

import com.github.devnied.emvnfccard.model.enums.CountryCodeEnum;
import com.github.devnied.emvnfccard.model.enums.CurrencyEnum;
import com.github.devnied.emvnfccard.parser.apdu.annotation.Data;
import com.github.devnied.emvnfccard.parser.apdu.impl.AbstractByteBean;
import com.github.devnied.emvnfccard.parser.apdu.impl.DataFactory;

/**
 * Bean used to describe EMV payment record
 * 
 * @author julien MILLAU
 * 
 */
public class EMVPaymentRecord extends AbstractByteBean<EMVPaymentRecord> implements Serializable {

	/**
	 * Generated serial UID
	 */
	private static final long serialVersionUID = -7050737312961921452L;

	/**
	 * Default size
	 */
	public final static int DEFAULT_SIZE = 128;

	/**
	 * Amount authorized
	 */
	@Data(index = 1, size = 48)
	private Float amount;

	/**
	 * Cryptogram information data
	 */
	@Data(index = 2, size = 8, readHexa = true)
	private String cyptogramData;

	/**
	 * Terminal country code
	 */
	@Data(index = 3, size = 16)
	private CountryCodeEnum terminalCountry;

	/**
	 * Currency
	 */
	@Data(index = 4, size = 16)
	private CurrencyEnum currency;

	/**
	 * Transaction date
	 */
	@Data(index = 5, size = 24, dateStandard = DataFactory.BCD_DATE, format = "yyMMdd")
	private Date transactionDate;

	/**
	 * Transaction type
	 */
	@Data(index = 6, size = 16)
	private Integer transactionType;

	/**
	 * Method used to get the field amount
	 * 
	 * @return the amount
	 */
	public Float getAmount() {
		return amount;
	}

	/**
	 * Method used to get the field cyptogramData
	 * 
	 * @return the cyptogramData
	 */
	public String getCyptogramData() {
		return cyptogramData;
	}

	/**
	 * Method used to get the field currency
	 * 
	 * @return the currency
	 */
	public CurrencyEnum getCurrency() {
		return currency;
	}

	/**
	 * Method used to get the field transactionDate
	 * 
	 * @return the transactionDate
	 */
	public Date getTransactionDate() {
		return transactionDate;
	}

	/**
	 * Method used to get the field transactionType
	 * 
	 * @return the transactionType
	 */
	public Integer getTransactionType() {
		return transactionType;
	}

	/**
	 * Method used to get the field terminalCountry
	 * 
	 * @return the terminalCountry
	 */
	public CountryCodeEnum getTerminalCountry() {
		return terminalCountry;
	}

	@Override
	public int getDefaultSize() {
		return DEFAULT_SIZE;
	}

}

@@ -2355,16 +2355,1313 @@
 ry;%0A%09%7D%0A%0A
+%09/**%0A%09 * Setter for the field amount%0A%09 * %0A%09 * @param amount%0A%09 *            the amount to set%0A%09 */%0A%09public void setAmount(final Float amount) %7B%0A%09%09this.amount = amount;%0A%09%7D%0A%0A%09/**%0A%09 * Setter for the field cyptogramData%0A%09 * %0A%09 * @param cyptogramData%0A%09 *            the cyptogramData to set%0A%09 */%0A%09public void setCyptogramData(final String cyptogramData) %7B%0A%09%09this.cyptogramData = cyptogramData;%0A%09%7D%0A%0A%09/**%0A%09 * Setter for the field terminalCountry%0A%09 * %0A%09 * @param terminalCountry%0A%09 *            the terminalCountry to set%0A%09 */%0A%09public void setTerminalCountry(final CountryCodeEnum terminalCountry) %7B%0A%09%09this.terminalCountry = terminalCountry;%0A%09%7D%0A%0A%09/**%0A%09 * Setter for the field currency%0A%09 * %0A%09 * @param currency%0A%09 *            the currency to set%0A%09 */%0A%09public void setCurrency(final CurrencyEnum currency) %7B%0A%09%09this.currency = currency;%0A%09%7D%0A%0A%09/**%0A%09 * Setter for the field transactionDate%0A%09 * %0A%09 * @param transactionDate%0A%09 *            the transactionDate to set%0A%09 */%0A%09public void setTransactionDate(final Date transactionDate) %7B%0A%09%09this.transactionDate = transactionDate;%0A%09%7D%0A%0A%09/**%0A%09 * Setter for the field transactionType%0A%09 * %0A%09 * @param transactionType%0A%09 *            the transactionType to set%0A%09 */%0A%09public void setTransactionType(final Integer transactionType) %7B%0A%09%09this.transactionType = transactionType;%0A%09%7D%0A%0A
 %09@Overri

Fix error with setter for mobile app