diff --git a/src/Message/CreateSubscriptionRequest.php b/src/Message/CreateSubscriptionRequest.php index 46d208cf..1f9f1892 100644 --- a/src/Message/CreateSubscriptionRequest.php +++ b/src/Message/CreateSubscriptionRequest.php @@ -33,6 +33,26 @@ public function setPlan($value) return $this->setParameter('plan', $value); } + /** + * Get the tax percent + * + * @return string + */ + public function getTaxPercent() + { + return $this->getParameter('tax_percent'); + } + + /** + * Set the tax percentage + * + * @return CreateSubscriptionRequest provides a fluent interface. + */ + public function setTaxPercent($value) + { + return $this->setParameter('tax_percent', $value); + } + public function getData() { $this->validate('customerReference', 'plan'); @@ -41,6 +61,10 @@ public function getData() 'plan' => $this->getPlan() ); + if ($this->parameters->has('tax_percent')) { + $data['tax_percent'] = (float)$this->getParameter('tax_percent'); + } + return $data; }