UpcomingDiscountsItem.fromJson constructor

UpcomingDiscountsItem.fromJson(
  1. Object? json
)

Implementation

factory UpcomingDiscountsItem.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return UpcomingDiscountsItem(
    coupon: map['coupon'] == null ? null : (map['coupon'] as String),
    discount: map['discount'] == null ? null : (map['discount'] as String),
    promotionCode: map['promotion_code'] == null
        ? null
        : (map['promotion_code'] as String),
  );
}