getShippingZoneById method

Future<WooShippingZone> getShippingZoneById(
  1. int id
)

Returns a WooShippingZone object with the specified id.

Implementation

Future<WooShippingZone> getShippingZoneById(int id) async {
  WooShippingZone shippingZone;
  _setApiResourceUrl(path: 'shipping/zones/' + id.toString());
  final response = await get(queryUri.toString());
  shippingZone = WooShippingZone.fromJson(response);
  return shippingZone;
}