SubscriptionOfferDetail.fromJson constructor

SubscriptionOfferDetail.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory SubscriptionOfferDetail.fromJson(Map<String, dynamic> json) =>
    SubscriptionOfferDetail(
      offerIdToken: json.containsKey("offerIdToken") && json["offerIdToken"] != null ? json["offerIdToken"] : "",
      basePlanId: json.containsKey("basePlanId") && json["basePlanId"] != null ? json["basePlanId"] : "",
      offerId: json.containsKey("offerId") && json["offerId"] != null ? json["offerId"] : "",
      pricingPhases: json.containsKey("pricingPhases") && json["pricingPhases"] != null ? List<PricingPhase?>.from(
              json["pricingPhases"].map((x) => PricingPhase.fromJson(x))) : [],
      offerTags: json.containsKey("offerTags") && json["offerTags"] != null ? List<String?>.from(json["offerTags"].map((x) => x)) : [],
    );