Interface CartDiscountValueAbsolute
- All Superinterfaces:
CartDiscountValue
,CartDiscountValueAbsoluteMixin
,CartDiscountValueMixin
,GenericCartDiscountValueMixin<CartDiscountValueAbsoluteDraft>
public interface CartDiscountValueAbsolute
extends CartDiscountValue, CartDiscountValueAbsoluteMixin
Discounts the CartDiscountTarget by an absolute amount (not allowed for MultiBuyLineItemsTarget and MultiBuyCustomLineItemsTarget).
Example to create an instance using the builder pattern
CartDiscountValueAbsolute cartDiscountValueAbsolute = CartDiscountValueAbsolute.builder()
.plusMoney(moneyBuilder -> moneyBuilder)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartDiscountValueAbsolutebuilder
(CartDiscountValueAbsolute template) create builder for CartDiscountValueAbsolute instancestatic CartDiscountValueAbsolute
deepCopy
(CartDiscountValueAbsolute template) factory method to create a deep copy of CartDiscountValueAbsoluteDetermines how the discount is applied on CartDiscountLineItemTarget and CartDiscountCustomLineItemTarget.@NotNull @Valid List<CentPrecisionMoney>
getMoney()
Cent precision money values in different currencies.static CartDiscountValueAbsolute
of()
factory methodstatic CartDiscountValueAbsolute
of
(CartDiscountValueAbsolute template) factory method to create a shallow copy CartDiscountValueAbsolutevoid
setApplicationMode
(DiscountApplicationMode applicationMode) Determines how the discount is applied on CartDiscountLineItemTarget and CartDiscountCustomLineItemTarget.void
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<CartDiscountValueAbsolute>
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
Methods inherited from interface com.commercetools.api.models.cart_discount.CartDiscountValueAbsoluteMixin
toDraft, toDraftBuilder
-
Field Details
-
ABSOLUTE
discriminator value for CartDiscountValueAbsolute- See Also:
-
-
Method Details
-
getMoney
Cent precision money values in different currencies.
- Specified by:
getMoney
in interfaceCartDiscountValueAbsoluteMixin
- Returns:
- money
-
getApplicationMode
DiscountApplicationMode getApplicationMode()Determines how the discount is applied on CartDiscountLineItemTarget and CartDiscountCustomLineItemTarget.
- Returns:
- applicationMode
-
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
-
setApplicationMode
Determines how the discount is applied on CartDiscountLineItemTarget and CartDiscountCustomLineItemTarget.
- Parameters:
applicationMode
- value to be set
-
of
factory method- Returns:
- instance of CartDiscountValueAbsolute
-
of
factory method to create a shallow copy CartDiscountValueAbsolute- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CartDiscountValueAbsolute- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartDiscountValueAbsolute- Returns:
- builder
-
builder
create builder for CartDiscountValueAbsolute instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartDiscountValueAbsolute
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
-