toMap method
Implementation
Map<String, dynamic> toMap() {
return {
'name': 'BASKET_OPERATIONS', // BASKET_OPERATION is required
'step': getBasketOperationStep(step),
'productId': productId,
if (price != null && price != 0) 'price': price,
if (quantity != null && quantity != 0) 'quantity': quantity,
if (currency != null) 'currency': getCurrencyType(currency!),
'sessionId': sessionId,
'userId': userId,
'device': device,
'os': os,
'lang': lang,
};
}