Class DefaultVoucherOfferUsageValidator
java.lang.Object
com.broadleafcommerce.promotion.offer.service.validation.DefaultVoucherOfferUsageValidator
- All Implemented Interfaces:
VoucherOfferUsageValidator
-
Constructor Summary
ConstructorDescriptionDefaultVoucherOfferUsageValidator
(OfferCandidateService<? extends Offer> offerCandidateService, OrderAndItemOfferHelper helper, com.broadleafcommerce.common.extension.TypeFactory offerFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected OrderAndItemOfferHelper
protected OfferCandidateService<? extends Offer>
protected com.broadleafcommerce.common.extension.TypeFactory
com.broadleafcommerce.promotion.offer.client.web.context.OfferAndOfferCodeUsageValidationResult
validateVoucherOfferUsages
(EnhancedOrder order, boolean isPostCheckout, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) With the provided order, determine which voucher offers are no longer usable in a given context.
-
Constructor Details
-
DefaultVoucherOfferUsageValidator
public DefaultVoucherOfferUsageValidator(OfferCandidateService<? extends Offer> offerCandidateService, OrderAndItemOfferHelper helper, com.broadleafcommerce.common.extension.TypeFactory offerFactory)
-
-
Method Details
-
validateVoucherOfferUsages
public com.broadleafcommerce.promotion.offer.client.web.context.OfferAndOfferCodeUsageValidationResult validateVoucherOfferUsages(@NonNull EnhancedOrder order, @NonNull boolean isPostCheckout, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Description copied from interface:VoucherOfferUsageValidator
With the provided order, determine which voucher offers are no longer usable in a given context.- Specified by:
validateVoucherOfferUsages
in interfaceVoucherOfferUsageValidator
- Parameters:
order
- The order with offers to check for usability.context
- Context information around sandbox and multitenant state.- Returns:
- A DTO holding the validation results on the offers.
-
getOfferCandidateService
-
getHelper
-
getOfferFactory
protected com.broadleafcommerce.common.extension.TypeFactory getOfferFactory()
-