paystack-sdk 2.5.5 → 2.5.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.
package/dist/plan/plan.js
CHANGED
|
@@ -28,8 +28,7 @@ class Plan {
|
|
|
28
28
|
*/
|
|
29
29
|
create(data) {
|
|
30
30
|
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
-
|
|
32
|
-
return JSON.parse(response.data);
|
|
31
|
+
return yield this.http.post('/plan', JSON.stringify(data));
|
|
33
32
|
});
|
|
34
33
|
}
|
|
35
34
|
/**
|
|
@@ -40,10 +39,9 @@ class Plan {
|
|
|
40
39
|
*/
|
|
41
40
|
list(queryParams) {
|
|
42
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
|
|
42
|
+
return yield this.http.get('/plan', {
|
|
44
43
|
params: Object.assign({}, queryParams),
|
|
45
44
|
});
|
|
46
|
-
return JSON.parse(response.data);
|
|
47
45
|
});
|
|
48
46
|
}
|
|
49
47
|
/**
|
|
@@ -54,8 +52,7 @@ class Plan {
|
|
|
54
52
|
*/
|
|
55
53
|
fetch(id) {
|
|
56
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
|
|
58
|
-
return JSON.parse(response.data);
|
|
55
|
+
return yield this.http.get(`/plan/${id}`);
|
|
59
56
|
});
|
|
60
57
|
}
|
|
61
58
|
/**
|
|
@@ -67,8 +64,7 @@ class Plan {
|
|
|
67
64
|
*/
|
|
68
65
|
update(id, data) {
|
|
69
66
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
|
|
71
|
-
return JSON.parse(response.data);
|
|
67
|
+
return yield this.http.put(`/plan/${id}`, JSON.stringify(data));
|
|
72
68
|
});
|
|
73
69
|
}
|
|
74
70
|
}
|
|
@@ -19,7 +19,7 @@ export declare class Transaction {
|
|
|
19
19
|
* @param {InitializeTransaction} data **Body Param**
|
|
20
20
|
*/
|
|
21
21
|
initialize(data: InitializeTransaction): Promise<TransactionInitialized | BadRequest>;
|
|
22
|
-
verify(reference:
|
|
22
|
+
verify(reference: string): Promise<GetTransactionResponse | BadRequest>;
|
|
23
23
|
list(queryParams?: ListTransactionQueryParams): Promise<ListTransactions | BadRequest>;
|
|
24
24
|
fetch(id: string): Promise<GetTransactionResponse | BadRequest>;
|
|
25
25
|
chargeAuthorization(data: ChargeAuthorization): Promise<GetTransactionResponse | BadRequest>;
|
|
@@ -30,7 +30,7 @@ class Transaction {
|
|
|
30
30
|
}
|
|
31
31
|
verify(reference) {
|
|
32
32
|
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
return yield this.http.get(`/transaction/verify
|
|
33
|
+
return yield this.http.get(`/transaction/verify/${reference}`);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
list(queryParams) {
|