-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd1354b
commit ecc711f
Showing
161 changed files
with
2,292 additions
and
1,718 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let params = { | ||
id: 0, | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.cancelCharge(params) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let params = { | ||
id: 1001, | ||
} | ||
|
||
let body = { | ||
description: 'This charge was not fully paid', | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.createChargeHistory(params, body) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let body = { | ||
items: [ | ||
{ | ||
name: 'Product 1', | ||
value: 1000, | ||
amount: 2, | ||
}, | ||
], | ||
shippings: [ | ||
{ | ||
name: 'Default Shipping Cost', | ||
value: 100, | ||
}, | ||
], | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.createCharge({}, body) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let body = { | ||
payment: { | ||
banking_billet: { | ||
expire_at: '2024-09-20', | ||
customer: { | ||
name: 'Gorbadoc Oldbuck', | ||
email: '[email protected]', | ||
cpf: '94271564656', | ||
birth: '1977-01-15', | ||
phone_number: '5144916523', | ||
}, | ||
}, | ||
}, | ||
|
||
items: [ | ||
{ | ||
name: 'Product 1', | ||
value: 500, | ||
amount: 1, | ||
}, | ||
], | ||
shippings: [ | ||
{ | ||
name: 'Default Shipping Cost', | ||
value: 100, | ||
}, | ||
], | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.createOneStepCharge([], body) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let params = { | ||
id: 0, | ||
} | ||
|
||
let 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 de um boleto balancete.', | ||
colspan: 4, | ||
}, | ||
], | ||
], | ||
}, | ||
], | ||
}, | ||
], | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.defineBalanceSheetBillet(params, body) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let params = { | ||
id: 0, | ||
} | ||
|
||
let body = { | ||
payment: { | ||
banking_billet: { | ||
expire_at: '2023-12-01', | ||
customer: { | ||
name: 'Gorbadoc Oldbuck', | ||
email: '[email protected]', | ||
cpf: '94271564656', | ||
birth: '1977-01-15', | ||
phone_number: '5144916523', | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.definePayMethod(params, body) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let params = { | ||
id: 0, | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.detailCharge(params) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let params = { | ||
id: 1000, | ||
} | ||
|
||
let body = { | ||
email: '[email protected]', | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.sendBilletEmail(params, body) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let params = { | ||
id: 553834, | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.settleCharge(params) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let params = { | ||
id: 1008, | ||
} | ||
|
||
let body = { | ||
expire_at: '2024-12-12', | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.updateBillet(params, body) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let params = { | ||
id: 1008, | ||
} | ||
|
||
let body = { | ||
notification_url: 'http://yourdomain.com', | ||
custom_id: 'my_new_id', | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.updateChargeMetadata(params, body) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let params = { | ||
id: 0, | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.cancelCharge(params) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let params = { | ||
id: 1001, | ||
} | ||
|
||
let body = { | ||
description: 'This charge was not fully paid', | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.createChargeHistory(params, body) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const Gerencianet = require('gn-api-sdk-node') | ||
const options = require('../../credentials') | ||
|
||
let body = { | ||
items: [ | ||
{ | ||
name: 'Product 1', | ||
value: 1000, | ||
amount: 2, | ||
}, | ||
], | ||
shippings: [ | ||
{ | ||
name: 'Default Shipping Cost', | ||
value: 100, | ||
}, | ||
], | ||
} | ||
|
||
const gerencianet = new Gerencianet(options) | ||
|
||
gerencianet.createCharge({}, body) | ||
.then((resposta) => { | ||
console.log(resposta) | ||
}) | ||
.catch((error) => { | ||
console.log(error) | ||
}) |
Oops, something went wrong.