Class CartDiscountChangeIsActiveActionBuilder

java.lang.Object
com.commercetools.api.models.cart_discount.CartDiscountChangeIsActiveActionBuilder
All Implemented Interfaces:
Builder<CartDiscountChangeIsActiveAction>

public class CartDiscountChangeIsActiveActionBuilder extends Object implements Builder<CartDiscountChangeIsActiveAction>
CartDiscountChangeIsActiveActionBuilder
Example to create an instance using the builder pattern

     CartDiscountChangeIsActiveAction cartDiscountChangeIsActiveAction = CartDiscountChangeIsActiveAction.builder()
             .isActive(true)
             .build()
 
  • Constructor Details

    • CartDiscountChangeIsActiveActionBuilder

      public CartDiscountChangeIsActiveActionBuilder()
  • Method Details

    • isActive

      New value to set. If set to true, the Discount will be applied to the Cart.

      If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.

      Parameters:
      isActive - value to be set
      Returns:
      Builder
    • getIsActive

      public Boolean getIsActive()

      New value to set. If set to true, the Discount will be applied to the Cart.

      If the limit for active Cart Discounts is reached, a MaxCartDiscountsReached error is returned.

      Returns:
      isActive
    • build

      builds CartDiscountChangeIsActiveAction with checking for non-null required values
      Specified by:
      build in interface Builder<CartDiscountChangeIsActiveAction>
      Returns:
      CartDiscountChangeIsActiveAction
    • buildUnchecked

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

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

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