Interface OfferUserService
- All Known Implementing Classes:
DefaultOfferUserService
public interface OfferUserService
Helper methods around users for offers. Contains methods to determine if an offer has met max
usage for a given order and context.
- Author:
- Chad Harchar (charchar)
-
Method Summary
Modifier and TypeMethodDescriptionbuildUserTargetsForCustomerContext
(com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext) Build and return a list ofUserTargets
based on the information provided in theCustomerContext
.buildUserTargetsForOfferCustomerContext
(Offer offer, com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) For the provided customer information, check if there are no more usages for the provided offer available.
-
Method Details
-
buildUserTargetsForCustomerContext
@NonNull Set<UserTarget> buildUserTargetsForCustomerContext(@Nullable com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext) Build and return a list ofUserTargets
based on the information provided in theCustomerContext
.- Parameters:
customerContext
- TheCustomerContext
with which to buildUserTargets
- Returns:
- a set of
UserTargets
-
buildUserTargetsForOfferCustomerContext
UserTarget buildUserTargetsForOfferCustomerContext(@NonNull Offer offer, @Nullable com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) For the provided customer information, check if there are no more usages for the provided offer available.- Parameters:
customerContext
- context information for the customeroffer
- the offer that we are checking usage againstcontextInfo
- context information around sandbox and multitenant state- Returns:
- whether this offer has met it's max user usage for the given order and context info
-