Interface CustomLineItemDraft

All Superinterfaces:
Draft<CustomLineItemDraft>

public interface CustomLineItemDraft extends Draft<CustomLineItemDraft>
CustomLineItemDraft
Example to create an instance using the builder pattern

     CustomLineItemDraft customLineItemDraft = CustomLineItemDraft.builder()
             .name(nameBuilder -> nameBuilder)
             .money(moneyBuilder -> moneyBuilder)
             .totalPrice(totalPriceBuilder -> totalPriceBuilder)
             .slug("{slug}")
             .quantity(0.3)
             .build()
 
  • Method Details

    • getName

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

      Maps to CustomLineItem.name.

      Returns:
      name
    • getMoney

      @NotNull @Valid @NotNull @Valid TypedMoney getMoney()

      Maps to CustomLineItem.money.

      Returns:
      money
    • getTaxedPrice

      @Valid @Valid CustomLineItemTaxedPrice getTaxedPrice()

      Maps to CustomLineItem.taxedPrice.

      Returns:
      taxedPrice
    • getTotalPrice

      @NotNull @Valid @NotNull @Valid TypedMoney getTotalPrice()

      Maps to CustomLineItem.totalPrice.

      Returns:
      totalPrice
    • getSlug

      @NotNull @NotNull String getSlug()

      Maps to CustomLineItem.slug.

      Returns:
      slug
    • getQuantity

      @NotNull @NotNull Long getQuantity()

      Maps to CustomLineItem.quantity.

      Returns:
      quantity
    • getState

      @Valid @Valid List<ItemState> getState()

      Maps to CustomLineItem.state.

      Returns:
      state
    • getTaxCategory

      @Valid @Valid TaxCategoryKeyReference getTaxCategory()

      Maps to CustomLineItem.taxCategory. References a tax category by key. If the referenced TaxCategory does not exist, the state of the ImportOperation will be set to unresolved until the referenced TaxCategory is created.

      Returns:
      taxCategory
    • getTaxRate

      @Valid @Valid TaxRate getTaxRate()

      Maps to CustomLineItem.taxRate.

      Returns:
      taxRate
    • getExternalTaxRate

      @Valid @Valid ExternalTaxRateDraft getExternalTaxRate()

      External Tax Rate for the Custom Line Item if the Cart has the External TaxMode.

      Returns:
      externalTaxRate
    • getDiscountedPricePerQuantity

      @Valid @Valid List<DiscountedLineItemPriceDraft> getDiscountedPricePerQuantity()

      Maps to CustomLineItem.discountedPricePerQuantity.

      Returns:
      discountedPricePerQuantity
    • getShippingDetails

      @Valid @Valid ItemShippingDetailsDraft getShippingDetails()

      Maps to CustomLineItem.shippingDetails.

      Returns:
      shippingDetails
    • setName

      void setName(LocalizedString name)

      Maps to CustomLineItem.name.

      Parameters:
      name - value to be set
    • setMoney

      void setMoney(TypedMoney money)

      Maps to CustomLineItem.money.

      Parameters:
      money - value to be set
    • setTaxedPrice

      void setTaxedPrice(CustomLineItemTaxedPrice taxedPrice)

      Maps to CustomLineItem.taxedPrice.

      Parameters:
      taxedPrice - value to be set
    • setTotalPrice

      void setTotalPrice(TypedMoney totalPrice)

      Maps to CustomLineItem.totalPrice.

      Parameters:
      totalPrice - value to be set
    • setSlug

      void setSlug(String slug)

      Maps to CustomLineItem.slug.

      Parameters:
      slug - value to be set
    • setQuantity

      void setQuantity(Long quantity)

      Maps to CustomLineItem.quantity.

      Parameters:
      quantity - value to be set
    • setState

      void setState(ItemState... state)

      Maps to CustomLineItem.state.

      Parameters:
      state - values to be set
    • setState

      void setState(List<ItemState> state)

      Maps to CustomLineItem.state.

      Parameters:
      state - values to be set
    • setTaxCategory

      void setTaxCategory(TaxCategoryKeyReference taxCategory)

      Maps to CustomLineItem.taxCategory. References a tax category by key. If the referenced TaxCategory does not exist, the state of the ImportOperation will be set to unresolved until the referenced TaxCategory is created.

      Parameters:
      taxCategory - value to be set
    • setTaxRate

      void setTaxRate(TaxRate taxRate)

      Maps to CustomLineItem.taxRate.

      Parameters:
      taxRate - value to be set
    • setExternalTaxRate

      void setExternalTaxRate(ExternalTaxRateDraft externalTaxRate)

      External Tax Rate for the Custom Line Item if the Cart has the External TaxMode.

      Parameters:
      externalTaxRate - value to be set
    • setDiscountedPricePerQuantity

      void setDiscountedPricePerQuantity(DiscountedLineItemPriceDraft... discountedPricePerQuantity)

      Maps to CustomLineItem.discountedPricePerQuantity.

      Parameters:
      discountedPricePerQuantity - values to be set
    • setDiscountedPricePerQuantity

      void setDiscountedPricePerQuantity(List<DiscountedLineItemPriceDraft> discountedPricePerQuantity)

      Maps to CustomLineItem.discountedPricePerQuantity.

      Parameters:
      discountedPricePerQuantity - values to be set
    • setShippingDetails

      void setShippingDetails(ItemShippingDetailsDraft shippingDetails)

      Maps to CustomLineItem.shippingDetails.

      Parameters:
      shippingDetails - value to be set
    • of

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

      factory method to create a shallow copy CustomLineItemDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

    • deepCopy

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

      static CustomLineItemDraftBuilder builder()
      builder factory method for CustomLineItemDraft
      Returns:
      builder
    • builder

      create builder for CustomLineItemDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCustomLineItemDraft

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