io.sphere.sdk.customobjects.commands.CustomObjectUpsertCommand Maven / Gradle / Ivy
The newest version!
package io.sphere.sdk.customobjects.commands;
import io.sphere.sdk.commands.DraftBasedCreateCommand;
import io.sphere.sdk.customobjects.CustomObject;
import io.sphere.sdk.customobjects.CustomObjectDraft;
/**
Command for creating or updating a custom object.
Upsert is a synthetic word which has its origins from "update" and "insert".
{@include.example io.sphere.sdk.customobjects.CustomObjectFixtures#createCustomObject()}
@param the type of the value in the custom object
@see CustomObject
*/
public interface CustomObjectUpsertCommand extends DraftBasedCreateCommand, CustomObjectDraft> {
static CustomObjectUpsertCommand of(final CustomObjectDraft draft) {
return new CustomObjectUpsertCommandImpl<>(draft);
}
}