Class LineItemQuantityValidator

Processes inventory requests for InventoryRecord.

Inheritance
System.Object
LineItemQuantityValidator
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: EPiServer.Commerce.Internal
Assembly: EPiServer.Business.Commerce.dll
Version: 10.8.0
Syntax
public class LineItemQuantityValidator

Constructors

LineItemQuantityValidator()

Declaration
public LineItemQuantityValidator()

Methods

GetAllowedQuantity(ILineItem, IStockPlacement, Action<ILineItem, ValidationIssue>)

Gets the allowed line item quantity based on IStockPlacement information.

Declaration
public decimal GetAllowedQuantity(ILineItem lineItem, IStockPlacement stock, Action<ILineItem, ValidationIssue> onValidationError)
Parameters
Type Name Description
ILineItem lineItem

The line item.

IStockPlacement stock

The stock.

System.Action<ILineItem, ValidationIssue> onValidationError

The on validation error.

Returns
Type Description
System.Decimal

The quantity.

GetAvailableQuantity(ILineItem, InventoryRecord, Action<ILineItem, ValidationIssue>)

Gets the available line item quantity based on inventory information.

Declaration
public decimal GetAvailableQuantity(ILineItem lineItem, InventoryRecord inventoryRecord, Action<ILineItem, ValidationIssue> onValidationError)
Parameters
Type Name Description
ILineItem lineItem

The line item.

InventoryRecord inventoryRecord

The inventory record.

System.Action<ILineItem, ValidationIssue> onValidationError

The on validation error.

Returns
Type Description
System.Decimal

The quantity.