Skip to content

Commit 7de841d

Browse files
committed
Add new endpoints
1 parent d66fae7 commit 7de841d

File tree

6 files changed

+51
-2
lines changed

6 files changed

+51
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 1.0.8
2+
3+
- Added: new endpoint (update plan)
4+
- Added: new endpoint (create subscription history)
5+
- Updated: examples
6+
17
# 1.0.7
28

39
- Added: new endpoint (update charge link)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# encoding: utf-8
2+
3+
from gerencianet import Gerencianet
4+
from credentials import CREDENTIALS
5+
6+
gn = Gerencianet(CREDENTIALS)
7+
8+
9+
params = {
10+
'id': 1000
11+
}
12+
13+
body = {
14+
'description': "This subscription was not fully paid"
15+
}
16+
17+
response = gn.create_subscription_history(params=params, body=body)
18+
print(response)

examples/update_plan.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# encoding: utf-8
2+
3+
from gerencianet import Gerencianet
4+
from credentials import CREDENTIALS
5+
6+
gn = Gerencianet(CREDENTIALS)
7+
8+
params = {
9+
'id': 1
10+
}
11+
12+
body = {
13+
'name': 'My new plan'
14+
}
15+
16+
response = gn.update_plan(params=params, body=body)
17+
print(response)

gerencianet/constants.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,13 @@ class Constants(object):
131131
'update_charge_link': {
132132
'route': '/charge/:id/link',
133133
'method': 'put'
134+
},
135+
'update_plan': {
136+
'route': '/plan/:id',
137+
'method': 'put'
138+
},
139+
'create_subscription_history': {
140+
'route': '/subscription/:id/history',
141+
'method': 'post'
134142
}
135143
}

gerencianet/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# encoding: utf-8
22

3-
VERSION='1.0.7'
3+
VERSION='1.0.8'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
setup(
1818
name='gerencianet',
1919

20-
version='1.0.7',
20+
version='1.0.8',
2121

2222
description='Module for integration with Gerencianet API',
2323
long_description=long_description,

0 commit comments

Comments
 (0)