<?php


class Billing implements \JsonSerializable
{
    private $clientID;    
    private $type;
    private $primaryDocument;	
    private $secondaryDocument;	
    private $name;	
    private $birthDate;	
    private $email;	
    private $gender;	
    private $address;	
    private $phones;	

    public function jsonSerialize()
    {
        $obj = clone $this;
        $keys = get_object_vars($obj);
        foreach ($keys as $key => $value) {
            if ($value===null || $value==='') {
                unset($obj->{$key});
            }
        }

        return get_object_vars($obj);
    }    

    /**
     * Get the value of clientID
     */ 
    public function getClientID()
    {
        return $this->clientID;
    }

    /**
     * Set the value of clientID
     *
     * @return  self
     */ 
    public function setClientID($clientID)
    {
        $this->clientID = $clientID;

        return $this;
    }

    /**
     * Get the value of type
     */ 
    public function getType()
    {
        return $this->type;
    }

    /**
     * Set the value of type
     *
     * @return  self
     */ 
    public function setType($type)
    {
        $this->type = $type;

        return $this;
    }

    /**
     * Get the value of primaryDocument
     */ 
    public function getPrimaryDocument()
    {
        return $this->primaryDocument;
    }

    /**
     * Set the value of primaryDocument
     *
     * @return  self
     */ 
    public function setPrimaryDocument($primaryDocument)
    {
        $this->primaryDocument = $primaryDocument;

        return $this;
    }

    /**
     * Get the value of secondaryDocument
     */ 
    public function getSecondaryDocument()
    {
        return $this->secondaryDocument;
    }

    /**
     * Set the value of secondaryDocument
     *
     * @return  self
     */ 
    public function setSecondaryDocument($secondaryDocument)
    {
        $this->secondaryDocument = $secondaryDocument;

        return $this;
    }

    /**
     * Get the value of name
     */ 
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set the value of name
     *
     * @return  self
     */ 
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get the value of birthDate
     */ 
    public function getBirthDate()
    {
        return $this->birthDate;
    }

    /**
     * Set the value of birthDate
     *
     * @return  self
     */ 
    public function setBirthDate($birthDate)
    {
        $this->birthDate = $birthDate;

        return $this;
    }

    /**
     * Get the value of email
     */ 
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * Set the value of email
     *
     * @return  self
     */ 
    public function setEmail($email)
    {
        $this->email = $email;

        return $this;
    }

    /**
     * Get the value of gender
     */ 
    public function getGender()
    {
        return $this->gender;
    }

    /**
     * Set the value of gender
     *
     * @return  self
     */ 
    public function setGender($gender)
    {
        $this->gender = $gender;

        return $this;
    }

    public function Address()
    {
        $address = new Address();
        $this->setAddress($address);
        return $address;        
    }        

    /**
     * Get the value of address
     */ 
    public function getAddress()
    {
        return $this->address;
    }

    /**
     * Set the value of address
     *
     * @return  self
     */ 
    public function setAddress(Address $address)
    {
        $this->address = $address;

        return $this;
    }

    /**
     * Get the value of phones
     */ 
    public function getPhones()
    {
        return $this->phones;
    }

    /**
     * Set the value of phones
     *
     * @return  self
     */ 
    public function setPhones($phones)
    {
        $this->phones = $phones;
        return $this;
    }

    public function addPhone(Phone $phone)
    {
        if ($this->phones == null) {
            $this->phones = [];
        }
        $this->phones[] = $phone;

        return $this;
    }    

}