Class CartDiscountTargetBuilder

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

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

     CartDiscountTarget cartDiscountTarget = CartDiscountTarget.builder()
             .type("{type}")
             .build()
 
  • Constructor Details

    • CartDiscountTargetBuilder

      public CartDiscountTargetBuilder()
  • Method Details

    • type

      public CartDiscountTargetBuilder 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 CartDiscountTarget build()
      builds CartDiscountTarget with checking for non-null required values
      Specified by:
      build in interface Builder<CartDiscountTarget>
      Returns:
      CartDiscountTarget
    • buildUnchecked

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

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

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