Class GetFreeItemsProcessorBase<TEntryPromotion>
Base class for processors for promotions giving free items discount.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Commerce.Marketing.Promotions
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0Syntax
public abstract class GetFreeItemsProcessorBase<TEntryPromotion> : EntryPromotionProcessorBase<TEntryPromotion>, IPromotionProcessor where TEntryPromotion : EntryPromotion
Type Parameters
Name | Description |
---|---|
TEntryPromotion |
Constructors
GetFreeItemsProcessorBase(CollectionTargetEvaluator, FulfillmentEvaluator, LocalizationService, Func<TEntryPromotion, PurchaseQuantity>, RedemptionDescriptionFactory)
Creates an instance of GetFreeItemsProcessorBase<TEntryPromotion>.
Declaration
public GetFreeItemsProcessorBase(CollectionTargetEvaluator targetEvaluator, FulfillmentEvaluator fulfillmentEvaluator, LocalizationService localizationService, Func<TEntryPromotion, PurchaseQuantity> conditionGetter, RedemptionDescriptionFactory redemptionDescriptionFactory)
Parameters
Type | Name | Description |
---|---|---|
CollectionTargetEvaluator | targetEvaluator | The service that is used to evaluate an order against a promotion's target properties. |
FulfillmentEvaluator | fulfillmentEvaluator | The service that is used to evaluate the fulfillment status of the promotion. |
EPiServer.Framework.Localization.LocalizationService | localizationService | The localization service. |
System.Func<TEntryPromotion, PurchaseQuantity> | conditionGetter | Delegate to get the condition from the promotion. |
RedemptionDescriptionFactory | redemptionDescriptionFactory | Factory for creating RedemptionDescriptions. |
Methods
CanBeFulfilled(TEntryPromotion, PromotionProcessorContext)
Declaration
protected override bool CanBeFulfilled(TEntryPromotion promotionData, PromotionProcessorContext context)
Parameters
Type | Name | Description |
---|---|---|
TEntryPromotion | promotionData | |
PromotionProcessorContext | context |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
Evaluate(TEntryPromotion, PromotionProcessorContext)
Declaration
protected override RewardDescription Evaluate(TEntryPromotion promotionData, PromotionProcessorContext context)
Parameters
Type | Name | Description |
---|---|---|
TEntryPromotion | promotionData | |
PromotionProcessorContext | context |
Returns
Type | Description |
---|---|
RewardDescription |
Overrides
GetAffectedEntries(TEntryPromotion, PromotionProcessorContext, IEnumerable<String>)
Gets the affected entries.
Declaration
protected abstract AffectedEntries GetAffectedEntries(TEntryPromotion promotionData, PromotionProcessorContext context, IEnumerable<string> applicableCodes)
Parameters
Type | Name | Description |
---|---|---|
TEntryPromotion | promotionData | The promotion used to evaluate the product codes. |
PromotionProcessorContext | context | The context for the promotion processor evaluation. |
System.Collections.Generic.IEnumerable<System.String> | applicableCodes | A collection of product codes to be checked against a promotion. |
Returns
Type | Description |
---|---|
AffectedEntries |
GetPromotionItems(TEntryPromotion)
Declaration
protected override PromotionItems GetPromotionItems(TEntryPromotion promotionData)
Parameters
Type | Name | Description |
---|---|---|
TEntryPromotion | promotionData |
Returns
Type | Description |
---|---|
PromotionItems |
Overrides
GetRedemptions(TEntryPromotion, PromotionProcessorContext, IEnumerable<String>)
Gets all AffectedEntriess affected by a given promotion.
Declaration
protected override IEnumerable<RedemptionDescription> GetRedemptions(TEntryPromotion promotionData, PromotionProcessorContext context, IEnumerable<string> applicableCodes)
Parameters
Type | Name | Description |
---|---|---|
TEntryPromotion | promotionData | The promotion used to evaluate the product codes. |
PromotionProcessorContext | context | The context for the promotion processor evaluation. |
System.Collections.Generic.IEnumerable<System.String> | applicableCodes | A collection of product codes to be checked against a promotion. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<RedemptionDescription> | A list of applicable RedemptionDescriptions. |
Overrides
NotFulfilledRewardDescription(TEntryPromotion, PromotionProcessorContext, FulfillmentStatus)
Declaration
protected override RewardDescription NotFulfilledRewardDescription(TEntryPromotion promotionData, PromotionProcessorContext context, FulfillmentStatus fulfillmentStatus)
Parameters
Type | Name | Description |
---|---|---|
TEntryPromotion | promotionData | |
PromotionProcessorContext | context | |
FulfillmentStatus | fulfillmentStatus |
Returns
Type | Description |
---|---|
RewardDescription |