DefaultStockAllocationStrategy
DefaultStockAllocationStrategy
Allocates stock when the Order transitions from ArrangingPayment
to either
PaymentAuthorized
or PaymentSettled
.
Signature
class DefaultStockAllocationStrategy implements StockAllocationStrategy {
shouldAllocateStock(ctx: RequestContext, fromState: OrderState, toState: OrderState, order: Order) => boolean | Promise<boolean>;
}
Implements
Members
shouldAllocateStock
method
type:
(ctx: RequestContext, fromState: OrderState, toState: OrderState, order: Order) => boolean | Promise<boolean>