Interface CartDiscountValue
- All Superinterfaces:
CartDiscountValueMixin
- All Known Subinterfaces:
CartDiscountValueAbsolute
,CartDiscountValueFixed
,CartDiscountValueGiftLineItem
,CartDiscountValueRelative
CartDiscountValue
Example to create a subtype instance using the builder pattern
Example to create a subtype instance using the builder pattern
CartDiscountValue cartDiscountValue = CartDiscountValue.absoluteBuilder()
plusMoney(moneyBuilder -> moneyBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder for absolute subtypestatic CartDiscountValue
deepCopy
(CartDiscountValue template) factory method to create a deep copy of CartDiscountValuebuilder for fixed subtype@NotNull String
getType()
builder for giftLineItem subtypebuilder for relative subtypestatic com.fasterxml.jackson.core.type.TypeReference<CartDiscountValue>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCartDiscountValue
(Function<CartDiscountValue, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.cart_discount.CartDiscountValueMixin
toDraft
-
Method Details
-
getType
- Returns:
- type
-
deepCopy
factory method to create a deep copy of CartDiscountValue- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
absoluteBuilder
builder for absolute subtype- Returns:
- builder
-
fixedBuilder
builder for fixed subtype- Returns:
- builder
-
giftLineItemBuilder
builder for giftLineItem subtype- Returns:
- builder
-
relativeBuilder
builder for relative subtype- Returns:
- builder
-
withCartDiscountValue
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
-