Package com.skava.promotion.ecomm
Class EcommPromotionUtil
java.lang.Object
com.skava.promotion.ecomm.EcommPromotionUtil
This class provides functionalities that are used to render offer in the response
- Since:
- 8.0
- Version:
- 8.0
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionstatic doublegetRoundOffDiscountValue(PromotionRoundOffTypes roundOffType, double discount) Functionality to roundoff the discount valuestatic voidgetTotalDiscountForPriceFacets(BaseDiscount priceFacets, Map<String, Object> overallPriceFacetsDiscountObj, PromotionRoundOffTypes roundOffType) getTotalPriceFacets(Map<String, Object> overAllPriceFacets, Map<String, Object> currentPriceFacets, PromotionRoundOffTypes roundOffType) static voidoverallCartPriceFacetsDiscount(Map<String, Object> priceFacets, Map<String, Object> overallPriceFacetsDiscount, PromotionRoundOffTypes roundOffType) This method is used to calculate overallCartPriceFacets DiscountoverallPriceFacetsDiscount(List<BaseDiscount> priceFacets, Map<String, Object> overallPriceFacetsDiscount, PromotionRoundOffTypes roundOffType) static voidsetOverAllDiscountForBundles(PromotionOfferDO promotionOfferDO, List<Object> offerObjects) Functionality to set the PromotionBundles overall discountstatic voidsetOverAllDiscountForCart(PromotionOfferDO promotionOfferDO, List<Object> offerObjects) Functionality to calculate PromotionCart overall discountstatic voidsetOverAllDiscountForSku(PromotionOfferDO promotionOfferDO, List<Object> offerObjects) Functionality to set the PromotionSkus overall discount
-
Method Details
-
setOverAllDiscountForCart
public static void setOverAllDiscountForCart(PromotionOfferDO promotionOfferDO, List<Object> offerObjects) Functionality to calculate PromotionCart overall discount- Parameters:
promotionOfferDO- An instance ofPromotionOfferDOofferObjects- An instance ofList<Object>
-
overallCartPriceFacetsDiscount
public static void overallCartPriceFacetsDiscount(Map<String, Object> priceFacets, @Nonnull Map<String, Object> overallPriceFacetsDiscount, PromotionRoundOffTypes roundOffType) This method is used to calculate overallCartPriceFacets Discount- Parameters:
priceFacets- contains priceFacets objectoverallPriceFacetsDiscount- holds calculated overallPriceFacetsDiscountroundOffType- holds roundOffType value
-
setOverAllDiscountForSku
public static void setOverAllDiscountForSku(PromotionOfferDO promotionOfferDO, List<Object> offerObjects) Functionality to set the PromotionSkus overall discount- Parameters:
promotionOfferDO- An instance ofPromotionOfferDOofferObjects- An instance ofList<Object>
-
setOverAllDiscountForBundles
public static void setOverAllDiscountForBundles(PromotionOfferDO promotionOfferDO, List<Object> offerObjects) Functionality to set the PromotionBundles overall discount- Parameters:
promotionOfferDO- An instance ofPromotionOfferDOofferObjects- An instance ofList<Object>
-
getTotalPriceFacets
-
overallPriceFacetsDiscount
public static Map<String,Object> overallPriceFacetsDiscount(List<BaseDiscount> priceFacets, @Nonnull Map<String, Object> overallPriceFacetsDiscount, PromotionRoundOffTypes roundOffType) -
getTotalDiscountForPriceFacets
public static void getTotalDiscountForPriceFacets(BaseDiscount priceFacets, Map<String, Object> overallPriceFacetsDiscountObj, PromotionRoundOffTypes roundOffType) -
getRoundOffDiscountValue
Functionality to roundoff the discount value- Parameters:
roundOffType- Holds thePromotionRoundOffTypesvaluesdiscount- Holds the calculated discount value- Returns:
- The rounded off discount value
-