Skip to content

Commit

Permalink
Merge pull request #83 from jsampedro77/allow-source-parameter-custom…
Browse files Browse the repository at this point in the history
…er-update

Allow source parameter in customer update request
  • Loading branch information
delatbabel authored Jun 15, 2017
2 parents c9a575f + 2679dba commit 2c0df1d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/Message/UpdateCustomerRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,27 @@ public function setEmail($value)
return $this->setParameter('email', $value);
}

/**
* Get the customer's source.
*
* @return string
*/
public function getSource()
{
return $this->getParameter('source');
}

/**
* Sets the customer's source.
*
* @param string $value
* @return CreateCustomerRequest provides a fluent interface.
*/
public function setSource($value)
{
$this->setParameter('source', $value);
}

public function getData()
{
$this->validate('customerReference');
Expand All @@ -77,6 +98,10 @@ public function getData()
$data['metadata'] = $this->getMetadata();
}

if ($this->getSource()) {
$data['source'] = $this->getSource();
}

return $data;
}

Expand Down

0 comments on commit 2c0df1d

Please sign in to comment.