Interface ShoppingListDraft

All Superinterfaces:
CustomizableDraft<ShoppingListDraft>, Draft<ShoppingListDraft>, WithKey

public interface ShoppingListDraft extends CustomizableDraft<ShoppingListDraft>, WithKey, Draft<ShoppingListDraft>
ShoppingListDraft
Example to create an instance using the builder pattern

     ShoppingListDraft shoppingListDraft = ShoppingListDraft.builder()
             .name(nameBuilder -> nameBuilder)
             .build()
 
  • Method Details

    • getName

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

      Name of the ShoppingList.

      Returns:
      name
    • getSlug

      @Valid @Valid LocalizedString getSlug()

      Human-readable identifiers usually used as deep-link URL to the related ShoppingList. Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. The slug must match the pattern [a-zA-Z0-9_-]{2,256}.

      Returns:
      slug
    • getCustomer

      @Valid @Valid CustomerResourceIdentifier getCustomer()

      The Customer the ShoppingList should be associated to.

      Returns:
      customer
    • getKey

      String getKey()

      User-defined unique identifier for the ShoppingList.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Description of the ShoppingList.

      Returns:
      description
    • getAnonymousId

      String getAnonymousId()

      Identifies ShoppingLists belonging to an anonymous session.

      Returns:
      anonymousId
    • 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
    • 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
    • getStore

      @Valid @Valid StoreResourceIdentifier getStore()

      Assigns the new ShoppingList to the Store.

      Returns:
      store
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields defined for the ShoppingList.

      Specified by:
      getCustom in interface CustomizableDraft<ShoppingListDraft>
      Returns:
      custom
    • setName

      void setName(LocalizedString name)

      Name of the ShoppingList.

      Parameters:
      name - value to be set
    • setSlug

      void setSlug(LocalizedString slug)

      Human-readable identifiers usually used as deep-link URL to the related ShoppingList. Each slug is unique across a Project, but a ShoppingList can have the same slug for different languages. The slug must match the pattern [a-zA-Z0-9_-]{2,256}.

      Parameters:
      slug - value to be set
    • setCustomer

      void setCustomer(CustomerResourceIdentifier customer)

      The Customer the ShoppingList should be associated to.

      Parameters:
      customer - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier for the ShoppingList.

      Parameters:
      key - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Description of the ShoppingList.

      Parameters:
      description - value to be set
    • setAnonymousId

      void setAnonymousId(String anonymousId)

      Identifies ShoppingLists belonging to an anonymous session.

      Parameters:
      anonymousId - 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
    • 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
    • setStore

      void setStore(StoreResourceIdentifier store)

      Assigns the new ShoppingList to the Store.

      Parameters:
      store - value to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom Fields defined for the ShoppingList.

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

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

      static ShoppingListDraft of(ShoppingListDraft template)
      factory method to create a shallow copy ShoppingListDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

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

      static ShoppingListDraftBuilder builder()
      builder factory method for ShoppingListDraft
      Returns:
      builder
    • builder

      static ShoppingListDraftBuilder builder(ShoppingListDraft template)
      create builder for ShoppingListDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withShoppingListDraft

      default <T> T withShoppingListDraft(Function<ShoppingListDraft,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<ShoppingListDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference