package com.enactor.training.paymentService.service.messages.gcash;


import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.namespace.QName;

import com.enactor.core.application.process.ApplicationProcessDataType;
import com.enactor.core.application.process.IApplicationProcessDataType;
import com.enactor.core.entities.PropertyValidationException;
import com.enactor.core.utilities.Logger;	

/**
 * Add comments for the AmountDetail entity implementation here
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AmountDetail", namespace=com.enactor.training.PackageInfo.NSURI_TRAINING, propOrder = {
	"chargeAmount",
	"chargebackAmount",
	"confirmAmount",
	"orderAmount",
	"payAmount",
	"refundAmount",
	"voidAmount"
})

@XmlRootElement(name = AmountDetail.ENTITY_NAME, namespace=com.enactor.training.PackageInfo.NSURI_TRAINING)
public class AmountDetail implements IAmountDetail {

	/** My logger instance */
	@SuppressWarnings("unused")
	private static final Logger logger = Logger.getLogger(AmountDetail.class);
	
	/** serialVersionUID */
	private static final long serialVersionUID = 1L;
	
	/** Entity name. */
	public static final String ENTITY_NAME = "amountDetail";
	
	/** Entity QName */
	public static final QName ENTITY_QNAME = new QName(com.enactor.training.PackageInfo.NSURI_TRAINING, ENTITY_NAME, com.enactor.training.PackageInfo.PREFIX_TRAINING);

	/** Entity application data type name */
	public static final String ENTITY_DATA_TYPE_NAME = "enactor.robinsons.messages.AmountDetail";
	
	/** Entity application data type */
	public static final IApplicationProcessDataType ENTITY_DATA_TYPE = new ApplicationProcessDataType(ENTITY_DATA_TYPE_NAME, IAmountDetail.class.getName());	
		
	/** The ChargeAmount field */
	@XmlElement(type=CurrencyAmount.class)
	private CurrencyAmount chargeAmount = new CurrencyAmount();
	
	/** The ChargebackAmount field */
	@XmlElement(type=CurrencyAmount.class)
	private CurrencyAmount chargebackAmount = new CurrencyAmount();
	
	/** The ConfirmAmount field */
	@XmlElement(type=CurrencyAmount.class)
	private CurrencyAmount confirmAmount = new CurrencyAmount();
	
	/** The OrderAmount field */
	@XmlElement(type=CurrencyAmount.class)
	private CurrencyAmount orderAmount = new CurrencyAmount();
	
	/** The PayAmount field */
	@XmlElement(type=CurrencyAmount.class)
	private CurrencyAmount payAmount = new CurrencyAmount();
	
	/** The RefundAmount field */
	@XmlElement(type=CurrencyAmount.class)
	private CurrencyAmount refundAmount = new CurrencyAmount();
	
	/** The VoidAmount field */
	@XmlElement(type=CurrencyAmount.class)
	private CurrencyAmount voidAmount = new CurrencyAmount();

	/**************************************************************************
	 * AmountDetail Interface
	 **************************************************************************/
	
	@Override
	public void setChargeAmount(CurrencyAmount chargeAmount) throws PropertyValidationException {
		this.chargeAmount = chargeAmount;
	}
	
	@Override
	public CurrencyAmount getChargeAmount() {
		return chargeAmount;
	}
	
	@Override
	public void setChargebackAmount(CurrencyAmount chargebackAmount) throws PropertyValidationException {
		this.chargebackAmount = chargebackAmount;
	}
	
	@Override
	public CurrencyAmount getChargebackAmount() {
		return chargebackAmount;
	}
	
	@Override
	public void setConfirmAmount(CurrencyAmount confirmAmount) throws PropertyValidationException {
		this.confirmAmount = confirmAmount;
	}
	
	@Override
	public CurrencyAmount getConfirmAmount() {
		return confirmAmount;
	}
	
	@Override
	public void setOrderAmount(CurrencyAmount orderAmount) throws PropertyValidationException {
		this.orderAmount = orderAmount;
	}
	
	@Override
	public CurrencyAmount getOrderAmount() {
		return orderAmount;
	}
	
	@Override
	public void setPayAmount(CurrencyAmount payAmount) throws PropertyValidationException {
		this.payAmount = payAmount;
	}
	
	@Override
	public CurrencyAmount getPayAmount() {
		return payAmount;
	}
	
	@Override
	public void setRefundAmount(CurrencyAmount refundAmount) throws PropertyValidationException {
		this.refundAmount = refundAmount;
	}
	
	@Override
	public CurrencyAmount getRefundAmount() {
		return refundAmount;
	}
	
	@Override
	public void setVoidAmount(CurrencyAmount voidAmount) throws PropertyValidationException {
		this.voidAmount = voidAmount;
	}
	
	@Override
	public CurrencyAmount getVoidAmount() {
		return voidAmount;
	}
	
	@Override
	public QName getEntityQName() {
		return ENTITY_QNAME;
	}

}
