@insignia-education/api-sdk-js 0.15.19 → 0.15.20
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/package.json +1 -1
- package/src/api/v1/Payments.js +15 -4
package/package.json
CHANGED
package/src/api/v1/Payments.js
CHANGED
|
@@ -21,10 +21,21 @@ export default class Payments {
|
|
|
21
21
|
const client = this.#client;
|
|
22
22
|
return {
|
|
23
23
|
edit: (id, data) => client.patch(`${base}/${id}`, data),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Employee-only: remove/restore any of a payment's line items. Removal is a
|
|
29
|
+
* soft delete — the line stays visible in the admin panel flagged as removed,
|
|
30
|
+
* and restore() puts it back. `type` is one of 'courses' | 'sessions' |
|
|
31
|
+
* 'quizzes' | 'premiums' | 'taxes'.
|
|
32
|
+
*/
|
|
33
|
+
items(paymentId) {
|
|
34
|
+
const base = `/payments/${paymentId}`;
|
|
35
|
+
const client = this.#client;
|
|
36
|
+
return {
|
|
37
|
+
delete: (type, id) => client.del(`${base}/${type}/${id}`),
|
|
38
|
+
restore: (type, id) => client.post(`${base}/${type}/${id}/restore`),
|
|
28
39
|
};
|
|
29
40
|
}
|
|
30
41
|
|