Skip to content

Commit

Permalink
Allow 'source' parameter when creating a customer
Browse files Browse the repository at this point in the history
  • Loading branch information
jsampedro77 committed May 18, 2017
1 parent 65f3b98 commit 4d1dc6a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/Message/CreateCustomerRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,24 @@ public function setEmail($value)
return $this->setParameter('email', $value);
}

public function getSource()
{
return $this->getParameter('source');
}

public function setSource($value)
{
$this->setParameter('source', $value);
}

public function getData()
{
$data = array();
$data['description'] = $this->getDescription();

if ($this->getToken()) {
$data['card'] = $this->getToken();

if ($this->getEmail()) {
$data['email'] = $this->getEmail();
}
Expand All @@ -126,6 +136,10 @@ public function getData()
$data['metadata'] = $this->getMetadata();
}

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

return $data;
}

Expand Down

0 comments on commit 4d1dc6a

Please sign in to comment.