public class XPFPromotionRule extends XPFEntity
| Modifier and Type | Class and Description |
|---|---|
static class |
XPFPromotionRule.XPFPromotionRuleBuilder |
| Constructor and Description |
|---|
XPFPromotionRule(@NonNull String code,
@NonNull String name,
@NonNull String type,
String description,
@NonNull String startDate,
String endDate,
@NonNull XPFPromotionOperatorEnum conditionalOperator,
@NonNull List<XPFPromotionElement> conditions,
@NonNull List<XPFPromotionElement> actions,
@NonNull XPFEntitySupplier<Map<Locale,String>> displayNames,
@NonNull XPFEntitySupplier<Map<Locale,String>> carrotDescriptions) |
| Modifier and Type | Method and Description |
|---|---|
static XPFPromotionRule.XPFPromotionRuleBuilder |
builder() |
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
@NonNull List<XPFPromotionElement> |
getActions()
The list of actions for the promotion rule.
|
Optional<String> |
getCarrotDescription(Locale locale)
Get localized carrot description for a locale with fallback behavior.
|
Map<Locale,String> |
getCarrotDescriptions()
Get the carrot descriptions.
|
@NonNull String |
getCode()
The unique code of the promotion rule.
|
@NonNull XPFPromotionOperatorEnum |
getConditionalOperator()
The conditional operator for the promotion rule.
|
@NonNull List<XPFPromotionElement> |
getConditions()
The list of conditions for the promotion rule.
|
String |
getDescription()
The description of the promotion rule.
|
Optional<String> |
getDisplayName(Locale locale)
Get localized display name for a locale with fallback behavior.
|
Map<Locale,String> |
getDisplayNames()
Get the display names.
|
String |
getEndDate()
The end date of the promotion rule.
|
@NonNull String |
getName()
The name of the promotion rule.
|
@NonNull String |
getStartDate()
The start date of the promotion rule.
|
@NonNull String |
getType()
The type of the promotion rule, which identifies the rule set and determines the promotion's context and behavior.
|
int |
hashCode() |
String |
toString() |
getCustomDatapublic XPFPromotionRule(@NonNull
@NonNull String code,
@NonNull
@NonNull String name,
@NonNull
@NonNull String type,
String description,
@NonNull
@NonNull String startDate,
String endDate,
@NonNull
@NonNull XPFPromotionOperatorEnum conditionalOperator,
@NonNull
@NonNull List<XPFPromotionElement> conditions,
@NonNull
@NonNull List<XPFPromotionElement> actions,
@NonNull
@NonNull XPFEntitySupplier<Map<Locale,String>> displayNames,
@NonNull
@NonNull XPFEntitySupplier<Map<Locale,String>> carrotDescriptions)
public Map<Locale,String> getDisplayNames()
public Optional<String> getDisplayName(Locale locale)
locale - The locale to get a display name for.public Map<Locale,String> getCarrotDescriptions()
public Optional<String> getCarrotDescription(Locale locale)
locale - The locale to get a carrot description for.public static XPFPromotionRule.XPFPromotionRuleBuilder builder()
@NonNull public @NonNull String getCode()
@NonNull public @NonNull String getName()
@NonNull public @NonNull String getType()
This field is expected to contain one of these values:
This type influences:
public String getDescription()
@NonNull public @NonNull String getStartDate()
public String getEndDate()
@NonNull public @NonNull XPFPromotionOperatorEnum getConditionalOperator()
@NonNull public @NonNull List<XPFPromotionElement> getConditions()
@NonNull public @NonNull List<XPFPromotionElement> getActions()
Copyright © 2025. All rights reserved.