toJSON method

Map<String, dynamic> toJSON()

Implementation

Map<String, dynamic> toJSON() {
  return <String, dynamic> {
    'id': id,
    'name': name,
    'imgUrl': imgUrl,
    'href': href,
    'productId': productId,
    'priceId': priceId,
    'level': level?.name,
    'price': price?.toJSON(),
    'isActive': isActive,
    'discount': discount,
    'lastUpdated': lastUpdated?.toIso8601String(),
  };
}