public interface OrderDeleteCommand extends MetaModelReferenceExpansionDsl<Order,OrderDeleteCommand,OrderExpansionModel<Order>>, DeleteCommand<Order>
Order
.
withOrder(client(), order -> { final Order deletedOrder = client().executeBlocking(OrderDeleteCommand.of(order)); final Order queriedDeletedOrder = client().executeBlocking(OrderByIdGet.of(deletedOrder)); assertThat(queriedDeletedOrder).isNull(); });
See the test code.
withOrder(client(), order -> { final String orderNumber = randomString(); final Order orderWithOrderNumber = client().executeBlocking(OrderUpdateCommand.of(order, SetOrderNumber.of(orderNumber))); final Order deletedOrder = client().executeBlocking(OrderDeleteCommand.ofOrderNumber(orderNumber, orderWithOrderNumber.getVersion())); final Order queriedDeletedOrder = client().executeBlocking(OrderByIdGet.of(deletedOrder)); assertThat(queriedDeletedOrder).isNull(); });
See the test code.
Order
Modifier and Type | Method and Description |
---|---|
static OrderDeleteCommand |
of(Versioned<Order> versioned)
Creates a command object to delete a
Order by ID. |
static OrderDeleteCommand |
of(Versioned<Order> versioned,
boolean eraseData)
Creates a command object to delete a
Order by ID. |
static OrderDeleteCommand |
ofOrderNumber(String orderNumber,
Long version)
Creates a command object to delete a
Order by its orderNumber. |
static OrderDeleteCommand |
ofOrderNumber(String orderNumber,
Long version,
boolean eraseData)
Creates a command object to delete a
Order by its orderNumber. |
plusExpansionPaths, withExpansionPaths
plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths
expansionPaths
canDeserialize, deserialize, httpRequestIntent
static OrderDeleteCommand of(Versioned<Order> versioned)
Order
by ID.versioned
- the object to delete (so directly a Order
) or just the version/ID information of itstatic OrderDeleteCommand of(Versioned<Order> versioned, boolean eraseData)
Order
by ID.versioned
- the object to delete (so directly a Order
) or just the version/ID information of iteraseData
- If set to true, Composable Commerce guarantees that all personal data related to the particular object, including invisible data, is erased, in compliance with the GDPR.static OrderDeleteCommand ofOrderNumber(String orderNumber, Long version)
Order
by its orderNumber.orderNumber
- the orderNumber of the Order to delete, see Order.getOrderNumber()
version
- `the current version of the Order, see Resource.getVersion()
static OrderDeleteCommand ofOrderNumber(String orderNumber, Long version, boolean eraseData)
Order
by its orderNumber.orderNumber
- the orderNumber of the Order to delete, see Order.getOrderNumber()
version
- the current version of the Order, see Resource.getVersion()
eraseData
- If set to true, Composable Commerce guarantees that all personal data related to the particular object, including invisible data, is erased, in compliance with the GDPR.