update billable

Signed-off-by: Maurice Preuß (envoyr) <hello@envoyr.com>
This commit is contained in:
2025-04-28 17:26:02 +02:00
parent 21946e3a22
commit d9a330222b
7 changed files with 173 additions and 6 deletions

View File

@@ -41,7 +41,7 @@ trait ManagesPaymentMethods
*/
public function hasDefaultPaymentMethod(): bool
{
return $this->defaultPaymentMethod()->count() > 0;
return (bool)$this->defaultPaymentMethod()->data;
}
/**
@@ -65,7 +65,7 @@ trait ManagesPaymentMethods
*/
public function billingPortalUrl(string $returnUrl, array $options): string
{
return $this->request('POST', 'v1/stripe/billing-portal', [
return $this->request('POST', 'v1/billing/portal', [
'return_url' => $returnUrl,
'options' => $options,
])->data->url;