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: 12.17.2Syntax
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 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. |