Class DefaultVoucherOfferUsageValidator
java.lang.Object
com.broadleafcommerce.promotion.offer.service.validation.DefaultVoucherOfferUsageValidator
- All Implemented Interfaces:
VoucherOfferUsageValidator
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultVoucherOfferUsageValidator(OfferCandidateService<? extends Offer> offerCandidateService, OrderAndItemOfferHelper helper, com.broadleafcommerce.common.extension.TypeFactory offerFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected OrderAndItemOfferHelperprotected OfferCandidateService<? extends Offer>protected com.broadleafcommerce.common.extension.TypeFactorycom.broadleafcommerce.promotion.offer.client.web.context.OfferAndOfferCodeUsageValidationResultvalidateVoucherOfferUsages(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:VoucherOfferUsageValidatorWith the provided order, determine which voucher offers are no longer usable in a given context.- Specified by:
validateVoucherOfferUsagesin 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()
-