@insignia-education/api-sdk-js 0.15.21 → 0.15.23
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 +8 -0
- package/src/api/v1/Search.js +10 -0
- package/src/api/v1/index.js +2 -0
package/package.json
CHANGED
package/src/api/v1/Payments.js
CHANGED
|
@@ -51,6 +51,14 @@ export default class Payments {
|
|
|
51
51
|
const base = `/payments/${paymentId}`;
|
|
52
52
|
const client = this.#client;
|
|
53
53
|
return {
|
|
54
|
+
/**
|
|
55
|
+
* Adds a line. `data` carries only identifiers — every price is
|
|
56
|
+
* derived server-side from the selected entity, never sent by the
|
|
57
|
+
* client. By type: courses `{course_id, course_date_id?}`, premiums
|
|
58
|
+
* `{course_premium_id}`, sessions `{course_id, type_id, quantity}`,
|
|
59
|
+
* quizzes `{quiz_id, course_id, quantity}`, taxes `{tax_id}`.
|
|
60
|
+
*/
|
|
61
|
+
create: (type, data) => client.put(`${base}/${type}`, data),
|
|
54
62
|
delete: (type, id) => client.del(`${base}/${type}/${id}`),
|
|
55
63
|
restore: (type, id) => client.post(`${base}/${type}/${id}/restore`),
|
|
56
64
|
};
|
package/src/api/v1/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import Organizations from './Organizations.js';
|
|
|
21
21
|
import PaymentMethods from './PaymentMethods.js';
|
|
22
22
|
import Payments from './Payments.js';
|
|
23
23
|
import Quizzes from './Quizzes.js';
|
|
24
|
+
import Search from './Search.js';
|
|
24
25
|
import ShortLinks from './ShortLinks.js';
|
|
25
26
|
import Surveys from './Surveys.js';
|
|
26
27
|
import Premiums from './Premiums.js';
|
|
@@ -69,6 +70,7 @@ export default class InsigniaApiV1 extends InsigniaApi {
|
|
|
69
70
|
this.paymentMethods = new PaymentMethods(this);
|
|
70
71
|
this.payments = new Payments(this);
|
|
71
72
|
this.quizzes = new Quizzes(this);
|
|
73
|
+
this.search = new Search(this);
|
|
72
74
|
this.shortLinks = new ShortLinks(this);
|
|
73
75
|
this.surveys = new Surveys(this);
|
|
74
76
|
this.premiums = new Premiums(this);
|