ShipmentMethods.fromJson constructor

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

Implementation

ShipmentMethods.fromJson(Map<String, dynamic> json) {
  id = json['id'];
  createdAt = json['createdAt'];
  name = json['name'];
  logoURL = json['logoURL'];
  type = json['type'];
  calculationType = json['calculationType'];
  shipmentEstimatedDay = json['shipmentEstimatedDay'];
  showShipmentEstimatedDay = json['showShipmentEstimatedDay'];
  freeShipmentCargoLimit = json['freeShipmentCargoLimit'];
  cashOnDelivery = json['cashOnDelivery'];
  if (json['prices'] != null) {
    prices = <ProductPriceDTO>[];
    json['prices'].forEach((v) {
      prices!.add(ProductPriceDTO.fromJson(v));
    });
  }
}