Previous Docs Version

The documentation you are viewing is for a previous version of the Vendr product. Click here to jump to the current stable version.

DiscountService

API reference for DiscountService in Vendr, the eCommerce solution for Umbraco v8+

DiscountService

public class DiscountService : EntityServiceBase, IDiscountService

Inheritance

Namespace

Constructors

DiscountService

public DiscountService(IRepositoryFactory repositoryFactory, IUnitOfWorkProvider uowProvider, 
    ILogger logger, ICache cache, IEntityStateCacheAccessor entityStateCacheAccessor, 
    DiscountRuleProviderCollection discountRuleProviders, 
    DiscountRewardProviderCollection discountRewardProviders)

Methods

DeleteDiscount (1 of 2)

public void DeleteDiscount(Guid id)

DeleteDiscount (2 of 2)

public void DeleteDiscount(Discount entity)

DiscountCodeExists

public bool DiscountCodeExists(Guid storeId, string code)

DiscountExists

public bool DiscountExists(Guid storeId, string alias)

GetActiveDiscounts

public IEnumerable<DiscountReadOnly> GetActiveDiscounts(Guid storeId)

GetDiscount (1 of 2)

public DiscountReadOnly GetDiscount(Guid id)

GetDiscount (2 of 2)

public DiscountReadOnly GetDiscount(Guid storeId, string alias)

GetDiscountByCode

public DiscountReadOnly GetDiscountByCode(Guid storeId, string code)

GetDiscountRewardProviderDefinitions

public IEnumerable<DiscountRewardProviderDefinition> GetDiscountRewardProviderDefinitions()

GetDiscountRewardProviderScaffold

public DiscountRewardProviderScaffold GetDiscountRewardProviderScaffold(string alias)

GetDiscountRuleProviderDefinitions

public IEnumerable<DiscountRuleProviderDefinition> GetDiscountRuleProviderDefinitions()

GetDiscountRuleProviderScaffold

public DiscountRuleProviderScaffold GetDiscountRuleProviderScaffold(string alias)

GetDiscounts

public IEnumerable<DiscountReadOnly> GetDiscounts(Guid storeId)

InvalidateEntityCache

public void InvalidateEntityCache(Guid entityId)

SaveDiscount

public void SaveDiscount(Discount entity)

SortDiscounts

public void SortDiscounts(Guid[] sortedIds)

ValidateDiscountCode

public bool ValidateDiscountCode(Guid storeId, string code)

Edit this page on GitHub

Site + logo design © 2025 Outfield Digital Ltd. Content contributions licensed under MIT.
Vendr® is a Registered Trademark of Outfield Digital Ltd.