toMap method
Implementation
Map<String, dynamic> toMap() => {
"id": id,
"vendor_order_id": vendorOrderId,
"reason": reason,
"display_id": displayId,
"stage": stage,
"payment_type": paymentType,
"origin": origin == null
? []
: List<dynamic>.from(origin!.map((x) => x.toMap())),
"destination": destination == null
? []
: List<dynamic>.from(destination!.map((x) => x.toMap())),
"return_address": returnAddress,
"pricing": pricing?.toMap(),
"distances": distances?.toMap(),
"delivery": delivery?.toMap(),
"vendor": vendor?.toMap(),
"courier": courier,
"trace": trace,
"created_at": createdAt?.toIso8601String(),
};