Subscription.fromJson constructor

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

Implementation

factory Subscription.fromJson(Map<String, dynamic> json) {
  return Subscription(
    id: json['id'],
    subscriberId: json['subscriberId'],
    price: json['price'],
    status: json['status'],
    wallet: json['wallet'],
    paymentHash: json['paymentHash'],
    currency: json['currency'],
    passengerChangeCounter: json['passengerChangeCounter'],
    package: json['package'],
    expiryDate: json['expiryDate'] != null ? DateTime.parse(json['expiryDate']) : null,
    type: json['type'],
    maxTotalBooking: json['maxTotalBooking'],
    neoMilesPaymentPercentage: json['neoMilesPaymentPercentage'],
    neoOneMonthlySubscription: json['neoOneMonthlySubscription'],
    paymentId: json['paymentId'],
    createdAt: json['createdAt'] != null ? DateTime.parse(json['createdAt']) : null,
    updatedAt: json['updatedAt'] != null ? DateTime.parse(json['updatedAt']) : null,
  );
}