Class PromotionContext

Contains content of current promotion excution runtime.

Inheritance
System.Object
PromotionContext
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: Mediachase.Commerce.Marketing
Assembly: Mediachase.Commerce.dll
Version: 10.8.0
Syntax
public class PromotionContext

Constructors

PromotionContext(IDictionary<String, Object>, PromotionEntriesSet, PromotionEntriesSet)

Initializes a new instance of the PromotionContext class.

Declaration
public PromotionContext(IDictionary<string, object> context, PromotionEntriesSet sourceEntries, PromotionEntriesSet targetEntries)
Parameters
Type Name Description
System.Collections.Generic.IDictionary<System.String, System.Object> context

The context.

PromotionEntriesSet sourceEntries

The source entries.

PromotionEntriesSet targetEntries

The target entries.

Properties

Context

Gets the context holder.

Declaration
public IDictionary<string, object> Context { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.String, System.Object>

The context.

Coupons

Gets or sets the coupons.

Declaration
public List<string> Coupons { get; set; }
Property Value
Type Description
System.Collections.Generic.List<System.String>

The coupons.

CurrentPromotion

Gets the promotion currently being evaluated.

Declaration
public PromotionItem CurrentPromotion { get; set; }
Property Value
Type Description
PromotionItem

The promotion.

CustomerId

Gets or sets the customer id.

Declaration
public Guid CustomerId { get; set; }
Property Value
Type Description
System.Guid

The customer id.

ExclusiveGroups

Keeps track of groups that have exclusive discount already

Declaration
public List<string> ExclusiveGroups { get; set; }
Property Value
Type Description
System.Collections.Generic.List<System.String>

The exclusive groups.

PromotionResult

Gets the promotion result which contains current results.

Declaration
public PromotionResult PromotionResult { get; }
Property Value
Type Description
PromotionResult

The promotion result.

ReservedCount

Gets the reserved count for the current promotion.

Declaration
public int ReservedCount { get; }
Property Value
Type Description
System.Int32

The reserved count.

Segments

Gets or sets the segments.

Declaration
public List<int> Segments { get; set; }
Property Value
Type Description
System.Collections.Generic.List<System.Int32>

The segments.

SourceEntriesSet

Gets or sets the entries.

Declaration
public PromotionEntriesSet SourceEntriesSet { get; set; }
Property Value
Type Description
PromotionEntriesSet

The entries.

TargetEntriesSet

Gets or sets the entries.

Declaration
public PromotionEntriesSet TargetEntriesSet { get; set; }
Property Value
Type Description
PromotionEntriesSet

The entries.

TargetGroup

Gets or sets the target group.

Declaration
public string TargetGroup { get; set; }
Property Value
Type Description
System.String

The target group.

Methods

AddPromotionItemRecord(PromotionItemRecord)

Adds the promotion item record.

Declaration
public void AddPromotionItemRecord(PromotionItemRecord record)
Parameters
Type Name Description
PromotionItemRecord record

The record.

CommitRecords()

Commits the records.

Declaration
public void CommitRecords()

RejectRecords()

Rejects the records.

Declaration
public void RejectRecords()