class SubscribeOrderDetailsResponse { String? orderid; String? orderNum; String? rentedDate; String? expiringInColor; String? expiringText; List? products; String? error; String? message; SubscribeOrderDetailsResponse( {this.orderid, this.orderNum, this.rentedDate, this.expiringInColor, this.expiringText, this.products, this.error, this.message}); SubscribeOrderDetailsResponse.fromJson(Map json) { orderid = json['orderid']; orderNum = json['order_num']; rentedDate = json['rentedDate']; expiringInColor = json['ExpiringInColor']; expiringText = json['expiringText']; if (json['products'] != null) { products = []; json['products'].forEach((v) { products!.add(new Products.fromJson(v)); }); } error = json['error']; message = json['message']; } Map toJson() { final Map data = new Map(); data['orderid'] = this.orderid; data['order_num'] = this.orderNum; data['rentedDate'] = this.rentedDate; data['ExpiringInColor'] = this.expiringInColor; data['expiringText'] = this.expiringText; if (this.products != null) { data['products'] = this.products!.map((v) => v.toJson()).toList(); } data['error'] = this.error; data['message'] = this.message; return data; } } class Products { String? id; String? idName; String? prodName; String? totalPrice; String? per; String? dispatchDate; String? receivedDate; Products( {this.id, this.idName, this.prodName, this.totalPrice, this.per, this.dispatchDate, this.receivedDate}); Products.fromJson(Map json) { id = json['id']; idName = json['id_name']; prodName = json['prod_name']; totalPrice = json['total_price']; per = json['per']; dispatchDate = json['dispatch_date']; receivedDate = json['received_date']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['id_name'] = this.idName; data['prod_name'] = this.prodName; data['total_price'] = this.totalPrice; data['per'] = this.per; data['dispatch_date'] = this.dispatchDate; data['received_date'] = this.receivedDate; return data; } }