Class RedemptionLimitService
Class to get the remaining redemption of given promotions for a given customer.
Inheritance
System.Object
RedemptionLimitService
Namespace: EPiServer.Commerce.Marketing
Assembly: EPiServer.Business.Commerce.dll
Version: 14.26.0Syntax
public class RedemptionLimitService : Object, 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. |
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