Redemption class

Constructors

Redemption({String? code, int? discountCents, String? plan, int? redeemedAt, int? seats})
Returns a new Redemption instance.

Properties

code ↔ String?
Code is the promo redeemed.
getter/setter pair
discountCents ↔ int?
DiscountCents is the month-one discount this redemption CLAIMS, in USD cents. It is a recorded figure, NOT a balance: nothing was credited and no wallet moved. An admin granting against this claim is what would make it money, and that decision happens on the admin surface, not here.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
plan ↔ String?
Plan is the tier redeemed against: pro, max or team. It is DERIVED from the org's live ACTIVE/TRIALING subscription, never read from the request, so it is what the org actually holds rather than what it claimed.
getter/setter pair
redeemedAt ↔ int?
RedeemedAt is unix seconds.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
seats ↔ int?
Seats is the seat count the claim was priced at, and it is ALWAYS 1. No server-side authority on this surface answers "how many seats", and the caller's own number is exactly the input that once inflated these claims, so a redemption records the single-seat floor and an admin resolves the real count against subscription data at grant time.
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) → Redemption?
Returns a new Redemption instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Redemption>
mapFromJson(dynamic json) → Map<String, Redemption>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Redemption>>

Constants

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