Class ProductDiscountValueRelativeBuilder

java.lang.Object
com.commercetools.api.models.product_discount.ProductDiscountValueRelativeBuilder
All Implemented Interfaces:
Builder<ProductDiscountValueRelative>

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

     ProductDiscountValueRelative productDiscountValueRelative = ProductDiscountValueRelative.builder()
             .permyriad(0.3)
             .build()
 
  • Constructor Details

    • ProductDiscountValueRelativeBuilder

      public ProductDiscountValueRelativeBuilder()
  • Method Details

    • permyriad

      public ProductDiscountValueRelativeBuilder permyriad(Long permyriad)

      Fraction (per ten thousand) the price is reduced by. For example, 1000 will result in a 10% price reduction.

      Parameters:
      permyriad - value to be set
      Returns:
      Builder
    • getPermyriad

      public Long getPermyriad()

      Fraction (per ten thousand) the price is reduced by. For example, 1000 will result in a 10% price reduction.

      Returns:
      permyriad
    • build

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

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

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

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