Voucher class

Constructors

Voucher({String? description, List<Leg> legs = const [], String? postingAt, String? sourceId, String? sourceKind})
Returns a new Voucher instance.

Properties

description ↔ String?
Description is the human line for the event, e.g. the vendor a bill came from.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
legs ↔ List<Leg>
Legs are the sides of the posting. They must balance: Σdebit == Σcredit, give or take the 2¢ round-off allowance.
getter/setter pair
postingAt ↔ String?
PostingAt is the RFC3339 instant the event posts at — the time every statement window filters on.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sourceId ↔ String?
SourceID is the source event's own id within that namespace. Together with SourceKind it is the key that makes a repeat posting a no-op.
getter/setter pair
sourceKind ↔ String?
SourceKind is the idempotency namespace naming what booked this, e.g. "scan".
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) → Voucher?
Returns a new Voucher instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Voucher>
mapFromJson(dynamic json) → Map<String, Voucher>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Voucher>>

Constants

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