Class CartDiscountValueBuilder

java.lang.Object
com.commercetools.history.models.common.CartDiscountValueBuilder
All Implemented Interfaces:
Builder<CartDiscountValue>

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

     CartDiscountValue cartDiscountValue = CartDiscountValue.builder()
             .type("{type}")
             .build()
 
  • Constructor Details

    • CartDiscountValueBuilder

      public CartDiscountValueBuilder()
  • Method Details

    • type

      public CartDiscountValueBuilder type(String type)
      set the value to the type
      Parameters:
      type - value to be set
      Returns:
      Builder
    • getType

      public String getType()
      value of type}
      Returns:
      type
    • build

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

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

      public static CartDiscountValueBuilder of()
      factory method for an instance of CartDiscountValueBuilder
      Returns:
      builder
    • of

      public static CartDiscountValueBuilder of(CartDiscountValue template)
      create builder for CartDiscountValue instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder