Class CartDiscountValueRelativeBuilder

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

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

     CartDiscountValueRelative cartDiscountValueRelative = CartDiscountValueRelative.builder()
             .permyriad(0.3)
             .build()
 
  • Constructor Details

    • CartDiscountValueRelativeBuilder

      public CartDiscountValueRelativeBuilder()
  • Method Details

    • permyriad

      public CartDiscountValueRelativeBuilder 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

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

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

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

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