com.ibm.commerce.marketing.promotion.code

Interface PromotionCodeManager

  • All Superinterfaces:
    PromotionCodeResolver, java.io.Serializable, XMLizable

    Deprecated. 
    replaced by GenericPromotionCodeManager

    public interface PromotionCodeManager
    extends PromotionCodeResolver
    Interface for PromotionCodeManager. This is the interface that exposes the feature required to manage promotion codes in the promotion engine.
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        Deprecated. 
        IBM Copyright
        See Also:
        Constant Field Values
      • PROMO_CODE_IN_USE

        static final int PROMO_CODE_IN_USE
        Deprecated. 
        A promotion code is being used in a order
        See Also:
        Constant Field Values
      • PROMO_CODE_USED

        static final int PROMO_CODE_USED
        Deprecated. 
        A promotion code has been used in a order that's completed
        See Also:
        Constant Field Values
    • Method Detail

      • addCodeForOrder

        void addCodeForOrder(java.lang.String code,
                             OrderKey okey)
                      throws PromotionApplicationException
        Deprecated. Use addCodeForOrder(String code, OrderKey okey, Date date)
        Add a promotion code to an order
        Parameters:
        code - the code
        okey - the order
        Throws:
        PromotionApplication - is thrown when system fails to add the code to the order
        PromotionApplicationException
      • addCodeForOrder

        void addCodeForOrder(java.lang.String code,
                             OrderKey okey,
                             java.util.Date date)
                      throws PromotionApplicationException
        Deprecated. 
        Add a promotion code to an order
        Parameters:
        code - the code
        okey - the order
        date - Current or Preview time to check if the coupon is valid or not.
        Throws:
        PromotionApplication - is thrown when system fails to add the code to the order
        PromotionApplicationException
      • listCodeForOrder

        java.lang.String[] listCodeForOrder(OrderKey okey)
        Deprecated. 
        List all the codes that are used in an order
        Parameters:
        okey -
        Returns:
        all the codes that are used in an order
      • removeCodeForOrder

        void removeCodeForOrder(java.lang.String code,
                                OrderKey okey)
                         throws PromotionApplicationException
        Deprecated. 
        Removes a promotion code entered for an order
        Parameters:
        code - the code
        okey - the order
        Throws:
        PromotionApplication - is thrown when system fails to remove the code from the order
        PromotionApplicationException
      • validatePromotionCode

        PromotionErrorReport validatePromotionCode(java.lang.String code,
                                                   CustomerKey ukey,
                                                   StoreKey storeKey)
                                            throws PromotionApplicationException
        Deprecated. Use validatePromotionCode(String code,CustomerKey ukey,StoreKey storeKey, Date date)
        Validates a promotion code. Performs the following tasks: 1. Checks if the code is valid 2. Checks if the promotion identified by this code is active 3. Checks if the promotion identified by this code has reached the redemption limit both overall and for this user in particular Not checked are: 1. If the promotion identified by this code is applicable to the current order based on its content 2. If the promotion identified by this code will be eliminated as a result of policy voilations.
        Parameters:
        code - the code
        ukey - customer who entered the code
        storeKey - key of the store where the customer is shopping
        Returns:
        true if code is valid
        Throws:
        PromotionApplicationException - if any of the 3 criteria is not satisfied.
      • validatePromotionCode

        PromotionErrorReport validatePromotionCode(java.lang.String code,
                                                   CustomerKey ukey,
                                                   StoreKey storeKey,
                                                   java.util.Date date)
                                            throws PromotionApplicationException
        Deprecated. 
        Validates a promotion code. Performs the following tasks: 1. Checks if the code is valid 2. Checks if the promotion identified by this code is active 3. Checks if the promotion identified by this code has reached the redemption limit both overall and for this user in particular Not checked are: 1. If the promotion identified by this code is applicable to the current order based on its content 2. If the promotion identified by this code will be eliminated as a result of policy voilations.
        Parameters:
        code - the code
        ukey - customer who entered the code
        storeKey - key of the store where the customer is shopping
        date - Current or Preview time to check if the coupon is valid or not.
        Returns:
        true if code is valid
        Throws:
        PromotionApplicationException - if any of the 3 criteria is not satisfied.