SubscriptionOption class

Contains all details associated with a SubscriptionOption Used only for Google

Available extensions
Annotations
  • @freezed

Constructors

SubscriptionOption(String id, String storeProductId, String productId, List<PricingPhase> pricingPhases, List<String> tags, bool isBasePlan, Period? billingPeriod, bool isPrepaid, PricingPhase? fullPricePhase, PricingPhase? freePhase, PricingPhase? introPhase, PresentedOfferingContext? presentedOfferingContext, InstallmentsInfo? installmentsInfo)
const
factory
SubscriptionOption.fromJson(Map<String, dynamic> json)
factory

Properties

billingPeriod Period?
The subscription period of fullPricePhase (after free and intro trials).
no setterinherited
copyWith → $SubscriptionOptionCopyWith<SubscriptionOption>
Create a copy of SubscriptionOption with the given fields replaced by the non-null parameter values.
no setterinherited
freePhase PricingPhase?
The free trial PricingPhase of the subscription. Looks for the first pricing phase of the SubscriptionOption where amountMicros is 0. There can be a freeTrialPhase and an introductoryPhase in the same SubscriptionOption.
no setterinherited
fullPricePhase PricingPhase?
The full price PricingPhase of the subscription. Looks for the last price phase of the SubscriptionOption.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
Identifier of the subscription option If this SubscriptionOption represents a base plan, this will be the basePlanId. If it represents an offer, it will be {basePlanId}:{offerId}
no setterinherited
installmentsInfo InstallmentsInfo?
For installment subscriptions, the details of the installment plan the customer commits to. Null for non-installment subscriptions. Installment plans are only available for Google Play subscriptions.
no setterinherited
introPhase PricingPhase?
The intro trial PricingPhase of the subscription. Looks for the first pricing phase of the SubscriptionOption where amountMicros is greater than 0. There can be a freeTrialPhase and an introductoryPhase in the same SubscriptionOption.
no setterinherited
isBasePlan bool
True if this SubscriptionOption represents a Google subscription base plan (rather than an offer).
no setterinherited
isPrepaid bool
True if the subscription is pre-paid.
no setterinherited
presentedOfferingContext PresentedOfferingContext?
Offering context this package belongs to. Null if not using offerings or if fetched directly from store via getProducts
no setterinherited
pricingPhases List<PricingPhase>
Pricing phases defining a user's payment plan for the product over time.
no setterinherited
productId String
Identifer of the subscription associated with this SubsriptionOption This will be {subId}
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storeProductId String
Identifier of the StoreProduct associated with this SubscriptionOption This will be {subId}:{basePlanId}
no setterinherited
tags List<String>
Tags defined on the base plan or offer.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this SubscriptionOption to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited