Giter Club home page Giter Club logo

bank_accouting_api's Introduction

Bank Accounting API

What is this Project?

This is an Open API to transfer money between accounts and get balance. The main goal of this API to make easy money transfer ans balance only by passing accounts and amount involved

How can I use this API

We have basically to endpoints, one to perform money transfer and another one to get the account balance.

###Money Transfer

For money transfer, you should call:

POST /api/v1/accounts/:account_id/transfer with destination_account_id and amount params at request body

And you'll receive the message if succeed:

{ message: "Transfer successfully done" }

Or if it fails:

{ error: <error message> }

Get Balance

To get account balance, you should call:

GET /api/v1/accounts/:account_id/balance

And you receive as response:

{ balance: <balance> }


I want to Contribute!

Our Stack

At this project we are using this stack:

  • Rails API
  • Sqlite
  • RSpec
  • Puma

How to setup the project

  1. Clone the project at a folder

    git clone https://github.com/dfmoreto/bank_accouting_api.git

  2. Join the folder

    cd bank_accounting_api

  3. Execute bundler

    bundle install

  4. Create db and run migrations for both dev and env test

    rails db:create db:migrate

    RAILS_ENV=test rails db:create db:migrate

  5. Start Rails server

    rails s

  6. Try it! : )

    Use a tool and try to reach the API (highly recommend Curl or Postman - AWESOME TOOLS!)

##How to execute tests

We're using RSpec, so our tests are in folder spec and configuration for support tools in spec/support

To execute ours tests ir very simple, only goes to terminal and execute:

rspec

And all tests will run. (I hope Green :D)

bank_accouting_api's People

Contributors

moretoend avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.