toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  if (this.microPricing != null) {
    data['microPricing'] = this.microPricing!.toJson();
  }
  data['price'] = this.price;
  data['duration'] = this.duration;
  data['currency'] = this.currency;
  data['currencySymbol'] = this.currencySymbol;
  data['clientName'] = this.clientName;
  data['url'] = this.url;
  data['title'] = this.title;
  data['contentType'] = this.contentType;
  if (this.couponDetails != null) {
    data['couponDetails'] = this.couponDetails!.toJson();
  }
  data['downloadExists'] = this.downloadExists;
  data['bundle'] = this.bundle;
  if (this.userDetails != null) {
    data['userDetails'] = this.userDetails!.toJson();
  }
  if (this.pixels != null) {
    data['pixels'] = this.pixels!.toJson();
  }
  data['logoUrl'] = this.logoUrl;
  if (this.validPass != null) {
    data['validPass'] = this.validPass!.toJson();
  }
  if (this.paywallCustomization != null) {
    data['paywallCustomization'] = this.paywallCustomization!.toJson();
  }
  data['subscriptionsExist'] = this.subscriptionsExist;
  data['subscriptionDomain'] = this.subscriptionDomain;
  data['pathUrl'] = this.pathUrl;
  // if (this.categories != null) {
  //   data['categories'] = this.categories!.map((v) => v.toJson()).toList();
  // }
  data['detectedCountry'] = this.detectedCountry;
  if (this.couponForPass != null) {
    data['couponForPass'] = this.couponForPass!.toJson();
  }
  data['subscriptionUrl'] = this.subscriptionUrl;
  return data;
}