Giter Site home page Giter Site logo

money-transfer's Introduction

hw

How to start the hw application

  1. Run mvn clean install to build your application
  2. Start application with java -jar target/hw-1.0-SNAPSHOT.jar server config.yml
  3. To check that your application is running enter url http://localhost:9000

How to run integration tests

  1. Run mvn clean verify

Description

Api for money transfer between two accounts.

States of money transfer transaction

  1. Pending - transaction registered, no actions performed
  2. Committed - transaction successfully finalized, money moved between accounts
  3. Failed - transaction failed, money was not transferred or rolled back to a state before the transaction

IMPORTANT RESTRICTION

The service does not support different currencies. Lets just assume that all transactions in USD

Availabel endpoints

/user

GET http://localhost:9000/user - get all users

GET http://localhost:9000/user/1 - get specific user

POST http://localhost:9000/user - create new user

/account

GET http://localhost:9000/account - get all accounts

GET http://localhost:9000/account/1 - get specific accounts

POST http://localhost:9000/account - create new account

/transaction

GET http://localhost:9000/transaction - get all transactions

GET http://localhost:9000/transaction/1 - get specific transaction

POST http://localhost:9000/transaction - create new transaction

payload for new transaction (money transfer) { "fromUser": 2, "toUser": 1, "amount": 10.0000 }

money-transfer's People

Contributors

nik5036350 avatar

Watchers

James Cloos avatar  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.