Try our conversational search powered by Generative AI!

Class DefaultInventoryProcessor

Processes inventory requests for InventoryRecord.

Inheritance
System.Object
DefaultInventoryProcessor
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: EPiServer.Commerce.Order
Assembly: EPiServer.Business.Commerce.dll
Version: 12.17.2
Syntax
public class DefaultInventoryProcessor : IInventoryProcessor

Constructors

DefaultInventoryProcessor(IContentLoader, ReferenceConverter, LineItemQuantityValidator, InventoryRequester, IFulfillmentWarehouseProcessor, IInventoryService)

Initializes a new instance of the DefaultInventoryProcessor class.

Declaration
public DefaultInventoryProcessor(IContentLoader contentLoader, ReferenceConverter referenceConverter, LineItemQuantityValidator lineItemQuantityValidator, InventoryRequester inventoryRequester, IFulfillmentWarehouseProcessor fulfillmentWarehouseProcessor, IInventoryService inventoryService)
Parameters
Type Name Description
EPiServer.IContentLoader contentLoader

The content loader.

ReferenceConverter referenceConverter

The reference converter.

LineItemQuantityValidator lineItemQuantityValidator

The line item inventory validator.

InventoryRequester inventoryRequester

The inventory requester.

IFulfillmentWarehouseProcessor fulfillmentWarehouseProcessor

The fulfillment warehouse processor.

IInventoryService inventoryService

The inventory service.

DefaultInventoryProcessor(IContentLoader, ReferenceConverter, ILogger, LineItemQuantityValidator, InventoryRequester, IFulfillmentWarehouseProcessor, IInventoryService)

Initializes a new instance of the DefaultInventoryProcessor class.

Declaration
[Obsolete("Use constructor without ILogger instead. Will remain at least until December 2018")]
public DefaultInventoryProcessor(IContentLoader contentLoader, ReferenceConverter referenceConverter, ILogger logger, LineItemQuantityValidator lineItemQuantityValidator, InventoryRequester inventoryRequester, IFulfillmentWarehouseProcessor fulfillmentWarehouseProcessor, IInventoryService inventoryService)
Parameters
Type Name Description
EPiServer.IContentLoader contentLoader

The content loader.

ReferenceConverter referenceConverter

The reference converter.

EPiServer.Logging.ILogger logger

The logger.

LineItemQuantityValidator lineItemQuantityValidator

The line item inventory validator.

InventoryRequester inventoryRequester

The inventory requester.

IFulfillmentWarehouseProcessor fulfillmentWarehouseProcessor

The fulfillment warehouse processor.

IInventoryService inventoryService

The inventory service.

Methods

AdjustInventoryOrRemoveLineItem(IShipment, OrderStatus, Action<ILineItem, ValidationIssue>)

Adjusts the inventory for shipment by reserving or completing reservation to the IInventoryService. Removes the line item if no available inventory.

Declaration
public virtual void AdjustInventoryOrRemoveLineItem(IShipment shipment, OrderStatus orderStatus, Action<ILineItem, ValidationIssue> onValidationError)
Parameters
Type Name Description
IShipment shipment

The shipment.

OrderStatus orderStatus

The order status.

System.Action<ILineItem, ValidationIssue> onValidationError

A callback that is invoked if a validation issue is detected.

UpdateInventoryOrRemoveLineItem(IShipment, Action<ILineItem, ValidationIssue>)

Validates and or updates the inventory for the shipment. Removes the line item if no available inventory.

Declaration
public virtual void UpdateInventoryOrRemoveLineItem(IShipment shipment, Action<ILineItem, ValidationIssue> onValidationError)
Parameters
Type Name Description
IShipment shipment

The shipment.

System.Action<ILineItem, ValidationIssue> onValidationError

A callback that is invoked if a validation issue is detected.

Implements