Class OfferAuditDetail

java.lang.Object
com.broadleafcommerce.promotion.offer.domain.OfferAuditDetail
All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.ContextStateAware, Serializable

public class OfferAuditDetail extends Object implements Serializable, com.broadleafcommerce.data.tracking.core.ContextStateAware

Captures audit relevant data when an offer was applied to an order.

Utilized by the offer engine to enforce max use and frequency rules and as a high-level audit of what orders and users have used an offer.

Author:
Marie Standeven (marieStandeven)
See Also:
  • Constructor Details

    • OfferAuditDetail

      public OfferAuditDetail()
  • Method Details

    • getId

      public String getId()
      The context ID of the offer audit detail.
      Returns:
      the context ID of the offer audit detail
    • getOfferAuditSummaryId

      public String getOfferAuditSummaryId()
      The ID of the offer audit summary that this audit is for.
      Returns:
      The ID of the offer audit summary that this audit is for.
    • getOfferCodeId

      public String getOfferCodeId()
      The ID of the offer code that this audit information is for.
      Returns:
      The ID of the offer code that this audit information is for.
    • getOfferId

      public String getOfferId()
      The ID of the offer this audit is for.
      Returns:
      the ID of the offer this audit is for
    • getCampaignTrackingId

      public String getCampaignTrackingId()
      The tracking ID of the campaign this audit is for.
      Returns:
      the tracking ID of the campaign this audit is for
    • getUser

      public UserTarget getUser()
      The identifying info of the user that used the offer code.
      Returns:
      The identifying info of the user that used the offer code.
    • getTransactionReferenceType

      public String getTransactionReferenceType()
      The type of the transaction upon which the related offer was used. For example, "ORDER".
      Returns:
      The type of the transaction upon which the related offer was used.
    • getTransactionReferenceId

      public String getTransactionReferenceId()
      The id of the transaction upon which the related offer was used. Used to check against an Offer.getMaxUsesPerOrder().
      Returns:
      The id of the transaction upon which the related offer was used.
    • getDateApplied

      public Instant getDateApplied()
      The date and time when the related offer code was applied.
      Returns:
      the date and time when the related offer code was applied
    • getContextState

      public com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState getContextState()
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      getContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Returns:
      a subset of Tracking information to expose the context state for this object
    • setId

      public void setId(String id)
      The context ID of the offer audit detail.
      Parameters:
      id - the context ID of the offer audit detail
    • setOfferAuditSummaryId

      public void setOfferAuditSummaryId(String offerAuditSummaryId)
      The ID of the offer audit summary that this audit is for.
      Parameters:
      offerAuditSummaryId - The ID of the offer audit summary that this audit is for.
    • setOfferCodeId

      public void setOfferCodeId(String offerCodeId)
      The ID of the offer code that this audit information is for.
      Parameters:
      offerCodeId - The ID of the offer code that this audit information is for.
    • setOfferId

      public void setOfferId(String offerId)
      The ID of the offer this audit is for.
      Parameters:
      offerId - the ID of the offer this audit is for
    • setCampaignTrackingId

      public void setCampaignTrackingId(String campaignTrackingId)
      The tracking ID of the campaign this audit is for.
      Parameters:
      campaignTrackingId - the tracking ID of the campaign this audit is for
    • setUser

      public void setUser(UserTarget user)
      The identifying info of the user that used the offer code.
      Parameters:
      user - The identifying info of the user that used the offer code.
    • setTransactionReferenceType

      public void setTransactionReferenceType(String transactionReferenceType)
      The type of the transaction upon which the related offer was used. For example, "ORDER".
      Parameters:
      transactionReferenceType - The type of the transaction upon which the related offer was used.
    • setTransactionReferenceId

      public void setTransactionReferenceId(String transactionReferenceId)
      The id of the transaction upon which the related offer was used. Used to check against an Offer.getMaxUsesPerOrder().
      Parameters:
      transactionReferenceId - The id of the transaction upon which the related offer was used.
    • setDateApplied

      public void setDateApplied(Instant dateApplied)
      The date and time when the related offer code was applied.
      Parameters:
      dateApplied - the date and time when the related offer code was applied
    • setContextState

      public void setContextState(com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState)
      A subset of Tracking information to expose the context state for this object.
      Specified by:
      setContextState in interface com.broadleafcommerce.data.tracking.core.ContextStateAware
      Parameters:
      contextState - a subset of Tracking information to expose the context state for this 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
    • toString

      public String toString()
      Overrides:
      toString in class Object