From 2679dba7d2350e2c182a691aad9ca4aea2ad2bbc Mon Sep 17 00:00:00 2001 From: Javier Sampedro Date: Fri, 9 Jun 2017 11:03:59 +0200 Subject: [PATCH] Allow source parameter in customer update request --- src/Message/UpdateCustomerRequest.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/Message/UpdateCustomerRequest.php b/src/Message/UpdateCustomerRequest.php index a3331518..d05cf8c9 100644 --- a/src/Message/UpdateCustomerRequest.php +++ b/src/Message/UpdateCustomerRequest.php @@ -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'); @@ -77,6 +98,10 @@ public function getData() $data['metadata'] = $this->getMetadata(); } + if ($this->getSource()) { + $data['source'] = $this->getSource(); + } + return $data; }