Class DefaultVoucherOfferUsageValidator

java.lang.Object
com.broadleafcommerce.promotion.offer.service.validation.DefaultVoucherOfferUsageValidator
All Implemented Interfaces:
VoucherOfferUsageValidator

public class DefaultVoucherOfferUsageValidator extends Object implements VoucherOfferUsageValidator
  • Constructor Details

  • 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 interface VoucherOfferUsageValidator
      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

      protected OfferCandidateService<? extends Offer> getOfferCandidateService()
    • getHelper

      protected OrderAndItemOfferHelper getHelper()
    • getOfferFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getOfferFactory()