Skip to content

Commit e01c302

Browse files
committed
Release 1.0.0
1 parent 403f87a commit e01c302

File tree

112 files changed

+366
-10596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+366
-10596
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ npm-debug.log
77
coverage/
88
.idea/
99
examples/open-accounts/
10-
examples/pix/split/
10+
examples/pix/split/
11+
package-lock.json

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
# gn-api-sdk-typescript
1+
<h1 align="center">SDK Typescript para APIs Efí Pay</h1>
22

3-
> A Typescript module for integration of your backend with the payment services provided by [Gerencianet](http://gerencianet.com.br).
3+
![Banner APIs Efí Pay](https://gnetbr.com/BJgSIUhlYs)
44

5-
> Um módulo Typescript para integrar seu backend com os serviços de pagamento da [Gerencianet](http://gerencianet.com.br).
65

6+
> Um módulo Typescript para integrar seu backend com os serviços de pagamento da [Efí](http://sejaefi.com.br).
77
## Instalação
88

99
```bash
10-
$ npm install gn-api-sdk-typescript
10+
$ npm install sdk-typescript-apis-efi
1111
```
1212

1313
## Uso Básico
1414

1515
Importe o módulo:
1616

1717
```typescript
18-
import Gerencianet from 'gn-api-sdk-typescript';
18+
import EfiPay from 'sdk-typescript-apis-efi';
1919
```
2020

2121
Insira suas credenciais e defina se deseja usar o sandbox ou não.
@@ -35,7 +35,7 @@ export = {
3535
Instancie o módulo passando as options:
3636

3737
```typescript
38-
const gerencianet = Gerencianet(options);
38+
const efipay = EfiPay(options);
3939
```
4040

4141
Crie uma cobrança:
@@ -51,7 +51,7 @@ var body = {
5151
],
5252
};
5353

54-
gerencianet
54+
efipay
5555
.createCharge({}, body)
5656
.then((resposta: any) => {
5757
console.log(resposta);
@@ -67,8 +67,8 @@ gerencianet
6767
Para executar os exemplos, clone este repo e instale as dependências:
6868

6969
```bash
70-
$ git clone git@github.com:gerencianet/gn-api-sdk-typescript.git
71-
$ cd gn-api-sdk-typescript/examples
70+
$ git clone git@github.com:efipay/sdk-typescript-apis-efi.git
71+
$ cd sdk-typescript-apis-efi/examples
7272
$ npm install
7373
```
7474

@@ -93,7 +93,7 @@ $ ts-node createCharge.ts
9393

9494
## Documentação
9595

96-
A documentação completa com todos os endpoints disponíveis você encontra em: https://dev.gerencianet.com.br/.
96+
A documentação completa com todos os endpoints disponíveis você encontra em: https://dev.efipay.com.br/.
9797

9898
## License
9999

examples/charges/billet/cancelBillet.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/* eslint-disable import/no-unresolved */
22
/* eslint-disable import/extensions */
3-
import Gerencianet from 'gn-api-sdk-typescript';
3+
import EfiPay from 'gn-api-sdk-typescript';
44
import options from '../../credentials';
55

66
const params = {
77
id: 0,
88
};
99

10-
const gerencianet = new Gerencianet(options);
10+
const efipay = new EfiPay(options);
1111

12-
gerencianet
12+
efipay
1313
.cancelCharge(params)
1414
.then((resposta: Promise<any>) => {
1515
console.log(resposta);

examples/charges/billet/createBilletHistory.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const params = {
@@ -10,9 +10,9 @@ const body = {
1010
description: 'This charge was not fully paid',
1111
};
1212

13-
const gerencianet = new Gerencianet(options);
13+
const efipay = new EfiPay(options);
1414

15-
gerencianet
15+
efipay
1616
.createChargeHistory(params, body)
1717
.then((resposta: Promise<any>) => {
1818
console.log(resposta);

examples/charges/billet/createCharge.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const body = {
@@ -18,9 +18,9 @@ const body = {
1818
],
1919
};
2020

21-
const gerencianet = new Gerencianet(options);
21+
const efipay = new EfiPay(options);
2222

23-
gerencianet
23+
efipay
2424
.createCharge({}, body)
2525
.then((resposta: Promise<any>) => {
2626
console.log(resposta);

examples/charges/billet/createOneStepBillet.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const body = {
@@ -8,7 +8,7 @@ const body = {
88
expire_at: '2024-09-20',
99
customer: {
1010
name: 'Gorbadoc Oldbuck',
11-
email: 'oldbuck@gerencianet.com.br',
11+
email: 'oldbuck@efipay.com.br',
1212
cpf: '94271564656',
1313
birth: '1977-01-15',
1414
phone_number: '5144916523',
@@ -31,9 +31,9 @@ const body = {
3131
],
3232
};
3333

34-
const gerencianet = new Gerencianet(options);
34+
const efipay = new EfiPay(options);
3535

36-
gerencianet
36+
efipay
3737
.createOneStepCharge([], body)
3838
.then((resposta: Promise<any>) => {
3939
console.log(resposta);

examples/charges/billet/defineBalanceSheetBillet.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const params = {
@@ -60,7 +60,7 @@ const body = {
6060
align: 'left',
6161
color: '#000000',
6262
style: 'normal',
63-
text: 'Confira na documentação da Gerencianet todas as configurações possíveis de um boleto balancete.',
63+
text: 'Confira na documentação da EfiPay todas as configurações possíveis de um boleto balancete.',
6464
colspan: 4,
6565
},
6666
],
@@ -71,9 +71,9 @@ const body = {
7171
],
7272
};
7373

74-
const gerencianet = new Gerencianet(options);
74+
const efipay = new EfiPay(options);
7575

76-
gerencianet
76+
efipay
7777
.defineBalanceSheetBillet(params, body)
7878
.then((resposta: Promise<any>) => {
7979
console.log(resposta);

examples/charges/billet/defineBilletPayMethod.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const params = {
@@ -12,7 +12,7 @@ const body = {
1212
expire_at: '2023-12-01',
1313
customer: {
1414
name: 'Gorbadoc Oldbuck',
15-
email: 'oldbuck@gerencianet.com.br',
15+
email: 'oldbuck@efipay.com.br',
1616
cpf: '94271564656',
1717
birth: '1977-01-15',
1818
phone_number: '5144916523',
@@ -21,9 +21,9 @@ const body = {
2121
},
2222
};
2323

24-
const gerencianet = new Gerencianet(options);
24+
const efipay = new EfiPay(options);
2525

26-
gerencianet
26+
efipay
2727
.definePayMethod(params, body)
2828
.then((resposta: Promise<any>) => {
2929
console.log(resposta);

examples/charges/billet/detailBillet.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const params = {
66
id: 0,
77
};
88

9-
const gerencianet = new Gerencianet(options);
9+
const efipay = new EfiPay(options);
1010

11-
gerencianet
11+
efipay
1212
.detailCharge(params)
1313
.then((resposta: Promise<any>) => {
1414
console.log(resposta);

examples/charges/billet/sendBilletEmail.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const params = {
66
id: 1000,
77
};
88

99
const body = {
10-
email: 'oldbuck@gerencianet.com.br',
10+
email: 'oldbuck@efipay.com.br',
1111
};
1212

13-
const gerencianet = new Gerencianet(options);
13+
const efipay = new EfiPay(options);
1414

15-
gerencianet
15+
efipay
1616
.sendBilletEmail(params, body)
1717
.then((resposta: Promise<any>) => {
1818
console.log(resposta);

examples/charges/billet/settleBillet.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const params = {
66
id: 553834,
77
};
88

9-
const gerencianet = new Gerencianet(options);
9+
const efipay = new EfiPay(options);
1010

11-
gerencianet
11+
efipay
1212
.settleCharge(params)
1313
.then((resposta: Promise<any>) => {
1414
console.log(resposta);

examples/charges/billet/updateBillet.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const params = {
@@ -10,9 +10,9 @@ const body = {
1010
expire_at: '2024-12-12',
1111
};
1212

13-
const gerencianet = new Gerencianet(options);
13+
const efipay = new EfiPay(options);
1414

15-
gerencianet
15+
efipay
1616
.updateBillet(params, body)
1717
.then((resposta: Promise<any>) => {
1818
console.log(resposta);

examples/charges/billet/updateBilletMetadata.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const params = {
@@ -11,9 +11,9 @@ const body = {
1111
custom_id: 'my_new_id',
1212
};
1313

14-
const gerencianet = new Gerencianet(options);
14+
const efipay = new EfiPay(options);
1515

16-
gerencianet
16+
efipay
1717
.updateChargeMetadata(params, body)
1818
.then((resposta: Promise<any>) => {
1919
console.log(resposta);

examples/charges/card/cancelCard.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const params = {
66
id: 0,
77
};
88

9-
const gerencianet = new Gerencianet(options);
9+
const efipay = new EfiPay(options);
1010

11-
gerencianet
11+
efipay
1212
.cancelCharge(params)
1313
.then((resposta: Promise<any>) => {
1414
console.log(resposta);

examples/charges/card/createCardHistory.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const params = {
@@ -10,9 +10,9 @@ const body = {
1010
description: 'This charge was not fully paid',
1111
};
1212

13-
const gerencianet = new Gerencianet(options);
13+
const efipay = new EfiPay(options);
1414

15-
gerencianet
15+
efipay
1616
.createChargeHistory(params, body)
1717
.then((resposta: Promise<any>) => {
1818
console.log(resposta);

examples/charges/card/createCharge.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const body = {
@@ -18,9 +18,9 @@ const body = {
1818
],
1919
};
2020

21-
const gerencianet = new Gerencianet(options);
21+
const efipay = new EfiPay(options);
2222

23-
gerencianet
23+
efipay
2424
.createCharge({}, body)
2525
.then((resposta: Promise<any>) => {
2626
console.log(resposta);

examples/charges/card/createOneStepCard.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable import/extensions */
2-
import Gerencianet from 'gn-api-sdk-typescript';
2+
import EfiPay from 'gn-api-sdk-typescript';
33
import options from '../../credentials';
44

55
const body = {
@@ -17,7 +17,7 @@ const body = {
1717
},
1818
customer: {
1919
name: 'Gorbadoc Oldbuck',
20-
email: 'oldbuck@gerencianet.com.br',
20+
email: 'oldbuck@efipay.com.br',
2121
cpf: '94271564656',
2222
birth: '1977-01-15',
2323
phone_number: '5144916523',
@@ -40,9 +40,9 @@ const body = {
4040
],
4141
};
4242

43-
const gerencianet = new Gerencianet(options);
43+
const efipay = new EfiPay(options);
4444

45-
gerencianet
45+
efipay
4646
.createOneStepCharge([], body)
4747
.then((resposta: Promise<any>) => {
4848
console.log(resposta);

0 commit comments

Comments
 (0)