toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      "freeTrial": freeTrial == null ? null : freeTrial.toJson(),
      "benefits": benefits == null ? null : benefits,
      "physical": physical == null ? null : physical,
      "digital": digital == null ? null : digital,
      "adFree": adFree == null ? null : adFree,
      "migrated": migrated == null ? null : migrated,
      "couponsEnabled": couponsEnabled == null ? null : couponsEnabled,
      "adminCoupon": adminCoupon == null ? null : adminCoupon,
      "usedCouponNumbers": usedCouponNumbers == null
          ? null
          : List<dynamic>.from(usedCouponNumbers.map((x) => x)),
      "_id": id == null ? null : id,
      "recommended": recommended == null ? null : recommended,
      "enabled": enabled == null ? null : enabled,
      "clientId": clientId == null ? null : clientId,
      "title": title == null ? null : title,
      "iconUrl": iconUrl == null ? null : iconUrl,
      "tiers": tiers == null
          ? null
          : List<dynamic>.from(tiers.map((x) => x.toJson())),
      "createdAt": createdAt == null ? null : createdAt.toIso8601String(),
      "updatedAt": updatedAt == null ? null : updatedAt.toIso8601String(),
      "__v": v == null ? null : v,
      "couponCount": couponCount == null ? null : couponCount,
      "currencySymbol": currencySymbol == null ? null : currencySymbol,
    };