toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = Map<String, dynamic>();
  if (this.freeTrial != null) {
    data['freeTrial'] = this.freeTrial!.toJson();
  }
  data['benefits'] = this.benefits;
  data['physical'] = this.physical;
  data['digital'] = this.digital;
  data['adFree'] = this.adFree;
  data['migrated'] = this.migrated;
  data['couponsEnabled'] = this.couponsEnabled;
  data['adminCoupon'] = this.adminCoupon;
  if (this.usedCouponNumbers != null) {
  //  data['usedCouponNumbers'] =
    //    this.usedCouponNumbers!.map((v) => v.toJson()).toList();
  }
  data['_id'] = this.sId;
  data['recommended'] = this.recommended;
  data['enabled'] = this.enabled;
  data['clientId'] = this.clientId;
  data['title'] = this.title;
  data['iconUrl'] = this.iconUrl;
  if (this.tiers != null) {
    data['tiers'] = this.tiers!.map((v) => v.toJson()).toList();
  }
  data['createdAt'] = this.createdAt;
  data['updatedAt'] = this.updatedAt;
  data['__v'] = this.iV;
  data['couponCount'] = this.couponCount;
  data['currencySymbol'] = this.currencySymbol;
  return data;
}