Skip to content

Commit 65f3b98

Browse files
authored
Merge pull request #75 from Neirda24/master
Add tax_percent when creating subscription
2 parents e11b40d + 25728b5 commit 65f3b98

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/Message/CreateSubscriptionRequest.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,26 @@ public function setPlan($value)
3333
return $this->setParameter('plan', $value);
3434
}
3535

36+
/**
37+
* Get the tax percent
38+
*
39+
* @return string
40+
*/
41+
public function getTaxPercent()
42+
{
43+
return $this->getParameter('tax_percent');
44+
}
45+
46+
/**
47+
* Set the tax percentage
48+
*
49+
* @return CreateSubscriptionRequest provides a fluent interface.
50+
*/
51+
public function setTaxPercent($value)
52+
{
53+
return $this->setParameter('tax_percent', $value);
54+
}
55+
3656
public function getData()
3757
{
3858
$this->validate('customerReference', 'plan');
@@ -41,6 +61,10 @@ public function getData()
4161
'plan' => $this->getPlan()
4262
);
4363

64+
if ($this->parameters->has('tax_percent')) {
65+
$data['tax_percent'] = (float)$this->getParameter('tax_percent');
66+
}
67+
4468
return $data;
4569
}
4670

0 commit comments

Comments
 (0)