Class OfferAuditDetail

  • All Implemented Interfaces:
    Serializable

    public class OfferAuditDetail
    extends Object
    implements Serializable

    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:
    Chad Harchar (charchar)
    See Also:
    Serialized Form
    • Constructor Detail

      • OfferAuditDetail

        public OfferAuditDetail()
    • Method Detail

      • getId

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

        public UserTarget getUser()
        The identifying info of the user that used the related offer. Used to check against an Offer.maxUsesPerUser.
        Returns:
        The identifying info of the user that used the related offer.
      • getOrderId

        public String getOrderId()
        The id of the order upon which the related offer was used. Used to check against an Offer.maxUsesPerOrder.
        Returns:
        The id of the order upon which the related offer was used.
      • getSharedCode

        public String getSharedCode()
        The string of the shared code used to apply the related offer if one was used. Used to check against a SharedCode.maxUses.
        Returns:
        The string of the shared code used to apply the related offer.
      • getDateApplied

        public Instant getDateApplied()
        The date and time when the related offer was applied. Used to check against an frequency type criteria in an offer's time criteria.
        Returns:
        The date and time when the related offer was applied.
      • setId

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

        public void setOfferId​(String offerId)
        The associated offer's id.
        Parameters:
        offerID - The associated offer's id.
      • setUser

        public void setUser​(UserTarget user)
        The identifying info of the user that used the related offer. Used to check against an Offer.maxUsesPerUser.
        Parameters:
        user - The identifying info of the user that used the related offer.
      • setOrderId

        public void setOrderId​(String orderId)
        The id of the order upon which the related offer was used. Used to check against an Offer.maxUsesPerOrder.
        Parameters:
        orderId - The id of the order upon which the related offer was used.
      • setSharedCode

        public void setSharedCode​(String sharedCode)
        The string of the shared code used to apply the related offer if one was used. Used to check against a SharedCode.maxUses.
        Parameters:
        sharedCode - The string of the shared code used to apply the related offer.
      • setDateApplied

        public void setDateApplied​(Instant dateApplied)
        The date and time when the related offer was applied. Used to check against an frequency type criteria in an offer's time criteria.
        Parameters:
        dateApplied - The date and time when the related offer was applied.
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object