Interface ProductDiscountValueAbsolute
- All Superinterfaces:
ProductDiscountValue
Discounts the Product's Price by a fixed amount, defined by the money
field.
Example to create an instance using the builder pattern
ProductDiscountValueAbsolute productDiscountValueAbsolute = ProductDiscountValueAbsolute.builder()
.plusMoney(moneyBuilder -> moneyBuilder)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ProductDiscountValueAbsolutebuilder
(ProductDiscountValueAbsolute template) create builder for ProductDiscountValueAbsolute instancestatic ProductDiscountValueAbsolute
deepCopy
(ProductDiscountValueAbsolute template) factory method to create a deep copy of ProductDiscountValueAbsolute@NotNull @Valid List<CentPrecisionMoney>
getMoney()
Money values in different currencies.static ProductDiscountValueAbsolute
of()
factory methodstatic ProductDiscountValueAbsolute
of
(ProductDiscountValueAbsolute template) factory method to create a shallow copy ProductDiscountValueAbsolutevoid
setMoney
(CentPrecisionMoney... money) Money values in different currencies.void
setMoney
(List<CentPrecisionMoney> money) Money values in different currencies.static com.fasterxml.jackson.core.type.TypeReference<ProductDiscountValueAbsolute>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.product_discount.ProductDiscountValue
getType, withProductDiscountValue
-
Field Details
-
ABSOLUTE
discriminator value for ProductDiscountValueAbsolute- See Also:
-
-
Method Details
-
getMoney
Money values in different currencies. An absolute ProductDiscount will only match a price if this array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
- Returns:
- money
-
setMoney
Money values in different currencies. An absolute ProductDiscount will only match a price if this array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
- Parameters:
money
- values to be set
-
setMoney
Money values in different currencies. An absolute ProductDiscount will only match a price if this array contains a value with the same currency. For example, if it contains 10€ and 15$, the matching € price will be decreased by 10€ and the matching $ price will be decreased by 15$.
- Parameters:
money
- values to be set
-
of
factory method- Returns:
- instance of ProductDiscountValueAbsolute
-
of
factory method to create a shallow copy ProductDiscountValueAbsolute- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static ProductDiscountValueAbsolute deepCopy(@Nullable ProductDiscountValueAbsolute template) factory method to create a deep copy of ProductDiscountValueAbsolute- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductDiscountValueAbsolute- Returns:
- builder
-
builder
create builder for ProductDiscountValueAbsolute instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductDiscountValueAbsolute
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
-