toJSON method

Map<String, dynamic> toJSON()

Implementation

Map<String, dynamic> toJSON() {
  return <String, dynamic>{
    'id': id,
    'description': description,
    'url': url,
    'createdTime': createdTime,
    'customerEmail': customerEmail,
    'customerType': customerType.name,
    'couponId': couponId,
    'invoiceIds': invoiceIds,
    'product': product?.toJSON(),
    'subscriptionPlan': subscriptionPlan?.toJSON(),
    'googlePlayPurchaseDetails': googlePlayPurchaseDetails != null ? googlePlayPurchaseDetailsJSON(googlePlayPurchaseDetails) : {},
    'appStorePurchaseDetails': appStorePurchaseDetails != null ? appStorePurchaseDetailsJSON(appStorePurchaseDetails) : {},
  };
}