CommerceSubscription class

Constructors

CommerceSubscription({required CommerceSubscriptionObjectEnum object, required String id, required String instanceId, required CommerceSubscriptionStatusEnum status, required String payerId, required int createdAt, required int updatedAt, required int? activeAt, required int? pastDueAt, List<CommerceSubscriptionItem> subscriptionItems = const [], CommerceSubscriptionNextPayment? nextPayment, bool? eligibleForFreeTrial})
Returns a new CommerceSubscription instance.

Properties

activeAt int?
Unix timestamp (milliseconds) when the subscription became active.
getter/setter pair
createdAt int
Unix timestamp (milliseconds) of creation.
getter/setter pair
eligibleForFreeTrial bool?
Whether the payer is eligible for a free trial.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
id String
Unique identifier for the commerce subscription.
getter/setter pair
instanceId String
The ID of the instance this subscription belongs to.
getter/setter pair
nextPayment CommerceSubscriptionNextPayment?
Please note: This property should have been non-nullable! Since the specification file does not include a default value (using the "default:" property), however, the generated source code must fall back to having a nullable type. Consider adding a "default:" property in the specification file to hide this note.
getter/setter pair
object CommerceSubscriptionObjectEnum
String representing the object's type. Objects of the same type share the same value.
getter/setter pair
pastDueAt int?
Unix timestamp (milliseconds) when the subscription became past due.
getter/setter pair
payerId String
The ID of the payer for this subscription.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status CommerceSubscriptionStatusEnum
The current status of the subscription.
getter/setter pair
subscriptionItems List<CommerceSubscriptionItem>
Array of subscription items in this subscription.
getter/setter pair
updatedAt int
Unix timestamp (milliseconds) of last update.
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) CommerceSubscription?
Returns a new CommerceSubscription instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<CommerceSubscription>
mapFromJson(dynamic json) Map<String, CommerceSubscription>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<CommerceSubscription>>

Constants

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