Skip to content

Commit b1586ca

Browse files
author
Danniel Ribeiro
committed
Added new endpoint.
1 parent d058b44 commit b1586ca

File tree

4 files changed

+96
-1
lines changed

4 files changed

+96
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.0.22
2+
3+
- Added: new endpoint (create charge balance sheet)
4+
15
# 0.0.21
26

37
- Fix: dependencies
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
'use strict';
2+
3+
var Gerencianet = require('gn-api-sdk-node');
4+
var credentials = require('./credentials');
5+
6+
var options = {
7+
client_id: credentials.client_id,
8+
client_secret: credentials.client_secret,
9+
sandbox: true
10+
};
11+
12+
var params = {
13+
id: 0
14+
};
15+
16+
var body = {
17+
title: "Balancete Demonstrativo",
18+
body: [
19+
{
20+
header: "Demonstrativo de Consumo",
21+
tables: [
22+
{
23+
rows: [
24+
[
25+
{
26+
align: "left",
27+
color: "#000000",
28+
style: "bold",
29+
text: "Exemplo de despesa",
30+
colspan: 2
31+
},
32+
{
33+
align: "left",
34+
color: "#000000",
35+
style: "bold",
36+
text: "Total lançado",
37+
colspan: 2
38+
}
39+
],
40+
[
41+
{
42+
align: "left",
43+
color: "#000000",
44+
style: "normal",
45+
text: "Instalação",
46+
colspan: 2
47+
},
48+
{
49+
align: "left",
50+
color: "#000000",
51+
style: "normal",
52+
text: "R$ 100,00",
53+
colspan: 2
54+
}
55+
]
56+
]
57+
}
58+
]
59+
},
60+
{
61+
header: "Balancete Geral",
62+
tables: [
63+
{
64+
rows: [
65+
[
66+
{
67+
align: "left",
68+
color: "#000000",
69+
style: "normal",
70+
text: "Confira na documentação da Gerencianet todas as configurações possíveis de um boleto balancete.",
71+
colspan: 4
72+
}
73+
]
74+
]
75+
}
76+
]
77+
}
78+
]
79+
};
80+
81+
var gerencianet = new Gerencianet(options);
82+
83+
gerencianet
84+
.createChargeBalanceSheet(params, body)
85+
.then(console.log)
86+
.catch(console.log)
87+
.done();

lib/gn-constants.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ module.exports = {
137137
createSubscriptionHistory: {
138138
route: '/subscription/:id/history',
139139
method: 'post'
140+
},
141+
createChargeBalanceSheet: {
142+
route: '/charge/:id/balance-sheet',
143+
method: 'post'
140144
}
141145
}
142146
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gn-api-sdk-node",
33
"description": "Module for integration with Gerencianet API",
4-
"version": "0.0.21",
4+
"version": "0.0.22",
55
"author": "Francisco Carvalho <[email protected]>",
66
"license": "MIT",
77
"repository": "gerencianet/gn-api-sdk-node",

0 commit comments

Comments
 (0)