toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['purchasedDate'] = this.purchasedDate;
  data['validity'] = this.validity;
  if (this.priceDetails != null) {
    data['priceDetails'] = this.priceDetails!.toJson();
  }
  if (this.offerDetails != null) {
    data['offerDetails'] = this.offerDetails!.map((v) => v.toJson()).toList();
  }
  if (this.subscription != null) {
    data['subscription'] = this.subscription!.toJson();
  }
  if (this.subscriptionDetails != null) {
    data['subscriptionDetails'] = this.subscriptionDetails!.toJson();
  }
  return data;
}