/**
 * 
 */
package com.microstar.tap3.contact.api;

import java.io.Serializable;

/**
 * @author dmcdaniel
 *
 */
public class ContactObject implements Serializable
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 4663016387257579780L;
	private ContactObjectContact contact;
	private ContactObjectAddress address;
	private String id;
	private boolean deleted;
	
	/**
	 * 
	 */
	public ContactObject()
	{
	}

	/**
	 * @return the id
	 */
	public String getId()
	{
		return id;
	}


	/**
	 * @param id the id to set
	 */
	public ContactObject setId(String id)
	{
		this.id = id;
		return this;
	}

	public ContactObject(ContactObjectContact contact, ContactObjectAddress address)
	{
		super();
		this.contact = contact;
		this.address = address;
		this.id = contact.getId();
	}

	public ContactObjectContact createContact(
			String id, String prefix, String firstName, String lastName, String suffix, String jobTitle,
			String deskPhone, String cellPhone, String emailAddress, boolean receiveOrderUpdates,
			boolean receiveInvoice, boolean receiveBill, boolean receiveNewsletter, String sfdcid, 
			String notes, Boolean receiveEmptyKegCountRequests, Boolean receiveAckRequests,  
			int receiveAckRequestsDelayHrs, Boolean deleted, Boolean defaultForType)
	{
		return new ContactObjectContact(id, prefix, firstName, lastName, suffix, jobTitle, deskPhone, cellPhone, 
				emailAddress, receiveOrderUpdates, receiveInvoice, receiveBill, receiveNewsletter, sfdcid, notes, 
				receiveEmptyKegCountRequests, receiveAckRequests, receiveAckRequestsDelayHrs, deleted, defaultForType);
	}

	public ContactObjectAddress createAddress(String id, String addressName, String address1, String address2, String address3, String city,
	String stateOrProvince, String postalCode, String country, Double lat, Double lon, String sfdcid, String notes, Boolean defaultForType)
	{
		return new ContactObjectAddress(id, addressName, address1, address2, address3, city, stateOrProvince, postalCode, country, 
				lat, lon, sfdcid, notes, defaultForType);
	}
	
	/**
	 * @return the contact
	 */
	public ContactObjectContact getContact()
	{
		return contact;
	}

	/**
	 * @param contact the contact to set
	 */
	public ContactObject setContact(ContactObjectContact contact)
	{
		this.contact = contact;
		return this;
	}

	/**
	 * @return the address
	 */
	public ContactObjectAddress getAddress()
	{
		return address;
	}

	/**
	 * @param address the address to set
	 */
	public ContactObject setAddress(ContactObjectAddress address)
	{
		this.address = address;
		return this;
	}

	public boolean isDeleted() {
		return deleted;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}

}
