Update Subscriptions.php

This commit is contained in:
2022-09-29 14:49:11 +02:00
committed by GitHub
parent 1476446765
commit d03a95b552

View File

@@ -18,7 +18,7 @@ class Subscriptions
*/ */
public function all(): ?object public function all(): ?object
{ {
return $this->asPaymentsUser('GET', 'subscriptions'); return $this->user->asPaymentsUser('GET', 'subscriptions');
} }
/** /**
@@ -27,7 +27,7 @@ class Subscriptions
*/ */
public function get(string $id): ?object public function get(string $id): ?object
{ {
return $this->asPaymentsUser('GET', sprintf('subscriptions/%s', $id)); return $this->user->asPaymentsUser('GET', sprintf('subscriptions/%s', $id));
} }
/** /**
@@ -52,7 +52,7 @@ class Subscriptions
'checkout' => $checkout 'checkout' => $checkout
]); ]);
return $this->asPaymentsUser('POST', 'subscriptions', $attributes)->data; return $this->user->asPaymentsUser('POST', 'subscriptions', $attributes)->data;
} }
/** /**
@@ -74,7 +74,7 @@ class Subscriptions
*/ */
public function checkout(string $id): bool public function checkout(string $id): bool
{ {
$this->asPaymentsUser('PUT', sprintf('subscriptions/%s/checkout', $id)); $this->user->asPaymentsUser('PUT', sprintf('subscriptions/%s/checkout', $id));
return true; return true;
} }
@@ -87,7 +87,7 @@ class Subscriptions
*/ */
public function revoke(string $id): bool public function revoke(string $id): bool
{ {
$this->asPaymentsUser('PUT', sprintf('subscriptions/%s/revoke', $id)); $this->user->asPaymentsUser('PUT', sprintf('subscriptions/%s/revoke', $id));
return true; return true;
} }
@@ -100,7 +100,7 @@ class Subscriptions
*/ */
public function resume(string $id): bool public function resume(string $id): bool
{ {
$this->asPaymentsUser('PUT', sprintf('subscriptions/%s/resume', $id)); $this->user->asPaymentsUser('PUT', sprintf('subscriptions/%s/resume', $id));
return true; return true;
} }