Product.fromJson constructor
Product.fromJson(
- Map<String, dynamic> json
)
Implementation
Product.fromJson(Map<String, dynamic> json)
: productId = json['productId'],
uspAppId = json['uspAppId'],
defaultLanguage = json['defaultLanguage'],
productLocales = json['productLocales'] != null
? List<ProductLocale>.from(json['productLocales']
.map((model) => ProductLocale.fromJson(model)))
: null,
purchaseType = json['purchaseType'],
appleCurrency = json['appleCurrency'],
applePrice = json['applePrice'],
status = json['status'],
defaultPrice = json['defaultPrice'] != null
? PriceInfo.fromJson(json['defaultPrice'])
: null,
prices = json['prices'] != null
? List<PriceInfo>.from(
json['prices'].map((model) => PriceInfo.fromJson(model)))
: null,
entitlements = json['entitlements'] != null
? List.from(json['entitlements'])
: null,
subsPeriod = json['subsPeriod'],
subGroupId = json['subGroupId'],
subGroupName = json['subGroupName'],
promotionId = json['promotionId'],
trialPeriod = json['trialPeriod'],
introductoryPeriod = json['introductoryPeriod'],
disDefaultPrice = json['disDefaultPrice'] != null
? PriceInfo.fromJson(json['disDefaultPrice'])
: null,
disPrice = json['disPrice'] != null
? PriceInfo.fromJson(json['disPrice'])
: null,
disPrices = json['disPrices'] != null
? List<PriceInfo>.from(
json['disPrices'].map((model) => PriceInfo.fromJson(model)))
: null,
gracePeriod = json['gracePeriod'],
appleSyncStatus = json['appleSyncStatus'],
appleSyncInfo = json['appleSyncInfo'] != null
? SyncInfo.fromJson(json['appleSyncInfo'])
: null,
huaweiPromotionPriority = json['huaweiPromotionPriority'],
googleSyncStatus = json['googleSyncStatus'],
googleSyncInfo = json['googleSyncInfo'] != null
? SyncInfo.fromJson(json['googleSyncInfo'])
: null,
huaweiSyncStatus = json['huaweiSyncStatus'],
huaweiSyncInfo = json['huaweiSyncInfo'] != null
? SyncInfo.fromJson(json['huaweiSyncInfo'])
: null,
applePriceDetails = json['applePriceDetails'] != null
? List<PriceTier>.from(json['applePriceDetails']
.map((model) => PriceTier.fromJson(model)))
: null,
appleActivePriceDetail = json['appleActivePriceDetail'] != null
? PriceTier.fromJson(json['appleActivePriceDetail'])
: null,
promotionalPrice =
json['promotionalPrice'] != null ? json['promotionalPrice'] : null,
originalPrice = json['originalPrice'] != null
? PriceInfo.fromJson(json['originalPrice'])
: null,
subscriptionDuration = json['subscriptionDuration'] != null
? SubscriptionDuration.fromJson(json['subscriptionDuration'])
: null,
productOffer = json['productOffer'] != null
? ProductOffer.fromJson(json['productOffer'])
: null;