package com.swfarm.biz.ebay.bo;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;

public class EbayOrder implements Serializable {

	private Long id;
	
	private String accountNumber;

	private String orderId;

	private Integer orderSaleRecordNo;

	private String orderEbayUserId;

	private String orderBuyerCheckoutMessage;

	private Timestamp createdTime;

	private Timestamp paidTime;

	private Timestamp shippedTime;

	private String buyerFullName;

	private String buyerPhoneNumber;

	private String buyerPhoneNumber2;

	private String buyerAddress1;

	private String buyerAddress2;

	private String buyerCity;

	private String buyerState;

	private String buyerZip;

	private String buyerCountry;

	private String shippingServiceSelected;

	private Integer shippingTimeMin;

	private Integer shippingTimeMax;

	private Double subtotalPrice;

	private Double postageFee;

	private Double totalPrice;

	private String currency;

	private String orderExternalTransactionId;

	private String orderRefundExternalTransactionId;

	private Double paymentOrRefundAmount;

	private Double payPalFee;

	private String orderEbayPaymentStatus;

	private String orderPaymentMethod;

	private String orderCheckoutStatus;

	private String orderStatus;

	private String buyerEmail;

	private String billingEmail;
	
	private String payPalEmailAddress;
	
	private Set<EbayOrderTransaction> ebayOrderTransactions = new HashSet<EbayOrderTransaction>();

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public Integer getOrderSaleRecordNo() {
		return orderSaleRecordNo;
	}

	public void setOrderSaleRecordNo(Integer orderSaleRecordNo) {
		this.orderSaleRecordNo = orderSaleRecordNo;
	}

	public String getOrderEbayUserId() {
		return orderEbayUserId;
	}

	public void setOrderEbayUserId(String orderEbayUserId) {
		this.orderEbayUserId = orderEbayUserId;
	}

	public String getOrderBuyerCheckoutMessage() {
		return orderBuyerCheckoutMessage;
	}

	public void setOrderBuyerCheckoutMessage(String orderBuyerCheckoutMessage) {
		this.orderBuyerCheckoutMessage = orderBuyerCheckoutMessage;
	}

	public Timestamp getCreatedTime() {
		return createdTime;
	}

	public void setCreatedTime(Timestamp createdTime) {
		this.createdTime = createdTime;
	}

	public Timestamp getPaidTime() {
		return paidTime;
	}

	public void setPaidTime(Timestamp paidTime) {
		this.paidTime = paidTime;
	}

	public Timestamp getShippedTime() {
		return shippedTime;
	}

	public void setShippedTime(Timestamp shippedTime) {
		this.shippedTime = shippedTime;
	}

	public String getBuyerFullName() {
		return buyerFullName;
	}

	public void setBuyerFullName(String buyerFullName) {
		this.buyerFullName = buyerFullName;
	}

	public String getBuyerPhoneNumber() {
		return buyerPhoneNumber;
	}

	public void setBuyerPhoneNumber(String buyerPhoneNumber) {
		this.buyerPhoneNumber = buyerPhoneNumber;
	}

	public String getBuyerPhoneNumber2() {
		return buyerPhoneNumber2;
	}

	public void setBuyerPhoneNumber2(String buyerPhoneNumber2) {
		this.buyerPhoneNumber2 = buyerPhoneNumber2;
	}

	public String getBuyerAddress1() {
		return buyerAddress1;
	}

	public void setBuyerAddress1(String buyerAddress1) {
		this.buyerAddress1 = buyerAddress1;
	}

	public String getBuyerAddress2() {
		return buyerAddress2;
	}

	public void setBuyerAddress2(String buyerAddress2) {
		this.buyerAddress2 = buyerAddress2;
	}

	public String getBuyerCity() {
		return buyerCity;
	}

	public void setBuyerCity(String buyerCity) {
		this.buyerCity = buyerCity;
	}

	public String getBuyerState() {
		return buyerState;
	}

	public void setBuyerState(String buyerState) {
		this.buyerState = buyerState;
	}

	public String getBuyerZip() {
		return buyerZip;
	}

	public void setBuyerZip(String buyerZip) {
		this.buyerZip = buyerZip;
	}

	public String getBuyerCountry() {
		return buyerCountry;
	}

	public void setBuyerCountry(String buyerCountry) {
		this.buyerCountry = buyerCountry;
	}

	public String getShippingServiceSelected() {
		return shippingServiceSelected;
	}

	public void setShippingServiceSelected(String shippingServiceSelected) {
		this.shippingServiceSelected = shippingServiceSelected;
	}

	public Integer getShippingTimeMin() {
		return shippingTimeMin;
	}

	public void setShippingTimeMin(Integer shippingTimeMin) {
		this.shippingTimeMin = shippingTimeMin;
	}

	public Integer getShippingTimeMax() {
		return shippingTimeMax;
	}

	public void setShippingTimeMax(Integer shippingTimeMax) {
		this.shippingTimeMax = shippingTimeMax;
	}

	public Double getSubtotalPrice() {
		return subtotalPrice;
	}

	public void setSubtotalPrice(Double subtotalPrice) {
		this.subtotalPrice = subtotalPrice;
	}

	public Double getPostageFee() {
		return postageFee;
	}

	public void setPostageFee(Double postageFee) {
		this.postageFee = postageFee;
	}

	public Double getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(Double totalPrice) {
		this.totalPrice = totalPrice;
	}

	public String getCurrency() {
		return currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public String getOrderExternalTransactionId() {
		return orderExternalTransactionId;
	}

	public void setOrderExternalTransactionId(String orderExternalTransactionId) {
		this.orderExternalTransactionId = orderExternalTransactionId;
	}

	public String getOrderRefundExternalTransactionId() {
		return orderRefundExternalTransactionId;
	}

	public void setOrderRefundExternalTransactionId(
			String orderRefundExternalTransactionId) {
		this.orderRefundExternalTransactionId = orderRefundExternalTransactionId;
	}

	public Double getPaymentOrRefundAmount() {
		return paymentOrRefundAmount;
	}

	public void setPaymentOrRefundAmount(Double paymentOrRefundAmount) {
		this.paymentOrRefundAmount = paymentOrRefundAmount;
	}

	public Double getPayPalFee() {
		return payPalFee;
	}

	public void setPayPalFee(Double payPalFee) {
		this.payPalFee = payPalFee;
	}

	public String getOrderEbayPaymentStatus() {
		return orderEbayPaymentStatus;
	}

	public void setOrderEbayPaymentStatus(String orderEbayPaymentStatus) {
		this.orderEbayPaymentStatus = orderEbayPaymentStatus;
	}

	public String getOrderPaymentMethod() {
		return orderPaymentMethod;
	}

	public void setOrderPaymentMethod(String orderPaymentMethod) {
		this.orderPaymentMethod = orderPaymentMethod;
	}

	public String getOrderCheckoutStatus() {
		return orderCheckoutStatus;
	}

	public void setOrderCheckoutStatus(String orderCheckoutStatus) {
		this.orderCheckoutStatus = orderCheckoutStatus;
	}

	public String getOrderStatus() {
		return orderStatus;
	}

	public void setOrderStatus(String orderStatus) {
		this.orderStatus = orderStatus;
	}

	public void setAccountNumber(String accountNumber) {
		this.accountNumber = accountNumber;
	}

	public String getAccountNumber() {
		return accountNumber;
	}

	public String getBuyerEmail() {
		return buyerEmail;
	}

	public void setBuyerEmail(String buyerEmail) {
		this.buyerEmail = buyerEmail;
	}

	public String getBillingEmail() {
		return billingEmail;
	}

	public void setBillingEmail(String billingEmail) {
		this.billingEmail = billingEmail;
	}

	public String getPayPalEmailAddress() {
		return payPalEmailAddress;
	}

	public void setPayPalEmailAddress(String payPalEmailAddress) {
		this.payPalEmailAddress = payPalEmailAddress;
	}
	
	public Set<EbayOrderTransaction> getEbayOrderTransactions() {
		return ebayOrderTransactions;
	}

	public void setEbayOrderTransactions(
			Set<EbayOrderTransaction> ebayOrderTransactions) {
		this.ebayOrderTransactions = ebayOrderTransactions;
	}

	public void addEbayOrderTransaction(EbayOrderTransaction ebayOrderTransaction){
		if (!ebayOrderTransactions.contains(ebayOrderTransaction)) {
			ebayOrderTransactions.add(ebayOrderTransaction);
		}
	}

	@Override
	public String toString() {
		return "EbayOrder [accountNumber=" + accountNumber + ", billingEmail="
				+ billingEmail + ", buyerAddress1=" + buyerAddress1
				+ ", buyerAddress2=" + buyerAddress2 + ", buyerCity="
				+ buyerCity + ", buyerCountry=" + buyerCountry
				+ ", buyerEmail=" + buyerEmail + ", buyerFullName="
				+ buyerFullName + ", buyerPhoneNumber=" + buyerPhoneNumber
				+ ", buyerPhoneNumber2=" + buyerPhoneNumber2 + ", buyerState="
				+ buyerState + ", buyerZip=" + buyerZip + ", createdTime="
				+ createdTime + ", currency=" + currency
				+ ", ebayOrderTransactions=" + ebayOrderTransactions + ", id="
				+ id + ", orderBuyerCheckoutMessage="
				+ orderBuyerCheckoutMessage + ", orderCheckoutStatus="
				+ orderCheckoutStatus + ", orderEbayPaymentStatus="
				+ orderEbayPaymentStatus + ", orderEbayUserId="
				+ orderEbayUserId + ", orderExternalTransactionId="
				+ orderExternalTransactionId + ", orderId=" + orderId
				+ ", orderPaymentMethod=" + orderPaymentMethod
				+ ", orderRefundExternalTransactionId="
				+ orderRefundExternalTransactionId + ", orderSaleRecordNo="
				+ orderSaleRecordNo + ", orderStatus=" + orderStatus
				+ ", paidTime=" + paidTime + ", payPalEmailAddress="
				+ payPalEmailAddress + ", payPalFee=" + payPalFee
				+ ", paymentOrRefundAmount=" + paymentOrRefundAmount
				+ ", postageFee=" + postageFee + ", shippedTime=" + shippedTime
				+ ", shippingServiceSelected=" + shippingServiceSelected
				+ ", shippingTimeMax=" + shippingTimeMax + ", shippingTimeMin="
				+ shippingTimeMin + ", subtotalPrice=" + subtotalPrice
				+ ", totalPrice=" + totalPrice + "]";
	}
	
}
