toCommand
Converts a PlaceOrderRequest into a corresponding PlaceOrderCommand. The conversion is based on the order type specified in the request.
Throws
if required fields for the specific order type are missing.
Converts an AdvanceOrderStatusRequest into a corresponding AdvanceOrderStatusCommand.
Converts an UpdateOrderItemsRequest into a corresponding UpdateOrderItemsCommand.
Converts an UpdateDeliveryOrderRequest into a corresponding UpdateDeliveryOrderCommand.
Converts an UpdateTakeawayOrderRequest into a corresponding UpdateTakeawayOrderCommand.