Coupons.fromJson constructor

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

Implementation

Coupons.fromJson(Map<String, dynamic> json) {
  sId = json['_id'];
  companyName = json['company_name'];
  creatorEmail = json['creator_email'];
  productCategories = json['product_categories'].cast<String>();
  expired = json['expired'];
  code = json['code'];
  redeemCount = json['redeem_count'];
  verifyCount = json['verify_count'];
  maxCount = json['max_count'];
  expiresAt = json['expires_at'];
  createdAt = json['createdAt'];
  updatedAt = json['updatedAt'];
  iV = json['__v'];
}