From f1f63b64131714a8abda9e7ba9e5f048443684a4 Mon Sep 17 00:00:00 2001 From: "Elvis P. dos Reis" Date: Wed, 4 Jan 2017 16:20:11 -0200 Subject: [PATCH] Suporte para pagamento pessoa juridica. --- src/Order/CustomerData.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/Order/CustomerData.php b/src/Order/CustomerData.php index 26d159b..c4386a0 100644 --- a/src/Order/CustomerData.php +++ b/src/Order/CustomerData.php @@ -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 */ @@ -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 @@ -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); @@ -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 @@ -186,6 +202,7 @@ public function toArray() { return [ 'customerIdentity' => $this->customerIdentity, + 'tradingName' => $this->tradingName, 'customerName' => $this->customerName, 'customerEmail' => $this->customerEmail, 'birthDate' => $this->birthDate,