Spend class

Constructors

Spend({bool? available, int? availableCents, int? balanceCents, List<CategorySpend> byCategory = const [], int? mtdCents, int? overageCents, List<SpendPoint> series = const [], String? source_, int? totalCents})
Returns a new Spend instance.

Properties

available ↔ bool?
Available is false when the commerce ledger was unconfigured or unreachable. Every number below is then an honest zero, NOT a measured one.
getter/setter pair
availableCents ↔ int?
AvailableCents is what of that balance is still spendable.
getter/setter pair
balanceCents ↔ int?
BalanceCents is the prepaid wallet's balance, in US cents.
getter/setter pair
byCategory ↔ List<CategorySpend>
ByCategory is the window's spend split by ledger category, largest first.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
mtdCents ↔ int?
MTDCents is commerce's authoritative month-to-date consumed figure, which is a different period from the window and is not derived from it.
getter/setter pair
overageCents ↔ int?
OverageCents is month-to-date consumption beyond the plan's allowance.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
series ↔ List<SpendPoint>
Series is the window's spend over time, gap-filled at the window's interval.
getter/setter pair
source_ ↔ String?
Source names where the roll-up came from.
getter/setter pair
totalCents ↔ int?
TotalCents is consumption over the requested window, in US cents. It is self-consistent with ByCategory and Series.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
override

Operators

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

Static Methods

fromJson(dynamic value) → Spend?
Returns a new Spend instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Spend>
mapFromJson(dynamic json) → Map<String, Spend>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Spend>>

Constants

requiredKeys → const Set<String>
The list of required keys that must be present in a JSON.