getProductShippingClassById method

Future<WooProductShippingClass> getProductShippingClassById({
  1. required int id,
})

Returns a WooProductShippingClass, with the specified id.

Implementation

Future<WooProductShippingClass> getProductShippingClassById(
    {required int id}) async {
  WooProductShippingClass productShippingClass;
  _setApiResourceUrl(
    path: 'products/shipping_classes/' + id.toString(),
  );
  final response = await get(queryUri.toString());
  _printToLog('response gotten : ' + response.toString());
  productShippingClass = WooProductShippingClass.fromJson(response);
  return productShippingClass;
}