November Happy Hour will be moved to Thursday December 5th.

Class RedemptionLimitService

Class to get the remaining redemption of given promotions for a given customer.

Inheritance
System.Object
RedemptionLimitService
Implements
System.IDisposable
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.0
Syntax
public class RedemptionLimitService : IRedemptionLimitService, IDisposable

Constructors

RedemptionLimitService(PromotionInformationRepository)

Initializes a new instance of the RedemptionLimitService class.

Declaration
public RedemptionLimitService(PromotionInformationRepository promotionInformationRepository)
Parameters
Type Name Description
PromotionInformationRepository promotionInformationRepository

The promotion information repository.

RedemptionLimitService(PromotionInformationRepository, CurrentUserService)

Initializes a new instance of the RedemptionLimitService class.

Declaration
[Obsolete("This constructor is no longer used. Use the constructor without CurrentUserService instead. Will remain at least until May 2020.")]
public RedemptionLimitService(PromotionInformationRepository promotionInformationRepository, CurrentUserService currentUserService)
Parameters
Type Name Description
PromotionInformationRepository promotionInformationRepository

The promotion information repository.

CurrentUserService currentUserService

The current user service.

RedemptionLimitService(IContentEvents, IContentLoader, PromotionInformationRepository, CurrentUserService)

Initializes a new instance of the RedemptionLimitService class.

Declaration
[Obsolete("This constructor is no longer used. Use the other constructor instead. Will remain at least until August 2019.")]
public RedemptionLimitService(IContentEvents contentEvents, IContentLoader contentLoader, PromotionInformationRepository promotionInformationRepository, CurrentUserService currentUserService)
Parameters
Type Name Description
EPiServer.Core.IContentEvents contentEvents

The content events.

EPiServer.IContentLoader contentLoader

The content loader.

PromotionInformationRepository promotionInformationRepository

The promotion information repository.

CurrentUserService currentUserService

The current user service.

Methods

Dispose()

Declaration
public void Dispose()

GetContactById(Guid)

Declaration
protected virtual CustomerContact GetContactById(Guid customerId)
Parameters
Type Name Description
System.Guid customerId
Returns
Type Description
CustomerContact

GetRemainingRedemptions(IEnumerable<PromotionData>, Guid, Int32)

Get the remaining redemptions for the given promotions and customer and order form.

Declaration
public virtual IDictionary<Guid, int> GetRemainingRedemptions(IEnumerable<PromotionData> promotions, Guid customerId, int orderFormId)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<PromotionData> promotions

The promotions to retrieve redemptions for.

System.Guid customerId

The customer Id.

System.Int32 orderFormId

The current order form Id.

Returns
Type Description
System.Collections.Generic.IDictionary<System.Guid, System.Int32>

A dictionary containing the number of remaining redemptions for each promotion.

Implements

System.IDisposable