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

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

The newest version!
/*
This class has been generated by class io.sphere.sdk.annotations.processors.CreateCommandEndpointAnnotationProcessor
induced by the annotation io.sphere.sdk.annotations.HasCreateCommand.
in the source class io.sphere.sdk.reviews.Review.
To render this class the handlebars template 'commands/createCommandImplementation.hbs' has been used.
*/
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;
import io.sphere.sdk.client.JsonEndpoint;

final class ReviewCreateCommandImpl extends MetaModelCreateCommandImpl> implements ReviewCreateCommand {
    ReviewCreateCommandImpl(final MetaModelCreateCommandBuilder> builder) {
        super(builder);
    }

    ReviewCreateCommandImpl(final ReviewDraft body) {
        super(body, JsonEndpoint.of(Review.typeReference(), "/reviews"), ReviewExpansionModel.of(), ReviewCreateCommandImpl::new);
    }

    @Override
    public ReviewCreateCommand withDraft(final ReviewDraft draft) {
        return new ReviewCreateCommandImpl(copyBuilder().draft(draft));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy