Class PriceService
- Namespace
- Dynamicweb.Ecommerce.Prices
- Assembly
- Dynamicweb.Ecommerce.dll
Service for managing prices.
- Inheritance
-
Price
Service
- Implements
- Inherited Members
Properties
Info
Information about the object cache
Property Value
Methods
ClearCache()
Resets all keys to the default value for objects stored in the object cache
ClearCache(IEnumerable<string>)
Resets the specified keys to the default value for objects stored in the object cache
Parameters
keys
IEnumerable<string>Keys to reset
ClearCache(string)
Resets the specified key to the default value for objects stored in the object cache
Parameters
key
stringKey to reset
Delete(IEnumerable<Price>)
Deletes the provided prices.
Parameters
prices
IEnumerable<Price>The prices to delete.
Returns
Exceptions
- Argument
Null Exception Throws exception if the
prices
are null.
Delete(IEnumerable<string>)
Deletes the provided price IDs.
Parameters
priceIds
IEnumerable<string>The price IDs to delete.
Returns
Exceptions
- Argument
Null Exception Throws exception if the
priceIds
are null.
Delete(string)
Deletes the price by ID.
Parameters
priceId
stringThe ID of the price to delete.
Returns
FindPrices(PriceContext, PriceProductSelection, bool)
Gets the prices valid for the provided context and product selection.
public virtual IEnumerable<Price> FindPrices(PriceContext context, PriceProductSelection selection, bool isInformative)
Parameters
context
PriceContext selection
PriceProduct Selection isInformative
bool
Returns
FindQuantityPrices(PriceContext, Product, bool)
Gets the quantity prices for a product in a given context.
public virtual IEnumerable<Price> FindQuantityPrices(PriceContext context, Product product, bool isInformative)
Parameters
context
PriceContext product
ProductisInformative
bool
Returns
GetById(string)
Get the price by ID.
Parameters
priceId
stringThe price ID.
Returns
- Price
The matching price.
GetByProductId(string)
Gets the prices for a given product ID.
Parameters
productId
stringThe product ID to filter by.
Returns
- IEnumerable<Price>
The prices matching the given product ID.
GetByProductIds(IEnumerable<string>)
Gets the prices for the provided product IDs.
Parameters
productIds
IEnumerable<string>The IDs of the products.
Returns
Exceptions
- Argument
Null Exception Throws exception if the
productIds
are null.
MovePrices(IEnumerable<PriceMoveSetting>)
Parameters
moveSettings
IEnumerable<PriceMove >Setting
Returns
Save(Price)
Saves the provided prices.
Parameters
price
PriceThe prices to save.
Returns
Exceptions
- Argument
Null Exception Throws exception if the
price
are null.
SetCacheType<TObjectCache>()
Changes the storage container
Type Parameters
TObjectCache