Auction.fromJson constructor

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

Implementation

factory Auction.fromJson(Map<String, dynamic> json) {
  return Auction(
    id: json["id"],
    sellerOrderId: json["seller_order_id"],
    roundId: json["round_id"],
    startDate: DateTime.tryParse(json["start_date"] ?? ""),
    startValue: json["start_value"],
    statusId: json["status_id"],
    maxBidStep: json["max_bid_step"],
    maxBidRecurrence: json["max_bid_recurrence"],
    type: json["type"],
    currentTime: json["current_time"] != null ? DateTime.tryParse(json["current_time"] ?? "") : null,
    status: json["status"],
    totalBids: json["total_bids"],
    currentBidStep: json["current_bid_step"],
    highestBid: json["highest_bid"],
    totalPrice: json["total_price"],
    endDate: json["end_date"] != null ? DateTime.tryParse(json["end_date"] ?? "") : null,
    paymentStatus: json["payment_status"],
    order: json["order"] == null ? null : Order.fromJson(json["order"]),
  );
}