Skip to content

Commit

Permalink
Merge pull request #19 from ariscratle/hotfix/complement-address
Browse files Browse the repository at this point in the history
Adding complement parameter on Address' constructor
  • Loading branch information
lucasmro authored Jun 9, 2017
2 parents 74684c6 + 6bf5b3f commit c2ac05c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ClearSale/XmlEntity/SendOrder/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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;
}

Expand Down

0 comments on commit c2ac05c

Please sign in to comment.