ContentDetails2.fromJson constructor

ContentDetails2.fromJson(
  1. Map<String, dynamic> json
)

Implementation

ContentDetails2.fromJson(Map<String, dynamic> json) {
  microPricing = json['microPricing'] != null
      ? new MicroPricing.fromJson(json['microPricing'])
      : null;
  price = json['price'];
  duration = json['duration'];
  currency = json['currency'];
  currencySymbol = json['currencySymbol'];
  clientName = json['clientName'];
  url = json['url'];
  title = json['title'];
  contentType = json['contentType'];
  couponDetails = json['couponDetails'] != null
      ? new CouponDetails.fromJson(json['couponDetails'])
      : null;
  downloadExists = json['downloadExists'];
  bundle = json['bundle'];
  userDetails = json['userDetails'] != null
      ? new UserDetails.fromJson(json['userDetails'])
      : null;
  pixels =
      json['pixels'] != null ? new Pixels.fromJson(json['pixels']) : null;
  logoUrl = json['logoUrl'];
  validPass = json['validPass'] != null
      ? new ValidPass.fromJson(json['validPass'])
      : null;
  paywallCustomization = json['paywallCustomization'] != null
      ? new PaywallCustomization.fromJson(json['paywallCustomization'])
      : null;
  subscriptionsExist = json['subscriptionsExist'];
  subscriptionDomain = json['subscriptionDomain'];
  pathUrl = json['pathUrl'];
  // if (json['categories'] != null) {
  //   categories = <Null>[];
  //   json['categories'].forEach((v) {
  //     categories!.add(new Null.fromJson(v));
  //   });
  // }
  detectedCountry = json['detectedCountry'];
  couponForPass = json['couponForPass'] != null
      ? new CouponDetails.fromJson(json['couponForPass'])
      : null;
  subscriptionUrl = json['subscriptionUrl'];
}