toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  return {
    'name': name,
    'identifier': uniqueIdentifier,
    'interval': cycle,
    'interval_type': intervalType,
    'currency': currencyTypeName,
    'value_cents': valueInCents,
    'payable_with': paymentMethod,
    'prices': prices?.map((x) => x.toMap()).toList(),
    'features': features?.map((x) => x.toMap()).toList(),
  };
}