public interface ShoppingListCreateCommand extends DraftBasedCreateCommandDsl<ShoppingList,ShoppingListDraft,ShoppingListCreateCommand>, MetaModelReferenceExpansionDsl<ShoppingList,ShoppingListCreateCommand,ShoppingListExpansionModel<ShoppingList>>
ShoppingList.
final int deleteDaysAfterLastModification = 1; final ShoppingListDraftDsl draft = ShoppingListFixtures.newShoppingListDraftBuilder() .key(DEMO_SHOPPING_LIST_KEY) .description(en("Demo shopping list description.")) .slug(en("demo-shopping-list-slug")) .deleteDaysAfterLastModification(deleteDaysAfterLastModification) .build(); final ShoppingList shoppingList = client().executeBlocking(ShoppingListCreateCommand.of(draft)); assertThat(shoppingList).isNotNull(); assertThat(shoppingList.getId()).isNotNull(); assertThat(shoppingList.getKey()).isEqualTo(DEMO_SHOPPING_LIST_KEY); assertThat(shoppingList.getDeleteDaysAfterLastModification()).isEqualTo(deleteDaysAfterLastModification);See the test code.
ShoppingListDraft,
ShoppingList| Modifier and Type | Method and Description |
|---|---|
static ShoppingListCreateCommand |
of(ShoppingListDraft draft)
Creates a command object to create a
ShoppingList. |
getDraft, withDraftcanDeserialize, deserialize, httpRequestIntentplusExpansionPaths, withExpansionPathsplusExpansionPaths, plusExpansionPaths, plusExpansionPaths, plusExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPaths, withExpansionPathsexpansionPathsstatic ShoppingListCreateCommand of(ShoppingListDraft draft)
ShoppingList.draft - template to create the new object