#Exercise
Design and implement a RESTful API (including data model and the backing implementation) for money transfers between accounts.
##Explicit requirements:
- keep it simple and to the point (e.g. no need to implement any authentication, assume the APi is invoked by another internal system/service)
- use whatever frameworks/libraries you like (except Spring, sorry!) but don't forget about the requirement #1
- the datastore should run in-memory for the sake of this test
- the final result should be executable as a standalone program (should not require a pre-installed container/server)
- demonstrate with tests that the API works as expected Implicit requirements:
- the code produced by you is expected to be of high quality.
- there are no detailed requirements, use common sense.
#Build and run
cd acme-transfer
mvn install
java -jar sample/target/sample-1.0-SNAPSHOT.jar
curl -d '{"from":{"number":"1342672"},"to":{"number":"2882882"},"amount":{"amount":100.98,"currency":"GBP"}}' -X POST http://localhost:8080/v1/transfers/transfer -H "Content-Type: application/json"
or
curl -d '<transfer><from number="1342672" /><to number="2882882" /><amount amount="100.98" currency="GBP" /></transfer>' -X POST http://localhost:8080/v1/transfers/transfer -H "Content-Type: application/xml"
Parent/root pom
##Modules
Factory and Server interfaces to decouple jaxws server
Basic jersey server used by sample.
Sample project to delivering the exercise ####Assumptions
- Account number is assumed to be unique ideally something like an iban
- That a accounts only hold single currencies and transfers must be of that currency
If during start up there's a port conflict com.acme.sample.rest.Main.SERVER_URI com.acme.sample.rest.Main is also the class to run in case you're running from an IDE.