<?php

namespace App\Entities\PagSeguro\Order;

use App\Entities\PagSeguro\Share\PagSeguroPhone;
use App\Utils\Builder;

class PagSeguroCustomerBuilder implements Builder {
	protected $nome;
	protected $email;
	protected $tax_id;
	protected $phone;

	public function build(): PagSeguroCustomer {

		$obj = new PagSeguroCustomer();
		
		$obj->setEmail($this->email);
		$obj->setNome($this->nome);
		$obj->setPhone($this->phone);
		$obj->setTaxId($this->tax_id);

		return $obj;

	}
	
	/**
	 *
	 * @param mixed $nome
	 */
	public function setNome($nome):PagSeguroCustomerBuilder {
		
		$this->nome = $nome;
		return $this;
	}
	
	/**
	 *
	 * @param mixed $email
	 */
	public function setEmail($email):PagSeguroCustomerBuilder {
		
		$this->email = $email;
		return $this;
	}
	
	/**
	 *
	 * @param mixed $tax_id
	 */
	public function setTaxId($tax_id):PagSeguroCustomerBuilder {
		
		$this->tax_id = $tax_id;
		return $this;
	}
	
	/**
	 *
	 * @param mixed $phone
	 */
	public function setPhone(PagSeguroPhone $phone):PagSeguroCustomerBuilder {
		
		$this->phone = $phone;
		return $this;
		
	}

}

