Skip to content

Commit

Permalink
Suporte para pagamento pessoa juridica.
Browse files Browse the repository at this point in the history
  • Loading branch information
elvispdosreis committed Jan 4, 2017
1 parent ec698b4 commit f1f63b6
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/Order/CustomerData.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@
class CustomerData implements Arrayable
{
/**
* @var string CPF do cliente
* @var string CPF/CNPJ do cliente
*/
private $customerIdentity;
/**
* @var string Nome da empresa
*/
private $tradingName;
/**
* @var string Nome do cliente
*/
Expand Down Expand Up @@ -53,6 +57,7 @@ class CustomerData implements Arrayable
/**
* Customer constructor.
* @param string $customerIdentity
* @param string $tradingName
* @param string $customerName
* @param string $customerEmail
* @param string $birthDate
Expand All @@ -61,9 +66,10 @@ class CustomerData implements Arrayable
* @param ShippingAddress $shippingAddress
* @param PhoneData $phoneData
*/
public function __construct($customerIdentity = null, $customerName = null, $customerEmail = null, $birthDate = null, $gender = null, BillingAddress $billingAddress = null, ShippingAddress $shippingAddress = null, PhoneData $phoneData = null)
public function __construct($customerIdentity = null, $tradingName = null, $customerName = null, $customerEmail = null, $birthDate = null, $gender = null, BillingAddress $billingAddress = null, ShippingAddress $shippingAddress = null, PhoneData $phoneData = null)
{
$this->setCustomerIdentity($customerIdentity);
$this->setTradingName($tradingName);
$this->setCustomerName($customerName);
$this->setCustomerEmail($customerEmail);
$this->setBirthDate($birthDate);
Expand Down Expand Up @@ -94,6 +100,16 @@ public function setCustomerIdentity($customerIdentity)
return $this;
}

/**
* @param string $tradingName
* @return CustomerData
*/
public function setTradingName($tradingName)
{
$this->tradingName = $tradingName;
return $this;
}

/**
* @param string $customerName
* @return CustomerData
Expand Down Expand Up @@ -186,6 +202,7 @@ public function toArray()
{
return [
'customerIdentity' => $this->customerIdentity,
'tradingName' => $this->tradingName,
'customerName' => $this->customerName,
'customerEmail' => $this->customerEmail,
'birthDate' => $this->birthDate,
Expand Down

0 comments on commit f1f63b6

Please sign in to comment.