DiscountIOS.fromJson constructor

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

Implementation

factory DiscountIOS.fromJson(Map<String, dynamic> json) {
  return DiscountIOS(
    identifier: json['identifier'] as String,
    localizedPrice: json['localizedPrice'] as String?,
    numberOfPeriods: json['numberOfPeriods'] as int,
    paymentMode: PaymentModeIOS.fromJson(json['paymentMode'] as String),
    price: json['price'] as String,
    priceAmount: (json['priceAmount'] as num).toDouble(),
    subscriptionPeriod: json['subscriptionPeriod'] as String,
    type: json['type'] as String,
  );
}