package api.unicore.component;
import static api.util.ComponentConstants.BOOLEAN_NULL;
import static api.util.ComponentConstants.BOOLEAN_NULL_CODE;
import static api.util.ComponentConstants.INTEGER_NULL;
import static api.util.ComponentConstants.INTEGER_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.UnoComponent;
import api.unicore.VirtualFields;
import api.unicore.component_manual.MerchantProcessingInfo;
import api.util.BooleanFormat;
import api.util.IntegerFormat;
import api.util.StringFormat;
import iapp.services.ServerObject;
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.XmlElement;
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 [Dmytro Sedukhin]
* @company UnitedThinkers
* @since 2013/08/23
*/
@JsonSerialize(include=NON_NULL)
@XmlType(propOrder={"isBatchReviewEnabled", "returnsCallbackUrl", "batchStatusCallbackUrl", "processinglistPolicy", "blacklistPolicy", "returnsDeliveryFrequency", "isExpirationDateValidationEnabled", "isRoutingNumberValidationEnabled", "batchValidationThresholdCount", "batchValidationThresholdAmount", "returnsDeliveryMode", "isBatchCustomFieldEnabled", "isProcessingOptimizationEnabled", "isAccountAggregationAchEnabled", "isAccountAggregationCardsEnabled", "isFileHashValidationEnabled", "tokenFormat", "fileEncryptionPublicKeyFileName", "tokenizationRemovalType", "isRealtimeReviewEnabled", "isMultipleReturnsFileSupported", "aggregationLevelType"})
@JsonPropertyOrder({"isBatchReviewEnabled", "returnsCallbackUrl", "batchStatusCallbackUrl", "processinglistPolicy", "blacklistPolicy", "returnsDeliveryFrequency", "isExpirationDateValidationEnabled", "isRoutingNumberValidationEnabled", "batchValidationThresholdCount", "batchValidationThresholdAmount", "returnsDeliveryMode", "isBatchCustomFieldEnabled", "isProcessingOptimizationEnabled", "isAccountAggregationAchEnabled", "isAccountAggregationCardsEnabled", "isFileHashValidationEnabled", "tokenFormat", "fileEncryptionPublicKeyFileName", "tokenizationRemovalType", "isRealtimeReviewEnabled", "isMultipleReturnsFileSupported", "aggregationLevelType"})
@XmlAccessorType(XmlAccessType.NONE)
@XmlSeeAlso(MerchantProcessingInfo.class)
public abstract class AbstractMerchantProcessingInfo extends UnoComponent<unicore.model.Merchant> {
@FormParam("isBatchReviewEnabled")
@BooleanFormat
@DefaultValue(BOOLEAN_NULL_CODE)
protected Boolean isBatchReviewEnabled;
@FormParam("returnsCallbackUrl")
@StringFormat
@DefaultValue(STRING_NULL_CODE)
protected String returnsCallbackUrl;
@FormParam("batchStatusCallbackUrl")
@StringFormat
@DefaultValue(STRING_NULL_CODE)
protected String batchStatusCallbackUrl;
@FormParam("processinglistPolicy")
@StringFormat
@DefaultValue(STRING_NULL_CODE)
protected String processinglistPolicy;
@FormParam("blacklistPolicy")
@StringFormat
@DefaultValue(STRING_NULL_CODE)
protected String blacklistPolicy;
@FormParam("returnsDeliveryFrequency")
@StringFormat
protected String returnsDeliveryFrequency;
@FormParam("isExpirationDateValidationEnabled")
@BooleanFormat
@DefaultValue(BOOLEAN_NULL_CODE)
protected Boolean isExpirationDateValidationEnabled;
@FormParam("isRoutingNumberValidationEnabled")
@BooleanFormat
@DefaultValue(BOOLEAN_NULL_CODE)
protected Boolean isRoutingNumberValidationEnabled;
@FormParam("batchValidationThresholdCount")
@IntegerFormat
@DefaultValue(INTEGER_NULL_CODE)
protected Integer batchValidationThresholdCount;
@FormParam("batchValidationThresholdAmount")
@IntegerFormat
@DefaultValue(INTEGER_NULL_CODE)
protected Integer batchValidationThresholdAmount;
@FormParam("returnsDeliveryMode")
@StringFormat
@DefaultValue(STRING_NULL_CODE)
protected String returnsDeliveryMode;
@FormParam("isBatchCustomFieldEnabled")
@BooleanFormat
@DefaultValue(BOOLEAN_NULL_CODE)
protected Boolean isBatchCustomFieldEnabled;
@FormParam("isProcessingOptimizationEnabled")
@BooleanFormat
@DefaultValue(BOOLEAN_NULL_CODE)
protected Boolean isProcessingOptimizationEnabled;
@FormParam("isAccountAggregationAchEnabled")
@BooleanFormat
@DefaultValue(BOOLEAN_NULL_CODE)
protected Boolean isAccountAggregationAchEnabled;
@FormParam("isAccountAggregationCardsEnabled")
@BooleanFormat
@DefaultValue(BOOLEAN_NULL_CODE)
protected Boolean isAccountAggregationCardsEnabled;
@FormParam("isFileHashValidationEnabled")
@BooleanFormat
@DefaultValue(BOOLEAN_NULL_CODE)
protected Boolean isFileHashValidationEnabled;
@FormParam("tokenFormat")
@StringFormat
@DefaultValue(STRING_NULL_CODE)
protected String tokenFormat;
@FormParam("fileEncryptionPublicKeyFileName")
@StringFormat
@DefaultValue(STRING_NULL_CODE)
protected String fileEncryptionPublicKeyFileName;
@FormParam("tokenizationRemovalType")
@StringFormat
@DefaultValue(STRING_NULL_CODE)
protected String tokenizationRemovalType;
@FormParam("isRealtimeReviewEnabled")
@BooleanFormat
@DefaultValue(BOOLEAN_NULL_CODE)
protected Boolean isRealtimeReviewEnabled;
@FormParam("isMultipleReturnsFileSupported")
@BooleanFormat
@DefaultValue(BOOLEAN_NULL_CODE)
protected Boolean isMultipleReturnsFileSupported;
@FormParam("aggregationLevelType")
@StringFormat
@DefaultValue(STRING_NULL_CODE)
protected String aggregationLevelType;
public AbstractMerchantProcessingInfo(){
super();
applyDefaults();
}
public AbstractMerchantProcessingInfo(unicore.model.Merchant object){
super(object);
}
private void applyDefaults() {
if (!isProxyObject()) {
isBatchReviewEnabled = BOOLEAN_NULL;
returnsCallbackUrl = STRING_NULL;
batchStatusCallbackUrl = STRING_NULL;
processinglistPolicy = STRING_NULL;
blacklistPolicy = STRING_NULL;
isExpirationDateValidationEnabled = BOOLEAN_NULL;
isRoutingNumberValidationEnabled = BOOLEAN_NULL;
batchValidationThresholdCount = INTEGER_NULL;
batchValidationThresholdAmount = INTEGER_NULL;
returnsDeliveryMode = STRING_NULL;
isBatchCustomFieldEnabled = BOOLEAN_NULL;
isProcessingOptimizationEnabled = BOOLEAN_NULL;
isAccountAggregationAchEnabled = BOOLEAN_NULL;
isAccountAggregationCardsEnabled = BOOLEAN_NULL;
isFileHashValidationEnabled = BOOLEAN_NULL;
tokenFormat = STRING_NULL;
fileEncryptionPublicKeyFileName = STRING_NULL;
tokenizationRemovalType = STRING_NULL;
isRealtimeReviewEnabled = BOOLEAN_NULL;
isMultipleReturnsFileSupported = BOOLEAN_NULL;
aggregationLevelType = STRING_NULL;
}
returnsDeliveryFrequency = "daily";
}
@Override
public void from() {
fromInternal();
super.from();
}
protected abstract void fromInternal();
@Override
public abstract void to();
@Override
public abstract void initializeNew();
@Override
public String toString(){
StringBuilder sb = new StringBuilder();
sb.append("processing: {");
sb.append("isBatchReviewEnabled: ");
sb.append(isBatchReviewEnabled);
sb.append(',').append(' ');
sb.append("returnsCallbackUrl: ");
sb.append(returnsCallbackUrl);
sb.append(',').append(' ');
sb.append("batchStatusCallbackUrl: ");
sb.append(batchStatusCallbackUrl);
sb.append(',').append(' ');
sb.append("processinglistPolicy: ");
sb.append(processinglistPolicy);
sb.append(',').append(' ');
sb.append("blacklistPolicy: ");
sb.append(blacklistPolicy);
sb.append(',').append(' ');
sb.append("returnsDeliveryFrequency: ");
sb.append(returnsDeliveryFrequency);
sb.append(',').append(' ');
sb.append("isExpirationDateValidationEnabled: ");
sb.append(isExpirationDateValidationEnabled);
sb.append(',').append(' ');
sb.append("isRoutingNumberValidationEnabled: ");
sb.append(isRoutingNumberValidationEnabled);
sb.append(',').append(' ');
sb.append("batchValidationThresholdCount: ");
sb.append(batchValidationThresholdCount);
sb.append(',').append(' ');
sb.append("batchValidationThresholdAmount: ");
sb.append(batchValidationThresholdAmount);
sb.append(',').append(' ');
sb.append("returnsDeliveryMode: ");
sb.append(returnsDeliveryMode);
sb.append(',').append(' ');
sb.append("isBatchCustomFieldEnabled: ");
sb.append(isBatchCustomFieldEnabled);
sb.append(',').append(' ');
sb.append("isProcessingOptimizationEnabled: ");
sb.append(isProcessingOptimizationEnabled);
sb.append(',').append(' ');
sb.append("isAccountAggregationAchEnabled: ");
sb.append(isAccountAggregationAchEnabled);
sb.append(',').append(' ');
sb.append("isAccountAggregationCardsEnabled: ");
sb.append(isAccountAggregationCardsEnabled);
sb.append(',').append(' ');
sb.append("isFileHashValidationEnabled: ");
sb.append(isFileHashValidationEnabled);
sb.append(',').append(' ');
sb.append("tokenFormat: ");
sb.append(tokenFormat);
sb.append(',').append(' ');
sb.append("fileEncryptionPublicKeyFileName: ");
sb.append(fileEncryptionPublicKeyFileName);
sb.append(',').append(' ');
sb.append("tokenizationRemovalType: ");
sb.append(tokenizationRemovalType);
sb.append(',').append(' ');
sb.append("isRealtimeReviewEnabled: ");
sb.append(isRealtimeReviewEnabled);
sb.append(',').append(' ');
sb.append("isMultipleReturnsFileSupported: ");
sb.append(isMultipleReturnsFileSupported);
sb.append(',').append(' ');
sb.append("aggregationLevelType: ");
sb.append(aggregationLevelType);
sb.append('}');
return sb.toString();
}
@XmlAttribute(name="isBatchReviewEnabled")
@FormParam("isBatchReviewEnabled")
@BooleanFormat
public Boolean getIsBatchReviewEnabled(){
return isBatchReviewEnabled;
}
public void setIsBatchReviewEnabled(Boolean value){
this.isBatchReviewEnabled = value;
}
@XmlAttribute(name="returnsCallbackUrl")
@XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
@FormParam("returnsCallbackUrl")
@StringFormat
@JsonDeserialize(using = api.util.StringDeserializer.class)
public String getReturnsCallbackUrl(){
return returnsCallbackUrl;
}
public void setReturnsCallbackUrl(String value){
this.returnsCallbackUrl = value;
}
@XmlAttribute(name="batchStatusCallbackUrl")
@XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
@FormParam("batchStatusCallbackUrl")
@StringFormat
@JsonDeserialize(using = api.util.StringDeserializer.class)
public String getBatchStatusCallbackUrl(){
return batchStatusCallbackUrl;
}
public void setBatchStatusCallbackUrl(String value){
this.batchStatusCallbackUrl = value;
}
@XmlAttribute(name="processinglistPolicy")
@XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
@FormParam("processinglistPolicy")
@StringFormat
@JsonDeserialize(using = api.util.StringDeserializer.class)
public String getProcessinglistPolicy(){
return processinglistPolicy;
}
public void setProcessinglistPolicy(String value){
this.processinglistPolicy = value;
}
@XmlAttribute(name="blacklistPolicy")
@XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
@FormParam("blacklistPolicy")
@StringFormat
@JsonDeserialize(using = api.util.StringDeserializer.class)
public String getBlacklistPolicy(){
return blacklistPolicy;
}
public void setBlacklistPolicy(String value){
this.blacklistPolicy = value;
}
@XmlElement(name="returnsDeliveryFrequency")
@XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
@FormParam("returnsDeliveryFrequency")
@StringFormat
@JsonDeserialize(using = api.util.StringDeserializer.class)
public String getReturnsDeliveryFrequency(){
return returnsDeliveryFrequency;
}
public void setReturnsDeliveryFrequency(String value){
this.returnsDeliveryFrequency = value;
}
@XmlAttribute(name="isExpirationDateValidationEnabled")
@FormParam("isExpirationDateValidationEnabled")
@BooleanFormat
public Boolean getIsExpirationDateValidationEnabled(){
return isExpirationDateValidationEnabled;
}
public void setIsExpirationDateValidationEnabled(Boolean value){
this.isExpirationDateValidationEnabled = value;
}
@XmlAttribute(name="isRoutingNumberValidationEnabled")
@FormParam("isRoutingNumberValidationEnabled")
@BooleanFormat
public Boolean getIsRoutingNumberValidationEnabled(){
return isRoutingNumberValidationEnabled;
}
public void setIsRoutingNumberValidationEnabled(Boolean value){
this.isRoutingNumberValidationEnabled = value;
}
@XmlAttribute(name="batchValidationThresholdCount")
@XmlJavaTypeAdapter(value=api.util.IntegerAdapter.class, type=Integer.class)
@FormParam("batchValidationThresholdCount")
@IntegerFormat
@JsonDeserialize(using=api.util.NumberDeserializer.class)
public Integer getBatchValidationThresholdCount(){
return batchValidationThresholdCount;
}
public void setBatchValidationThresholdCount(Integer value){
this.batchValidationThresholdCount = value;
}
@XmlAttribute(name="batchValidationThresholdAmount")
@XmlJavaTypeAdapter(value=api.util.IntegerAdapter.class, type=Integer.class)
@FormParam("batchValidationThresholdAmount")
@IntegerFormat
@JsonDeserialize(using=api.util.NumberDeserializer.class)
public Integer getBatchValidationThresholdAmount(){
return batchValidationThresholdAmount;
}
public void setBatchValidationThresholdAmount(Integer value){
this.batchValidationThresholdAmount = value;
}
@XmlAttribute(name="returnsDeliveryMode")
@XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
@FormParam("returnsDeliveryMode")
@StringFormat
@JsonDeserialize(using = api.util.StringDeserializer.class)
public String getReturnsDeliveryMode(){
return returnsDeliveryMode;
}
public void setReturnsDeliveryMode(String value){
this.returnsDeliveryMode = value;
}
@XmlAttribute(name="isBatchCustomFieldEnabled")
@FormParam("isBatchCustomFieldEnabled")
@BooleanFormat
public Boolean getIsBatchCustomFieldEnabled(){
return isBatchCustomFieldEnabled;
}
public void setIsBatchCustomFieldEnabled(Boolean value){
this.isBatchCustomFieldEnabled = value;
}
@XmlAttribute(name="isProcessingOptimizationEnabled")
@FormParam("isProcessingOptimizationEnabled")
@BooleanFormat
public Boolean getIsProcessingOptimizationEnabled(){
return isProcessingOptimizationEnabled;
}
public void setIsProcessingOptimizationEnabled(Boolean value){
this.isProcessingOptimizationEnabled = value;
}
@XmlAttribute(name="isAccountAggregationAchEnabled")
@FormParam("isAccountAggregationAchEnabled")
@BooleanFormat
public Boolean getIsAccountAggregationAchEnabled(){
return isAccountAggregationAchEnabled;
}
public void setIsAccountAggregationAchEnabled(Boolean value){
this.isAccountAggregationAchEnabled = value;
}
@XmlAttribute(name="isAccountAggregationCardsEnabled")
@FormParam("isAccountAggregationCardsEnabled")
@BooleanFormat
public Boolean getIsAccountAggregationCardsEnabled(){
return isAccountAggregationCardsEnabled;
}
public void setIsAccountAggregationCardsEnabled(Boolean value){
this.isAccountAggregationCardsEnabled = value;
}
@XmlAttribute(name="isFileHashValidationEnabled")
@FormParam("isFileHashValidationEnabled")
@BooleanFormat
public Boolean getIsFileHashValidationEnabled(){
return isFileHashValidationEnabled;
}
public void setIsFileHashValidationEnabled(Boolean value){
this.isFileHashValidationEnabled = value;
}
@XmlAttribute(name="tokenFormat")
@XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
@FormParam("tokenFormat")
@StringFormat
@JsonDeserialize(using = api.util.StringDeserializer.class)
public String getTokenFormat(){
return tokenFormat;
}
public void setTokenFormat(String value){
this.tokenFormat = value;
}
@XmlAttribute(name="fileEncryptionPublicKeyFileName")
@XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
@FormParam("fileEncryptionPublicKeyFileName")
@StringFormat
@JsonDeserialize(using = api.util.StringDeserializer.class)
public String getFileEncryptionPublicKeyFileName(){
return fileEncryptionPublicKeyFileName;
}
public void setFileEncryptionPublicKeyFileName(String value){
this.fileEncryptionPublicKeyFileName = value;
}
@XmlAttribute(name="tokenizationRemovalType")
@XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
@FormParam("tokenizationRemovalType")
@StringFormat
@JsonDeserialize(using = api.util.StringDeserializer.class)
public String getTokenizationRemovalType(){
return tokenizationRemovalType;
}
public void setTokenizationRemovalType(String value){
this.tokenizationRemovalType = value;
}
@XmlAttribute(name="isRealtimeReviewEnabled")
@FormParam("isRealtimeReviewEnabled")
@BooleanFormat
public Boolean getIsRealtimeReviewEnabled(){
return isRealtimeReviewEnabled;
}
public void setIsRealtimeReviewEnabled(Boolean value){
this.isRealtimeReviewEnabled = value;
}
@XmlAttribute(name="isMultipleReturnsFileSupported")
@FormParam("isMultipleReturnsFileSupported")
@BooleanFormat
public Boolean getIsMultipleReturnsFileSupported(){
return isMultipleReturnsFileSupported;
}
public void setIsMultipleReturnsFileSupported(Boolean value){
this.isMultipleReturnsFileSupported = value;
}
@XmlAttribute(name="aggregationLevelType")
@XmlJavaTypeAdapter(value=api.util.StringAdapter.class, type=String.class)
@FormParam("aggregationLevelType")
@StringFormat
@JsonDeserialize(using = api.util.StringDeserializer.class)
public String getAggregationLevelType(){
return aggregationLevelType;
}
public void setAggregationLevelType(String value){
this.aggregationLevelType = value;
}
public void audit(AuditHelper helper, ServerObject object) {
unicore.model.Merchant s_object = (unicore.model.Merchant) object;
helper.audit("isBatchReviewEnabled", isBatchReviewEnabled, s_object.getIsBatchReviewRequired());
helper.audit("returnsCallbackUrl", returnsCallbackUrl, s_object.getReturnsCallbackUrl());
helper.audit("batchStatusCallbackUrl", batchStatusCallbackUrl, s_object.getSubmissionsCallbackUrl());
helper.audit("processinglistPolicy", processinglistPolicy, s_object.getBatchProcessingPolicyCl() == null ? null : s_object.getBatchProcessingPolicyCl().getValue());
helper.audit("blacklistPolicy", blacklistPolicy, s_object.getBlacklistPolicyCl() == null ? null : s_object.getBlacklistPolicyCl().getValue());
helper.audit("returnsDeliveryFrequency", returnsDeliveryFrequency, VirtualFields.ReturnsDeliveryFrequency.get(s_object));
helper.audit("isExpirationDateValidationEnabled", isExpirationDateValidationEnabled, s_object.getIsExpirationDateValidationEnabled());
helper.audit("isRoutingNumberValidationEnabled", isRoutingNumberValidationEnabled, s_object.getIsRoutingNumberValidationEnabled());
helper.audit("batchValidationThresholdCount", batchValidationThresholdCount, s_object.getBatchValidationThresholdCount());
helper.audit("batchValidationThresholdAmount", batchValidationThresholdAmount, s_object.getBatchValidationThresholdAmount());
helper.audit("returnsDeliveryMode", returnsDeliveryMode, s_object.getReturnsDeliveryModeCl() == null ? null : s_object.getReturnsDeliveryModeCl().getValue());
helper.audit("isBatchCustomFieldEnabled", isBatchCustomFieldEnabled, s_object.getIsBatchCustomFieldEnabled());
helper.audit("isProcessingOptimizationEnabled", isProcessingOptimizationEnabled, s_object.getIsTransactionProcessingOptimizationEnabled());
helper.audit("isAccountAggregationAchEnabled", isAccountAggregationAchEnabled, s_object.getIsAccountAggregationAchEnabled());
helper.audit("isAccountAggregationCardsEnabled", isAccountAggregationCardsEnabled, s_object.getIsAccountAggregationCardsEnabled());
helper.audit("isFileHashValidationEnabled", isFileHashValidationEnabled, s_object.getIsFileHashValidationEnabled());
helper.audit("tokenFormat", tokenFormat, s_object.getTokenizationFormatCl() == null ? null : s_object.getTokenizationFormatCl().getValue());
helper.audit("fileEncryptionPublicKeyFileName", fileEncryptionPublicKeyFileName, s_object.getFileEncryptionPublicKeyFileName());
helper.audit("tokenizationRemovalType", tokenizationRemovalType, s_object.getTokenizationRemovalCl() == null ? null : s_object.getTokenizationRemovalCl().getValue());
helper.audit("isRealtimeReviewEnabled", isRealtimeReviewEnabled, s_object.getIsRealtimeReviewRequired());
helper.audit("isMultipleReturnsFileSupported", isMultipleReturnsFileSupported, s_object.getIsMultipleReturnsFileSupported());
helper.audit("aggregationLevelType", aggregationLevelType, s_object.getAggregationLevelCl() == null ? null : s_object.getAggregationLevelCl().getValue());
}
public static String objectTypeCode(){
return "processing-info";
}
}