Class CartDiscountValueFixedDraftBuilder

java.lang.Object
com.commercetools.api.models.cart_discount.CartDiscountValueFixedDraftBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<CartDiscountValueFixedDraft>

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

     CartDiscountValueFixedDraft cartDiscountValueFixedDraft = CartDiscountValueFixedDraft.builder()
             .plusMoney(moneyBuilder -> moneyBuilder)
             .build()
 
  • Constructor Details

  • Method Details

    • money

      Money values in different currencies. A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.

      Parameters:
      money - value to be set
      Returns:
      Builder
    • money

      Money values in different currencies. A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.

      Parameters:
      money - value to be set
      Returns:
      Builder
    • plusMoney

      Money values in different currencies. A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.

      Parameters:
      money - value to be set
      Returns:
      Builder
    • plusMoney

      Money values in different currencies. A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.

      Parameters:
      builder - function to build the money value
      Returns:
      Builder
    • withMoney

      Money values in different currencies. A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.

      Parameters:
      builder - function to build the money value
      Returns:
      Builder
    • addMoney

      Money values in different currencies. A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.

      Parameters:
      builder - function to build the money value
      Returns:
      Builder
    • setMoney

      Money values in different currencies. A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.

      Parameters:
      builder - function to build the money value
      Returns:
      Builder
    • getMoney

      public List<Money> getMoney()

      Money values in different currencies. A fixed Cart Discount will only match a price if this array contains a value with the same currency. If it contains 10€ and 15$, the matching € price will be discounted by 10€ and the matching $ price will be discounted to 15$.

      Returns:
      money
    • build

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

      builds CartDiscountValueFixedDraft without checking for non-null required values
      Returns:
      CartDiscountValueFixedDraft
    • of

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

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