mirror of
https://github.com/anikeen-com/id.git
synced 2026-03-13 13:46:13 +00:00
add refund to revoke endpoint
This commit is contained in:
@@ -70,9 +70,13 @@ class Subscription extends BaseResource
|
|||||||
*
|
*
|
||||||
* @throws Throwable
|
* @throws Throwable
|
||||||
*/
|
*/
|
||||||
public function revoke(): self
|
public function revoke(bool $refund = false): self
|
||||||
{
|
{
|
||||||
return (new self(fn() => $this->billable->request('PUT', sprintf('v1/subscriptions/%s/revoke', $this->id))))
|
$attributes = [
|
||||||
|
'refund' => $refund,
|
||||||
|
];
|
||||||
|
|
||||||
|
return (new self(fn() => $this->billable->request('PUT', sprintf('v1/subscriptions/%s/revoke', $this->id), $attributes)))
|
||||||
->setBillable($this->billable);
|
->setBillable($this->billable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user