public interface CustomerGroupDeleteCommand extends MetaModelReferenceExpansionDsl<CustomerGroup,CustomerGroupDeleteCommand,CustomerGroupExpansionModel<CustomerGroup>>, DeleteCommand<CustomerGroup>
final String name = randomKey(); final CustomerGroup customerGroup = client().executeBlocking(CustomerGroupCreateCommand.of(name)); client().executeBlocking(CustomerGroupDeleteCommand.of(customerGroup)); final PagedQueryResult<CustomerGroup> queryResult = client().executeBlocking(CustomerGroupQuery.of().byName(name)); assertThat(queryResult.getResults()).isEmpty();See the test code.
CustomerGroup| Modifier and Type | Method and Description |
|---|---|
static CustomerGroupDeleteCommand |
of(Versioned<CustomerGroup> versioned)
Creates a command object to delete a
CustomerGroup by ID. |
static CustomerGroupDeleteCommand |
ofKey(String key,
Long version)
Creates a command object to delete a
CustomerGroup by its key. |
plusExpansionPaths, withExpansionPathsplusExpansionPaths, plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPathsexpansionPathscanDeserialize, deserialize, httpRequestIntentstatic CustomerGroupDeleteCommand of(Versioned<CustomerGroup> versioned)
CustomerGroup by ID.versioned - the object to delete (so directly a CustomerGroup) or just the version/ID information of itstatic CustomerGroupDeleteCommand ofKey(String key, Long version)
CustomerGroup by its key.key - the key of the CustomerGroup to delete, see CustomerGroup.getKey()version - `the current version of the CustomerGroup, see Resource.getVersion()