Spring Boot restTemplate client to fetch all transactions from Starling Bank API, calculate the round-up and save the amount into a new savings goal.
-
Spring boot will start a new local server and ask the Main method to automatically fetch all transactions.
-
TransactionsResponseInterceptor will capture the response from the API and call the RoundUp method.
-
RoundUpController calculate roundUp of all transactions amounts and create a new savings goal with generated savingGoalUid.
-
SavingGoalResponseInterceptor will capture the savingGoalUid and store the amount using the API.
This compressed file already contains a packaged JAR file for you. It is inside the target folder > saving-client.jar If you want to rebuild the project, you can do:
mvn clean install
Run this command to start the Spring Boot application:
java -jar target/saving-client.jar
You should see some output followed by a success message when the calculated amount is saved:
You successfully saved 55.04£ into your new saving goal
The token used by this repository is not perpetual. If you get 403 error while testing, please contact me at: [email protected]. I will refresh the Token for you.