CustomerEntitlement class abstract
One active entitlement of a customer, as the SDK and the console see it.
Constructors
- CustomerEntitlement({required String key, DateTime? expiresAt, PurchaseStore? store, required bool willRenew, required bool granted})
-
factory
-
CustomerEntitlement.fromJson(Map<
String, dynamic> jsonSerialization) -
factory
Properties
- expiresAt ↔ DateTime?
-
When access ends without a renewal; null for a lifetime purchase or a
grant without end.
getter/setter pair
- granted ↔ bool
-
Granted in the console or by the server API, not bought.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- key ↔ String
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- store ↔ PurchaseStore?
-
The store of the purchase; null for a grant.
getter/setter pair
- willRenew ↔ bool
-
getter/setter pair
Methods
-
copyWith(
{String? key, DateTime? expiresAt, PurchaseStore? store, bool? willRenew, bool? granted}) → CustomerEntitlement - Returns a shallow copy of this CustomerEntitlement with some or all fields replaced by the given arguments.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Returns a serialized JSON structure of the model which also includes fields used by the database.
-
toJsonForProtocol(
) → Map< String, dynamic> - Returns a JSON structure of the model, optimized for Protocol communication.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited