55 lines
1.2 KiB
Dart
55 lines
1.2 KiB
Dart
// To parse this JSON data, do
|
|
//
|
|
// final zeroPrice = zeroPriceFromJson(jsonString);
|
|
|
|
import 'dart:convert';
|
|
|
|
ZeroPrice zeroPriceFromJson(String str) => ZeroPrice.fromJson(json.decode(str));
|
|
|
|
String zeroPriceToJson(ZeroPrice data) => json.encode(data.toJson());
|
|
|
|
class ZeroPrice {
|
|
ZeroPrice({
|
|
this.status,
|
|
this.error,
|
|
this.data,
|
|
});
|
|
|
|
final int? status;
|
|
final bool? error;
|
|
List<Data>? data;
|
|
|
|
factory ZeroPrice.fromJson(Map<String, dynamic> json) => ZeroPrice(
|
|
status: json["status"],
|
|
error: json["error"],
|
|
data: List<Data>.from(json["data"]
|
|
.map((x) => List<Data>.from(x.map((x) => Data.fromJson(x))))),
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"status": status,
|
|
"error": error,
|
|
"data": List<dynamic>.from(data!.map((x) => x.toJson())),
|
|
};
|
|
}
|
|
|
|
class Data {
|
|
Data({
|
|
this.orderId,
|
|
this.grossAmount,
|
|
});
|
|
|
|
final String? orderId;
|
|
final String? grossAmount;
|
|
|
|
factory Data.fromJson(Map<String, dynamic> json) => Data(
|
|
orderId: json["order_id"],
|
|
grossAmount: json["gross_amount"],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
"order_id": orderId,
|
|
"gross_amount": grossAmount,
|
|
};
|
|
}
|