Interface CartDiscountValueFixed
- All Superinterfaces:
CartDiscountValue
- All Known Implementing Classes:
CartDiscountValueFixedImpl
Sets the DiscountedLineItemPrice of the CartDiscountLineItemsTarget or CartDiscountCustomLineItemsTarget to the value specified in the money
field, if it is lower than the current Line Item price for the same currency. If the Line Item price is already discounted to a price equal to or lower than the respective price in the money
field, this Discount is not applied.
Example to create an instance using the builder pattern
CartDiscountValueFixed cartDiscountValueFixed = CartDiscountValueFixed.builder()
.plusMoney(moneyBuilder -> moneyBuilder)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartDiscountValueFixedbuilder
(CartDiscountValueFixed template) create builder for CartDiscountValueFixed instancestatic CartDiscountValueFixed
deepCopy
(CartDiscountValueFixed template) factory method to create a deep copy of CartDiscountValueFixed@NotNull @Valid List<CentPrecisionMoney>
getMoney()
Cent precision money values in different currencies.static CartDiscountValueFixed
of()
factory methodstatic CartDiscountValueFixed
of
(CartDiscountValueFixed template) factory method to create a shallow copy CartDiscountValueFixedvoid
setMoney
(CentPrecisionMoney... money) Cent precision money values in different currencies.void
setMoney
(List<CentPrecisionMoney> money) Cent precision money values in different currencies.static com.fasterxml.jackson.core.type.TypeReference<CartDiscountValueFixed>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.cart_discount.CartDiscountValue
getType, withCartDiscountValue
-
Field Details
-
FIXED
discriminator value for CartDiscountValueFixed- See Also:
-
-
Method Details
-
getMoney
Cent precision money values in different currencies.
- Returns:
- money
-
setMoney
Cent precision money values in different currencies.
- Parameters:
money
- values to be set
-
setMoney
Cent precision money values in different currencies.
- Parameters:
money
- values to be set
-
of
factory method- Returns:
- instance of CartDiscountValueFixed
-
of
factory method to create a shallow copy CartDiscountValueFixed- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CartDiscountValueFixed- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartDiscountValueFixed- Returns:
- builder
-
builder
create builder for CartDiscountValueFixed instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartDiscountValueFixed
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
-