AppOrder.fromJSON constructor

AppOrder.fromJSON(
  1. dynamic data
)

Implementation

AppOrder.fromJSON(data) :
  id = data["id"] ?? "",
  description = data["description"] ?? "",
  url = data["url"] ?? "",
  createdTime = data["createdTime"] ?? 0,
  customerEmail = data["customerEmail"] ?? "",
  customerType = EnumToString.fromString(ProfileType.values, data["type"] ?? ProfileType.general.value) ?? ProfileType.general,
  couponId = data["couponId"] ?? "",
  invoiceIds = data["invoiceIds"]?.cast<String>() ?? [],
  product = AppProduct.fromJSON(data["product"] ?? {}),
  subscriptionPlan = SubscriptionPlan.fromJSON(data["subscriptionPlan"] ?? {}),
  googlePlayPurchaseDetails = googlePlayPurchaseDetailsFromJSON(data["googlePlayPurchaseDetails"] ?? {}),
  appStorePurchaseDetails = appStorePurchaseDetailsFromJSON(data["appStorePurchaseDetails"] ?? {});