ProviderQuota class

A provider's remaining-allowance snapshot at updatedAt.

Constructors

ProviderQuota({double? used, double? limit, QuotaUnit unit = QuotaUnit.currencyUsd, DateTime? resetsAt, bool isUnmetered = false, DateTime? updatedAt})
ProviderQuota.fromJson(Map<String, Object?> json)
factory
ProviderQuota.unmetered({DateTime? updatedAt})
DIAL-style providers with no billing surface at all: reported silently, never an error.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
isDepleted → bool
Metered and exhausted. A null limit (no cap) is never depleted.
no setter
isUnmetered → bool
final
limit → double?
final
remaining → double?
limit - used, or null when either side is unknown.
no setter
resetsAt → DateTime?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unit → QuotaUnit
final
updatedAt → DateTime
final
used → double?
final

Methods

isResetOverdue(DateTime now) → bool
True past a declared reset point: the cached limit is stale after a billing reset and must not persist (E4).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
toString() → String
A string representation of this object.
override

Operators

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