payment api

This commit is contained in:
Min Zeya Phyo
2017-04-18 11:01:10 +06:30
parent 6a84a34a9f
commit dbad900cd4
30 changed files with 751 additions and 32 deletions

View File

@@ -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