This HTTP REST API receives call detail records and calculates monthly bills for a given telephone number.
The API avoids consistency errors when receiving call records, eliminating the concerns of telecommunication platforms that consume the service.
This service expects Start/End call record pairs inputs. Then, counts bills based of pre-existent charge prices. On the final month period, a Bill is avaliable for query with all call records information of subscribers by monthly period.
-
Heroku CLI:
- Clone the project locally:
$ git clone [email protected]:douglasmoraisdev/work-at-olist.git
- Upload the code for the Heroku App (e.g: telephone-call-api):
$ cd work-at-olist/
$ heroku git:remote -a telephone-call-api
$ git subtree push --prefix telephone_call_api/ heroku master
Done.
-
Pipenv:
- cd project root path:
$ cd work-at-olist/telephone_call_api/
- Run pipenv virtual environment and update libraries:
$ pipenv shell
$ pipenv install
- run tests
$ python manage.py test
or
$ python3 manage.py test
Depending of your python installation.
-
After the installation, all API documentation, with the Endpoints descriptions can be accessed on the url:
Computer/operating system, text editor/IDE, libraries, etc).
- Hardware: Lenovo Notebook, Intel i7 processor, 16GB Ram, NVIDIA 2GB
- SO: Linux Ubuntu 18.04 LTS
- Text Editor: VSCode 1.26
- Python version: 3.6
- Main libraries: django, djangorestframework, django-heroku (complete list on Pipfile)
- Virtual environment using pipenv (https://github.com/pypa/pipenv)
- Deploy to a diferent Heroku App:
$ cd work-at-olist/
$ git remote remove heroku
$ heroku git:remote -a <your-heroku-app-name>
$ git subtree push --prefix telephone_call_api/ heroku master