Class PromotionUtil

java.lang.Object
com.skava.oms.flow.util.PromotionUtil

public final class PromotionUtil extends Object
This class common methods to access the promotion service.
Since:
26-Jul-2018
Author:
Infosys Equinox
  • Method Details

    • getPromotions

      public static List<Promotion> getPromotions(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
      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 personalizations
      promotionList - contains the promotion list
    • getDiscountCode

      public static 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 consideration
      Parameters:
      discounts - - contains the discount array
      promotionList - 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 shipping
      promotionList - contains the promotion list