Class LineItemQuantityValidator
Processes inventory requests for InventoryRecord.
Inheritance
Namespace: EPiServer.Commerce.Internal
Assembly: EPiServer.Business.Commerce.dll
Version: 14.26.0Syntax
public class LineItemQuantityValidator : Object
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 allowed quantity of the given line item. |
GetLineItemRequestedQuantity(IShipmentInventory, ILineItem)
Gets requested quantity of an ILineItem based on IShipmentInventory.
Declaration
protected virtual Decimal GetLineItemRequestedQuantity(IShipmentInventory shipmentInventory, ILineItem lineItem)
Parameters
Type | Name | Description |
---|---|---|
IShipmentInventory | shipmentInventory | The shipment inventory. |
ILineItem | lineItem | The line item. |
Returns
Type | Description |
---|---|
System.Decimal | The requested quantity of the given line item. |
GetValidatedQuantity(IShipmentInventory, ILineItem, InventoryRecord, Action<ILineItem, ValidationIssue>)
Gets the validated line item quantity based on inventory information.
Declaration
public Decimal GetValidatedQuantity(IShipmentInventory shipmentInventory, ILineItem lineItem, InventoryRecord inventoryRecord, Action<ILineItem, ValidationIssue> onValidationError)
Parameters
Type | Name | Description |
---|---|---|
IShipmentInventory | shipmentInventory | The shipment inventory containing operation keys for the line item. |
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 validated quantity of the given line item. |