public class PromotionErrorReport
extends java.lang.Object
PromotionArgument
object carries a list of PromotionErrorReports.Modifier and Type | Field and Description |
---|---|
static int |
_ERR_PROMOTION_FORMAT_COUPONIDS_NOT_CORRECT
The format of CouponIds is not correct.
|
static int |
_ERR_PROMOTION_FORMAT_ORDERIDS_NOT_CORRECT
The format of OrderIds is not correct.
|
static int |
_ERR_PROMOTION_FORMAT_PROMOCODES_NOT_CORRECT
The format of promotion codes is not correct.
|
static int |
_ERR_PROMOTION_PARAMETER_MISSING
Error condition when parameter is missing.
|
static java.lang.String |
COPYRIGHT
IBM Copyright notice
|
static int |
ERR_MAJ_COUPON_CANT_BE_TRANSFERRED
Error condition when a coupon that can not be transferred is being transferred
|
static int |
ERR_MAJ_COUPON_EXPIRED
Error condition when the coupon entered has passed its expiration date
|
static int |
ERR_MAJ_COUPON_INVALID
Error condition when coupon entered is invalid, that is, can not be resolved to a promotion.
|
static int |
ERR_MAJ_COUPON_NOT_YET_ACTIVE
Error condition when the coupon entered has not reached the first date when it will become active
|
static int |
ERR_MAJ_COUPON_REQUIRED
Error condition when no coupon is entered for a promotion that requires coupon
|
static int |
ERR_MAJ_COUPON_UNAUTHORIZED_USER
Error condition when an unauthorized user tries to redeem a coupon
|
static int |
ERR_MAJ_CUSTOM_CONDITION_NOT_SATISFIED
Error conditions when at least one of the custom conditions of this promotion do not be satisfied
|
static int |
ERR_MAJ_CUSTOMER_NOT_TARGETED
Error condition when a customer is not a member of the profiles targeted by a promotion
|
static int |
ERR_MAJ_POLICY_VIOLATION
Error conditions when by applying a promotion, at least one of the promotion policies will be violated
|
static int |
ERR_MAJ_PROMOTION_CODE_DUPLICATED
Incorrect usage when enter the duplicated promotion code
|
static int |
ERR_MAJ_PROMOTION_CODE_INVALID
Error condition when promotion code entered is invalid, that is, can not be resolved to a promotion
|
static int |
ERR_MAJ_PROMOTION_CODE_REQUIRED
Error condition when no promotion code is entered for a promotion that requires a promotion code
|
static int |
ERR_MAJ_PROMOTION_NOT_AVAILABLE_AT_THIS_TIME
Error condition when a promotion is not active at the moment
|
static 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
|
static 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
|
static 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
|
static int |
ERR_MAJ_PURCHASE_CONDITION_NOT_SATISFIED
Error condition when the purchase condition of a promotion has not been satisfied
|
static int |
ERR_MAJ_SYSTEM_ERR
Error condition when a system error has occurred
|
static int |
ERR_MAJ_UNKNOWN_ERR
Error condition when an unknown problem has occurred
|
static int |
ERR_MAJ_USAGE_ERR
Error condition when promotion APIs has not been used properly
|
static int |
ERR_MIN_PARAMETER_MISSING
Error condition when required parameters is not presented.
|
static int |
ERR_NO_ERROR
Error conditions not present, namely success.
|
Constructor and Description |
---|
PromotionErrorReport()
This is the only constructor (the same as default constructor).
|
Modifier and Type | Method and Description |
---|---|
com.ibm.commerce.marketing.promotion.coupon.Coupon |
getCoupon()
Returns coupon attribute
|
int |
getErrorCodeMajor()
Returns major error code
|
int |
getErrorCodeMinor()
returns minor error code
|
java.lang.String |
getErrorMessage()
Returns error message
|
java.lang.Throwable |
getException()
Returns exception that caused this error
|
PromotionPolicy |
getPolicy()
Returns violated policy
|
java.lang.Object |
getProblematicComponent()
Returns any component that caused this error
|
Promotion |
getPromotion()
Returns the promotion where the problem occurred
|
java.lang.String |
getPromotionCode()
Returns promotion code
|
void |
setCoupon(com.ibm.commerce.marketing.promotion.coupon.Coupon aCoupon)
Sets the coupon attribute
|
void |
setErrorCodeMajor(int i)
Sets major error code
|
void |
setErrorCodeMinor(int i)
Sets the minor error code
|
void |
setErrorMessage(java.lang.String string)
Sets the error message
|
void |
setException(java.lang.Throwable throwable)
Sets the exception attribute
|
void |
setPolicy(PromotionPolicy aPolicy)
Sets the violated policy
|
void |
setProblematicComponent(java.lang.Object object)
Sets the component that caused this problem
|
void |
setPromotion(Promotion aPromotion)
Sets the promotion where the problem occurred
|
void |
setPromotionCode(java.lang.String string)
Sets the promotion code
|
java.lang.String |
toString() |
public static final java.lang.String COPYRIGHT
public static final int ERR_NO_ERROR
public static final int ERR_MAJ_PROMOTION_CODE_REQUIRED
public static final int ERR_MAJ_PROMOTION_CODE_DUPLICATED
public static final int ERR_MAJ_PROMOTION_CODE_INVALID
public static final int ERR_MAJ_COUPON_INVALID
public static final int ERR_MAJ_COUPON_REQUIRED
public static final int ERR_MAJ_COUPON_EXPIRED
public static final int ERR_MAJ_COUPON_NOT_YET_ACTIVE
public static final int ERR_MAJ_COUPON_CANT_BE_TRANSFERRED
public static final int ERR_MAJ_COUPON_UNAUTHORIZED_USER
public static final int ERR_MAJ_PROMOTION_PER_SHOPPER_LIMIT_EXCEEDED
public static final int ERR_MAJ_PROMOTION_OVERALL_LIMIT_EXCEEDED
public static final int ERR_MAJ_PROMOTION_ORDER_LIMIT_EXCEEDED
public static final int ERR_MAJ_CUSTOMER_NOT_TARGETED
public static final int ERR_MAJ_PROMOTION_NOT_AVAILABLE_AT_THIS_TIME
public static final int ERR_MAJ_CUSTOM_CONDITION_NOT_SATISFIED
public static final int ERR_MAJ_PURCHASE_CONDITION_NOT_SATISFIED
public static final int ERR_MAJ_POLICY_VIOLATION
public static final int ERR_MAJ_UNKNOWN_ERR
public static final int ERR_MAJ_SYSTEM_ERR
public static final int ERR_MAJ_USAGE_ERR
public static final int ERR_MIN_PARAMETER_MISSING
public static final int _ERR_PROMOTION_FORMAT_COUPONIDS_NOT_CORRECT
public static final int _ERR_PROMOTION_PARAMETER_MISSING
public static final int _ERR_PROMOTION_FORMAT_PROMOCODES_NOT_CORRECT
public static final int _ERR_PROMOTION_FORMAT_ORDERIDS_NOT_CORRECT
public PromotionErrorReport()
public com.ibm.commerce.marketing.promotion.coupon.Coupon getCoupon()
public int getErrorCodeMajor()
public int getErrorCodeMinor()
public java.lang.String getErrorMessage()
public java.lang.Throwable getException()
public PromotionPolicy getPolicy()
public java.lang.Object getProblematicComponent()
public Promotion getPromotion()
public java.lang.String getPromotionCode()
public void setCoupon(com.ibm.commerce.marketing.promotion.coupon.Coupon aCoupon)
aCoupon
- coupon to be setpublic void setErrorCodeMajor(int i)
i
- to set major error codepublic void setErrorCodeMinor(int i)
i
- minor error codepublic void setErrorMessage(java.lang.String string)
string
- error messagepublic void setException(java.lang.Throwable throwable)
throwable
- the exception attribute to be setpublic void setPolicy(PromotionPolicy aPolicy)
aPolicy
- the violated policypublic void setProblematicComponent(java.lang.Object object)
object
- the component that caused the problempublic void setPromotion(Promotion aPromotion)
aPromotion
- the promotion where the problem occurredpublic void setPromotionCode(java.lang.String string)
string
- sets the promotion codepublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()