Quote class

Constructors

Quote({int? chargeCents, String? code, int? discountCents, bool? eligible, int? listCents, String? plan, String? reason, int? remaining, int? seats})
Returns a new Quote instance.

Properties

chargeCents ↔ int?
ChargeCents is what month one costs after the discount, in USD cents, totalled over the seats quoted. On team that is a multiple of the seat count, so it is not ListCents minus DiscountCents.
getter/setter pair
code ↔ String?
Code is the promo that was priced, as stored.
getter/setter pair
discountCents ↔ int?
DiscountCents is what the promo takes off month one, in USD cents. The promo rate reaches at most TeamSeatCap seats; seats past the cap bill at full list and add nothing here. It is arithmetic only — quoting credits nothing, counts nothing and reserves nothing.
getter/setter pair
eligible ↔ bool?
Eligible says whether a redeem would be accepted right now; Reason says why not when it would not.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
listCents ↔ int?
ListCents is the undiscounted month price in USD cents: PER SEAT on team, the whole month on pro and max, 0 for a plan with no list price.
getter/setter pair
plan ↔ String?
Plan is the tier priced, lower-cased and trimmed: pro, max or team. Unlike a redemption's plan this one comes from the REQUEST — quoting has no side effects, so it will happily price a plan the caller does not hold.
getter/setter pair
reason ↔ String?
Reason is why Eligible is false, drawn from: "promo redemption is closed" (the subsystem is off, which is how it ships), "promo redemption cap reached", "promo is not active", "plan is free or unknown; nothing to discount", "promo does not cover plan
getter/setter pair
remaining ↔ int?
Remaining is how many redemptions are left under the fleet-wide cap.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
seats ↔ int?
Seats is the seat count priced; a request of 0 or less was read as 1. It only bites on team, the one per-seat plan — pro and max are single-seat and ignore it.
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) → Quote?
Returns a new Quote instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Quote>
mapFromJson(dynamic json) → Map<String, Quote>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Quote>>

Constants

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