Interface CartDiscountValueRelative
- All Superinterfaces:
CartDiscountValue,CartDiscountValueMixin,CartDiscountValueRelativeMixin,GenericCartDiscountValueMixin<CartDiscountValueRelativeDraft>
public interface CartDiscountValueRelative
extends CartDiscountValue, CartDiscountValueRelativeMixin
Discounts the CartDiscountTarget relative to its price.
Example to create an instance using the builder pattern
CartDiscountValueRelative cartDiscountValueRelative = CartDiscountValueRelative.builder()
.permyriad(0.3)
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CartDiscountValueRelativebuilder(CartDiscountValueRelative template) create builder for CartDiscountValueRelative instancecopyDeep()static CartDiscountValueRelativedeepCopy(CartDiscountValueRelative template) factory method to create a deep copy of CartDiscountValueRelative@NotNull LongFraction (per ten thousand) the price is reduced by.static CartDiscountValueRelativeof()factory methodstatic CartDiscountValueRelativeof(CartDiscountValueRelative template) factory method to create a shallow copy CartDiscountValueRelativevoidsetPermyriad(Long permyriad) Fraction (per ten thousand) the price is reduced by.static com.fasterxml.jackson.core.type.TypeReference<CartDiscountValueRelative>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.cart_discount.CartDiscountValue
getType, withCartDiscountValueMethods inherited from interface com.commercetools.api.models.cart_discount.CartDiscountValueRelativeMixin
toDraft, toDraftBuilder
-
Field Details
-
RELATIVE
discriminator value for CartDiscountValueRelative- See Also:
-
-
Method Details
-
getPermyriad
Fraction (per ten thousand) the price is reduced by. For example,
1000will result in a 10% price reduction.- Specified by:
getPermyriadin interfaceCartDiscountValueRelativeMixin- Returns:
- permyriad
-
setPermyriad
Fraction (per ten thousand) the price is reduced by. For example,
1000will result in a 10% price reduction.- Parameters:
permyriad- value to be set
-
of
factory method- Returns:
- instance of CartDiscountValueRelative
-
of
factory method to create a shallow copy CartDiscountValueRelative- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CartDiscountValueRelative copyDeep()- Specified by:
copyDeepin interfaceCartDiscountValue
-
deepCopy
factory method to create a deep copy of CartDiscountValueRelative- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartDiscountValueRelative- Returns:
- builder
-
builder
create builder for CartDiscountValueRelative instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCartDiscountValueRelative
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-