Skip to content

Commit 7afd493

Browse files
committed
fix: update billing docs
1 parent 716e3d5 commit 7afd493

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/docs/utils/billing.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ export default function MyComponent({ user }) {
303303
return <p>You are subscribed to a plan</p>;
304304
}
305305
306-
if (user.subscriptionPlan === 'Starter') {
306+
if (user.subscription === 'Starter') {
307307
return <p>You are subscribed to the Starter plan</p>;
308308
}
309309
}
@@ -319,7 +319,7 @@ const { user } = defineProps({
319319
320320
<template>
321321
<p v-if="user.hasSubscription">You are subscribed to a plan</p>
322-
<p v-if="user.subscriptionPlan === 'Starter'">You are subscribed to the Starter plan</p>
322+
<p v-if="user.subscription === 'Starter'">You are subscribed to the Starter plan</p>
323323
</template>
324324
```
325325

@@ -333,7 +333,7 @@ const { user } = $props();
333333
<p>You are subscribed to a plan</p>
334334
{/if}
335335
336-
{#if $user.subscriptionPlan === 'Starter'}
336+
{#if $user.subscription === 'Starter'}
337337
<p>You are subscribed to the Starter plan</p>
338338
{/if}
339339
```
@@ -419,16 +419,9 @@ In your models, you can add billing add-ons to get extra functions directly from
419419
| `isSubscribed()` | Check if the user is subscribed to a plan |
420420
| `isOnTrial()` | Check if the user is on a trial period |
421421
| `subscription()` | Get the user's subscription |
422-
| `subscriptionPlan()` | Get the user's subscription plan |
423-
| `subscriptionStatus()` | Get the user's subscription status |
424-
| `subscriptionPrice()` | Get the user's subscription price |
425-
| `subscriptionDiscount()` | Get the user's subscription discount |
426-
| `subscriptionFeatures()` | Get the user's subscription features |
427-
| `subscriptionTrialDays()` | Get the user's subscription trial days |
428422
| `subscriptionNextBillingDate()` | Get the user's subscription next billing date |
429423
| `subscriptionEndDate()` | Get the user's subscription end date |
430424
| `subscriptionPeriod()` | Get the user's subscription period |
431-
| `subscriptionStatus()` | Get the user's subscription status |
432425

433426
You can add the `HasBilling` trait to your models like this:
434427

0 commit comments

Comments
 (0)