toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = id;
  data['country'] = country;
  data['state'] = state;
  data['postcode'] = postcode;
  data['city'] = city;
  data['rate'] = rate;
  data['name'] = name;
  data['priority'] = priority;
  data['compound'] = compound;
  data['shipping'] = shipping;
  data['order'] = order;
  data['class'] = taxClass;
  if (links != null) {
    data['_links'] = links!.toJson();
  }
  return data;
}