This is a simple Spring project that represents an API for customers who have made transactions and how many reward points they have accumulated over the last three months.
The project has an embedded H2 database with an initial script that will run on startup that will populate a user with some transactions.
The main endpoints are:
- "/customers" (GET) : Brings back the full list of customers
- "/customers/{id}" (GET) : Brings back the customer with their transactions and points in a 3 month period
- "/customers" (POST) : Creates the customer. Only need to pass in the "customerName" as the JSON request body for it to create new user.
- "/transactions" (GET) & (POST) : Either shows all the transactions or creates a new transaction.
Here are samples of the Postman requests:
Response will return a Http 201 Status Code for a created object.