Interface ShoppingList

All Superinterfaces:
BaseResource, Customizable<ShoppingList>, DomainResource<ShoppingList>, Identifiable<ShoppingList>, Referencable<ShoppingList>, ResourceIdentifiable<ShoppingList>, ShoppingListMixin, Versioned<ShoppingList>, WithKey

ShoppingList
Example to create an instance using the builder pattern

     ShoppingList shoppingList = ShoppingList.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .name(nameBuilder -> nameBuilder)
             .plusLineItems(lineItemsBuilder -> lineItemsBuilder)
             .plusTextLineItems(textLineItemsBuilder -> textLineItemsBuilder)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the ShoppingList.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface DomainResource<ShoppingList>
      Specified by:
      getId in interface Identifiable<ShoppingList>
      Specified by:
      getId in interface Versioned<ShoppingList>
      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the ShoppingList.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface DomainResource<ShoppingList>
      Specified by:
      getVersion in interface Versioned<ShoppingList>
      Returns:
      version
    • getName

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

      Name of the ShoppingList.

      Returns:
      name
    • getKey

      String getKey()

      User-defined unique identifier of the ShoppingList.

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

      @Valid @Valid CustomerReference getCustomer()

      Reference to a Customer associated with the ShoppingList.

      Returns:
      customer
    • 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}. For good performance, indexes are provided for the first 15 languages set on the Project.

      Returns:
      slug
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Description of the ShoppingList.

      Returns:
      description
    • getLineItems

      @NotNull @Valid @NotNull @Valid List<ShoppingListLineItem> getLineItems()

      Line Items (containing Products) of the ShoppingList.

      Returns:
      lineItems
    • getTextLineItems

      @NotNull @Valid @NotNull @Valid List<TextLineItem> getTextLineItems()

      Line Items (containing text values) of the ShoppingList.

      Returns:
      textLineItems
    • getDeleteDaysAfterLastModification

      Long getDeleteDaysAfterLastModification()

      Number of days after which the ShoppingList will be automatically deleted if it has not been modified.

      Returns:
      deleteDaysAfterLastModification
    • getAnonymousId

      String getAnonymousId()

      Identifies ShoppingLists belonging to an anonymous session.

      Returns:
      anonymousId
    • getStore

      @Valid @Valid StoreKeyReference getStore()

      Store to which the ShoppingList is assigned.

      Returns:
      store
    • getCustom

      @Valid @Valid CustomFields getCustom()

      Custom Fields defined for the ShoppingList.

      Specified by:
      getCustom in interface Customizable<ShoppingList>
      Returns:
      custom
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the ShoppingList was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the ShoppingList was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Returns:
      createdBy
    • setId

      void setId(String id)

      Unique identifier of the ShoppingList.

      Specified by:
      setId in interface BaseResource
      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the ShoppingList.

      Specified by:
      setVersion in interface BaseResource
      Parameters:
      version - value to be set
    • setName

      void setName(LocalizedString name)

      Name of the ShoppingList.

      Parameters:
      name - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the ShoppingList.

      Parameters:
      key - value to be set
    • setCustomer

      void setCustomer(CustomerReference customer)

      Reference to a Customer associated with the ShoppingList.

      Parameters:
      customer - 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}. For good performance, indexes are provided for the first 15 languages set on the Project.

      Parameters:
      slug - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Description of the ShoppingList.

      Parameters:
      description - value to be set
    • setLineItems

      void setLineItems(ShoppingListLineItem... lineItems)

      Line Items (containing Products) of the ShoppingList.

      Parameters:
      lineItems - values to be set
    • setLineItems

      void setLineItems(List<ShoppingListLineItem> lineItems)

      Line Items (containing Products) of the ShoppingList.

      Parameters:
      lineItems - values to be set
    • setTextLineItems

      void setTextLineItems(TextLineItem... textLineItems)

      Line Items (containing text values) of the ShoppingList.

      Parameters:
      textLineItems - values to be set
    • setTextLineItems

      void setTextLineItems(List<TextLineItem> textLineItems)

      Line Items (containing text values) of the ShoppingList.

      Parameters:
      textLineItems - values 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.

      Parameters:
      deleteDaysAfterLastModification - value to be set
    • setAnonymousId

      void setAnonymousId(String anonymousId)

      Identifies ShoppingLists belonging to an anonymous session.

      Parameters:
      anonymousId - value to be set
    • setStore

      void setStore(StoreKeyReference store)

      Store to which the ShoppingList is assigned.

      Parameters:
      store - value to be set
    • setCustom

      void setCustom(CustomFields custom)

      Custom Fields defined for the ShoppingList.

      Specified by:
      setCustom in interface Customizable<ShoppingList>
      Parameters:
      custom - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the ShoppingList was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the ShoppingList was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      void setLastModifiedBy(LastModifiedBy lastModifiedBy)

      Present on resources created after 1 February 2019 except for events not tracked.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      Present on resources created after 1 February 2019 except for events not tracked.

      Parameters:
      createdBy - value to be set
    • of

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

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

      @Nullable static ShoppingList deepCopy(@Nullable ShoppingList template)
      factory method to create a deep copy of ShoppingList
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ShoppingListBuilder builder()
      builder factory method for ShoppingList
      Returns:
      builder
    • builder

      static ShoppingListBuilder builder(ShoppingList template)
      create builder for ShoppingList instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withShoppingList

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

      static ReferenceTypeId referenceTypeId()
    • typeReference

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