Interface DiscountsConfiguration
public interface DiscountsConfiguration
Holds the configuration for behavior of Product and Cart Discounts.
Example to create an instance using the builder pattern
DiscountsConfiguration discountsConfiguration = DiscountsConfiguration.builder()
.discountCombinationMode(DiscountCombinationMode.BEST_DEAL)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for DiscountsConfigurationbuilder(DiscountsConfiguration template) create builder for DiscountsConfiguration instancecopyDeep()static DiscountsConfigurationdeepCopy(DiscountsConfiguration template) factory method to create a deep copy of DiscountsConfiguration@NotNull DiscountCombinationModeIndicates how Product Discounts and Cart Discounts should be combined.static DiscountsConfigurationof()factory methodstatic DiscountsConfigurationof(DiscountsConfiguration template) factory method to create a shallow copy DiscountsConfigurationvoidsetDiscountCombinationMode(DiscountCombinationMode discountCombinationMode) Indicates how Product Discounts and Cart Discounts should be combined.static com.fasterxml.jackson.core.type.TypeReference<DiscountsConfiguration>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map function
-
Method Details
-
getDiscountCombinationMode
Indicates how Product Discounts and Cart Discounts should be combined. Default value is
Stacking.- Returns:
- discountCombinationMode
-
setDiscountCombinationMode
Indicates how Product Discounts and Cart Discounts should be combined. Default value is
Stacking.- Parameters:
discountCombinationMode- value to be set
-
of
factory method- Returns:
- instance of DiscountsConfiguration
-
of
factory method to create a shallow copy DiscountsConfiguration- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
DiscountsConfiguration copyDeep() -
deepCopy
factory method to create a deep copy of DiscountsConfiguration- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DiscountsConfiguration- Returns:
- builder
-
builder
create builder for DiscountsConfiguration instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withDiscountsConfiguration
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
-