mirror of
https://github.com/anikeen-com/id.git
synced 2026-03-13 21:56:14 +00:00
Compare commits
1 Commits
1.0.0-rc.7
...
1.0.0-rc.8
| Author | SHA1 | Date | |
|---|---|---|---|
| c641ec725d |
@@ -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