toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  final item = <String, dynamic>{
    "id": id,
    "price": price,
    "quantity": quantity,
  };

  if (customEventProperties != null) {
    item["custom_event_properties"] = customEventProperties;
  }

  return item;
}