Package com.skava.oms.flow.util
Class PromotionUtil
java.lang.Object
com.skava.oms.flow.util.PromotionUtil
This class common methods to access the promotion service.
- Since:
- 26-Jul-2018
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkPersonalizationLevel
(Personalization[] personalizations, List<Promotion> promotionList) This method checks the promotion in the personalization levelstatic void
checkShippingLevel
(ShippingMethodPriceInfo[] shippingMethodPriceInfos, List<Promotion> promotionList) This method checks the promotions in the shipping levelstatic void
getDiscountCode
(Discount[] discounts, List<Promotion> promotionList) This method gets the discount codes from the given discount array If the code is already present in the list, then that is not taken into considerationgetPromotions
(Order order) This method gets the promotion codes available in the order Promotions can be present in : 1.OrderItem level 2.Personalization in orderItem 3.Shipping in OrderItem
-
Method Details
-
getPromotions
This method gets the promotion codes available in the order Promotions can be present in : 1.OrderItem level 2.Personalization in orderItem 3.Shipping in OrderItem- Parameters:
order
- - order to be manipulated- Returns:
- the list of promocodes
-
checkPersonalizationLevel
public static void checkPersonalizationLevel(Personalization[] personalizations, List<Promotion> promotionList) This method checks the promotion in the personalization level- Parameters:
personalizations
- contains the personalizationspromotionList
- contains the promotion list
-
getDiscountCode
This method gets the discount codes from the given discount array If the code is already present in the list, then that is not taken into consideration- Parameters:
discounts
- - contains the discount arraypromotionList
- contains the discount code
-
checkShippingLevel
public static void checkShippingLevel(ShippingMethodPriceInfo[] shippingMethodPriceInfos, List<Promotion> promotionList) This method checks the promotions in the shipping level- Parameters:
shippingMethodPriceInfos
- - contains the information about the shippingpromotionList
- contains the promotion list
-