getAShippingMethodFromZone method

Future<WooShippingZoneMethod> getAShippingMethodFromZone({
  1. required int zoneId,
  2. required int methodId,
})

Returns a WooShippingZoneMethod object from the specified zoneId and methodId.

Implementation

Future<WooShippingZoneMethod> getAShippingMethodFromZone(
    {required int zoneId, required int methodId}) async {
  WooShippingZoneMethod shippingZoneMethod;
  _setApiResourceUrl(
      path: 'shipping/zones/' +
          zoneId.toString() +
          'methods/' +
          methodId.toString());
  final response = await get(queryUri.toString());
  shippingZoneMethod = WooShippingZoneMethod.fromJson(response);
  return shippingZoneMethod;
}