// Path: src/main/java/com/payu/sdk/utils/xml/MapAdditionalInfoAdapter.java
// public class MapAdditionalInfoAdapter extends XmlAdapter<MapAdditionalInfoElement, Map<String, String>> {
// 
// 	@Override
// 	public MapAdditionalInfoElement marshal(Map<String, String> v) throws Exception {
// 
// 		if (v == null || v.isEmpty()) {
// 			return null;
// 		}
// 
// 		MapAdditionalInfoElement map = new MapAdditionalInfoElement();
// 		map.setCardType(v.get("cardType"));
// 		return map;
// 	}
// 
// 	@Override
// 	public Map<String, String> unmarshal(MapAdditionalInfoElement v) throws Exception {
// 
// 		if (v == null) {
// 			return null;
// 		}
// 
// 		Map<String, String> map = new HashMap<String, String>(1);
// 		map.put("cardType", v.getCardType());
// 		return map;
// 	}
// }


import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import com.payu.sdk.utils.xml.DateAdapter;
import com.payu.sdk.utils.xml.MapAdditionalInfoAdapter;
import com.payu.sdk.utils.xml.MapExtraParameterAdapter;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
/**
 * The MIT License (MIT)
 *
 * Copyright (c) 2016 developers-payu-latam
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package com.payu.sdk.model;




/**
 * Represents a response for a transaction in the PayU SDK.
 *
 * @author PayU Latam
 * @since 1.0.0
 * @version 1.0.0, 21/08/2013
 */
@XmlRootElement(name = "transactionResponse")
@XmlAccessorType(XmlAccessType.FIELD)
public class TransactionResponse implements Serializable {

	/** The generated serial version Id */
	private static final long serialVersionUID = 7073372114746122059L;
	/** the related order id. */
	@XmlElement(required = false)
	private Long orderId;
	/** the order's reference code */
	@XmlElement(required = false)
	private String orderReferenceCode;
	/** the related transaction id. */
	@XmlElement(required = false)
	private String transactionId;
	/** The transaction state */
	@XmlElement(required = false)
	private TransactionState state;
	/** The payment network response code. */
	@XmlElement(required = false)
	private String paymentNetworkResponseCode;
	/** The error message related to the payment network response. */
	@XmlElement(required = false)
	private String paymentNetworkResponseErrorMessage;
	/** The trazability code related with the response. */
	@XmlElement(required = false)
	private String trazabilityCode;
	/** The authorization code. */
	@XmlElement(required = false)
	private String authorizationCode;
	/** The transaction pending reason */
	@XmlElement(required = false)
	private TransactionPendingReason pendingReason;
	/** The transaction response code */
	@XmlElement(required = false)
	private TransactionResponseCode responseCode;
	/** The error code. */
	@XmlElement(required = false)
	private TransactionErrorCode errorCode;
	/** The message related to the response code. */
	@XmlElement(required = false)
	private String responseMessage;
	/** The payment date. */
	@XmlElement(required = false)
	private String transactionDate;
	/** The payment time. */
	@XmlElement(required = false)
	private String transactionTime;
	/** The operation date. */
	@XmlElement(required = false)
	@XmlJavaTypeAdapter(DateAdapter.class)
	private Date operationDate;

	/** The extra parameters. */
	@XmlJavaTypeAdapter(MapExtraParameterAdapter.class)
	private Map<String, Object> extraParameters;

	/** The addicional info fields */
// Path: src/main/java/com/payu/sdk/utils/xml/MapAdditionalInfoAdapter.java
// public class MapAdditionalInfoAdapter extends XmlAdapter<MapAdditionalInfoElement, Map<String, String>> {
// 
// 	@Override
// 	public MapAdditionalInfoElement marshal(Map<String, String> v) throws Exception {
// 
// 		if (v == null || v.isEmpty()) {
// 			return null;
// 		}
// 
// 		MapAdditionalInfoElement map = new MapAdditionalInfoElement();
// 		map.setCardType(v.get("cardType"));
// 		return map;
// 	}
// 
// 	@Override
// 	public Map<String, String> unmarshal(MapAdditionalInfoElement v) throws Exception {
// 
// 		if (v == null) {
// 			return null;
// 		}
// 
// 		Map<String, String> map = new HashMap<String, String>(1);
// 		map.put("cardType", v.getCardType());
// 		return map;
// 	}
// }


// Path: src/main/java/com/payu/sdk/model/TransactionResponse.java
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import com.payu.sdk.utils.xml.DateAdapter;
import com.payu.sdk.utils.xml.MapAdditionalInfoAdapter;
import com.payu.sdk.utils.xml.MapExtraParameterAdapter;
import java.io.Serializable;
import java.util.Date;
import java.util.Map;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;

/**
 * The MIT License (MIT)
 *
 * Copyright (c) 2016 developers-payu-latam
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
package com.payu.sdk.model;




/**
 * Represents a response for a transaction in the PayU SDK.
 *
 * @author PayU Latam
 * @since 1.0.0
 * @version 1.0.0, 21/08/2013
 */
@XmlRootElement(name = "transactionResponse")
@XmlAccessorType(XmlAccessType.FIELD)
public class TransactionResponse implements Serializable {

	/** The generated serial version Id */
	private static final long serialVersionUID = 7073372114746122059L;
	/** the related order id. */
	@XmlElement(required = false)
	private Long orderId;
	/** the order's reference code */
	@XmlElement(required = false)
	private String orderReferenceCode;
	/** the related transaction id. */
	@XmlElement(required = false)
	private String transactionId;
	/** The transaction state */
	@XmlElement(required = false)
	private TransactionState state;
	/** The payment network response code. */
	@XmlElement(required = false)
	private String paymentNetworkResponseCode;
	/** The error message related to the payment network response. */
	@XmlElement(required = false)
	private String paymentNetworkResponseErrorMessage;
	/** The trazability code related with the response. */
	@XmlElement(required = false)
	private String trazabilityCode;
	/** The authorization code. */
	@XmlElement(required = false)
	private String authorizationCode;
	/** The transaction pending reason */
	@XmlElement(required = false)
	private TransactionPendingReason pendingReason;
	/** The transaction response code */
	@XmlElement(required = false)
	private TransactionResponseCode responseCode;
	/** The error code. */
	@XmlElement(required = false)
	private TransactionErrorCode errorCode;
	/** The message related to the response code. */
	@XmlElement(required = false)
	private String responseMessage;
	/** The payment date. */
	@XmlElement(required = false)
	private String transactionDate;
	/** The payment time. */
	@XmlElement(required = false)
	private String transactionTime;
	/** The operation date. */
	@XmlElement(required = false)
	@XmlJavaTypeAdapter(DateAdapter.class)
	private Date operationDate;

	/** The extra parameters. */
	@XmlJavaTypeAdapter(MapExtraParameterAdapter.class)
	private Map<String, Object> extraParameters;

	/** The addicional info fields */
        @XmlJavaTypeAdapter(MapAdditionalInfoAdapter.class)