DVLocalBillingProvider class

Implemented types

Constructors

DVLocalBillingProvider()

Properties

grants → Map<String, Set<String>>
Who holds what, for an entitlements view.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
usageLedger → Map<String, Map<String, int>>
Every meter's running total, by customer.
no setter

Methods

cancelSubscription({required Object customer, bool atPeriodEnd = false}) → Future<void>
Cancel the customer's subscription. When atPeriodEnd is true, the subscription remains active until the current billing period ends and is then revoked; when false, it is revoked immediately.
override
changeSubscriptionPlan({required Object customer, required BillingPlan plan, bool prorate = true}) → Future<void>
Change the customer's subscription to plan. When prorate is true, the provider applies proration if it supports it; when false, the change takes effect at the next billing period without proration.
override
checkout({required BillingPlan plan, required Object customer}) → Future<DVBillingCheckoutSession>
override
customerPortalUrl({required Object customer}) → Future<String>
A URL the customer can open to manage their billing (update card, download invoices, view subscription details).
override
grant(Object customer, Entitlement entitlement) → void
hasEntitlement(Object customer, Entitlement entitlement) → Future<bool>
override
invoices(Object customer, {int limit = 20}) → Future<List<DVInvoice>>
None: nothing here charges anybody, so there is nothing to invoice.
override
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.
override
recordUsage({required Object customer, required DVUsageMeter meter, required int quantity, required String idempotencyKey, DateTime? at}) → Future<void>
Records quantity against meter for customer.
override
resumeSubscription({required Object customer}) → Future<void>
Resume a previously paused or canceled-at-period-end subscription.
override
revoke(Object customer, Entitlement entitlement) → void
subscriptionStatus({required Object customer}) → Future<DVSubscriptionStatus>
The subscription status for customer, including whether it is deferred for cancellation at period end.
override
toString() → String
A string representation of this object.
inherited
usage(Object customer, DVUsageMeter meter) → int
What customer has run up against meter, zero if nothing.

Operators

operator ==(Object other) → bool
The equality operator.
inherited