toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  return {
    'id': id,
    'displayName': displayName,
    'productDescription': productDescription,
    'type': type.rawValue,
    'webPrice': webPrice?.toMap(),
    'appStorePrice': appStorePrice?.toMap(),
    'syncedToAppStoreConnect': syncedToAppStoreConnect,
    'subscriptionGroupId': subscriptionGroupId,
    'promotion': promotion?.toMap(),
    'storeKitAvailable': storeKitAvailable,
    'storeKitPrice': storeKitPrice?.toMap(),
    'savingsPercent': savingsPercent,
    'billingInterval': billingInterval,
    'freeTrialDuration': freeTrialDuration,
    'isTrialEligible': isTrialEligible,
  };
}