areski / a2billing-flask-api

Restful A2Billing APIs in Flask
http://a2billing-flask-api.readthedocs.org
Mozilla Public License 2.0
21 stars 13 forks source link

Add telf data on ADD method #1

Closed elvismdev closed 9 years ago

elvismdev commented 9 years ago

What if I want to fill the user telf data on my a2billing database? My I send the ADD method with the telf info like this?

$ curl -u username:password --dump-header - -H "Content-Type:application/json" -X POST --data '{"name": "mygroup", "description": "", "telf": "123456789"}' http://localhost:8008/api/cardgroup/

areski commented 9 years ago

The card model is described here: https://github.com/areski/a2billing-flask-api/blob/master/a2billing_flask_api/a2billing_flask_api.py#L288 You can add your custom fields by changing the model.