public class FinalizeCouponUsageCmdImpl extends CalculationCmdImpl implements FinalizeCouponUsageCmd
This is a task command that is invoked from the ORDERPROCESS command to mark all the eCoupons as unusable that are used in the current order preparation.
The cpwalletId is found out for the current orderId from the ORCPMAP table. Then for each cpwalletId the number of times this coupon has been used is incremented. If the number of times this coupon has been used has reached the limit specified, then the eCoupon is marked as "Not Usable" in the CouponWalletAccessBean for the current cpwalletId.
Constructor and Description |
---|
FinalizeCouponUsageCmdImpl()
FinalizeCouponUsageCmdImpl constructor, calls super().
|
Modifier and Type | Method and Description |
---|---|
OrderAccessBean | getOrder()
Gets the access bean representing the order.
|
OrderItemAccessBean[] | getOrderItems()
Gets the access bean representing the order items.
|
void | performExecute()
Deprecated.
The WC54 coupon feature will be replaced by the WC56 promotion engine coupon feature.
|
void | reset()
Resets the command properties.
|
void | setOrder(OrderAccessBean newOrder)
Sets the access bean representing the order.
|
void | setOrderItems(OrderItemAccessBean[] newOrderItems)
Sets the access bean representing the order items.
|
public FinalizeCouponUsageCmdImpl()
public void reset()
public OrderAccessBean getOrder()
public OrderItemAccessBean[] getOrderItems()
public void performExecute() throws ECException
The cpwalletId is found out for the current orderId from ORCPMAP table. Then for each cpwalletId the number of time this coupon has been used is increamented. If the number of times this coupon has been used has reached the limit specified, then th eCoupon is marked as "Not Usable" in the CouponWalletAccessBean for the current cpwalletId.
public void setOrder(OrderAccessBean newOrder)
public void setOrderItems(OrderItemAccessBean[] newOrderItems)