getProductVariationById method
Future<WooProductVariation>
getProductVariationById({
- required int productId,
- dynamic variationId,
Returns a WooProductVariation, with the specified productId
and variationId
.
Implementation
Future<WooProductVariation> getProductVariationById(
{required int productId, variationId}) async {
WooProductVariation productVariation;
_setApiResourceUrl(
path: 'products/' +
productId.toString() +
'/variations/' +
variationId.toString(),
);
final response = await get(queryUri.toString());
_printToLog('response gotten : ' + response.toString());
productVariation = WooProductVariation.fromJson(response);
return productVariation;
}