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

@@ -0,0 +1,19 @@
class Api::DiscountsController < ActionController::API
def create
@invoice = Sale.find(params[:invoice_id])
end
#Update sale item - Price | Qty |
def update
end
#destroy - Remove items form invoice
def destroy
@sale.remove_item(params[:sale_item_id])
end
private
def set_invoice_params
@sale = Sale.find(params[:invoice_id])
end
end