toMap method
Implementation
Map<String, dynamic> toMap() {
return {
'productId': productId,
if (price != null) 'price': price,
if (quantity != null) 'quantity': quantity,
if (currency != null) 'currency': getCurrencyType(currency!),
};
}