
io.sphere.client.shop.ReviewService Maven / Gradle / Ivy
package io.sphere.client.shop;
import io.sphere.client.CommandRequest;
import io.sphere.client.FetchRequest;
import io.sphere.client.QueryRequest;
import io.sphere.client.model.VersionedId;
import io.sphere.client.shop.model.*;
/** Sphere HTTP API for working with product reviews in a given project. */
public interface ReviewService {
/** Finds a review by id. */
FetchRequest byId(String id);
/** Queries all reviews in current project. */
QueryRequest all();
/** Queries all reviews by given customer. */
public QueryRequest forCustomer(String customerId);
/** Queries all reviews for a specific product by given customer. */
public QueryRequest forCustomerAndProduct(String customerId, String productId);
/** Queries all reviews for a specific product. */
public QueryRequest forProduct(String productId);
/** Creates a review. At least one of the three optional parameters (title, text, score) must be set. */
public CommandRequest createReview(
String productId, String customerId, String authorName, String title, String text, Double score);
/** Updates a review. */
public CommandRequest updateReview(VersionedId reviewId, ReviewUpdate update);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy