Simple api for money transfers between accounts. The project is designed using Kotlin language, Vertx framework and Spock framework for tests
All methods require Content-Type = "application/json"
- Method: "/account/create", Type: PUT, Params: {"balance":100}, Response: {"id":1}
- Method: "/account/get", Type: POST, Params: {"id":1}, Response: {"id":1, "balance":100}
- Method: "/transfer", Type: POST, Params: {"from":1, "to":2, "amount":30}, Response: {}
You can open project and run Strater.kt
To build artifact and run service execute this commands:
./gradlew shadowJar
java -jar /build/libs/account-transfers-test-1.0-SNAPSHOT-fat.jar
To run tests execute this commands:
./gradlew test