- Ruby 3.0.0
- Rails 6.1.4.1
- SQlite
- Rails API
- Install deps using
bundle install
- Setup DB using
rails db:setup
- Run
rails s
at project root, fire up the browser and go tolocalhost:3000
- For rails specs
rspec
- For Bank CRUD operations
- GET
/api/v1/banks
retrieves all banks - POST
/api/v1/banks
for creation new bank record - PATCH
/api/v1/banks/:id
for update existing bank record - DELETE
/api/v1/banks/:id
for deletion of existing bank record
- GET
- For Transaction CRUD operations
- GET
/api/v1/banks/:bank_id/accounts/:account_id/transactions
retrieves all transactions of an account - POST
/api/v1/banks/:bank_id/accounts/:account_id/transactions
for creation new transaction of an account - PATCH
/api/v1/banks/:bank_id/accounts/:account_id/transactions/:id
for update existing transaction record - DELETE
/api/v1/banks/:bank_id/accounts/:account_id/transactions/:id
for deletion of existing transaction record
- GET
- To get the total of all transaction amounts of an account
- GET
/api/v1/banks/:bank_id/accounts/:id/amount
retrieve the total amount of all transactions of an account
- GET
- No authentication to keep things simple
- Added Model specs only
- Added unit test specs coverage
- We can see all flag transactions of a transaction with every endpoint of transaction CRUD operations