toMap method
Implementation
Map<String, dynamic> toMap() => {
'flowType': flowType.rawValue,
'productId': productId,
'eligibleProductIds': eligibleProductIds,
'savingsPercent': savingsPercent,
'display': display.toMap(),
'freeTrialDays': freeTrialDays,
'minSubscriptionDays': minSubscriptionDays,
if (maxSubscriptionDays != null)
'maxSubscriptionDays': maxSubscriptionDays,
if (rolloutPercent != null) 'rolloutPercent': rolloutPercent,
if (upgradeType != null) 'upgradeType': upgradeType!.rawValue,
if (fromProductId != null) 'fromProductId': fromProductId,
if (toProductId != null) 'toProductId': toProductId,
if (variantId != null) 'variantId': variantId,
if (perProductPrompts != null)
'perProductPrompts':
perProductPrompts!.map((k, v) => MapEntry(k, v.toMap())),
if (checkoutPresentation != null)
'checkoutPresentation': checkoutPresentation!.rawValue,
};