updateProductReview method

Future<WooProductReview> updateProductReview({
  1. required WooProductReview productReview,
})

Updates an existing Product Review and returns the WooProductReview object.

Related endpoint: https://woocommerce.github.io/woocommerce-rest-api-docs/#product-reviews

Implementation

Future<WooProductReview> updateProductReview(
    {required WooProductReview productReview}) async {
  _printToLog('Updating product review With reviewId : ' +
      productReview.id.toString());
  _setApiResourceUrl(
    path: 'products/reviews/' + productReview.id.toString(),
  );
  final response = await put(queryUri.toString(), productReview.toJson());
  return WooProductReview.fromJson(response);
}