public final class SetExpectedDelivery extends UpdateActionImpl<InventoryEntry>
See also InventoryEntryUpdateCommand.
withUpdateableInventoryEntry(client(), entry -> {
final ZonedDateTime expectedDelivery = SphereTestUtils.now().plus(7, ChronoUnit.DAYS);
final UpdateAction<InventoryEntry> action = SetExpectedDelivery.of(expectedDelivery);
final InventoryEntry updatedEntry = client().executeBlocking(InventoryEntryUpdateCommand.of(entry, action));
assertThat(updatedEntry.getExpectedDelivery())
.isEqualTo(expectedDelivery);
return updatedEntry;
});
See the test code.
Modifier and Type | Method and Description |
---|---|
ZonedDateTime |
getExpectedDelivery() |
static SetExpectedDelivery |
of(ZonedDateTime expectedDelivery) |
getAction
@Nullable public ZonedDateTime getExpectedDelivery()
public static SetExpectedDelivery of(@Nullable ZonedDateTime expectedDelivery)