From 6bf5b3ff6901ffaeb48acb1fc9bcd6ac8eb06569 Mon Sep 17 00:00:00 2001 From: Cleiton Alves Date: Wed, 31 May 2017 00:39:24 -0300 Subject: [PATCH] Adding complement parameter on Address' constructor --- src/ClearSale/XmlEntity/SendOrder/Address.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ClearSale/XmlEntity/SendOrder/Address.php b/src/ClearSale/XmlEntity/SendOrder/Address.php index c778788..10e499d 100755 --- a/src/ClearSale/XmlEntity/SendOrder/Address.php +++ b/src/ClearSale/XmlEntity/SendOrder/Address.php @@ -19,7 +19,7 @@ class Address implements XmlEntityInterface private $zipCode; private $reference; - public static function create($street, $number, $county, $country, $city, $state, $zipCode) + public static function create($street, $number, $county, $country, $city, $state, $zipCode, $complement = '') { $instance = new self(); @@ -31,6 +31,10 @@ public static function create($street, $number, $county, $country, $city, $state $instance->setState($state); $instance->setZipCode($zipCode); + if (!empty($complement)) { + $instance->setComplement($complement); + } + return $instance; }