This API was built to support a payment between friends. It was built in Ruby on rails 2.7.2.
How to use
- Clone this repository
- Install PostgreSQL in case you don't have it
- Create your database.yml and application.yml file
- bundle install
- rake db:create
- rake db:migrate
- rake db:seed
- rspec (optional)
- rails s
POST /api/v1/users/{user_id}/payments (generate friends payments)
Get /api/v1/users/{user_id}/feed?page=1 (get the transaction feed)
Get /api/v1/users/{user_id}/balance (get user account balance)
Get /api/v1/users (List users with all friends)
I have added some linters and code quality tools that I usually use:
sh 'bundle exec brakeman . -z -q'
sh 'bundle exec rubocop app config lib spec'
sh 'bundle exec reek app lib public spec tmp'
sh 'bundle exec rails_best_practices .'