com.ibm.commerce.marketing.promotion.runtime

Class PromotionErrorReport

  • java.lang.Object
    • com.ibm.commerce.marketing.promotion.runtime.PromotionErrorReport


  • public class PromotionErrorReport
    extends java.lang.Object
    An error report that explains any issues that may have risen during the evaluation of a promotion. The PromotionArgument object carries a list of PromotionErrorReports.
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice
        See Also:
        Constant Field Values
      • ERR_NO_ERROR

        public static final int ERR_NO_ERROR
        Error conditions not present, namely success.
        See Also:
        Constant Field Values
      • ERR_MAJ_PROMOTION_CODE_REQUIRED

        public static final int ERR_MAJ_PROMOTION_CODE_REQUIRED
        Error condition when no promotion code is entered for a promotion that requires a promotion code
        See Also:
        Constant Field Values
      • ERR_MAJ_PROMOTION_CODE_DUPLICATED

        public static final int ERR_MAJ_PROMOTION_CODE_DUPLICATED
        Incorrect usage when enter the duplicated promotion code
        See Also:
        Constant Field Values
      • ERR_MAJ_PROMOTION_CODE_INVALID

        public static final int ERR_MAJ_PROMOTION_CODE_INVALID
        Error condition when promotion code entered is invalid, that is, can not be resolved to a promotion
        See Also:
        Constant Field Values
      • ERR_MAJ_COUPON_INVALID

        public static final int ERR_MAJ_COUPON_INVALID
        Error condition when coupon entered is invalid, that is, can not be resolved to a promotion.
        See Also:
        Constant Field Values
      • ERR_MAJ_COUPON_REQUIRED

        public static final int ERR_MAJ_COUPON_REQUIRED
        Error condition when no coupon is entered for a promotion that requires coupon
        See Also:
        Constant Field Values
      • ERR_MAJ_COUPON_EXPIRED

        public static final int ERR_MAJ_COUPON_EXPIRED
        Error condition when the coupon entered has passed its expiration date
        See Also:
        Constant Field Values
      • ERR_MAJ_COUPON_NOT_YET_ACTIVE

        public static final int ERR_MAJ_COUPON_NOT_YET_ACTIVE
        Error condition when the coupon entered has not reached the first date when it will become active
        See Also:
        Constant Field Values
      • ERR_MAJ_COUPON_CANT_BE_TRANSFERRED

        public static final int ERR_MAJ_COUPON_CANT_BE_TRANSFERRED
        Error condition when a coupon that can not be transferred is being transferred
        See Also:
        Constant Field Values
      • ERR_MAJ_COUPON_UNAUTHORIZED_USER

        public static final int ERR_MAJ_COUPON_UNAUTHORIZED_USER
        Error condition when an unauthorized user tries to redeem a coupon
        See Also:
        Constant Field Values
      • ERR_MAJ_PROMOTION_PER_SHOPPER_LIMIT_EXCEEDED

        public static final int ERR_MAJ_PROMOTION_PER_SHOPPER_LIMIT_EXCEEDED
        Error condition when a promotion has exceeded its limit on how many times a shopper can redeem it
        See Also:
        Constant Field Values
      • ERR_MAJ_PROMOTION_OVERALL_LIMIT_EXCEEDED

        public static final int ERR_MAJ_PROMOTION_OVERALL_LIMIT_EXCEEDED
        Error condition when a promotion has exceeded its limit on how many times it can be redeemed overall
        See Also:
        Constant Field Values
      • ERR_MAJ_PROMOTION_ORDER_LIMIT_EXCEEDED

        public static final int ERR_MAJ_PROMOTION_ORDER_LIMIT_EXCEEDED
        Error condition when a promotion has exceeded its limit on how many time it can be applied to an order
        See Also:
        Constant Field Values
      • ERR_MAJ_CUSTOMER_NOT_TARGETED

        public static final int ERR_MAJ_CUSTOMER_NOT_TARGETED
        Error condition when a customer is not a member of the profiles targeted by a promotion
        See Also:
        Constant Field Values
      • ERR_MAJ_PROMOTION_NOT_AVAILABLE_AT_THIS_TIME

        public static final int ERR_MAJ_PROMOTION_NOT_AVAILABLE_AT_THIS_TIME
        Error condition when a promotion is not active at the moment
        See Also:
        Constant Field Values
      • ERR_MAJ_CUSTOM_CONDITION_NOT_SATISFIED

        public static final int ERR_MAJ_CUSTOM_CONDITION_NOT_SATISFIED
        Error conditions when at least one of the custom conditions of this promotion do not be satisfied
        See Also:
        Constant Field Values
      • ERR_MAJ_PURCHASE_CONDITION_NOT_SATISFIED

        public static final int ERR_MAJ_PURCHASE_CONDITION_NOT_SATISFIED
        Error condition when the purchase condition of a promotion has not been satisfied
        See Also:
        Constant Field Values
      • ERR_MAJ_POLICY_VIOLATION

        public static final int ERR_MAJ_POLICY_VIOLATION
        Error conditions when by applying a promotion, at least one of the promotion policies will be violated
        See Also:
        Constant Field Values
      • ERR_MAJ_UNKNOWN_ERR

        public static final int ERR_MAJ_UNKNOWN_ERR
        Error condition when an unknown problem has occurred
        See Also:
        Constant Field Values
      • ERR_MAJ_SYSTEM_ERR

        public static final int ERR_MAJ_SYSTEM_ERR
        Error condition when a system error has occurred
        See Also:
        Constant Field Values
      • ERR_MAJ_USAGE_ERR

        public static final int ERR_MAJ_USAGE_ERR
        Error condition when promotion APIs has not been used properly
        See Also:
        Constant Field Values
      • ERR_MIN_PARAMETER_MISSING

        public static final int ERR_MIN_PARAMETER_MISSING
        Error condition when required parameters is not presented.
        See Also:
        Constant Field Values
      • _ERR_PROMOTION_FORMAT_COUPONIDS_NOT_CORRECT

        public static final int _ERR_PROMOTION_FORMAT_COUPONIDS_NOT_CORRECT
        The format of CouponIds is not correct.
        See Also:
        Constant Field Values
      • _ERR_PROMOTION_PARAMETER_MISSING

        public static final int _ERR_PROMOTION_PARAMETER_MISSING
        Error condition when parameter is missing.
        See Also:
        Constant Field Values
      • _ERR_PROMOTION_FORMAT_PROMOCODES_NOT_CORRECT

        public static final int _ERR_PROMOTION_FORMAT_PROMOCODES_NOT_CORRECT
        The format of promotion codes is not correct.
        See Also:
        Constant Field Values
      • _ERR_PROMOTION_FORMAT_ORDERIDS_NOT_CORRECT

        public static final int _ERR_PROMOTION_FORMAT_ORDERIDS_NOT_CORRECT
        The format of OrderIds is not correct.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PromotionErrorReport

        public PromotionErrorReport()
        This is the only constructor (the same as default constructor). This is similar to that error code is not present, which means no errors. As a result, method of setter will be called to set error code if there is any errors to include.
    • Method Detail

      • getCoupon

        public com.ibm.commerce.marketing.promotion.coupon.Coupon getCoupon()
        Returns coupon attribute
        Returns:
        coupon attribute
      • getErrorCodeMajor

        public int getErrorCodeMajor()
        Returns major error code
        Returns:
        major error code
      • getErrorCodeMinor

        public int getErrorCodeMinor()
        returns minor error code
        Returns:
        minor error code
      • getErrorMessage

        public java.lang.String getErrorMessage()
        Returns error message
        Returns:
        error message
      • getException

        public java.lang.Throwable getException()
        Returns exception that caused this error
        Returns:
        exception that caused this error
      • getPolicy

        public PromotionPolicy getPolicy()
        Returns violated policy
        Returns:
        violated policy
      • getProblematicComponent

        public java.lang.Object getProblematicComponent()
        Returns any component that caused this error
        Returns:
        any component that caused this error
      • getPromotion

        public Promotion getPromotion()
        Returns the promotion where the problem occurred
        Returns:
        the promotion where the problem occurred
      • getPromotionCode

        public java.lang.String getPromotionCode()
        Returns promotion code
        Returns:
        promotion code
      • setCoupon

        public void setCoupon(com.ibm.commerce.marketing.promotion.coupon.Coupon aCoupon)
        Sets the coupon attribute
        Parameters:
        aCoupon - coupon to be set
      • setErrorCodeMajor

        public void setErrorCodeMajor(int i)
        Sets major error code
        Parameters:
        i - to set major error code
      • setErrorCodeMinor

        public void setErrorCodeMinor(int i)
        Sets the minor error code
        Parameters:
        i - minor error code
      • setErrorMessage

        public void setErrorMessage(java.lang.String string)
        Sets the error message
        Parameters:
        string - error message
      • setException

        public void setException(java.lang.Throwable throwable)
        Sets the exception attribute
        Parameters:
        throwable - the exception attribute to be set
      • setPolicy

        public void setPolicy(PromotionPolicy aPolicy)
        Sets the violated policy
        Parameters:
        aPolicy - the violated policy
      • setProblematicComponent

        public void setProblematicComponent(java.lang.Object object)
        Sets the component that caused this problem
        Parameters:
        object - the component that caused the problem
      • setPromotion

        public void setPromotion(Promotion aPromotion)
        Sets the promotion where the problem occurred
        Parameters:
        aPromotion - the promotion where the problem occurred
      • setPromotionCode

        public void setPromotionCode(java.lang.String string)
        Sets the promotion code
        Parameters:
        string - sets the promotion code
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()