Skip to content

Commit

Permalink
Add new endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipeMata committed Jan 5, 2018
1 parent d66fae7 commit 7de841d
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
18 changes: 18 additions & 0 deletions examples/create_subscription_history.py
Original file line number Diff line number Diff line change
@@ -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)
17 changes: 17 additions & 0 deletions examples/update_plan.py
Original file line number Diff line number Diff line change
@@ -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)
8 changes: 8 additions & 0 deletions gerencianet/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
2 changes: 1 addition & 1 deletion gerencianet/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# encoding: utf-8

VERSION='1.0.7'
VERSION='1.0.8'
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7de841d

Please sign in to comment.