SubscriptionResponse.fromJson constructor

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

Implementation

SubscriptionResponse.fromJson(Map<String, dynamic> json) {
  gid = json["gid"];
  currency =
      json["currency"] != null ? Currency.fromJson(json["currency"]) : null;
  plan = json["plan"] != null ? Plan.fromJson(json["plan"]) : null;
  status = json["status"];
  link = json["link"];
  account =
      json["account"] != null ? Account.fromJson(json["account"]) : null;
  coupon = json["coupon"] != null ? Coupon.fromJson(json["coupon"]) : null;
  if (json["taxAmount"] != null) {
    var tax = json["taxAmount"] as List;
    taxAmount = tax.map((json) => TaxInfo.fromJson(json)).toList();
  } else {
    taxAmount = null;
  }
}