modified the ModifyQuantityMethod to work for both loans and disbursements
modified the send cart method for dispense and plebian to support checks for loans
CHANGED API FOR CREATE DISBURSEMENT to /api/request/disbursement/
Get all loans
GET /api/request/loan/ HTTP/1.1
Can filter by 'cartstatus', 'itemname', 'cartownerusername','returned'
returned is either true or false
Response:
current_type = ['loan','disbursement']
pk = pk of the current_type
They are response are both the same (except if current_type is loan, then there is no loaned_timestamp or returned_timestamp).
Created loans:-
CHANGED API FOR CREATE DISBURSEMENT to /api/request/disbursement/
Get all loans GET /api/request/loan/ HTTP/1.1 Can filter by 'cartstatus', 'itemname', 'cartownerusername','returned' returned is either true or false Response:
Create a loan POST /api/request/loan/addItem/ HTTP/1.1 Request:
Response:
Delete a loan DELETE /api/request/loan/deleteItem/5 HTTP/1.1
Returns HTTP_204_NO_CONTENT on success
Return Loan PATCH /api/request/loan/returnItem/6/ HTTP/1.1 Cart must be fulfilled already Response:
Return All Loans PATCH /api/request/returnAllLoans/16/ HTTP/1.1 This returns the entire cart Response:
Modify Quantity of Disbursement/Loan PATCH /api/request/modifyQuantityRequested/7/ HTTP/1.1 Type can be ['loan','disbursement'] Request:
Response:
Convert Request Type POST /api/request/convertRequestType/ HTTP/1.1 Request:
Response:
current_type = ['loan','disbursement'] pk = pk of the current_type They are response are both the same (except if current_type is loan, then there is no loaned_timestamp or returned_timestamp).