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
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CartDiscountValueAbsolutebuilder(CartDiscountValueAbsolute template) create builder for CartDiscountValueAbsolute instancecopyDeep()static CartDiscountValueAbsolutedeepCopy(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 CartDiscountValueAbsoluteof()factory methodstatic CartDiscountValueAbsoluteof(CartDiscountValueAbsolute template) factory method to create a shallow copy CartDiscountValueAbsolutevoidsetApplicationMode(DiscountApplicationMode applicationMode) Determines how the discount is applied on CartDiscountLineItemTarget and CartDiscountCustomLineItemTarget.voidsetMoney(CentPrecisionMoney... money) Cent precision money values in different currencies.voidsetMoney(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> Taccessor map functionMethods inherited from interface com.commercetools.api.models.cart_discount.CartDiscountValue
getType, withCartDiscountValueMethods 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:
getMoneyin 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
-
copyDeep
CartDiscountValueAbsolute copyDeep()- Specified by:
copyDeepin interfaceCartDiscountValue
-
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
-