Giter VIP home page Giter VIP logo

money-transfer's Introduction

Money transfer Rest API

A Java RESTful API for money transfers between users accounts

Technologies

  • JAX-RS API
  • H2 in memory database
  • Log4j
  • Jetty Container (for Test and Demo app)
  • Apache HTTP Client

How to run

mvn exec:java

Application starts a jetty server on localhost port 8080 An H2 in memory database initialized with some sample user and account data To view

Available Services

HTTP METHOD PATH USAGE
GET /user/{userName} get user by user name
GET /user/all get all users
PUT /user/create create a new user
POST /user/{userId} update user
DELETE /user/{userId} remove user
GET /account/{accountId} get account by accountId
GET /account/all get all accounts
GET /account/{accountId}/balance get account balance by accountId
PUT /account/create create a new account
DELETE /account/{accountId} remove account by accountId
PUT /account/{accountId}/withdraw/{amount} withdraw money from account
PUT /account/{accountId}/deposit/{amount} deposit money to account
POST /transaction perform transaction between 2 user accounts

Http Status

  • 200 OK: The request has succeeded
  • 400 Bad Request: The request could not be understood by the server
  • 404 Not Found: The requested resource cannot be found
  • 500 Internal Server Error: The server encountered an unexpected condition

Sample JSON for User and Account

User :
{  
  "userName":"test1",
  "emailAddress":"[email protected]"
} 
User Account: :
{  
   "userName":"test1",
   "balance":10.0000,
   "currencyCode":"GBP"
} 

User Transaction:

{  
   "currencyCode":"EUR",
   "amount":100000.0000,
   "fromAccountId":1,
   "toAccountId":2
}

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

paypal

money-transfer's People

Contributors

parths049 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.