Dispenser.fromJson constructor

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

Implementation

Dispenser.fromJson(Map<String, dynamic> json) {
  id = json['id'];
  dispenserId = json['dispenser_id'];
  merchantId = json['merchant_id'];
  serialNo = json['serial_no'];
  manufacturer = json['manufacturer'];
  modelNo = json['model_no'];
  createdAt = json['created_at'];
  updatedAt = json['updated_at'];
  stationId = json['station_id'];
  productId = json['product_id'];
  dongleId = json['dongle_id'];
  status = json['status'];
  pumpCode = json['pump_code'];
  product =
      json['product'] != null ? Product.fromJson(json['product']) : null;
}