Table of Contents

Class DiscountService

Namespace
Dynamicweb.Ecommerce.Orders.Adjustments
Assembly
Dynamicweb.Ecommerce.dll
[Experimental("DWEX100001")]
public abstract class DiscountService : ICacheStorage<string, Discount>, ICacheStorage<string>, ICacheStorage
Inheritance
DiscountService
Implements
Inherited Members

Properties

Info

Information about the object cache

public abstract CacheInformation Info { get; }

Property Value

CacheInformation

Methods

ClearCache()

Resets all keys to the default value for objects stored in the object cache

public abstract void ClearCache()

ClearCache(IEnumerable<string>)

Resets the specified keys to the default value for objects stored in the object cache

public abstract void ClearCache(IEnumerable<string> keys)

Parameters

keys IEnumerable<string>

Keys to reset

ClearCache(string)

Resets the specified key to the default value for objects stored in the object cache

public abstract void ClearCache(string key)

Parameters

key string

Key to reset

DeleteDiscountsById(IEnumerable<string>)

public abstract void DeleteDiscountsById(IEnumerable<string> ids)

Parameters

ids IEnumerable<string>

GetDiscountById(string)

public abstract Discount? GetDiscountById(string key)

Parameters

key string

Returns

Discount

GetDiscounts()

public abstract IEnumerable<Discount> GetDiscounts()

Returns

IEnumerable<Discount>

GetProductDiscountPrice(PriceContext, PriceProductSelection)

public abstract IPriceInfo GetProductDiscountPrice(PriceContext context, PriceProductSelection selection)

Parameters

context PriceContext
selection PriceProductSelection

Returns

IPriceInfo

Save(Discount)

public abstract void Save(Discount discount)

Parameters

discount Discount

SetCache(Discount)

public abstract void SetCache(Discount discount)

Parameters

discount Discount

SetCacheType<TObjectCache>()

Changes the storage container

public abstract void SetCacheType<TObjectCache>() where TObjectCache : ServiceCache<string, Discount>

Type Parameters

TObjectCache
To top