diff --git a/CHANGELOG.md b/CHANGELOG.md index aacbee6..5fea30a 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.0.8 + +- Added: new endpoint (update plan) +- Added: new endpoint (create subscription history) +- Updated: examples + # 1.0.7 - Added: new endpoint (update charge link) diff --git a/examples/create_subscription_history.py b/examples/create_subscription_history.py new file mode 100755 index 0000000..6de5f55 --- /dev/null +++ b/examples/create_subscription_history.py @@ -0,0 +1,18 @@ +# encoding: utf-8 + +from gerencianet import Gerencianet +from credentials import CREDENTIALS + +gn = Gerencianet(CREDENTIALS) + + +params = { + 'id': 1000 +} + +body = { + 'description': "This subscription was not fully paid" +} + +response = gn.create_subscription_history(params=params, body=body) +print(response) diff --git a/examples/update_plan.py b/examples/update_plan.py new file mode 100755 index 0000000..9c9ae8e --- /dev/null +++ b/examples/update_plan.py @@ -0,0 +1,17 @@ +# encoding: utf-8 + +from gerencianet import Gerencianet +from credentials import CREDENTIALS + +gn = Gerencianet(CREDENTIALS) + +params = { + 'id': 1 +} + +body = { + 'name': 'My new plan' +} + +response = gn.update_plan(params=params, body=body) +print(response) diff --git a/gerencianet/constants.py b/gerencianet/constants.py index 7b9e2dc..5388623 100755 --- a/gerencianet/constants.py +++ b/gerencianet/constants.py @@ -131,5 +131,13 @@ class Constants(object): 'update_charge_link': { 'route': '/charge/:id/link', 'method': 'put' + }, + 'update_plan': { + 'route': '/plan/:id', + 'method': 'put' + }, + 'create_subscription_history': { + 'route': '/subscription/:id/history', + 'method': 'post' } } diff --git a/gerencianet/version.py b/gerencianet/version.py index 0ec0dcd..b4c9094 100755 --- a/gerencianet/version.py +++ b/gerencianet/version.py @@ -1,3 +1,3 @@ # encoding: utf-8 -VERSION='1.0.7' +VERSION='1.0.8' diff --git a/setup.py b/setup.py index a6e265e..c69b1de 100755 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ setup( name='gerencianet', - version='1.0.7', + version='1.0.8', description='Module for integration with Gerencianet API', long_description=long_description,