Table of Contents

Class PriceService

Namespace
Dynamicweb.Ecommerce.Prices
Assembly
Dynamicweb.Ecommerce.dll

Service for managing prices.

public abstract class PriceService
Inheritance
PriceService
Inherited Members

Methods

Delete(IEnumerable<Price>)

Deletes the provided prices.

public virtual bool Delete(IEnumerable<Price> prices)

Parameters

prices IEnumerable<Price>

The prices to delete.

Returns

bool

Exceptions

ArgumentNullException

Throws exception if the prices are null.

Delete(IEnumerable<string>)

Deletes the provided price IDs.

public virtual bool Delete(IEnumerable<string> priceIds)

Parameters

priceIds IEnumerable<string>

The price IDs to delete.

Returns

bool

Exceptions

ArgumentNullException

Throws exception if the priceIds are null.

Delete(string)

Deletes the price by ID.

public virtual bool Delete(string priceId)

Parameters

priceId string

The ID of the price to delete.

Returns

bool

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 PriceProductSelection
isInformative bool

Returns

IEnumerable<Price>

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 Product
isInformative bool

Returns

IEnumerable<Price>

GetById(string)

Get the price by ID.

public virtual Price? GetById(string priceId)

Parameters

priceId string

The price ID.

Returns

Price

The matching price.

GetByProductId(string)

Gets the prices for a given product ID.

public virtual IEnumerable<Price> GetByProductId(string productId)

Parameters

productId string

The 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.

public virtual IEnumerable<Price> GetByProductIds(IEnumerable<string> productIds)

Parameters

productIds IEnumerable<string>

The IDs of the products.

Returns

IEnumerable<Price>

Exceptions

ArgumentNullException

Throws exception if the productIds are null.

MovePrices(IEnumerable<PriceMoveSetting>)

public virtual int MovePrices(IEnumerable<PriceMoveSetting> moveSettings)

Parameters

moveSettings IEnumerable<PriceMoveSetting>

Returns

int

Save(Price)

Saves the provided prices.

public virtual bool Save(Price price)

Parameters

price Price

The prices to save.

Returns

bool

Exceptions

ArgumentNullException

Throws exception if the price are null.

To top