java.lang.Object
com.broadleafcommerce.promotion.offer.client.web.context.OfferUsabilityInfo

public class OfferUsabilityInfo extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
     
    boolean
     
     
    int
    The number of uses left for this info's related offer.
    int
    The number of uses left for the current customer for this info's related offer.
    int
     
    boolean
    If this offer can be used based on its max uses.
    boolean
    Whether this offer has a maximum limit to the number of times it can be used as defined by its max uses.
    boolean
    Whether this offer has a maximum limit to the number of times it can be used by a single user.
    void
    setCanUse(boolean canUse)
    If this offer can be used based on its max uses.
    void
    setHasMaxUsage(boolean hasMaxUsage)
    Whether this offer has a maximum limit to the number of times it can be used as defined by its max uses.
    void
    setHasMaxUsagePerUser(boolean hasMaxUsagePerUser)
    Whether this offer has a maximum limit to the number of times it can be used by a single user.
    void
    setOfferId(String offerId)
     
    void
    setUsesLeft(int usesLeft)
    The number of uses left for this info's related offer.
    void
    setUsesLeftPerCustomer(int usesLeftPerCustomer)
    The number of uses left for the current customer for this info's related offer.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • OfferUsabilityInfo

      public OfferUsabilityInfo()
  • Method Details

    • getOfferId

      public String getOfferId()
    • isCanUse

      public boolean isCanUse()
      If this offer can be used based on its max uses.
      Returns:
      If this code can be used for this offer based on it's max uses.
    • isHasMaxUsage

      public boolean isHasMaxUsage()
      Whether this offer has a maximum limit to the number of times it can be used as defined by its max uses.
      Returns:
      Whether this offer has a maximum limit to the number of times it can be used as defined by its max uses.
    • getUsesLeft

      public int getUsesLeft()
      The number of uses left for this info's related offer. This is calculated by subtracting the number of times the offer has been used from its max uses.
      Returns:
      The number of uses left for this info's related offer.
    • isHasMaxUsagePerUser

      public boolean isHasMaxUsagePerUser()
      Whether this offer has a maximum limit to the number of times it can be used by a single user.
      Returns:
      Whether this offer has a maximum limit to the number of times it can be used by a single user.
    • getUsesLeftPerCustomer

      public int getUsesLeftPerCustomer()
      The number of uses left for the current customer for this info's related offer. This is calculated by subtracting the number of times the offer has been used by the customer from its max uses per customer.
      Returns:
      The number of uses left for the current customer for this info's related offer.
    • setOfferId

      public void setOfferId(String offerId)
    • setCanUse

      public void setCanUse(boolean canUse)
      If this offer can be used based on its max uses.
      Parameters:
      canUse - If this code can be used for this offer based on it's max uses.
    • setHasMaxUsage

      public void setHasMaxUsage(boolean hasMaxUsage)
      Whether this offer has a maximum limit to the number of times it can be used as defined by its max uses.
      Parameters:
      hasMaxUsage - Whether this offer has a maximum limit to the number of times it can be used as defined by its max uses.
    • setUsesLeft

      public void setUsesLeft(int usesLeft)
      The number of uses left for this info's related offer. This is calculated by subtracting the number of times the offer has been used from its max uses.
      Parameters:
      usesLeft - The number of uses left for this info's related offer.
    • setHasMaxUsagePerUser

      public void setHasMaxUsagePerUser(boolean hasMaxUsagePerUser)
      Whether this offer has a maximum limit to the number of times it can be used by a single user.
      Parameters:
      hasMaxUsagePerUser - Whether this offer has a maximum limit to the number of times it can be used by a single user.
    • setUsesLeftPerCustomer

      public void setUsesLeftPerCustomer(int usesLeftPerCustomer)
      The number of uses left for the current customer for this info's related offer. This is calculated by subtracting the number of times the offer has been used by the customer from its max uses per customer.
      Parameters:
      usesLeftPerCustomer - The number of uses left for the current customer for this info's related offer.
    • 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