Class ProductDiscountValueAbsoluteDraftBuilder

java.lang.Object
com.commercetools.api.models.product_discount.ProductDiscountValueAbsoluteDraftBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ProductDiscountValueAbsoluteDraft>

public class ProductDiscountValueAbsoluteDraftBuilder extends Object implements io.vrap.rmf.base.client.Builder<ProductDiscountValueAbsoluteDraft>
ProductDiscountValueAbsoluteDraftBuilder
Example to create an instance using the builder pattern

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

    • ProductDiscountValueAbsoluteDraftBuilder

      public ProductDiscountValueAbsoluteDraftBuilder()
  • Method Details

    • 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 - value to be set
      Returns:
      Builder
    • 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 - value to be set
      Returns:
      Builder
    • plusMoney

      public ProductDiscountValueAbsoluteDraftBuilder plusMoney(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 - value to be set
      Returns:
      Builder
    • plusMoney

      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:
      builder - function to build the money value
      Returns:
      Builder
    • withMoney

      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:
      builder - function to build the money value
      Returns:
      Builder
    • addMoney

      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:
      builder - function to build the money value
      Returns:
      Builder
    • setMoney

      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:
      builder - function to build the money value
      Returns:
      Builder
    • getMoney

      public 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
    • build

      builds ProductDiscountValueAbsoluteDraft with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<ProductDiscountValueAbsoluteDraft>
      Returns:
      ProductDiscountValueAbsoluteDraft
    • buildUnchecked

      public ProductDiscountValueAbsoluteDraft buildUnchecked()
      builds ProductDiscountValueAbsoluteDraft without checking for non-null required values
      Returns:
      ProductDiscountValueAbsoluteDraft
    • of

      factory method for an instance of ProductDiscountValueAbsoluteDraftBuilder
      Returns:
      builder
    • of

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