From 666302799127f7fbca66a37fb9a74354a1ac84a2 Mon Sep 17 00:00:00 2001 From: Delight Olu-Olagbuji <64509158+Dheelyte@users.noreply.github.com> Date: Fri, 29 Mar 2024 13:35:53 +0100 Subject: [PATCH 1/3] Update README.md --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 311446d..04fb7ec 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,18 @@ # Flite -#TODO: update readme for local development \ No newline at end of file +### Project Setup +To run the project locally, make sure you have docker installed on your machine, thn run the following command: + +``` +docker-compose up +``` + +### Testing +To run the integration tests, use the command below: + +``` +docker-compose exec django python manage.py test flite.users.test.test_views +``` + +### Assumptions made during the project +- I assumed that every user has sufficient balance before making a P2P transfer. From fcead93e32dc18cfb1b8d2ec01af673c5260dc54 Mon Sep 17 00:00:00 2001 From: Delight Olu-Olagbuji <64509158+Dheelyte@users.noreply.github.com> Date: Fri, 29 Mar 2024 13:39:09 +0100 Subject: [PATCH 2/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 04fb7ec..955ee81 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,4 @@ docker-compose exec django python manage.py test flite.users.test.test_views ### Assumptions made during the project - I assumed that every user has sufficient balance before making a P2P transfer. +- I created a transaction record for Deposits, Withdrawal and P2P transfers. From eae1dddb0b84dbc15fc1724f3fcd1a75456048d6 Mon Sep 17 00:00:00 2001 From: Delight Olu-Olagbuji <64509158+Dheelyte@users.noreply.github.com> Date: Fri, 29 Mar 2024 14:09:16 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/README.md b/README.md index 955ee81..2e7d059 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,71 @@ To run the project locally, make sure you have docker installed on your machine, docker-compose up ``` +### Endpoints Usage +- ``` + users/:user_id + ``` + Request method: GET + + Request JSON body: Empty + +- ``` + users/ + ``` + Request method: GET + + Request JSON body: Empty + +- ``` + users/:user_id/deposits + ``` + Request method: POST + + Request JSON body: + ``` + { + "amount": int + } + ``` + +- ``` + users/:user_id/withdrawals + ``` + Request method: POST + + Request JSON body: + ``` + { + "amount": int + } + ``` + +- ``` + account/:sender_account_id/transfers/:recipient_account_id + ``` + Request method: POST + + Request JSON body: + ``` + { + "amount": int + } + ``` + +- ``` + account/:account_id/transactions + ``` + Request method: GET + + Request JSON body: Empty + +- ``` + account/:account_id/transactions/:transaction_id + ``` + Request method: GET + + Request JSON body: Empty + ### Testing To run the integration tests, use the command below: