Try our conversational search powered by Generative AI!

Class DefaultPriceOptimizer

Eliminates overlapping values and assigns MaxQuantity values to a set of price values. This type/member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Inheritance
System.Object
DefaultPriceOptimizer
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Pricing
Assembly: Mediachase.Commerce.dll
Version: 13.30.0
Syntax
public class DefaultPriceOptimizer : IPriceOptimizer

Constructors

DefaultPriceOptimizer()

Declaration
public DefaultPriceOptimizer()

Methods

OptimizePrices(IEnumerable<IPriceValue>)

Returns an optimized list of price values representing the same pricing structure as the supplied price value list.

Declaration
public IEnumerable<IOptimizedPriceValue> OptimizePrices(IEnumerable<IPriceValue> prices)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IPriceValue> prices

The original price list. All values in the list are expected to be for the same catalog entry.

Returns
Type Description
System.Collections.Generic.IEnumerable<IOptimizedPriceValue>

An optimized list.

Remarks

The optimized list will not have any overlapping values, and tiered pricing on quantity will always decrease or stay the same on price as the minimum quantity increases. Two price values overlap if they are for the same catalog entry, market, currency, and customer pricing, and have overlapping validity date ranges. All overlaps are resolved by taking the lower unit price.

Implements