All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sphere.client.shop.CommentService Maven / Gradle / Ivy

There is a newer version: 0.72.1
Show newest version
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.
     *
     * @deprecated since 0.49.0. Use {@link #query()} instead.
     **/
    @Deprecated
    QueryRequest all();

    /** Queries comments. */
    QueryRequest query();

    /** 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 - 2024 Weber Informatics LLC | Privacy Policy