-
Notifications
You must be signed in to change notification settings - Fork 0
Wallet APIs
-
POST: http://localhost:8080/walletThis POST request is used to create or update the wallet.
Request Body to create wallet:
{ "amount": 0, "borrowId": "string", "comment": "string", "lenderId": "string", "txnType": "DEBIT", }
Request Body to update wallet:
{ "amount": 0, "borrowId": "string", "comment": "string", "lenderId": "string", "txnType": "DEBIT", "walletId": 0 }
Response Body (same for both):
{ "amount": 0, "borrowId": "string", "comment": "string", "createdDate": "2020-05-27T10:35:15.388Z", "lenderId": "string", "txnType": "DEBIT", "updatedDate": "2020-05-27T10:35:15.388Z", "walletId": 0 }
-
GET: http://localhost:8080/wallet/lenderId/{lenderId}This GET API is used to get the wallets list using lenderId.
Request Parameter:
String: {lenderId}
Response Body:
[ { "balance": 0, "borrowId": "string", "createdDate": "2020-05-27T10:39:26.437Z", "lenderId": "string", "updatedDate": "2020-05-27T10:39:26.438Z", "walletId": 0 } ]
-
GET: http://localhost:8080/wallet/lenderId/{lenderId}/borrowId/{borrowId}This GET API is used to get the wallet using lenderId and borrowId from database.
Request Parameter:
String: {lenderId}
String: {borrowId}
Response Body:
{ "balance": 0, "borrowId": "string", "createdDate": "2020-05-27T10:39:26.437Z", "lenderId": "string", "updatedDate": "2020-05-27T10:39:26.438Z", "walletId": 0 }
-
GET: http://localhost:8080/wallet/walletId/{walletId}This GET API is used to get the wallet using walletId from Database.
Request Parameter:
String: {walletId}
Response Body:
{ "balance": 0, "borrowId": "string", "createdDate": "2020-05-27T10:39:26.437Z", "lenderId": "string", "updatedDate": "2020-05-27T10:39:26.438Z", "walletId": 0 }
-
DELETE: http://localhost:8080/wallet/walletId/{walletId}This API is used to delete the wallet using walletId from Database.
Request Parameter:
String: {walletId}
Response Body:
true
-
GET: http://localhost:8080/wallet/walletsThis GET API is used to get the list of all wallets from Database.
Response Body:
[ { "balance": 0, "borrowId": "string", "createdDate": "2020-05-27T10:39:26.437Z", "lenderId": "string", "updatedDate": "2020-05-27T10:39:26.438Z", "walletId": 0 } ]