@ariary/ariary 3.0.5 → 3.0.7

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.
Files changed (2) hide show
  1. package/README.md +9 -15
  2. package/package.json +17 -19
package/README.md CHANGED
@@ -47,13 +47,16 @@ const result = await Ariari.tasks({
47
47
  order: -1
48
48
  });
49
49
 
50
- const nextResult = await Ariari.tasks(result.next);
51
- ...
52
- const prevResult = await Ariari.tasks(result.prev);
50
+ const fetchTasks = (from) => Ariari.tasks({ from, count: 20, order: -1 });
51
+
52
+ // Get next and previous pages
53
+ const nextResult = await fetchTasks(result.next);
54
+ const prevResult = await fetchTasks(result.prev);
53
55
  ```
54
56
 
55
57
  ## Payment
56
58
 
59
+ ### Create Payment
57
60
 
58
61
  ```typescript
59
62
  const payment = await Ariari.payment.create({
@@ -61,18 +64,6 @@ const payment = await Ariari.payment.create({
61
64
  amount: 5000,
62
65
  projectId: 'your-project-id'
63
66
  });
64
-
65
- // Get payment details
66
- await payment.get();
67
-
68
- // Update payment
69
- await payment.updateRest('TICKET123');
70
- ```
71
-
72
- ### Get All Payments
73
-
74
- ```typescript
75
- const payments = await Ariari.payment.getAll();
76
67
  ```
77
68
 
78
69
  ### Get Payment by ID
@@ -82,6 +73,9 @@ const payment = Ariari.payment.getById('payment-id-123');
82
73
  await payment.get();
83
74
  await payment.updateRest('TICKET123');
84
75
  ```
76
+
77
+ ### Payment Operations
78
+
85
79
  ```typescript
86
80
  const payment = await Ariari.payment.payment({
87
81
  phone: '261345678901',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariary/ariary",
3
- "version": "3.0.5",
3
+ "version": "3.0.7",
4
4
  "description": "SDK officiel pour l'API de paiement Ariary",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -15,24 +15,22 @@
15
15
  "files": [
16
16
  "dist"
17
17
  ],
18
- "tsup": [
19
- {
20
- "entry": {
21
- "index": "src/index.ts"
22
- },
23
- "format": [
24
- "cjs",
25
- "esm"
26
- ],
27
- "outDir": "dist",
28
- "dts": true,
29
- "splitting": false,
30
- "sourcemap": false,
31
- "clean": true,
32
- "minify": false,
33
- "exclude": ["README.md"]
34
- }
35
- ],
18
+ "tsup": {
19
+ "entry": {
20
+ "index": "src/index.ts"
21
+ },
22
+ "format": [
23
+ "cjs",
24
+ "esm"
25
+ ],
26
+ "outDir": "dist",
27
+ "dts": true,
28
+ "splitting": false,
29
+ "sourcemap": false,
30
+ "clean": true,
31
+ "minify": false,
32
+ "exclude": ["README.md"]
33
+ },
36
34
  "scripts": {
37
35
  "build": "tsup",
38
36
  "test": "echo \"Error: no test specified\" && exit 1"