Interface TextLineItem

All Superinterfaces:
Customizable<TextLineItem>

public interface TextLineItem extends Customizable<TextLineItem>

TextLineItems are Line Items that use text values instead of references to Products.


Example to create an instance using the builder pattern

     TextLineItem textLineItem = TextLineItem.builder()
             .addedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .id("{id}")
             .name(nameBuilder -> nameBuilder)
             .quantity(0.3)
             .build()
 
  • Method Details

    • getAddedAt

      @NotNull @NotNull ZonedDateTime getAddedAt()

      Date and time (UTC) the TextLineItem was added to the ShoppingList.

      Returns:
      addedAt
    • getCustom

      @Valid @Valid CustomFields getCustom()

      Custom Fields of the TextLineItem.

      Specified by:
      getCustom in interface Customizable<TextLineItem>
      Returns:
      custom
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Description of the TextLineItem.

      Returns:
      description
    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the TextLineItem.

      Returns:
      id
    • getKey

      String getKey()

      User-defined identifier of the TextLineItem. It is unique per ShoppingList.

      Returns:
      key
    • getName

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

      Name of the TextLineItem.

      Returns:
      name
    • getQuantity

      @NotNull @NotNull Long getQuantity()

      Number of entries in the TextLineItem.

      Returns:
      quantity
    • setAddedAt

      void setAddedAt(ZonedDateTime addedAt)

      Date and time (UTC) the TextLineItem was added to the ShoppingList.

      Parameters:
      addedAt - value to be set
    • setCustom

      void setCustom(CustomFields custom)

      Custom Fields of the TextLineItem.

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

      void setDescription(LocalizedString description)

      Description of the TextLineItem.

      Parameters:
      description - value to be set
    • setId

      void setId(String id)

      Unique identifier of the TextLineItem.

      Parameters:
      id - value to be set
    • setKey

      void setKey(String key)

      User-defined identifier of the TextLineItem. It is unique per ShoppingList.

      Parameters:
      key - value to be set
    • setName

      void setName(LocalizedString name)

      Name of the TextLineItem.

      Parameters:
      name - value to be set
    • setQuantity

      void setQuantity(Long quantity)

      Number of entries in the TextLineItem.

      Parameters:
      quantity - value to be set
    • of

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

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

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

      static TextLineItemBuilder builder()
      builder factory method for TextLineItem
      Returns:
      builder
    • builder

      static TextLineItemBuilder builder(TextLineItem template)
      create builder for TextLineItem instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withTextLineItem

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