Changing, pausing, resuming and cancelling a subscription, and reading its
state. A separate interface from DVBillingProvider so a provider written
before these existed still compiles; Stripe, Paddle and the local provider
implement both. Check with provider is DVSubscriptionLifecycle.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancelSubscription(
{required Object customer, bool atPeriodEnd = false}) → Future< void> -
Cancel the customer's subscription. When
atPeriodEndis true, the subscription remains active until the current billing period ends and is then revoked; when false, it is revoked immediately. -
changeSubscriptionPlan(
{required Object customer, required BillingPlan plan, bool prorate = true}) → Future< void> -
Change the customer's subscription to
plan. Whenprorateis true, the provider applies proration if it supports it; when false, the change takes effect at the next billing period without proration. -
customerPortalUrl(
{required Object customer}) → Future< String> - A URL the customer can open to manage their billing (update card, download invoices, view subscription details).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pauseSubscription(
{required Object customer}) → Future< void> - Pause the customer's subscription. The subscription stays active with no charge until resumed; the exact behavior depends on the provider.
-
resumeSubscription(
{required Object customer}) → Future< void> - Resume a previously paused or canceled-at-period-end subscription.
-
subscriptionStatus(
{required Object customer}) → Future< DVSubscriptionStatus> -
The subscription status for
customer, including whether it is deferred for cancellation at period end. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited