Promo class

Constructors

Promo({bool? active, String? code, int? createdAt, String? description, int? maxRedemptions, int? percentOff, String? plans, int? teamSeatCap})
Returns a new Promo instance.

Properties

active ↔ bool?
Active is false for a promo that is no longer offered; an inactive promo quotes as ineligible and refuses to redeem.
getter/setter pair
code ↔ String?
Code is the promo id, e.g. "first1000".
getter/setter pair
createdAt ↔ int?
CreatedAt is unix seconds.
getter/setter pair
description ↔ String?
Description is the human-readable offer.
getter/setter pair
hashCode → int
The hash code for this object.
no setteroverride
maxRedemptions ↔ int?
MaxRedemptions is the hard fleet-wide cap; the redemption past it is declined.
getter/setter pair
percentOff ↔ int?
PercentOff is the discount applied to ONE month's list price.
getter/setter pair
plans ↔ String?
Plans is the csv of eligible plan ids ("pro,max,team").
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
teamSeatCap ↔ int?
TeamSeatCap is how many Team seats bill at the promo rate; seats beyond it bill at list.
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) → Promo?
Returns a new Promo instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) → List<Promo>
mapFromJson(dynamic json) → Map<String, Promo>
mapListFromJson(dynamic json, {bool growable = false}) → Map<String, List<Promo>>

Constants

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