Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

Money transfer Rest API

A Java RESTful API for money transfers between users accounts

Technologies

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

How to run

mvn clean install
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 METHODPATHUSAGE
GET/user/{userName}get user by user name
GET/user/allget all users
PUT/user/createcreate a new user
POST/user/{userId}update user
DELETE/user/{userId}remove user
GET/account/{accountId}get account by accountId
GET/account/allget all accounts
GET/account/{accountId}/balanceget account balance by accountId
PUT/account/createcreate 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/transactionperform 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":"vikram",
"emailAddress":"vikram@gmail.com"
} 
User Account: :
{ "userName":"vikram",
"balance":10.0000,
"currencyCode":"GBP"
} 

User Transaction:

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

About

APIs for money transfer between accounts.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages