public function __construct($name, $email, \DateTime $birthday, Address $address, $taxIdentification, ContactPhone $phone = null, ContactPhone $mobile = null, $gender = null) { $this->NomeEntrega = $name; $this->CpfCnpj = $taxIdentification; $this->Sexo = $gender; $this->DataNascimento = $birthday; $this->Email = $email; $this->Endereco = $address; $this->DddTelefone = $phone->getAreaCode(); $this->NumeroTelefone = $phone->getNumber(); $this->DddCelular = $mobile->getAreaCode(); $this->NumeroCelular = $mobile->getNumber(); }
public function __construct($id, $name, $email, \DateTime $registeredAt, \DateTime $birthday, Address $address, $taxIdentification, ContactPhone $phone = null, ContactPhone $mobile = null, $gender = null, $ipAddress = null) { $this->Codigo = $id; $this->NomeComprador = $name; $this->DataCadastro = $registeredAt; $this->DataNascimento = $birthday; $this->Email = $email; $this->Endereco = $address; $this->CpfCnpj = $taxIdentification; $this->DddTelefone = $phone->getAreaCode(); $this->NumeroTelefone = $phone->getNumber(); $this->DddCelular = $mobile->getAreaCode(); $this->NumeroCelular = $mobile->getNumber(); $this->Sexo = $gender; $this->IP = $ipAddress; }