Class CampaignCode

java.lang.Object
com.broadleafcommerce.orderoperation.domain.CampaignCode
All Implemented Interfaces:
Serializable

public class CampaignCode extends Object implements 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 Details

    • CampaignCode

      public CampaignCode()
  • Method Details

    • getId

      public String getId()
    • getCode

      public String getCode()
      The string code that represents this record.
    • getExternalId

      public String 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

      public String getOfferId()
      Defines the id for the offer that originated the offer code.
    • getActiveStartDate

      public Instant getActiveStartDate()
      Defines the beginning time for which this campaign code is active. Overrides the value set in the Campaign#activeStartDate.
    • getActiveEndDate

      public Instant getActiveEndDate()
      Defines the ending time for which this campaign code is active. Overrides the value set in the Campaign#activeEndDate.
    • getMaxUses

      public int getMaxUses()
      Defines the number of max uses allowed for this campaign code.
    • getEmailRegEx

      public String getEmailRegEx()
      Defines a regex to be used for validating this campaign code for customer updateUses.
    • getCampaignId

      public String getCampaignId()
      Defines the id for the campaign that originated this campaign code.
    • getGeneratorId

      public String 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

      public String 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

      public void setId(String id)
    • setCode

      public void setCode(String code)
      The string code that represents this record.
    • setExternalId

      public void setExternalId(String externalId)
      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

      public void setOfferId(String offerId)
      Defines the id for the offer that originated the offer code.
    • setActiveStartDate

      public void setActiveStartDate(Instant activeStartDate)
      Defines the beginning time for which this campaign code is active. Overrides the value set in the Campaign#activeStartDate.
    • setActiveEndDate

      public void setActiveEndDate(Instant activeEndDate)
      Defines the ending time for which this campaign code is active. Overrides the value set in the Campaign#activeEndDate.
    • setMaxUses

      public void setMaxUses(int maxUses)
      Defines the number of max uses allowed for this campaign code.
    • setEmailRegEx

      public void setEmailRegEx(String emailRegEx)
      Defines a regex to be used for validating this campaign code for customer updateUses.
    • setCampaignId

      public void setCampaignId(String campaignId)
      Defines the id for the campaign that originated this campaign code.
    • setGeneratorId

      public void setGeneratorId(String generatorId)
      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

      public void setSegment(String segment)
      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

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object