An application that reads bets from a csv file or optionally runs a REST api service that accepts a list of bets and produces two reports.
./mvnw test
./mvnw clean package
java -jar target/report-generator-1.0.jar
curl --header "Content-Type: application/json" \
--request POST \
--data '[\
{\
"betId":"xyz",\
"timestamp":123454,\
"selectionId":13,\
"selectionName":"WinniePooh",\
"stake": 2.0,\
"price": 3.1,\
"currency":"EUR"\
},\
{\
"betId":"xyz-2",\
"timestamp":123454,\
"selectionId":13,\
"selectionName":"WinniePooh",\
"stake": 1.0,\
"price": 3.2, \
"currency":"EUR"\
}]'\
'localhost:8080'
./src/main/resources/bets.csv
- ./selection-liability-by-currency-report.csv
- ./total-liability-by-currency-report.csv