Tiers.fromJson constructor

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

Implementation

Tiers.fromJson(Map<String, dynamic> json) {
  priceOverrides = json['priceOverrides'] != null
      ? PriceOverrides.fromJson(json['priceOverrides'])
      : null;
  currency = json['currency'];
  basePrice = json['basePrice'].toDouble();
  if (json['offers'] != null) {
    offers = <Offers>[];
    json['offers'].forEach((v) {
      offers!.add(Offers.fromJson(v));
    });
  }
  sId = json['_id'];
  price = json['price'];
  duration = json['duration'];
}