Skip to content

jesperancinha/car-lease

Repository files navigation

Car Lease


Generic badge

GitHub License

CLM Build, Test, Coverage and Report

Codacy Badge

Codacy Badge Coverage Status

GitHub language count GitHub top language GitHub top language


Introduction

This is an Auto Lease app

Stable releases

How to test

Register users

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
{
  "fistName": "João",
  "lastName": "Esperancinha",
  "username": "jesperancinha",
  "password": "admin"
}

Login users

curl -i -X POST -H "Content-Type: application/json" --data '{ "username": "jesperancinha", "password": "admin"}' http://localhost:8081/api/login
{
  "username": "jesperancinha",
  "password": "admin"
}

Making requests

curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <TOKEN>" http://localhost:8081/api/<ENDPOINT>
curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <TOKEN>"  --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 <TOKEN>"  --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 <TOKEN>"  --data '{ "carId": 1, "customerId": 2, "duration": 1000, "interestRate": 2}'  http://localhost:8081/api/leases
{
  "make": "Renault",
  "model": "5",
  "version": "10",
  "numberDoors": 4,
  "co2Emission": 111,
  "grossPrice": 20000,
  "netPrice": 15000,
  "millage": 10
}
{
  "name": "Mr. Springfield",
  "street": "Mr. Springfield Street",
  "houseNumber": 30,
  "zipCode": "334455",
  "place": "Olhao",
  "email": "9374092hfiohlfihwrif@nsdkldsnflknkfld.com",
  "phoneNumber": "1234455667"
}
{
  "carId": 2,
  "customerId": 1,
  "duration": 1000,
  "interestRate": 2
}

About me

GitHub followers

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published