Skip to content

Commit

Permalink
add CancelSubscription at_period_end parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
wellingguzman committed Aug 30, 2016
1 parent 861d21f commit 1611673
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion src/Message/CancelSubscriptionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,44 @@ public function getSubscriptionReference()
/**
* Set the set subscription reference.
*
* @param string $value
*
* @return CancelSubscriptionRequest provides a fluent interface.
*/
public function setSubscriptionReference($value)
{
return $this->setParameter('subscriptionReference', $value);
}

/**
* Set whether or not to cancel the subscription at period end.
*
* @param bool $value
*
* @return CancelSubscriptionRequest provides a fluent interface.
*/
public function setAtPeriodEnd($value)
{
return $this->setParameter('atPeriodEnd', $value);
}

/**
* Get whether or not to cancel the subscription at period end.
*
* @return bool
*/
public function getAtPeriodEnd()
{
return $this->getParameter('atPeriodEnd');
}

public function getData()
{
$this->validate('customerReference', 'subscriptionReference');

$data = array();
$data = array(
'at_period_end' => $this->getAtPeriodEnd()
);

return $data;
}
Expand Down

0 comments on commit 1611673

Please sign in to comment.