The Transactions Service is a Spring Boot application that provides functionality for managing and converting purchase transactions. It allows users to create, retrieve, and convert transactions to different currencies based on exchange rates.
Before you begin, ensure you have met the following requirements:
- Java Development Kit (JDK) 11 or higher
- Spring Boot
- Maven
- Git
Follow these steps to set up and run the Transactions Service:
-
Clone the repository:
$ git clone https://github.com/TiagoGIM/wex-challenger.git
-
Navigate to the project directory:
$ cd wex-challenger -
Build the project using Maven:
$ mvn clean install
This project uses an in-memory H2 database for storing transactions. This means that data is stored only temporarily during the application's runtime and does not persist between restarts.
$ mvn spring-boot:run
To run the project's tests, you can use the following Maven command:
$ mvn test- Access the API documentation:
Open a web browser and go to http://localhost:8080/swagger-ui.html to view and interact with the API using Swagger.
Explore the API endpoints and start managing and converting purchase transactions!
Feel free to use tools like Postman or curl to make API requests as well.
GET /api/public/transactions| Parameter | Type | Description |
|---|---|---|
currency |
string |
Required. desired currency (ex.: Real ) |
id |
string |
Required. UUID from existente transaction |
POST /api/transaction| Parameter | Type | Description |
|---|---|---|
body |
Transaction |
Required. date, description and amount |