io.sphere.sdk.shippingmethods.commands.ShippingMethodDeleteCommand Maven / Gradle / Ivy
/*
This class has been generated by class io.sphere.sdk.annotations.processors.DeleteCommandEndpointAnnotationProcessor
induced by the annotation io.sphere.sdk.annotations.HasDeleteCommand.
in the source class io.sphere.sdk.shippingmethods.ShippingMethod.
To render this class the handlebars template 'commands/deleteCommandInterface.hbs' has been used.
*/
package io.sphere.sdk.shippingmethods.commands;
import io.sphere.sdk.commands.DeleteCommand;
import io.sphere.sdk.expansion.MetaModelReferenceExpansionDsl;
import io.sphere.sdk.models.Versioned;
import io.sphere.sdk.shippingmethods.ShippingMethod;
import io.sphere.sdk.shippingmethods.expansion.ShippingMethodExpansionModel;
import static io.sphere.sdk.client.SphereRequestUtils.urlEncode;
/**
Command object to delete a {@link ShippingMethod}.
@see ShippingMethod
*/
public interface ShippingMethodDeleteCommand extends MetaModelReferenceExpansionDsl>, DeleteCommand {
/**
Creates a command object to delete a {@link ShippingMethod} by ID.
@param versioned the object to delete (so directly a {@link ShippingMethod}) or just the version/ID information of it
@return delete command
*/
static ShippingMethodDeleteCommand of(final Versioned versioned) {
return new ShippingMethodDeleteCommandImpl(versioned,false);
}
/**
Creates a command object to delete a {@link ShippingMethod} by its key.
@param key the key of the ShippingMethod to delete, see {@link ShippingMethod#getKey()}
@param version `the current version of the ShippingMethod, see {@link ShippingMethod#getVersion()}
@return delete command
*/
static ShippingMethodDeleteCommand ofKey(final String key, final Long version) {
final Versioned versioned = Versioned.of("key=" + urlEncode(key), version);//hack for simple reuse
return of(versioned);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy