Interface ProductDiscountValueRelative

All Superinterfaces:
ProductDiscountValue

public interface ProductDiscountValueRelative extends ProductDiscountValue

Discounts the product price by a percentage, defined by the permyriad field.


Example to create an instance using the builder pattern

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

  • Method Details

    • getPermyriad

      @NotNull @NotNull Long getPermyriad()

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

      Returns:
      permyriad
    • setPermyriad

      void setPermyriad(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
    • of

      factory method
      Returns:
      instance of ProductDiscountValueRelative
    • of

      factory method to create a shallow copy ProductDiscountValueRelative
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ProductDiscountValueRelative
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ProductDiscountValueRelative
      Returns:
      builder
    • builder

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

      default <T> T withProductDiscountValueRelative(Function<ProductDiscountValueRelative,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ProductDiscountValueRelative> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference