CommerceSubscriptionItem class

Constructors

CommerceSubscriptionItem({required CommerceSubscriptionItemObjectEnum object, required String id, required String instanceId, required CommerceSubscriptionItemStatusEnum status, CommerceSubscriptionCreditResponse? credit, required String? planId, String? priceId, CommercePlan? plan, required CommerceSubscriptionItemPlanPeriodEnum planPeriod, CommercePaymentMethodResponse? paymentMethod, CommerceMoneyResponse? lifetimePaid, CommerceSubscriptionItemNextPaymentResponse? nextPayment, required String payerId, CommercePayerResponse? payer, required bool isFreeTrial, required int periodStart, required int? periodEnd, DateTime? prorationDate, required int? canceledAt, required int? pastDueAt, required int? endedAt, int? createdAt, int? updatedAt})
Returns a new CommerceSubscriptionItem instance.

Properties

canceledAt int?
Unix timestamp (in milliseconds) when the subscription item was canceled.
getter/setter pair
createdAt int?
Unix timestamp (in milliseconds) when the subscription item was created.
getter/setter pair
credit CommerceSubscriptionCreditResponse?
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
endedAt int?
Unix timestamp (in milliseconds) when the subscription item ended.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
id String
Unique identifier for the subscription item.
getter/setter pair
instanceId String
Unique identifier for the Clerk instance.
getter/setter pair
isFreeTrial bool
Whether this subscription item includes a free trial.
getter/setter pair
lifetimePaid CommerceMoneyResponse?
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
nextPayment CommerceSubscriptionItemNextPaymentResponse?
Information about the next payment.
getter/setter pair
object CommerceSubscriptionItemObjectEnum
String representing the object's type. Objects of the same type share the same value.
getter/setter pair
pastDueAt int?
Unix timestamp (in milliseconds) when the subscription item became past due.
getter/setter pair
payer CommercePayerResponse?
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
payerId String
Unique identifier for the payer.
getter/setter pair
paymentMethod CommercePaymentMethodResponse?
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
periodEnd int?
Unix timestamp (in milliseconds) when the current period ends.
getter/setter pair
periodStart int
Unix timestamp (in milliseconds) when the current period started.
getter/setter pair
plan CommercePlan?
The associated plan.
getter/setter pair
planId String?
Unique identifier for the associated plan.
getter/setter pair
planPeriod CommerceSubscriptionItemPlanPeriodEnum
The billing period for this subscription item.
getter/setter pair
priceId String?
Unique identifier for the associated price
getter/setter pair
prorationDate DateTime?
The day the subscription item was prorated from. Only available in some responses.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status CommerceSubscriptionItemStatusEnum
Current status of the subscription item.
getter/setter pair
updatedAt int?
Unix timestamp (in milliseconds) when the subscription item was last updated.
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) CommerceSubscriptionItem?
Returns a new CommerceSubscriptionItem instance and imports its values from value if it's a Map, null otherwise.
listFromJson(dynamic json, {bool growable = false}) List<CommerceSubscriptionItem>
mapFromJson(dynamic json) Map<String, CommerceSubscriptionItem>
mapListFromJson(dynamic json, {bool growable = false}) Map<String, List<CommerceSubscriptionItem>>

Constants

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