Class EntryPromotionProcessorBase<TEntryPromotion>
Responsible for evaluating if an entry promotion is valid for a specific IOrderForm.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Commerce.Marketing
Assembly: EPiServer.Business.Commerce.dll
Version: 12.17.2Syntax
public abstract class EntryPromotionProcessorBase<TEntryPromotion> : PromotionProcessorBase<TEntryPromotion>, IPromotionProcessor where TEntryPromotion : EntryPromotion
Type Parameters
| Name | Description |
|---|---|
| TEntryPromotion |
Constructors
EntryPromotionProcessorBase(RedemptionDescriptionFactory)
Initializes a new instance of an EntryPromotionProcessorBase<TEntryPromotion>.
Declaration
protected EntryPromotionProcessorBase(RedemptionDescriptionFactory redemptionDescriptionFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| RedemptionDescriptionFactory | redemptionDescriptionFactory | Factory for creating RedemptionDescriptions. |
Methods
CreateRedemptionDescription(AffectedEntries)
Creates a RedemptionDescription using affected AffectedEntries.
Declaration
protected virtual RedemptionDescription CreateRedemptionDescription(AffectedEntries affectedEntries)
Parameters
| Type | Name | Description |
|---|---|---|
| AffectedEntries | affectedEntries | The affected entries. |
Returns
| Type | Description |
|---|---|
| RedemptionDescription |
GetMaxRedemptions(RedemptionLimitsData)
Gets the maximum number of redemptions according to the provided configuration.
Declaration
[Obsolete("This method is no longer used. Use the PromotionProcessorContext.GetRemainingRedemptions(PromotionData) instead. This method will remain at least until October 2019.")]
protected virtual int GetMaxRedemptions(RedemptionLimitsData redemptions)
Parameters
| Type | Name | Description |
|---|---|---|
| RedemptionLimitsData | redemptions | Contains information regarding Redemption Limits on PromotionData. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Max redemptions. |
GetRedemptions(TEntryPromotion, PromotionProcessorContext, IEnumerable<String>)
Gets all AffectedEntriess affected by a given promotion.
Declaration
protected virtual 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. |