offer update
This commit is contained in:
94
lib/src/data/cod_order_response.dart
Normal file
94
lib/src/data/cod_order_response.dart
Normal file
@@ -0,0 +1,94 @@
|
||||
// To parse this JSON data, do
|
||||
//
|
||||
// final codOrderResponse = codOrderResponseFromJson(jsondynamic);
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
CodOrderResponse codOrderResponseFromJson(dynamic str) => CodOrderResponse.fromJson(json.decode(str));
|
||||
|
||||
dynamic codOrderResponseToJson(CodOrderResponse data) => json.encode(data.toJson());
|
||||
|
||||
class CodOrderResponse {
|
||||
dynamic id;
|
||||
dynamic orderNumber;
|
||||
dynamic userId;
|
||||
int? totalItems;
|
||||
dynamic subtotal;
|
||||
dynamic deliveryCharge;
|
||||
dynamic discount;
|
||||
dynamic grandTotal;
|
||||
dynamic paymentMethod;
|
||||
dynamic paymentStatus;
|
||||
dynamic transactionId;
|
||||
dynamic orderStatus;
|
||||
dynamic deliveryAddressId;
|
||||
dynamic couponId;
|
||||
dynamic cancelReason;
|
||||
dynamic cancelledBy;
|
||||
dynamic cancelledAt;
|
||||
|
||||
|
||||
CodOrderResponse({
|
||||
this.id,
|
||||
this.orderNumber,
|
||||
this.userId,
|
||||
this.totalItems,
|
||||
this.subtotal,
|
||||
this.deliveryCharge,
|
||||
this.discount,
|
||||
this.grandTotal,
|
||||
this.paymentMethod,
|
||||
this.paymentStatus,
|
||||
this.transactionId,
|
||||
this.orderStatus,
|
||||
this.deliveryAddressId,
|
||||
this.couponId,
|
||||
this.cancelReason,
|
||||
this.cancelledBy,
|
||||
this.cancelledAt,
|
||||
|
||||
});
|
||||
|
||||
factory CodOrderResponse.fromJson(Map<dynamic, dynamic> json) => CodOrderResponse(
|
||||
id: json["id"],
|
||||
orderNumber: json["orderNumber"],
|
||||
userId: json["userId"],
|
||||
totalItems: json["totalItems"],
|
||||
subtotal: json["subtotal"],
|
||||
deliveryCharge: json["deliveryCharge"],
|
||||
discount: json["discount"],
|
||||
grandTotal: json["grandTotal"],
|
||||
paymentMethod: json["paymentMethod"],
|
||||
paymentStatus: json["paymentStatus"],
|
||||
transactionId: json["transactionId"],
|
||||
orderStatus: json["orderStatus"],
|
||||
deliveryAddressId: json["deliveryAddressId"],
|
||||
couponId: json["couponId"],
|
||||
cancelReason: json["cancelReason"],
|
||||
cancelledBy: json["cancelledBy"],
|
||||
cancelledAt: json["cancelledAt"],
|
||||
|
||||
);
|
||||
|
||||
Map<dynamic, dynamic> toJson() => {
|
||||
"id": id,
|
||||
"orderNumber": orderNumber,
|
||||
"userId": userId,
|
||||
"totalItems": totalItems,
|
||||
"subtotal": subtotal,
|
||||
"deliveryCharge": deliveryCharge,
|
||||
"discount": discount,
|
||||
"grandTotal": grandTotal,
|
||||
"paymentMethod": paymentMethod,
|
||||
"paymentStatus": paymentStatus,
|
||||
"transactionId": transactionId,
|
||||
"orderStatus": orderStatus,
|
||||
"deliveryAddressId": deliveryAddressId,
|
||||
"couponId": couponId,
|
||||
"cancelReason": cancelReason,
|
||||
"cancelledBy": cancelledBy,
|
||||
"cancelledAt": cancelledAt,
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user