Subscriptions.fromJson constructor

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

Implementation

Subscriptions.fromJson(Map<String, dynamic> json) {
  freeTrial = json['freeTrial'] != null
      ? FreeTrial.fromJson(json['freeTrial'])
      : null;
  benefits = json['benefits'];
  physical = json['physical'];
  digital = json['digital'];
  adFree = json['adFree'];
  migrated = json['migrated'];
  couponsEnabled = json['couponsEnabled'];
  adminCoupon = json['adminCoupon'];
  if (json['usedCouponNumbers'] != null) {
    usedCouponNumbers = <Null>[];
    json['usedCouponNumbers'].forEach((v) {
    //  usedCouponNumbers!.add(new Null.fromJson(v));
    });
  }
  sId = json['_id'];
  recommended = json['recommended'];
  enabled = json['enabled'];
  clientId = json['clientId'];
  title = json['title'];
  iconUrl = json['iconUrl'];
  if (json['tiers'] != null) {
    tiers = <Tiers>[];
    json['tiers'].forEach((v) {
      tiers!.add(Tiers.fromJson(v));
    });
  }
  createdAt = json['createdAt'];
  updatedAt = json['updatedAt'];
  iV = json['__v'];
  couponCount = json['couponCount'];
  currencySymbol = json['currencySymbol'];
}