Class CampaignCodeUsage
java.lang.Object
com.broadleafcommerce.promotion.campaign.client.web.context.CampaignCodeUsage
- All Implemented Interfaces:
Serializable
Information on a
CampaignCodeUsabilityInfo.getCodeToUse()
usage for a related campaign.- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCampaignCodeUsage
(String campaignTrackingId, boolean canUse, boolean hasMaxUsage, int usesLeft) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The tracking id of the campaign for which this code usability info belongs.int
The number of uses left for this info's related campaign code.int
hashCode()
boolean
isCanUse()
If this code can be used for the campaign based on it's max uses.boolean
Whether this code has a maximum limit to the number of times it can be used as defined by it's max uses.void
setCampaignTrackingId
(String campaignTrackingId) The tracking id of the campaign for which this code usability info belongs.void
setCanUse
(boolean canUse) If this code can be used for the campaign based on it's max uses.void
setHasMaxUsage
(boolean hasMaxUsage) Whether this code has a maximum limit to the number of times it can be used as defined by it's max uses.void
setUsesLeft
(int usesLeft) The number of uses left for this info's related campaign code.toString()
-
Constructor Details
-
CampaignCodeUsage
public CampaignCodeUsage() -
CampaignCodeUsage
public CampaignCodeUsage(String campaignTrackingId, boolean canUse, boolean hasMaxUsage, int usesLeft)
-
-
Method Details
-
getCampaignTrackingId
The tracking id of the campaign for which this code usability info belongs.- Returns:
- The tracking id of the campaign for which this code usability info belongs.
-
isCanUse
public boolean isCanUse()If this code can be used for the campaign based on it's max uses.- Returns:
- If this code can be used for the campaign based on it's max uses.
-
isHasMaxUsage
public boolean isHasMaxUsage()Whether this code has a maximum limit to the number of times it can be used as defined by it's max uses.- Returns:
- Whether this code has a maximum limit to the number of times it can be used as defined by it's max uses.
-
getUsesLeft
public int getUsesLeft()The number of uses left for this info's related campaign code. This is calculated by subtracting the number of times the code has been used from it's max uses.- Returns:
- The number of uses left for this info's related campaign code.
-
setCampaignTrackingId
The tracking id of the campaign for which this code usability info belongs.- Parameters:
campaignTrackingId
- The tracking id of the campaign for which this code usability info belongs.
-
setCanUse
public void setCanUse(boolean canUse) If this code can be used for the campaign based on it's max uses.- Parameters:
canUse
- If this code can be used for the campaign based on it's max uses.
-
setHasMaxUsage
public void setHasMaxUsage(boolean hasMaxUsage) Whether this code has a maximum limit to the number of times it can be used as defined by it's max uses.- Parameters:
hasMaxUsage
- Whether this code has a maximum limit to the number of times it can be used as defined by it's max uses.
-
setUsesLeft
public void setUsesLeft(int usesLeft) The number of uses left for this info's related campaign code. This is calculated by subtracting the number of times the code has been used from it's max uses.- Parameters:
usesLeft
- The number of uses left for this info's related campaign code.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-