toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  return {
    'id': id,
    'suspended': suspended,
    'plan_identifier': planIdentifier,
    'price_cents': priceCents,
    'currency': currency,
    'features': features?.toMap(),
    'expires_at': expiresAt,
    'created_at': createdAt,
    'updated_at': updatedAt,
    'customer_name': customerName,
    'customer_email': customerEmail,
    'cycled_at': cycledAt,
    'credits_min': creditsMin,
    'credits_cycle': creditsCycle,
    'customer_id': customerId,
    'plan_name': planName,
    'customer_ref': customerRef,
    'plan_ref': planRef,
    'active': active,
    'in_trial': inTrial,
    'credits': credits,
    'credits_based': creditsBased,
    'recent_invoices': recentInvoices,
    'subitems': subitems?.map((x) => x.toMap()).toList(),
    'logs': logs?.map((x) => x.toMap()).toList(),
    'custom_variables': customVariables?.map((x) => x.toMap()).toList(),
  };
}