Class CampaignInfoExtractor

Helper class to work with campaign item info

Inheritance
System.Object
CampaignInfoExtractor
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: 10.8.0
Syntax
public class CampaignInfoExtractor

Constructors

CampaignInfoExtractor()

Declaration
public CampaignInfoExtractor()

Methods

GetEffectiveStatus(PromotionData, SalesCampaign)

Gets the effective CampaignItemStatus of a promotion.

Declaration
public virtual CampaignItemStatus GetEffectiveStatus(PromotionData promotion, SalesCampaign parentCampaign)
Parameters
Type Name Description
PromotionData promotion

The promotion.

SalesCampaign parentCampaign

The parent campaign.

Returns
Type Description
CampaignItemStatus

Active if the promotion's CampaignItemStatus is Active and also have an existing schedule with applicable dates, else Inactive.

GetEffectiveValidFrom(PromotionData, SalesCampaign)

Gets the effective valid from.

Declaration
public virtual DateTime GetEffectiveValidFrom(PromotionData promotion, SalesCampaign parentCampaign)
Parameters
Type Name Description
PromotionData promotion

The promotion.

SalesCampaign parentCampaign

The parent campaign.

Returns
Type Description
System.DateTime

GetEffectiveValidUntil(PromotionData, SalesCampaign)

Gets the effective valid until.

Declaration
public virtual DateTime GetEffectiveValidUntil(PromotionData promotion, SalesCampaign parentCampaign)
Parameters
Type Name Description
PromotionData promotion

The promotion.

SalesCampaign parentCampaign

The parent campaign.

Returns
Type Description
System.DateTime

GetStatusFromDates(DateTime, DateTime)

Gets the status from valid dates.

Declaration
public virtual CampaignItemStatus GetStatusFromDates(DateTime validFrom, DateTime validUntil)
Parameters
Type Name Description
System.DateTime validFrom

The valid from.

System.DateTime validUntil

The valid until.

Returns
Type Description
CampaignItemStatus