getProductAttributeById method

Future<WooProductAttribute> getProductAttributeById({
  1. required int attributeId,
})

Returns a WooProductAttribute, with the specified attributeId.

Implementation

Future<WooProductAttribute> getProductAttributeById(
    {required int attributeId}) async {
  WooProductAttribute productAttribute;
  _setApiResourceUrl(
    path: 'products/attributes/' + attributeId.toString(),
  );
  final response = await get(queryUri.toString());
  _printToLog('response gotten : ' + response.toString());

  productAttribute = WooProductAttribute.fromJson(response);
  return productAttribute;
}