
io.sphere.client.shop.CommentService 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.Comment;
import io.sphere.client.shop.model.CommentUpdate;
/** Sphere HTTP API for working with product comments in a given project. */
public interface CommentService {
/** Finds a comment by id. */
FetchRequest byId(String id);
/** Queries all comments. */
QueryRequest all();
/** Queries all comments by given customer. */
public QueryRequest forCustomer(String customerId);
/** Queries all comments for a specific product. */
public QueryRequest forProduct(String productId);
/** Creates a comment. At least one of (title, text) must be set. */
public CommandRequest createComment(String productId, String customerId, String authorName, String title, String text);
/** Updates a comment. At least one of (title, text) must be set. */
public CommandRequest updateComment(VersionedId commentId, CommentUpdate update);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy