Class OfferAndOfferCodeUsageValidationResult
java.lang.Object
com.broadleafcommerce.promotion.offer.client.web.context.OfferAndOfferCodeUsageValidationResult
- All Implemented Interfaces:
Serializable
DTO holding the resulting information about the validity of offers and offer code usages. This is
mainly used for the purposes of holding and transferring information about the validity of offers
and offer codes upon checkout.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
void
boolean
The list of offer codes which are no longer valid.The list of offer id's which are no longer valid.A map which holds pairings of Strings in invalidOfferRefIds and invalidOfferCodes as key values to messages as values which hold a description of why an offer is no longer valid.int
hashCode()
boolean
If this is set to false, one or more offers or offer codes is no longer valid and need to be removed from the list of previously applied offers.void
setInvalidOfferCodes
(List<String> invalidOfferCodes) The list of offer codes which are no longer valid.void
setInvalidOfferRefIds
(List<String> invalidOfferRefIds) The list of offer id's which are no longer valid.void
setUsageValid
(boolean isUsageValid) If this is set to false, one or more offers or offer codes is no longer valid and need to be removed from the list of previously applied offers.void
setValidationFailureMessages
(Map<String, String> validationFailureMessages) A map which holds pairings of Strings in invalidOfferRefIds and invalidOfferCodes as key values to messages as values which hold a description of why an offer is no longer valid.toString()
-
Constructor Details
-
OfferAndOfferCodeUsageValidationResult
public OfferAndOfferCodeUsageValidationResult()
-
-
Method Details
-
combineValidationResults
-
isUsageValid
public boolean isUsageValid()If this is set to false, one or more offers or offer codes is no longer valid and need to be removed from the list of previously applied offers. Default is true.- Returns:
- Whether the offer usages are valid.
-
getInvalidOfferRefIds
The list of offer id's which are no longer valid.- Returns:
- The list of offer id's which are no longer valid.
-
getInvalidOfferCodes
The list of offer codes which are no longer valid.- Returns:
- The list of offer codes which are no longer valid.
-
getValidationFailureMessages
A map which holds pairings of Strings in invalidOfferRefIds and invalidOfferCodes as key values to messages as values which hold a description of why an offer is no longer valid.- Returns:
- The map of error messages and their tie to an invalid offer.
-
setUsageValid
public void setUsageValid(boolean isUsageValid) If this is set to false, one or more offers or offer codes is no longer valid and need to be removed from the list of previously applied offers. Default is true.- Parameters:
isUsageValid
- Whether the offer usages are valid.
-
setInvalidOfferRefIds
The list of offer id's which are no longer valid.- Parameters:
invalidOfferRefIds
- The list of offer id's which are no longer valid.
-
setInvalidOfferCodes
The list of offer codes which are no longer valid.- Parameters:
invalidOfferCodes
- The list of offer codes which are no longer valid.
-
setValidationFailureMessages
A map which holds pairings of Strings in invalidOfferRefIds and invalidOfferCodes as key values to messages as values which hold a description of why an offer is no longer valid.- Parameters:
validationFailureMessages
- The map of error messages and their tie to an invalid offer.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-