Class PromotionUtilsExtend
java.lang.Object
com.skava.promotion.orchestration.utils.PromotionUtilsExtend
The Class PromotionUtilsExtend
This class defines the promotion related methods.- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptiongetCartPriceFacets
(Map<String, Map<String, Object>> totalPriceFacets, Map<String, Object> priceFacet, Boolean eligiblePriceFacet) This method is to get the cart level priceFacets after discountstatic double
getCartPromotionTotalValue
(SFCart cart, String discountProperty) getCartPromotionTotalValuestatic Boolean
isOnlySubscripitionItemsstatic Boolean
isValidItemToProcess
(SFCart cart, SFItem item) isValidItemToProcesssetCartPriceFacets
(SFCart cart, String discountProperty, boolean isForEligiblePdts) This method is used to set cart eligible priceFacets to the promotion cart objectstatic void
setTotalPriceFacet
(Iterator<Map.Entry<String, Map<String, Object>>> totalPriceFacet, Map<String, Map<String, Object>> totalPriceFacets) This method is setTotalPriceFacetstatic void
-
Method Details
-
getCartPromotionTotalValue
getCartPromotionTotalValue- Parameters:
cart
- SFCartdiscountProperty
- discountProperty- Returns:
- A promotion total value
-
isValidItemToProcess
isValidItemToProcess- Parameters:
cart
- SFCartitem
- SFItem- Returns:
- A boolean value
-
isOnlySubscripitionItems
isOnlySubscripitionItems- Parameters:
cart
- SFCart- Returns:
- A boolean value
-
setCartPriceFacets
public static Map<String,Object> setCartPriceFacets(SFCart cart, String discountProperty, boolean isForEligiblePdts) This method is used to set cart eligible priceFacets to the promotion cart object- Parameters:
discountProperty
- contains attribute to allow discount.cart
- Indicates aSFCart
, contains the cartisForEligiblePdts
- Indicates a boolean value true/false- Returns:
- priceFacet.
-
getCartPriceFacets
public static Map<String,Object> getCartPriceFacets(Map<String, Map<String, Object>> totalPriceFacets, Map<String, Object> priceFacet, Boolean eligiblePriceFacet) This method is to get the cart level priceFacets after discount- Parameters:
totalPriceFacets
- contains the price facets.priceFacet
- contains the priceFacets value after discounteligiblePriceFacet
- Indicates the eligible price facet flag value- Returns:
- A pricefacets
-
setTotalPriceFacet
public static void setTotalPriceFacet(Iterator<Map.Entry<String, Map<String, Object>>> totalPriceFacet, Map<String, Map<String, Object>> totalPriceFacets) This method is setTotalPriceFacet- Parameters:
totalPriceFacet
- .totalPriceFacets
- contains the price facets.
-
setTotalPriceFacets
-