SubscriptionOption.fromJson constructor
SubscriptionOption.fromJson(
- Map<String, dynamic> json
)
Implementation
factory SubscriptionOption.fromJson(Map<String, dynamic> json) => SubscriptionOption(
json['id'] as String,
json['storeProductId'] as String,
json['productId'] as String,
(json['pricingPhases'] as List)
.map((e) => PricingPhase.fromJson(Map<String, dynamic>.from(e)))
.toList(),
(json['tags'] as List).map((e) => e as String).toList(),
json['isBasePlan'] as bool,
json['billingPeriod'] != null ? Period.fromJson(Map<String, dynamic>.from(json['billingPeriod'])) : null,
json['isPrepaid'] as bool,
json['fullPricePhase'] != null ? PricingPhase.fromJson(Map<String, dynamic>.from(json['fullPricePhase'])) : null,
json['freePhase'] != null ? PricingPhase.fromJson(Map<String, dynamic>.from(json['freePhase'])) : null,
json['introPhase'] != null ? PricingPhase.fromJson(Map<String, dynamic>.from(json['introPhase'])) : null,
json['presentedOfferingContext'] != null ? PresentedOfferingContext.fromJson(Map<String, dynamic>.from(json['presentedOfferingContext'])) : null,
json['installmentsInfo'] != null ? InstallmentsInfo.fromJson(Map<String, dynamic>.from(json['installmentsInfo'])) : null,
);