public interface PromotionActionService
| Modifier and Type | Method and Description |
|---|---|
void |
createDiscountValue(DiscountRAO discountRao,
java.lang.String code,
AbstractOrderEntryModel orderEntry)
Creates a
DiscountValue from the given discountRao and adds it to the given orderEntry. |
void |
createDiscountValue(DiscountRAO discountRao,
java.lang.String code,
AbstractOrderModel order)
Creates a
DiscountValue from the given discountRao and adds it to the given order. |
PromotionResultModel |
createPromotionResult(AbstractRuleActionRAO action)
Creates a
PromotionResultModel object for the given AbstractRuleActionRAO. |
AbstractOrderModel |
getOrder(AbstractRuleActionRAO action)
Returns the order for the given
action. |
AbstractOrderEntryModel |
getOrderEntry(AbstractRuleActionRAO action)
Looks up the
AbstractOrderEntryModel based on the given AbstractRuleActionRAO. |
AbstractRuleEngineRuleModel |
getRule(AbstractRuleActionRAO action)
Returns the rule for the given
action. |
void |
recalculateFiredPromotionMessage(PromotionResultModel promoResult)
Recalculates promotion fired message and stores it in provided
PromotionResultModel. |
void |
recalculateTotals(AbstractOrderModel order)
Recalculates totals for the given
order. |
java.util.List<ItemModel> |
removeDiscountValue(java.lang.String code,
AbstractOrderModel order)
Removes the
DiscountValue with the given code from the given order and its order entries. |
void recalculateFiredPromotionMessage(PromotionResultModel promoResult)
PromotionResultModel. This method should be
used for potential promotion only to update computed values displayed in the messagepromoResult - a promotion result that holds fired promotion message which needs to be updatedPromotionResultModel createPromotionResult(AbstractRuleActionRAO action)
PromotionResultModel object for the given AbstractRuleActionRAO.action - the action rao to use for the promotion result creationPromotionResultModel.void createDiscountValue(DiscountRAO discountRao, java.lang.String code, AbstractOrderModel order)
DiscountValue from the given discountRao and adds it to the given order. Note:
The order is not saved!discountRao - the discountRao to take the values fromcode - the code for the new DiscountValue (e.g. UUID from the respective AbstractPromotionActionModel
that creates this discount)order - the order to apply the discount value tojava.util.List<ItemModel> removeDiscountValue(java.lang.String code, AbstractOrderModel order)
DiscountValue with the given code from the given order and its order entries. Returns
the list of all modified items (order, order entries). Note: The returned items are not saved!code - the code for the DiscountValue to be removedorder - the order to remove the discount value fromvoid createDiscountValue(DiscountRAO discountRao, java.lang.String code, AbstractOrderEntryModel orderEntry)
DiscountValue from the given discountRao and adds it to the given orderEntry.
Note: The orderEntry is not saved!discountRao - the discountRao to take the values fromcode - the code for the new DiscountValue (e.g. UUID from the respective AbstractPromotionActionModel
that creates this discount)orderEntry - the orderEntry to apply the discount value toAbstractOrderEntryModel getOrderEntry(AbstractRuleActionRAO action)
AbstractOrderEntryModel based on the given AbstractRuleActionRAO.action - the action to use for the look-upAbstractOrderModel getOrder(AbstractRuleActionRAO action)
action.action - the orderRaoAbstractRuleEngineRuleModel getRule(AbstractRuleActionRAO action)
action.action - the action raovoid recalculateTotals(AbstractOrderModel order)
order.order - the order to recalculate its totalsCopyright © 2018 SAP SE. All Rights Reserved.