https://github.com/jesperancinha/car-lease
https://github.com/jesperancinha/car-lease
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jesperancinha/car-lease
- Owner: jesperancinha
- License: apache-2.0
- Created: 2022-10-03T22:06:41.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-02T08:42:13.000Z (9 months ago)
- Last Synced: 2025-03-02T09:29:10.900Z (9 months ago)
- Language: Kotlin
- Size: 290 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Car Lease
---
[](https://github.com/jesperancinha/car-lease)
[](https://www.apache.org/licenses/LICENSE-2.0)
[](https://github.com/jesperancinha/car-lease/actions/workflows/car-lease-manager.yml)
[](https://www.codacy.com/gh/jesperancinha/car-lease/dashboard?utm_source=github.com&utm_medium=referral&utm_content=jesperancinha/car-lease&utm_campaign=Badge_Grade)
[](https://www.codacy.com/gh/jesperancinha/car-lease/dashboard?utm_source=github.com&utm_medium=referral&utm_content=jesperancinha/car-lease&utm_campaign=Badge_Coverage)
[](https://coveralls.io/github/jesperancinha/car-lease?branch=main)
[](#)
[](#)
[](#)
---
## Introduction
This is an Auto Lease app
#### Stable releases
- [0.0.0](https://github.com/jesperancinha/car-lease/tree/0.0.0) - [0b502ad1366c2dbdbb4adecc703cffa3f54dbb84](https://github.com/jesperancinha/car-lease/tree/0.0.0) - JDK 17 / H2 / Spring Boot 3.0.1
## How to test
### Register users
```bash
curl -i -X POST -H "Content-Type: application/json" --data '{ "fistName": "Joao", "lastName": "Esperancinha", "username": "jesperancinha", "password": "admin"}' http://localhost:8081/api/users
curl -i -X POST -H "Content-Type: application/json" --data '{ "fistName": "Joao2", "lastName": "Esperancinha", "username": "jesperancinha2", "password": "admin"}' http://localhost:8081/api/users
```
```json
{
"fistName": "João",
"lastName": "Esperancinha",
"username": "jesperancinha",
"password": "admin"
}
```
### Login users
```bash
curl -i -X POST -H "Content-Type: application/json" --data '{ "username": "jesperancinha", "password": "admin"}' http://localhost:8081/api/login
````
```json
{
"username": "jesperancinha",
"password": "admin"
}
```
### Making requests
```bash
curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer " http://localhost:8081/api/
````
```bash
curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer " --data '{ "make": "Renault", "model": "5", "version": "10", "numberDoors": 4, "co2Emission": 111, "grossPrice": 20000, "netPrice": 15000, "millage": 10000}' http://localhost:8081/api/cars
curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer " --data '{ "name": "Mr. Springfield", "street": "Mr. Springfield Street", "houseNumber": 30, "zipCode": "334455", "place": "Olhao", "email": "9374092hfiohlfihwrif@nsdkldsnflknkfld.com", "phoneNumber": "1234455667" }' http://localhost:8081/api/customers
curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer " --data '{ "carId": 1, "customerId": 2, "duration": 1000, "interestRate": 2}' http://localhost:8081/api/leases
````
```json
{
"make": "Renault",
"model": "5",
"version": "10",
"numberDoors": 4,
"co2Emission": 111,
"grossPrice": 20000,
"netPrice": 15000,
"millage": 10
}
```
```json
{
"name": "Mr. Springfield",
"street": "Mr. Springfield Street",
"houseNumber": 30,
"zipCode": "334455",
"place": "Olhao",
"email": "9374092hfiohlfihwrif@nsdkldsnflknkfld.com",
"phoneNumber": "1234455667"
}
```
```json
{
"carId": 2,
"customerId": 1,
"duration": 1000,
"interestRate": 2
}
```
## About me
[](https://github.com/jesperancinha)