payment api
This commit is contained in:
@@ -1,33 +1,38 @@
|
||||
class Api::CustomersController < ActionController::API
|
||||
class Api::InvoicesController < ActionController::API
|
||||
before :authenticate_token
|
||||
before :set_sale_params, only:[:show, :update, :destroy]
|
||||
|
||||
#List open invoices for today.
|
||||
def index
|
||||
@sales = Sale.open_invoices
|
||||
end
|
||||
#Description
|
||||
# This API show current order details
|
||||
# Input Params - order_id
|
||||
# This API show current sale details
|
||||
# Input Params - ID
|
||||
def show
|
||||
order = Order.find(params[:order_id])
|
||||
order.order_items
|
||||
@sale = Sale.find(params[:id])
|
||||
end
|
||||
|
||||
# Description
|
||||
# This API allow new invoice creation
|
||||
# Input Params
|
||||
# order_id
|
||||
# Output Params
|
||||
# Status [Success | Error | System Error] , order_id, error_message (*)
|
||||
#Creat Sales based on Items -
|
||||
def create
|
||||
#
|
||||
end
|
||||
|
||||
#UPDATE SALES
|
||||
def update
|
||||
|
||||
end
|
||||
|
||||
def by_booking
|
||||
end
|
||||
|
||||
def by_order
|
||||
#VOID Sale
|
||||
def destroy
|
||||
#Reason | #Approval
|
||||
end
|
||||
|
||||
private
|
||||
def process_items
|
||||
def set_sale_params
|
||||
@sale = Sale.find(params[:id])
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user