ivozprovider
ivozprovider copied to clipboard
How to create a new API (Balance Addition)
I wanted to ask how to add a new API in swagger. We want to have balance addition control via API. Please guide
HI @habibshahid,
Please use provided issue template ir order to make a feature request or it'll be automatically closed next time. You can use the mailing list otherwise.
About your question, I'd suggest you to check out any PR implementing a similar feature, https://github.com/irontec/ivozprovider/pull/1160 for instance.
Within the controller you'll need to use the services below:
- library/Ivoz/Provider/Domain/Service/Company/IncrementBalance.php
- library/Ivoz/Provider/Domain/Service/Company/DecrementBalance.php
- library/Ivoz/Provider/Domain/Service/Carrier/IncrementBalance.php
- library/Ivoz/Provider/Domain/Service/Carrier/DecrementBalance.php
Let us know whether you are willing to implement it yourself and do a PR or not, it will certainly be interesting to have it in the API.
Regards
Thank you for the response. I have implemented the API locally and would love to contribute it to the project.