This is the pricing service. It subscribes to messages from the sessions exchange,
adds a price, and puts them on the transactions exchange.
- Make sure RabbitMQ is running and both exchanges are created. This can be done with the shared-dev-env repo.
- Run
lein run
An api is available with the following endpoints:
- GET
/policies/:idget policy with the given ID - POST
/policiescreate new policy with givenname(as JSON body) - POST
/policies/:id/elementscreate new policy element with givenstart_at,end_at,time_from,time_to,days,unit,step_sizeandprice
Put this JSON in the session queue to test. It should end up in the transaction service.
{
"evse_id": "790838973-00002",
"started_at": "2016-01-30T17:39:12Z",
"ended_at": "2016-01-30T18:39:12Z",
"volume": 17.453634968809,
"user_id": "John"
}