November Happy Hour will be moved to Thursday December 5th.

Class CancelProcessor

Handles the processing of cancel request items.

Inheritance
System.Object
CancelProcessor
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.InventoryService.BusinessLogic
Assembly: Mediachase.Commerce.dll
Version: 13.30.0
Syntax
public class CancelProcessor : RequestItemProcessor

Constructors

CancelProcessor(InventoryRequest, InventoryRequestItem, OperationKeySerializer, RecordStateSet)

Creates a new instance of CancelProcessor.

Declaration
public CancelProcessor(InventoryRequest request, InventoryRequestItem requestItem, OperationKeySerializer operationKeySerializer, RecordStateSet recordStateSet)
Parameters
Type Name Description
InventoryRequest request

The request containing the item to process.

InventoryRequestItem requestItem

The request item to process.

OperationKeySerializer operationKeySerializer

The OperationKeySerializer for encoding and decoding operation keys.

RecordStateSet recordStateSet

The collection of RecordState values for the request.

Methods

Apply()

Applies the request item to the appropriate RecordState.

Declaration
public override void Apply()
Overrides
Remarks

The cancel request item will be marked as successful as long as the operation key is valid, even if it refers to a non-existent inventory record. Cancel requests are expected to always work, unless the input is invalid.

Successful cancel requests undo the quantity changes applied by the request item that created the operation key.

GetResponseItems(Boolean)

Returns the final InventoryResponseItem instances for the item (typically, only one unless the operation is a split). CreateDefaultResponseItem(InventoryRequestItem, Boolean, RecordState, String, InventoryResponseType, InventoryResponseTypeInfo) can be used to generate response items in most cases.

Declaration
public override InventoryResponseItem[] GetResponseItems(bool isOverallSuccess)
Parameters
Type Name Description
System.Boolean isOverallSuccess

True if all items wer successful, false if any item returned false from Validate().

Returns
Type Description
InventoryResponseItem[]
Overrides

Validate()

Validates that the request item is successful.

Declaration
public override bool Validate()
Returns
Type Description
System.Boolean

True if the request item is successful; otherwise, false.

Overrides
Remarks

The cancel request item will succeed as long as the operation key is valid.