java.lang.Object
com.broadleafcommerce.order.common.domain.Voucher
All Implemented Interfaces:
Serializable

public class Voucher extends Object implements Serializable
Represents a voucher for a Cart or an Order containing a voucher code to use for a future purchase.
Author:
Sunny Yu
See Also:
  • Constructor Details

    • Voucher

      public Voucher()
  • Method Details

    • getOfferId

      public String getOfferId()
      The OfferRef.getId() of the voucher offer.
    • getVoucherCampaignId

      public String getVoucherCampaignId()
      The id of the voucher campaign, which will be used for voucher code generation later on.
    • getGeneratedCampaignCode

      public String getGeneratedCampaignCode()
      The generated campaign code for this voucher.
    • isValidationSuccessful

      public boolean isValidationSuccessful()
      Indicates whether the post-checkout voucher validation was successful.
    • isGenerationSuccessful

      public boolean isGenerationSuccessful()
      Indicates whether the post-checkout voucher code generation was successful.
    • getErrorMessage

      public String getErrorMessage()
      The error message from voucher code generation for this voucher.
    • getAttributes

      public Map<String,Object> getAttributes()
      Map holding any additional attributes that do not match any defined properties.
    • setOfferId

      public void setOfferId(String offerId)
      The OfferRef.getId() of the voucher offer.
    • setVoucherCampaignId

      public void setVoucherCampaignId(String voucherCampaignId)
      The id of the voucher campaign, which will be used for voucher code generation later on.
    • setGeneratedCampaignCode

      public void setGeneratedCampaignCode(String generatedCampaignCode)
      The generated campaign code for this voucher.
    • setValidationSuccessful

      public void setValidationSuccessful(boolean validationSuccessful)
      Indicates whether the post-checkout voucher validation was successful.
    • setGenerationSuccessful

      public void setGenerationSuccessful(boolean generationSuccessful)
      Indicates whether the post-checkout voucher code generation was successful.
    • setErrorMessage

      public void setErrorMessage(String errorMessage)
      The error message from voucher code generation for this voucher.
    • setAttributes

      public void setAttributes(Map<String,Object> attributes)
      Map holding any additional attributes that do not match any defined properties.
    • 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