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

Constructors

RedemptionLimitService(IContentEvents, IContentLoader, PromotionInformationRepository, CurrentUserService)

Initializes a new instance of the RedemptionLimitService class.

Declaration
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