Tier.fromJson constructor

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

Implementation

factory Tier.fromJson(Map<String, dynamic> json) => Tier(
  priceOverrides:  PriceOverrides.fromJson(json["priceOverrides"]),
  currency: json["currency"] == null ? null : json["currency"],
  basePrice: json["basePrice"] == null ? null : json["basePrice"].toDouble(),
  offers:  List<Offer>.from(json["offers"].map((x) => Offer.fromJson(x))),
  id: json["_id"] == null ? null : json["_id"],
  price: json["price"] == null ? null : json["price"],
  duration: json["duration"] == null ? null : json["duration"],
);