Class CampaignCode
java.lang.Object
com.broadleafcommerce.orderoperation.domain.CampaignCode
- All Implemented Interfaces:
Serializable
A CampaignCode represents a distinct code for an offer or campaign. It is typically created
through the Code Generation endpoint and services.
- Author:
- Chad Harchar (charchar)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
Defines the ending time for which this campaign code is active.Defines the beginning time for which this campaign code is active.Defines the id for the campaign that originated this campaign code.getCode()
The string code that represents this record.Defines a regex to be used for validating this campaign code for customer updateUses.This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.Defines the id for the code generator that originated this campaign code.getId()
int
Defines the number of max uses allowed for this campaign code.Defines the id for the offer that originated the offer code.The segment to which this campaign code can apply.int
hashCode()
boolean
Defines whether this code has been assigned for use.void
setActiveEndDate
(Instant activeEndDate) Defines the ending time for which this campaign code is active.void
setActiveStartDate
(Instant activeStartDate) Defines the beginning time for which this campaign code is active.void
setAssigned
(boolean assigned) Defines whether this code has been assigned for use.void
setCampaignId
(String campaignId) Defines the id for the campaign that originated this campaign code.void
The string code that represents this record.void
setEmailRegEx
(String emailRegEx) Defines a regex to be used for validating this campaign code for customer updateUses.void
setExternalId
(String externalId) This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.void
setGeneratorId
(String generatorId) Defines the id for the code generator that originated this campaign code.void
void
setMaxUses
(int maxUses) Defines the number of max uses allowed for this campaign code.void
setOfferId
(String offerId) Defines the id for the offer that originated the offer code.void
setSegment
(String segment) The segment to which this campaign code can apply.toString()
-
Constructor Details
-
CampaignCode
public CampaignCode()
-
-
Method Details
-
getId
-
getCode
The string code that represents this record. -
getExternalId
This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.- Returns:
- an external ID
-
getOfferId
Defines the id for the offer that originated the offer code. -
getActiveStartDate
Defines the beginning time for which this campaign code is active. Overrides the value set in theCampaign#activeStartDate
. -
getActiveEndDate
Defines the ending time for which this campaign code is active. Overrides the value set in theCampaign#activeEndDate
. -
getMaxUses
public int getMaxUses()Defines the number of max uses allowed for this campaign code. -
getEmailRegEx
Defines a regex to be used for validating this campaign code for customer updateUses. -
getCampaignId
Defines the id for the campaign that originated this campaign code. -
getGeneratorId
Defines the id for the code generator that originated this campaign code. -
isAssigned
public boolean isAssigned()Defines whether this code has been assigned for use. -
getSegment
The segment to which this campaign code can apply. A value of empty or "ANY" is the most common usage and means that this campaign code can apply to any qualifying part of the order. Typical uses of segments include using them to restrict an campaign code to a specific vendor or store (aka banner).- Returns:
- The segment to which this campaign code can apply.
-
setId
-
setCode
The string code that represents this record. -
setExternalId
This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf.- Parameters:
externalId
- an external ID, often a DB or business ID, from a system outside of Broadleaf
-
setOfferId
Defines the id for the offer that originated the offer code. -
setActiveStartDate
Defines the beginning time for which this campaign code is active. Overrides the value set in theCampaign#activeStartDate
. -
setActiveEndDate
Defines the ending time for which this campaign code is active. Overrides the value set in theCampaign#activeEndDate
. -
setMaxUses
public void setMaxUses(int maxUses) Defines the number of max uses allowed for this campaign code. -
setEmailRegEx
Defines a regex to be used for validating this campaign code for customer updateUses. -
setCampaignId
Defines the id for the campaign that originated this campaign code. -
setGeneratorId
Defines the id for the code generator that originated this campaign code. -
setAssigned
public void setAssigned(boolean assigned) Defines whether this code has been assigned for use. -
setSegment
The segment to which this campaign code can apply. A value of empty or "ANY" is the most common usage and means that this campaign code can apply to any qualifying part of the order. Typical uses of segments include using them to restrict an campaign code to a specific vendor or store (aka banner). -
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-