toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'productId': productId,
      'uspAppId': uspAppId,
      'defaultLanguage': defaultLanguage,
      'productLocales': productLocales != null
          ? List<dynamic>.from(productLocales!.map((model) => model.toJson()))
          : null,
      'purchaseType': purchaseType,
      'applePrice': applePrice,
      'appleCurrency': appleCurrency,
      'status': status,
      'defaultPrice': defaultPrice != null ? defaultPrice!.toJson() : null,
      'prices': prices != null
          ? List<dynamic>.from(prices!.map((model) => model.toJson()))
          : null,
      'entitlements': entitlements,
      'subsPeriod': subsPeriod,
      'subGroupId': subGroupId,
      'subGroupName': subGroupName,
      'promotionId': promotionId,
      'trialPeriod': trialPeriod,
      'introductoryPeriod': introductoryPeriod,
      'disDefaultPrice':
          disDefaultPrice != null ? disDefaultPrice!.toJson() : null,
      'disPrice': disPrice != null ? disPrice!.toJson() : null,
      'disPrices': disPrices != null
          ? List<dynamic>.from(disPrices!.map((model) => model.toJson()))
          : null,
      'gracePeriod': gracePeriod,
      'appleSyncStatus': appleSyncStatus,
      'appleSyncInfo': appleSyncInfo != null ? appleSyncInfo!.toJson() : null,
      'huaweiPromotionPriority': huaweiPromotionPriority,
      'googleSyncStatus': googleSyncStatus,
      'googleSyncInfo':
          googleSyncInfo != null ? googleSyncInfo!.toJson() : null,
      'huaweiSyncStatus': huaweiSyncStatus,
      'huaweiSyncInfo':
          huaweiSyncInfo != null ? huaweiSyncInfo!.toJson() : null,
      'applePriceDetails': applePriceDetails != null
          ? List<dynamic>.from(
              applePriceDetails!.map((model) => model.toJson()))
          : null,
      'appleActivePriceDetail': appleActivePriceDetail != null
          ? appleActivePriceDetail!.toJson()
          : null,
      'promotionalPrice': promotionalPrice,
      'originalPrice': originalPrice != null ? originalPrice!.toJson() : null,
      'subscriptionDuration': subscriptionDuration != null
          ? subscriptionDuration!.toJson()
          : null,
    };