WooShippingMethodFlatRate.fromJson constructor

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

Implementation

WooShippingMethodFlatRate.fromJson(Map<String, dynamic> json) {
  id = json['id'];
  title = json['title'];
  methodId = json['method_id'];
  cost = json['cost'];
  classCost = json['class_cost'];
  calculationType = json['calculation_type'];
  taxable = json['taxable'];
  if (json['shipping_classes'] != null) {
    shippingClasses = [];
    json['shipping_classes'].forEach((v) {
      shippingClasses!.add(new WooShippingMethodShippingClasses.fromJson(v));
    });
  }
}