Class GiftItemFactory
Class to get the applicable gift items for the given promotion.
Inheritance
System.Object
GiftItemFactory
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Commerce.Marketing
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0Syntax
public class GiftItemFactory
Constructors
GiftItemFactory(IContentLoader, IPriceService, IOrderGroupFactory)
Initializes a new instance of the GiftItemFactory class.
Declaration
public GiftItemFactory(IContentLoader contentLoader, IPriceService priceService, IOrderGroupFactory orderGroupFactory)
Parameters
Type | Name | Description |
---|---|---|
EPiServer.IContentLoader | contentLoader | The content loader service. |
IPriceService | priceService | The price service. |
IOrderGroupFactory | orderGroupFactory | The order group factory. |
Methods
CreateGiftItems(IEnumerable<ContentReference>, PromotionProcessorContext)
Creates gift items for the entries specified in System.Collections.Generic.IEnumerable<T>.
Declaration
public virtual AffectedEntries CreateGiftItems(IEnumerable<ContentReference> entryLinks, PromotionProcessorContext processorContext)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<EPiServer.Core.ContentReference> | entryLinks | The entry links. |
PromotionProcessorContext | processorContext | The context for the promotion processor. |
Returns
Type | Description |
---|---|
AffectedEntries | List of effected item which contain gift items. One AffectedEntries for each EPiServer.Core.ContentReference. |
CreateGiftLineItem(EntryContentBase, PromotionProcessorContext)
Creates the gift line item.
Declaration
protected virtual ILineItem CreateGiftLineItem(EntryContentBase entryContent, PromotionProcessorContext processorContext)
Parameters
Type | Name | Description |
---|---|---|
EntryContentBase | entryContent | The entry content. |
PromotionProcessorContext | processorContext | The context for the promotion processor. |
Returns
Type | Description |
---|---|
ILineItem | The line item. |