To run the project locally, make sure you have docker installed on your machine, thn run the following command:
docker-compose up
-
users/:user_idRequest method: GET
Request JSON body: Empty
-
users/Request method: GET
Request JSON body: Empty
-
users/:user_id/depositsRequest method: POST
Request JSON body:
{ "amount": int } -
users/:user_id/withdrawalsRequest method: POST
Request JSON body:
{ "amount": int } -
account/:sender_account_id/transfers/:recipient_account_idRequest method: POST
Request JSON body:
{ "amount": int } -
account/:account_id/transactionsRequest method: GET
Request JSON body: Empty
-
account/:account_id/transactions/:transaction_idRequest method: GET
Request JSON body: Empty
To run the integration tests, use the command below:
docker-compose exec django python manage.py test flite.users.test.test_views
- I assumed that every user has sufficient balance before making a P2P transfer.
- I created a transaction record for Deposits, Withdrawal and P2P transfers.