Interface CustomLineItem


public interface CustomLineItem
CustomLineItem
Example to create an instance using the builder pattern

     CustomLineItem customLineItem = CustomLineItem.builder()
             .id("{id}")
             .name(nameBuilder -> nameBuilder)
             .money(moneyBuilder -> moneyBuilder)
             .taxedPrice(taxedPriceBuilder -> taxedPriceBuilder)
             .totalPrice(totalPriceBuilder -> totalPriceBuilder)
             .slug("{slug}")
             .quantity(1)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      The unique ID of this CustomLineItem.

      Returns:
      id
    • getName

      @NotNull @Valid @NotNull @Valid LocalizedString getName()
      Returns:
      name
    • getMoney

      @NotNull @Valid @NotNull @Valid Money getMoney()
      Returns:
      money
    • getTaxedPrice

      @NotNull @Valid @NotNull @Valid TaxedItemPrice getTaxedPrice()
      Returns:
      taxedPrice
    • getTotalPrice

      @NotNull @Valid @NotNull @Valid Money getTotalPrice()
      Returns:
      totalPrice
    • getSlug

      @NotNull @NotNull String getSlug()

      A unique String in the cart to identify this CustomLineItem.

      Returns:
      slug
    • getQuantity

      @NotNull @NotNull Integer getQuantity()

      The amount of a CustomLineItem in the cart. Must be a positive integer.

      Returns:
      quantity
    • setId

      void setId(String id)

      The unique ID of this CustomLineItem.

      Parameters:
      id - value to be set
    • setName

      void setName(LocalizedString name)
      set name
      Parameters:
      name - value to be set
    • setMoney

      void setMoney(Money money)
      set money
      Parameters:
      money - value to be set
    • setTaxedPrice

      void setTaxedPrice(TaxedItemPrice taxedPrice)
      set taxedPrice
      Parameters:
      taxedPrice - value to be set
    • setTotalPrice

      void setTotalPrice(Money totalPrice)
      set totalPrice
      Parameters:
      totalPrice - value to be set
    • setSlug

      void setSlug(String slug)

      A unique String in the cart to identify this CustomLineItem.

      Parameters:
      slug - value to be set
    • setQuantity

      void setQuantity(Integer quantity)

      The amount of a CustomLineItem in the cart. Must be a positive integer.

      Parameters:
      quantity - value to be set
    • of

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

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

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

      static CustomLineItemBuilder builder()
      builder factory method for CustomLineItem
      Returns:
      builder
    • builder

      static CustomLineItemBuilder builder(CustomLineItem template)
      create builder for CustomLineItem instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCustomLineItem

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