This is a small POC for Software Engineer test at Tracksale.
This project was made using PHP as programming language with Symfony 4.1 as framework and using DDD, TDD and SOLID concepts.
For run this project, you must have docker
and docker-compose
installed.
- Clone this repo
- Execute
docker-composer up
- Open
http://localhost:4000/api/
in your browser. - If you see timestamp on browser, is working.
Check if customer can be impacted.
Request example
curl --request GET --url http://0.0.0.0:4000/api/customers/53216823644
Success response example.
{
"id": 1,
"customerDocument": "12345678900",
"dateImpactStart": "2018-10-05",
"dateImpactEnd": "2019-01-03",
"allowImpact": true,
"createdAt": "2018-10-05 18:14:27",
"updatedAt": null
}
Remove customer from impact rules.
Request example
curl --request DELETE --url http://0.0.0.0:4000/api/customers/53216823644
Success response example.
{
"removed": true
}
- Clone this repo
- Execute
docker-composer up
- Execute
docker exec -it tracksale_tracksale-test-symfony-php-fpm_1 php /var/www/html/composer.phar run tests