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()

      A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.

      {
          "de": "Hundefutter",
          "en": "dog food"
        }
        
      Returns:
      name
    • getMoney

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

      @Valid @Valid CustomLineItemTaxedPrice getTaxedPrice()
      Returns:
      taxedPrice
    • getTotalPrice

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

      @NotNull @NotNull String getSlug()
      Returns:
      slug
    • getQuantity

      @NotNull @NotNull Long getQuantity()
      Returns:
      quantity
    • getState

      @Valid @Valid List<ItemState> getState()
      Returns:
      state
    • getTaxCategory

      @Valid @Valid TaxCategoryKeyReference getTaxCategory()

      References a tax category by key.

      Returns:
      taxCategory
    • getTaxRate

      @Valid @Valid TaxRate getTaxRate()
      Returns:
      taxRate
    • getExternalTaxRate

      @Valid @Valid ExternalTaxRateDraft getExternalTaxRate()
      Returns:
      externalTaxRate
    • getDiscountedPricePerQuantity

      @Valid @Valid List<DiscountedLineItemPriceDraft> getDiscountedPricePerQuantity()
      Returns:
      discountedPricePerQuantity
    • getShippingDetails

      @Valid @Valid ItemShippingDetailsDraft getShippingDetails()
      Returns:
      shippingDetails
    • setName

      void setName(LocalizedString name)

      A localized string is a JSON object where the keys are of IETF language tag, and the values the corresponding strings used for that language.

      {
          "de": "Hundefutter",
          "en": "dog food"
        }
        
      Parameters:
      name - value to be set
    • setMoney

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

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

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

      void setSlug(String slug)
      set slug
      Parameters:
      slug - value to be set
    • setQuantity

      void setQuantity(Long quantity)
      set quantity
      Parameters:
      quantity - value to be set
    • setState

      void setState(ItemState... state)
      set state
      Parameters:
      state - values to be set
    • setState

      void setState(List<ItemState> state)
      set state
      Parameters:
      state - values to be set
    • setTaxCategory

      void setTaxCategory(TaxCategoryKeyReference taxCategory)

      References a tax category by key.

      Parameters:
      taxCategory - value to be set
    • setTaxRate

      void setTaxRate(TaxRate taxRate)
      set taxRate
      Parameters:
      taxRate - value to be set
    • setExternalTaxRate

      void setExternalTaxRate(ExternalTaxRateDraft externalTaxRate)
      set externalTaxRate
      Parameters:
      externalTaxRate - value to be set
    • setDiscountedPricePerQuantity

      void setDiscountedPricePerQuantity(DiscountedLineItemPriceDraft... discountedPricePerQuantity)
      set discountedPricePerQuantity
      Parameters:
      discountedPricePerQuantity - values to be set
    • setDiscountedPricePerQuantity

      void setDiscountedPricePerQuantity(List<DiscountedLineItemPriceDraft> discountedPricePerQuantity)
      set discountedPricePerQuantity
      Parameters:
      discountedPricePerQuantity - values to be set
    • setShippingDetails

      void setShippingDetails(ItemShippingDetailsDraft shippingDetails)
      set 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
    • deepCopy

      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