Interface MyShoppingListDraft

All Superinterfaces:
CustomizableDraft<MyShoppingListDraft>, Draft<MyShoppingListDraft>

public interface MyShoppingListDraft extends CustomizableDraft<MyShoppingListDraft>, Draft<MyShoppingListDraft>

A MyShoppingListDraft is the object submitted as payload to the Create MyShoppingList request. The customer field of ShoppingList is automatically set with a password flow token. The anonymousId is automatically set with a token for an anonymous session. The key and slug fields can not be set.


Example to create an instance using the builder pattern

     MyShoppingListDraft myShoppingListDraft = MyShoppingListDraft.builder()
             .name(nameBuilder -> nameBuilder)
             .build()
 
  • Method Details

    • getName

      @NotNull @Valid @NotNull @Valid LocalizedString getName()

      Name of the ShoppingList.

      Returns:
      name
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Description of the ShoppingList.

      Returns:
      description
    • getLineItems

      @Valid @Valid List<ShoppingListLineItemDraft> getLineItems()

      Line Items (containing Products) to add to the ShoppingList.

      Returns:
      lineItems
    • getTextLineItems

      @Valid @Valid List<TextLineItemDraft> getTextLineItems()

      Line Items (containing text values) to add to the ShoppingList.

      Returns:
      textLineItems
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields defined for the ShoppingList.

      Specified by:
      getCustom in interface CustomizableDraft<MyShoppingListDraft>
      Returns:
      custom
    • getDeleteDaysAfterLastModification

      Long getDeleteDaysAfterLastModification()

      Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the default value configured in the Project is used.

      Returns:
      deleteDaysAfterLastModification
    • getStore

      @Valid @Valid StoreResourceIdentifier getStore()

      Assigns the new ShoppingList to the Store. The Store assignment can not be modified.

      Returns:
      store
    • setName

      void setName(LocalizedString name)

      Name of the ShoppingList.

      Parameters:
      name - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Description of the ShoppingList.

      Parameters:
      description - value to be set
    • setLineItems

      void setLineItems(ShoppingListLineItemDraft... lineItems)

      Line Items (containing Products) to add to the ShoppingList.

      Parameters:
      lineItems - values to be set
    • setLineItems

      void setLineItems(List<ShoppingListLineItemDraft> lineItems)

      Line Items (containing Products) to add to the ShoppingList.

      Parameters:
      lineItems - values to be set
    • setTextLineItems

      void setTextLineItems(TextLineItemDraft... textLineItems)

      Line Items (containing text values) to add to the ShoppingList.

      Parameters:
      textLineItems - values to be set
    • setTextLineItems

      void setTextLineItems(List<TextLineItemDraft> textLineItems)

      Line Items (containing text values) to add to the ShoppingList.

      Parameters:
      textLineItems - values to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom Fields defined for the ShoppingList.

      Specified by:
      setCustom in interface CustomizableDraft<MyShoppingListDraft>
      Parameters:
      custom - value to be set
    • setDeleteDaysAfterLastModification

      void setDeleteDaysAfterLastModification(Long deleteDaysAfterLastModification)

      Number of days after which the ShoppingList will be automatically deleted if it has not been modified. If not set, the default value configured in the Project is used.

      Parameters:
      deleteDaysAfterLastModification - value to be set
    • setStore

      void setStore(StoreResourceIdentifier store)

      Assigns the new ShoppingList to the Store. The Store assignment can not be modified.

      Parameters:
      store - value to be set
    • of

      static MyShoppingListDraft of()
      factory method
      Returns:
      instance of MyShoppingListDraft
    • of

      factory method to create a shallow copy MyShoppingListDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of MyShoppingListDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static MyShoppingListDraftBuilder builder()
      builder factory method for MyShoppingListDraft
      Returns:
      builder
    • builder

      create builder for MyShoppingListDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withMyShoppingListDraft

      default <T> T withMyShoppingListDraft(Function<MyShoppingListDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<MyShoppingListDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference