It would be good to have a single API method to change a services tariff.
At the moment, if you change a services tariff through the GUI, it will automatically create another service (with a start date of now) and end the previous service (by setting an end date). This is best practice.
However if I want to do this through the API, I would have to do the following:
- GET the current service - store all attributes as variables
- PUT the current service - set the end date to now
- POST a new service - set all the attributes to the variables collected during the GET.
It would be good if this could be handled as a single method, you would have to know the following:
- Customer ID of the customer of the existing service
- Service ID of the existing service
- Tariff ID of the new service