@pague-dev/sdk-node 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
SDK oficial do [pague.dev](https://pague.dev) para Node.js e browsers.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Instalação
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install @pague-dev/sdk-node
|
|
@@ -18,6 +18,23 @@ const pdev = new Pdev('pd_live_sua_api_key');
|
|
|
18
18
|
|
|
19
19
|
// Opção 2: Usar variável de ambiente PDEV_API_KEY
|
|
20
20
|
const pdev = new Pdev();
|
|
21
|
+
|
|
22
|
+
// PIX
|
|
23
|
+
await pdev.pix.create({ amount, description, customer });
|
|
24
|
+
|
|
25
|
+
// Charges
|
|
26
|
+
await pdev.charges.create({ projectId, name, amount, paymentMethods });
|
|
27
|
+
|
|
28
|
+
// Customers
|
|
29
|
+
await pdev.customers.create({ name, document });
|
|
30
|
+
await pdev.customers.list({ page, limit, search });
|
|
31
|
+
|
|
32
|
+
// Projects
|
|
33
|
+
await pdev.projects.create({ name, color });
|
|
34
|
+
await pdev.projects.list({ page, limit });
|
|
35
|
+
|
|
36
|
+
// Transactions
|
|
37
|
+
await pdev.transactions.get(id);
|
|
21
38
|
```
|
|
22
39
|
|
|
23
40
|
## Recursos
|
|
@@ -29,10 +46,14 @@ const pdev = new Pdev();
|
|
|
29
46
|
- **Transactions** - Consulta de transações
|
|
30
47
|
- **Webhooks** - Notificações em tempo real
|
|
31
48
|
|
|
32
|
-
##
|
|
49
|
+
## Exemplo
|
|
50
|
+
|
|
51
|
+
Veja uma aplicação completa usando o SDK: **[github.com/pague-dev/sdk-example](https://github.com/pague-dev/sdk-example)**
|
|
52
|
+
|
|
53
|
+
## Documentação
|
|
33
54
|
|
|
34
|
-
|
|
55
|
+
Guias e exemplos completos: **[docs.pague.dev](https://docs.pague.dev)**
|
|
35
56
|
|
|
36
|
-
##
|
|
57
|
+
## Licença
|
|
37
58
|
|
|
38
59
|
MIT
|