Class ProductDiscountValueBuilder

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

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

     ProductDiscountValue productDiscountValue = ProductDiscountValue.builder()
             .type("{type}")
             .build()
 
  • Constructor Details

    • ProductDiscountValueBuilder

      public ProductDiscountValueBuilder()
  • Method Details

    • type

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

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

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

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