GithubHelp home page GithubHelp logo

moneytransfer's Introduction

moneytransfer REST API using the Javalin and google Juice Framework

Sample Money Transfer API This is a simple Api to simulate transferring money to and from accounts from a bank. As this is a Maven project please build this project with the following via a terminal in the working project directory:

This project is created using hte Javalin and google juice framework its a micro framework to create the REST services.

Please following following instruction to run the application. This app does not required third party applicatdion server to run one can run the application as a stand-alone application,

run

  1. mvn clean

  2. mvn install

Above will create the jar file inside the target folder

  1. Open command prompt or terminal depending on the Operating system on which one is running and run following command to run the application

java -jar JarFileName portNumber

e.g.

java -jar money-transfer-1.0-SNAPSHOT.jar 7000

NOTE:

Note: Above project is created using java 11 so it assume you are running on java 11 atleast.

Following are the endpoint URLs on which are exposed in the API

get("/api/moneybank/accounts"); --- to get all the accounts in the system

post("/api/moneybank/accounts"); --add the account to the system, Following is json request is expected

{"name" : "dharmendra", "amount" : 1200 }

delete("/api/moneybank/accounts/:account-id"); -- to delete account from the system

get("/api/moneybank/accounts/balance/:account-id"); -- give account balance for an account

get("/api/moneybank/accounts/transaction/:account-id"); --give all transaction happend to the account

post("/api/moneybank/accounts/addBalance"); --add Balance to the account, Following is json request is expected

{"name" : "dharmendra", "amount" : 1200 }

post("/api/moneybank/accounts/withdraw"); -- withdraw amount from an account,Following is json request is expected

{"name" : "dharmendra", "amount" : 1200 }

post("/api/moneybank/accounts/transfer"); -- Money transfer API, Following is json request is expected

{"accountFrom" : 1,"accountTo" : 2,"amount" : 500}

There are some feature that needs to be added related to currency, Now system assumes both amount in same currency. Added the Test cases which are self explanatory.

moneytransfer's People

Contributors

mishradharmendra avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.