@insignia-education/api-sdk-js 0.15.21 → 0.15.22

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insignia-education/api-sdk-js",
3
- "version": "0.15.21",
3
+ "version": "0.15.22",
4
4
  "description": "JavaScript SDK for the Insignia Education API",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -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
  };