SubscriptionDetails.fromJson constructor
SubscriptionDetails.fromJson(
- Map<String, dynamic> json
)
Implementation
SubscriptionDetails.fromJson(Map<String, dynamic> json) {
freeTrial = json['freeTrial'] != null
? new 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 = [];
if ( json['usedCouponNumbers']!= null){
json['usedCouponNumbers'].forEach((v) {
usedCouponNumbers!.add(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(new Tiers.fromJson(v));
});
}
createdAt = json['createdAt'];
updatedAt = json['updatedAt'];
iV = json['__v'];
couponCount = json['couponCount'];
currencySymbol = json['currencySymbol'];
}