Interface LineItem


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

     LineItem lineItem = LineItem.builder()
             .addedAt("{addedAt}")
             .custom(customBuilder -> customBuilder)
             .id("{id}")
             .name(nameBuilder -> nameBuilder)
             .productId("{productId}")
             .productSlug(productSlugBuilder -> productSlugBuilder)
             .productType(productTypeBuilder -> productTypeBuilder)
             .quantity(1)
             .variant(variantBuilder -> variantBuilder)
             .variantId(1)
             .build()
 
  • Method Details

    • getAddedAt

      @NotNull @NotNull String getAddedAt()
      Returns:
      addedAt
    • getCustom

      @NotNull @Valid @NotNull @Valid CustomFields getCustom()
      Returns:
      custom
    • getId

      @NotNull @NotNull String getId()
      Returns:
      id
    • getName

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

      @NotNull @NotNull String getProductId()
      Returns:
      productId
    • getProductSlug

      @NotNull @Valid @NotNull @Valid LocalizedString getProductSlug()
      Returns:
      productSlug
    • getProductType

      @NotNull @Valid @NotNull @Valid Reference getProductType()
      Returns:
      productType
    • getQuantity

      @NotNull @NotNull Integer getQuantity()
      Returns:
      quantity
    • getVariant

      @NotNull @Valid @NotNull @Valid Variant getVariant()
      Returns:
      variant
    • getVariantId

      @NotNull @NotNull Integer getVariantId()
      Returns:
      variantId
    • setAddedAt

      void setAddedAt(String addedAt)
      set addedAt
      Parameters:
      addedAt - value to be set
    • setCustom

      void setCustom(CustomFields custom)
      set custom
      Parameters:
      custom - value to be set
    • setId

      void setId(String id)
      set id
      Parameters:
      id - value to be set
    • setName

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

      void setProductId(String productId)
      set productId
      Parameters:
      productId - value to be set
    • setProductSlug

      void setProductSlug(LocalizedString productSlug)
      set productSlug
      Parameters:
      productSlug - value to be set
    • setProductType

      void setProductType(Reference productType)
      set productType
      Parameters:
      productType - value to be set
    • setQuantity

      void setQuantity(Integer quantity)
      set quantity
      Parameters:
      quantity - value to be set
    • setVariant

      void setVariant(Variant variant)
      set variant
      Parameters:
      variant - value to be set
    • setVariantId

      void setVariantId(Integer variantId)
      set variantId
      Parameters:
      variantId - value to be set
    • of

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

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

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

      static LineItemBuilder builder()
      builder factory method for LineItem
      Returns:
      builder
    • builder

      static LineItemBuilder builder(LineItem template)
      create builder for LineItem instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withLineItem

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