Interface CartDiscountLineItemsTarget
- All Superinterfaces:
CartDiscountTarget
Discount is applied to LineItems matching the predicate
.
Example to create an instance using the builder pattern
CartDiscountLineItemsTarget cartDiscountLineItemsTarget = CartDiscountLineItemsTarget.builder()
.predicate("{predicate}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for CartDiscountLineItemsTarget -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartDiscountLineItemsTargetbuilder
(CartDiscountLineItemsTarget template) create builder for CartDiscountLineItemsTarget instancestatic CartDiscountLineItemsTarget
deepCopy
(CartDiscountLineItemsTarget template) factory method to create a deep copy of CartDiscountLineItemsTarget@NotNull String
Valid LineItem target predicate.static CartDiscountLineItemsTarget
of()
factory methodstatic CartDiscountLineItemsTarget
of
(CartDiscountLineItemsTarget template) factory method to create a shallow copy CartDiscountLineItemsTargetvoid
setPredicate
(String predicate) Valid LineItem target predicate.static com.fasterxml.jackson.core.type.TypeReference<CartDiscountLineItemsTarget>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.cart_discount.CartDiscountTarget
getType, withCartDiscountTarget
-
Field Details
-
LINE_ITEMS
discriminator value for CartDiscountLineItemsTarget- See Also:
-
-
Method Details
-
getPredicate
Valid LineItem target predicate.
- Returns:
- predicate
-
setPredicate
Valid LineItem target predicate.
- Parameters:
predicate
- value to be set
-
of
factory method- Returns:
- instance of CartDiscountLineItemsTarget
-
of
factory method to create a shallow copy CartDiscountLineItemsTarget- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static CartDiscountLineItemsTarget deepCopy(@Nullable CartDiscountLineItemsTarget template) factory method to create a deep copy of CartDiscountLineItemsTarget- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartDiscountLineItemsTarget- Returns:
- builder
-
builder
create builder for CartDiscountLineItemsTarget instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartDiscountLineItemsTarget
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
-