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
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -107,4 +111,4 @@ class Subscription extends BaseResource
|
||||
{
|
||||
return $this->billable->request('DELETE', sprintf('v1/subscriptions/%s', $this->id))->success();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user