Skip to content

Commit

Permalink
Added more setters
Browse files Browse the repository at this point in the history
  • Loading branch information
Rene de Kat committed Jul 5, 2017
1 parent 2b39fd0 commit 52ef1a9
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 0 deletions.
55 changes: 55 additions & 0 deletions src/Builders/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,59 @@

class Address extends Builder
{

/**
* @param string $line1
* @return Address
*/
public function setLine1($line1)
{
$this->data['Line1'] = $line1;

return $this;
}

/**
* @param string $line2
* @return Address
*/
public function setLine2($line2)
{
$this->data['Line2'] = $line2;

return $this;
}

/**
* @param string $city
* @return Address
*/
public function setCity($city)
{
$this->data['City'] = $city;

return $this;
}

/**
* @param string $postalCode
* @return Address
*/
public function setPostalCode($postalCode)
{
$this->data['PostalCode'] = $postalCode;

return $this;
}

/**
* @param string $country
* @return Address
*/
public function setCountry($country)
{
$this->data['Country'] = $country;

return $this;
}
}
11 changes: 11 additions & 0 deletions src/Builders/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,15 @@ public function getResourceName()
{
return static::$name ?: strtolower($this->getEntityName());
}

/**
* @param $syncToken
* @return $this
*/
public function setSynctoken($syncToken)
{
$this->data['SyncToken'] = $syncToken;

return $this;
}
}
34 changes: 34 additions & 0 deletions src/Builders/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@

class Customer extends Builder
{

/**
* @param $id
* @return $this
*/
public function setId($id)
{
$this->data['Id'] = $id;

return $this;
}

/**
* Set a customer's full name.
*
Expand All @@ -22,6 +34,28 @@ public function setName($givenName, $middleName = null, $familyName = null)
return $this;
}

/**
* @param string $displayName
* @return $this
*/
public function setDisplayName($displayName)
{
$this->data['DisplayName'] = $displayName;

return $this;
}

/**
* @param string $companyName
* @return $this
*/
public function setCompanyName($companyName)
{
$this->data['CompanyName'] = $companyName;

return $this;
}

/**
* Set customer's address.
*
Expand Down

0 comments on commit 52ef1a9

Please sign in to comment.