package api.unicore.component.fees;
 
import static api.util.ComponentConstants.BOOLEAN_NULL;
import static api.util.ComponentConstants.BOOLEAN_NULL_CODE;
import static api.util.ComponentConstants.STRING_NULL;
import static api.util.ComponentConstants.STRING_NULL_CODE;
import static org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion.NON_NULL;
 
import api.unicore.component.fees_manual.RealtimeFeePolicy;
import api.util.BooleanFormat;
import api.util.StringFormat;
import iapp.util.audit.AuditHelper;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.FormParam;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.codehaus.jackson.annotate.JsonPropertyOrder;
import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;
 
/**
 * @author CodeGen [Maksim Peresypkin]
 * @company UnitedThinkers
 * @since 2013/01/31
 */
 
@JsonSerialize(include=NON_NULL)
@XmlType(propOrder={"approvalProcessing", "approvalItem", "declineProcessing", "declineItem", "voidProcessing", "voidItem", "blacklistProcessing", "blacklistItem", "visaDeposit", "masterCardDeposit", "discoverDeposit", "achDeposit", "amexDeposit", "ebtDeposit", "bankCardDeposit", "processingCost", "convenienceFee", "achReturnDeposit", "cardsChargebackDeposit"})
@JsonPropertyOrder({"approvalProcessing", "approvalItem", "declineProcessing", "declineItem", "voidProcessing", "voidItem", "blacklistProcessing", "blacklistItem", "visaDeposit", "masterCardDeposit", "discoverDeposit", "achDeposit", "amexDeposit", "ebtDeposit", "bankCardDeposit", "processingCost", "convenienceFee", "achReturnDeposit", "cardsChargebackDeposit"})
@XmlAccessorType(XmlAccessType.NONE)
@XmlSeeAlso(RealtimeFeePolicy.class)
public abstract class AbstractRealtimeFeePolicy {
 
    @FormParam("approvalProcessing")
    @BooleanFormat
    @DefaultValue(BOOLEAN_NULL_CODE)
    protected Boolean approvalProcessing = BOOLEAN_NULL;
 
    @FormParam("approvalItem")
    @BooleanFormat
    @DefaultValue(BOOLEAN_NULL_CODE)
    protected Boolean approvalItem = BOOLEAN_NULL;
 
    @FormParam("declineProcessing")
    @BooleanFormat
    @DefaultValue(BOOLEAN_NULL_CODE)
    protected Boolean declineProcessing = BOOLEAN_NULL;
 
    @FormParam("declineItem")
    @BooleanFormat
    @DefaultValue(BOOLEAN_NULL_CODE)
    protected Boolean declineItem = BOOLEAN_NULL;
 
    @FormParam("voidProcessing")
    @BooleanFormat
    @DefaultValue(BOOLEAN_NULL_CODE)
    protected Boolean voidProcessing = BOOLEAN_NULL;
 
    @FormParam("voidItem")
    @BooleanFormat
    @DefaultValue(BOOLEAN_NULL_CODE)
    protected Boolean voidItem = BOOLEAN_NULL;
 
    @FormParam("blacklistProcessing")
    @BooleanFormat
    @DefaultValue(BOOLEAN_NULL_CODE)
    protected Boolean blacklistProcessing = BOOLEAN_NULL;
 
    @FormParam("blacklistItem")
    @BooleanFormat
    @DefaultValue(BOOLEAN_NULL_CODE)
    protected Boolean blacklistItem = BOOLEAN_NULL;
 
    @FormParam("visaDeposit")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String visaDeposit = STRING_NULL;
 
    @FormParam("masterCardDeposit")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String masterCardDeposit = STRING_NULL;
 
    @FormParam("discoverDeposit")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String discoverDeposit = STRING_NULL;
 
    @FormParam("achDeposit")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String achDeposit = STRING_NULL;
 
    @FormParam("amexDeposit")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String amexDeposit = STRING_NULL;
 
    @FormParam("ebtDeposit")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String ebtDeposit = STRING_NULL;
 
    @FormParam("bankCardDeposit")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String bankCardDeposit = STRING_NULL;
 
    @FormParam("processingCost")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String processingCost = STRING_NULL;
 
    @FormParam("convenienceFee")
    @BooleanFormat
    @DefaultValue(BOOLEAN_NULL_CODE)
    protected Boolean convenienceFee = BOOLEAN_NULL;
 
    @FormParam("achReturnDeposit")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String achReturnDeposit = STRING_NULL;
 
    @FormParam("cardsChargebackDeposit")
    @StringFormat
    @DefaultValue(STRING_NULL_CODE)
    protected String cardsChargebackDeposit = STRING_NULL;
 
 
    public AbstractRealtimeFeePolicy(){
    }
 
    public String toString(){
        StringBuilder sb = new StringBuilder();
        sb.append("policy: {");
        sb.append("approvalProcessing: ");
        sb.append(approvalProcessing);
        sb.append(',').append(' ');
        sb.append("approvalItem: ");
        sb.append(approvalItem);
        sb.append(',').append(' ');
        sb.append("declineProcessing: ");
        sb.append(declineProcessing);
        sb.append(',').append(' ');
        sb.append("declineItem: ");
        sb.append(declineItem);
        sb.append(',').append(' ');
        sb.append("voidProcessing: ");
        sb.append(voidProcessing);
        sb.append(',').append(' ');
        sb.append("voidItem: ");
        sb.append(voidItem);
        sb.append(',').append(' ');
        sb.append("blacklistProcessing: ");
        sb.append(blacklistProcessing);
        sb.append(',').append(' ');
        sb.append("blacklistItem: ");
        sb.append(blacklistItem);
        sb.append(',').append(' ');
        sb.append("visaDeposit: ");
        sb.append(visaDeposit);
        sb.append(',').append(' ');
        sb.append("masterCardDeposit: ");
        sb.append(masterCardDeposit);
        sb.append(',').append(' ');
        sb.append("discoverDeposit: ");
        sb.append(discoverDeposit);
        sb.append(',').append(' ');
        sb.append("achDeposit: ");
        sb.append(achDeposit);
        sb.append(',').append(' ');
        sb.append("amexDeposit: ");
        sb.append(amexDeposit);
        sb.append(',').append(' ');
        sb.append("ebtDeposit: ");
        sb.append(ebtDeposit);
        sb.append(',').append(' ');
        sb.append("bankCardDeposit: ");
        sb.append(bankCardDeposit);
        sb.append(',').append(' ');
        sb.append("processingCost: ");
        sb.append(processingCost);
        sb.append(',').append(' ');
        sb.append("convenienceFee: ");
        sb.append(convenienceFee);
        sb.append(',').append(' ');
        sb.append("achReturnDeposit: ");
        sb.append(achReturnDeposit);
        sb.append(',').append(' ');
        sb.append("cardsChargebackDeposit: ");
        sb.append(cardsChargebackDeposit);
        sb.append('}');
        return sb.toString();
    }
 
 
    @XmlAttribute(name="approvalProcessing")
    @FormParam("approvalProcessing")
    @BooleanFormat
    public Boolean getApprovalProcessing(){
        return approvalProcessing;
    }
 
    public void setApprovalProcessing(Boolean value){
        this.approvalProcessing = value;
    }
 
    @XmlAttribute(name="approvalItem")
    @FormParam("approvalItem")
    @BooleanFormat
    public Boolean getApprovalItem(){
        return approvalItem;
    }
 
    public void setApprovalItem(Boolean value){
        this.approvalItem = value;
    }
 
    @XmlAttribute(name="declineProcessing")
    @FormParam("declineProcessing")
    @BooleanFormat
    public Boolean getDeclineProcessing(){
        return declineProcessing;
    }
 
    public void setDeclineProcessing(Boolean value){
        this.declineProcessing = value;
    }
 
    @XmlAttribute(name="declineItem")
    @FormParam("declineItem")
    @BooleanFormat
    public Boolean getDeclineItem(){
        return declineItem;
    }
 
    public void setDeclineItem(Boolean value){
        this.declineItem = value;
    }
 
    @XmlAttribute(name="voidProcessing")
    @FormParam("voidProcessing")
    @BooleanFormat
    public Boolean getVoidProcessing(){
        return voidProcessing;
    }
 
    public void setVoidProcessing(Boolean value){
        this.voidProcessing = value;
    }
 
    @XmlAttribute(name="voidItem")
    @FormParam("voidItem")
    @BooleanFormat
    public Boolean getVoidItem(){
        return voidItem;
    }
 
    public void setVoidItem(Boolean value){
        this.voidItem = value;
    }
 
    @XmlAttribute(name="blacklistProcessing")
    @FormParam("blacklistProcessing")
    @BooleanFormat
    public Boolean getBlacklistProcessing(){
        return blacklistProcessing;
    }
 
    public void setBlacklistProcessing(Boolean value){
        this.blacklistProcessing = value;
    }
 
    @XmlAttribute(name="blacklistItem")
    @FormParam("blacklistItem")
    @BooleanFormat
    public Boolean getBlacklistItem(){
        return blacklistItem;
    }
 
    public void setBlacklistItem(Boolean value){
        this.blacklistItem = value;
    }
 
    @XmlAttribute(name="visaDeposit")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("visaDeposit")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getVisaDeposit(){
        return visaDeposit;
    }
 
    public void setVisaDeposit(String value){
        this.visaDeposit = value;
    }
 
    @XmlAttribute(name="masterCardDeposit")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("masterCardDeposit")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getMasterCardDeposit(){
        return masterCardDeposit;
    }
 
    public void setMasterCardDeposit(String value){
        this.masterCardDeposit = value;
    }
 
    @XmlAttribute(name="discoverDeposit")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("discoverDeposit")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getDiscoverDeposit(){
        return discoverDeposit;
    }
 
    public void setDiscoverDeposit(String value){
        this.discoverDeposit = value;
    }
 
    @XmlAttribute(name="achDeposit")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("achDeposit")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getAchDeposit(){
        return achDeposit;
    }
 
    public void setAchDeposit(String value){
        this.achDeposit = value;
    }
 
    @XmlAttribute(name="amexDeposit")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("amexDeposit")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getAmexDeposit(){
        return amexDeposit;
    }
 
    public void setAmexDeposit(String value){
        this.amexDeposit = value;
    }
 
    @XmlAttribute(name="ebtDeposit")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("ebtDeposit")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getEbtDeposit(){
        return ebtDeposit;
    }
 
    public void setEbtDeposit(String value){
        this.ebtDeposit = value;
    }
 
    @XmlAttribute(name="bankCardDeposit")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("bankCardDeposit")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getBankCardDeposit(){
        return bankCardDeposit;
    }
 
    public void setBankCardDeposit(String value){
        this.bankCardDeposit = value;
    }
 
    @XmlAttribute(name="processingCost")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("processingCost")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getProcessingCost(){
        return processingCost;
    }
 
    public void setProcessingCost(String value){
        this.processingCost = value;
    }
 
    @XmlAttribute(name="convenienceFee")
    @FormParam("convenienceFee")
    @BooleanFormat
    public Boolean getConvenienceFee(){
        return convenienceFee;
    }
 
    public void setConvenienceFee(Boolean value){
        this.convenienceFee = value;
    }
 
    @XmlAttribute(name="achReturnDeposit")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("achReturnDeposit")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getAchReturnDeposit(){
        return achReturnDeposit;
    }
 
    public void setAchReturnDeposit(String value){
        this.achReturnDeposit = value;
    }
 
    @XmlAttribute(name="cardsChargebackDeposit")
    @XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
    @FormParam("cardsChargebackDeposit")
    @StringFormat
    @JsonDeserialize(using = api.util.StringDeserializer.class)
    public String getCardsChargebackDeposit(){
        return cardsChargebackDeposit;
    }
 
    public void setCardsChargebackDeposit(String value){
        this.cardsChargebackDeposit = value;
    }
 
 
    public void audit(AuditHelper helper, AbstractRealtimeFeePolicy old) {
        helper.audit("approvalProcessing", approvalProcessing, old.getApprovalProcessing());
        helper.audit("approvalItem", approvalItem, old.getApprovalItem());
        helper.audit("declineProcessing", declineProcessing, old.getDeclineProcessing());
        helper.audit("declineItem", declineItem, old.getDeclineItem());
        helper.audit("voidProcessing", voidProcessing, old.getVoidProcessing());
        helper.audit("voidItem", voidItem, old.getVoidItem());
        helper.audit("blacklistProcessing", blacklistProcessing, old.getBlacklistProcessing());
        helper.audit("blacklistItem", blacklistItem, old.getBlacklistItem());
        helper.audit("visaDeposit", visaDeposit, old.getVisaDeposit());
        helper.audit("masterCardDeposit", masterCardDeposit, old.getMasterCardDeposit());
        helper.audit("discoverDeposit", discoverDeposit, old.getDiscoverDeposit());
        helper.audit("achDeposit", achDeposit, old.getAchDeposit());
        helper.audit("amexDeposit", amexDeposit, old.getAmexDeposit());
        helper.audit("ebtDeposit", ebtDeposit, old.getEbtDeposit());
        helper.audit("bankCardDeposit", bankCardDeposit, old.getBankCardDeposit());
        helper.audit("processingCost", processingCost, old.getProcessingCost());
        helper.audit("convenienceFee", convenienceFee, old.getConvenienceFee());
        helper.audit("achReturnDeposit", achReturnDeposit, old.getAchReturnDeposit());
        helper.audit("cardsChargebackDeposit", cardsChargebackDeposit, old.getCardsChargebackDeposit());
    }
 
}