Skip to main content

DefaultShippingLineAssignmentStrategy

DefaultShippingLineAssignmentStrategy

This is the default ShippingLineAssignmentStrategy which simply assigns all OrderLines to the ShippingLine, and is suitable for the most common scenario of a single shipping method per Order.

Signature
class DefaultShippingLineAssignmentStrategy implements ShippingLineAssignmentStrategy {
assignShippingLineToOrderLines(ctx: RequestContext, shippingLine: ShippingLine, order: Order) => OrderLine[] | Promise<OrderLine[]>;
}

assignShippingLineToOrderLines

method
(ctx: RequestContext, shippingLine: ShippingLine, order: Order) => OrderLine[] | Promise<OrderLine[]>