-
Notifications
You must be signed in to change notification settings - Fork 5
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
1499f18
commit aa0c015
Showing
161 changed files
with
2,512 additions
and
1,714 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,19 @@ | ||
/* eslint-disable import/no-unresolved */ | ||
/* eslint-disable import/extensions */ | ||
import Gerencianet from 'gn-api-sdk-typescript'; | ||
import options from '../../credentials'; | ||
|
||
const params = { | ||
id: 0, | ||
}; | ||
|
||
const gerencianet = new Gerencianet(options); | ||
|
||
gerencianet | ||
.cancelCharge(params) | ||
.then((resposta: Promise<any>) => { | ||
console.log(resposta); | ||
}) | ||
.catch((error: Promise<any>) => { | ||
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,22 @@ | ||
/* eslint-disable import/extensions */ | ||
import Gerencianet from 'gn-api-sdk-typescript'; | ||
import options from '../../credentials'; | ||
|
||
const params = { | ||
id: 1001, | ||
}; | ||
|
||
const body = { | ||
description: 'This charge was not fully paid', | ||
}; | ||
|
||
const gerencianet = new Gerencianet(options); | ||
|
||
gerencianet | ||
.createChargeHistory(params, body) | ||
.then((resposta: Promise<any>) => { | ||
console.log(resposta); | ||
}) | ||
.catch((error: Promise<any>) => { | ||
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,30 @@ | ||
/* eslint-disable import/extensions */ | ||
import Gerencianet from 'gn-api-sdk-typescript'; | ||
import options from '../../credentials'; | ||
|
||
const 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: Promise<any>) => { | ||
console.log(resposta); | ||
}) | ||
.catch((error: Promise<any>) => { | ||
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,43 @@ | ||
/* eslint-disable import/extensions */ | ||
import Gerencianet from 'gn-api-sdk-typescript'; | ||
import options from '../../credentials'; | ||
|
||
const 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: Promise<any>) => { | ||
console.log(resposta); | ||
}) | ||
.catch((error: Promise<any>) => { | ||
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,83 @@ | ||
/* eslint-disable import/extensions */ | ||
import Gerencianet from 'gn-api-sdk-typescript'; | ||
import options from '../../credentials'; | ||
|
||
const params = { | ||
id: 0, | ||
}; | ||
|
||
const 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: Promise<any>) => { | ||
console.log(resposta); | ||
}) | ||
.catch((error: Promise<any>) => { | ||
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,33 @@ | ||
/* eslint-disable import/extensions */ | ||
import Gerencianet from 'gn-api-sdk-typescript'; | ||
import options from '../../credentials'; | ||
|
||
const params = { | ||
id: 0, | ||
}; | ||
|
||
const 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: Promise<any>) => { | ||
console.log(resposta); | ||
}) | ||
.catch((error: Promise<any>) => { | ||
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,18 @@ | ||
/* eslint-disable import/extensions */ | ||
import Gerencianet from 'gn-api-sdk-typescript'; | ||
import options from '../../credentials'; | ||
|
||
const params = { | ||
id: 0, | ||
}; | ||
|
||
const gerencianet = new Gerencianet(options); | ||
|
||
gerencianet | ||
.detailCharge(params) | ||
.then((resposta: Promise<any>) => { | ||
console.log(resposta); | ||
}) | ||
.catch((error: Promise<any>) => { | ||
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,22 @@ | ||
/* eslint-disable import/extensions */ | ||
import Gerencianet from 'gn-api-sdk-typescript'; | ||
import options from '../../credentials'; | ||
|
||
const params = { | ||
id: 1000, | ||
}; | ||
|
||
const body = { | ||
email: '[email protected]', | ||
}; | ||
|
||
const gerencianet = new Gerencianet(options); | ||
|
||
gerencianet | ||
.sendBilletEmail(params, body) | ||
.then((resposta: Promise<any>) => { | ||
console.log(resposta); | ||
}) | ||
.catch((error: Promise<any>) => { | ||
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,18 @@ | ||
/* eslint-disable import/extensions */ | ||
import Gerencianet from 'gn-api-sdk-typescript'; | ||
import options from '../../credentials'; | ||
|
||
const params = { | ||
id: 553834, | ||
}; | ||
|
||
const gerencianet = new Gerencianet(options); | ||
|
||
gerencianet | ||
.settleCharge(params) | ||
.then((resposta: Promise<any>) => { | ||
console.log(resposta); | ||
}) | ||
.catch((error: Promise<any>) => { | ||
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,22 @@ | ||
/* eslint-disable import/extensions */ | ||
import Gerencianet from 'gn-api-sdk-typescript'; | ||
import options from '../../credentials'; | ||
|
||
const params = { | ||
id: 1008, | ||
}; | ||
|
||
const body = { | ||
expire_at: '2024-12-12', | ||
}; | ||
|
||
const gerencianet = new Gerencianet(options); | ||
|
||
gerencianet | ||
.updateBillet(params, body) | ||
.then((resposta: Promise<any>) => { | ||
console.log(resposta); | ||
}) | ||
.catch((error: Promise<any>) => { | ||
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,23 @@ | ||
/* eslint-disable import/extensions */ | ||
import Gerencianet from 'gn-api-sdk-typescript'; | ||
import options from '../../credentials'; | ||
|
||
const params = { | ||
id: 1008, | ||
}; | ||
|
||
const body = { | ||
notification_url: 'http://yourdomain.com', | ||
custom_id: 'my_new_id', | ||
}; | ||
|
||
const gerencianet = new Gerencianet(options); | ||
|
||
gerencianet | ||
.updateChargeMetadata(params, body) | ||
.then((resposta: Promise<any>) => { | ||
console.log(resposta); | ||
}) | ||
.catch((error: Promise<any>) => { | ||
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,18 @@ | ||
/* eslint-disable import/extensions */ | ||
import Gerencianet from 'gn-api-sdk-typescript'; | ||
import options from '../../credentials'; | ||
|
||
const params = { | ||
id: 0, | ||
}; | ||
|
||
const gerencianet = new Gerencianet(options); | ||
|
||
gerencianet | ||
.cancelCharge(params) | ||
.then((resposta: Promise<any>) => { | ||
console.log(resposta); | ||
}) | ||
.catch((error: Promise<any>) => { | ||
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,22 @@ | ||
/* eslint-disable import/extensions */ | ||
import Gerencianet from 'gn-api-sdk-typescript'; | ||
import options from '../../credentials'; | ||
|
||
const params = { | ||
id: 1001, | ||
}; | ||
|
||
const body = { | ||
description: 'This charge was not fully paid', | ||
}; | ||
|
||
const gerencianet = new Gerencianet(options); | ||
|
||
gerencianet | ||
.createChargeHistory(params, body) | ||
.then((resposta: Promise<any>) => { | ||
console.log(resposta); | ||
}) | ||
.catch((error: Promise<any>) => { | ||
console.log(error); | ||
}); |
Oops, something went wrong.