toMap method
Implementation
Map<String, dynamic> toMap() {
return {
'available': available,
if (reason != null) 'reason': reason,
if (currentProduct != null) 'currentProduct': currentProduct!.toMap(),
if (targetProduct != null) 'targetProduct': targetProduct!.toMap(),
if (savingsPercent != null) 'savingsPercent': savingsPercent,
if (upgradeType != null) 'upgradeType': upgradeType,
if (proration != null) 'proration': proration!.toMap(),
if (display != null) 'display': display!.toMap(),
if (variantId != null) 'variantId': variantId,
};
}