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

io.sphere.sdk.reviews.commands.ReviewCreateCommandImpl Maven / Gradle / Ivy

There is a newer version: 1.0.0-M26
Show newest version
package io.sphere.sdk.reviews.commands;

import io.sphere.sdk.commands.MetaModelCreateCommandBuilder;
import io.sphere.sdk.commands.MetaModelCreateCommandImpl;
import io.sphere.sdk.reviews.Review;
import io.sphere.sdk.reviews.ReviewDraft;
import io.sphere.sdk.reviews.expansion.ReviewExpansionModel;

/**
 Creates a review.

 {@include.example io.sphere.sdk.reviews.commands.ReviewCreateCommandTest#execution()}

@see io.sphere.sdk.reviews.ReviewDraftBuilder
 */
final class ReviewCreateCommandImpl extends MetaModelCreateCommandImpl> implements ReviewCreateCommand {
    ReviewCreateCommandImpl(final MetaModelCreateCommandBuilder> builder) {
        super(builder);
    }

    public ReviewCreateCommandImpl(final ReviewDraft body) {
        super(body, ReviewEndpoint.ENDPOINT, ReviewExpansionModel.of(), ReviewCreateCommandImpl::new);
    }

    public static ReviewCreateCommandImpl of(final ReviewDraft draft) {
        return new ReviewCreateCommandImpl(draft);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy