io.sphere.sdk.shippingmethods.commands.ShippingMethodCreateCommandImpl 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.shippingmethods.ShippingMethod.
To render this class the handlebars template 'commands/createCommandImplementation.hbs' has been used.
*/
package io.sphere.sdk.shippingmethods.commands;
import io.sphere.sdk.commands.MetaModelCreateCommandBuilder;
import io.sphere.sdk.commands.MetaModelCreateCommandImpl;
import io.sphere.sdk.shippingmethods.ShippingMethod;
import io.sphere.sdk.shippingmethods.ShippingMethodDraft;
import io.sphere.sdk.shippingmethods.expansion.ShippingMethodExpansionModel;
import io.sphere.sdk.client.JsonEndpoint;
final class ShippingMethodCreateCommandImpl extends MetaModelCreateCommandImpl> implements ShippingMethodCreateCommand {
ShippingMethodCreateCommandImpl(final MetaModelCreateCommandBuilder> builder) {
super(builder);
}
ShippingMethodCreateCommandImpl(final ShippingMethodDraft body) {
super(body, JsonEndpoint.of(ShippingMethod.typeReference(), "/shipping-methods"), ShippingMethodExpansionModel.of(), ShippingMethodCreateCommandImpl::new);
}
@Override
public ShippingMethodCreateCommand withDraft(final ShippingMethodDraft draft) {
return new ShippingMethodCreateCommandImpl(copyBuilder().draft(draft));
}
}