Interface ProductDiscountValueAbsoluteDraft

All Superinterfaces:
Draft<ProductDiscountValueAbsoluteDraft>, ProductDiscountValueDraft

public interface ProductDiscountValueAbsoluteDraft extends ProductDiscountValueDraft, Draft<ProductDiscountValueAbsoluteDraft>

Discounts the Product Price by a fixed amount, defined by the money field.


Example to create an instance using the builder pattern

     ProductDiscountValueAbsoluteDraft productDiscountValueAbsoluteDraft = ProductDiscountValueAbsoluteDraft.builder()
             .plusMoney(moneyBuilder -> moneyBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getMoney

      @NotNull @Valid @NotNull @Valid List<Money> getMoney()

      Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$. If the array has multiple values of the same currency, the API returns an InvalidOperation error.

      If the array is empty, the discount does not apply.

      Returns:
      money
    • setMoney

      void setMoney(Money... money)

      Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$. If the array has multiple values of the same currency, the API returns an InvalidOperation error.

      If the array is empty, the discount does not apply.

      Parameters:
      money - values to be set
    • setMoney

      void setMoney(List<Money> money)

      Money values in different currencies. An absolute Product Discount will match a price only if the array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$. If the array has multiple values of the same currency, the API returns an InvalidOperation error.

      If the array is empty, the discount does not apply.

      Parameters:
      money - values to be set
    • of

      factory method
      Returns:
      instance of ProductDiscountValueAbsoluteDraft
    • of

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

      factory method to create a deep copy of ProductDiscountValueAbsoluteDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ProductDiscountValueAbsoluteDraft
      Returns:
      builder
    • builder

      create builder for ProductDiscountValueAbsoluteDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductDiscountValueAbsoluteDraft

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