class Api::Restaurant::OrderController < ActionController::API before :authenticate_token #Description # This API show current order details # Input Params - order_id def show order = Order.find(params[:order_id]) order.order_items end # Description # This API allow new order creation # Input Params # order_source [* default - emenu] | table_id (*require for Dine-In) | order_type [* Default - Dine-in] # | guest_info (optional) | customer_id (optional) # order_items {[item_code, item_instance_code , qty, option, variants]} # Output Params # Status [Success | Error | System Error] , order_id, error_message (*) def create end # Description # This API - allow order to add new items to existing orders, does not allow you to remove confirm items # Update customer info, Guest Info # Input Params # order_id , order_items {[item_code, item_instance_code , qty, option, variants]} def update end end