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: 12.17.2
Syntax
public class RedemptionLimitService : IRedemptionLimitService, IDisposable

Constructors

RedemptionLimitService(PromotionInformationRepository, CurrentUserService)

Initializes a new instance of the RedemptionLimitService class.

Declaration
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()

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