Skip to content

Commit

Permalink
Add charge balance sheet endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Danniel Ribeiro committed Jul 5, 2018
1 parent 7de841d commit 5d17187
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.9

- Added: new endpoint (create charge balance sheet)

# 1.0.8

- Added: new endpoint (update plan)
Expand Down
78 changes: 78 additions & 0 deletions examples/create_charge_balance_sheet.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# encoding: utf-8

from gerencianet import Gerencianet
from credentials import CREDENTIALS

gn = Gerencianet(CREDENTIALS)

params = {
'id': 1
}

body = {
'title': 'Balancete Demonstrativo',
'body': [
{
'header': 'Demonstrativo de Consumo',
'tables': [
{
'rows': [
[
{
'align': 'left',
'color': '#000000',
'style': 'bold',
'text': 'Exemplo de despesa',
'colspan': 2
},
{
'align': 'left',
'color': '#000000',
'style': 'bold',
'text': 'Total lançado',
'colspan': 2
}
],
[
{
'align': 'left',
'color': '#000000',
'style': 'normal',
'text': 'Instalação',
'colspan': 2
},
{
'align': 'left',
'color': '#000000',
'style': 'normal',
'text': 'R$ 100,00',
'colspan': 2
}
]
]
}
]
},
{
'header': 'Balancete Geral',
'tables': [
{
'rows': [
[
{
'align': 'left',
'color': '#000000',
'style': 'normal',
'text': 'Confira na documentação da Gerencianet todas as configurações possíveis.',
'colspan': 4
}
]
]
}
]
}
]
}

response = gn.create_charge_balance_sheet(params=params, body=body)
print(response)
4 changes: 4 additions & 0 deletions gerencianet/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,9 @@ class Constants(object):
'create_subscription_history': {
'route': '/subscription/:id/history',
'method': 'post'
},
'create_charge_balance_sheet': {
'route': '/charge/:id/balance_sheet',
'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.8'
VERSION = '1.0.9'
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.8',
version='1.0.9',

description='Module for integration with Gerencianet API',
long_description=long_description,
Expand Down

0 comments on commit 5d17187

Please sign in to comment.