@itutoring/itutoring_application_js_api 1.3.14 → 1.3.16
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/modules/Payments.js +9 -0
- package/objects/AttendanceEvent.js +4 -1
- package/objects/Event.js +2 -0
- package/package.json +1 -1
package/modules/Payments.js
CHANGED
|
@@ -10,6 +10,7 @@ class Payments
|
|
|
10
10
|
// All method names
|
|
11
11
|
static #PURCHASE = "Purchase";
|
|
12
12
|
static #VALIDATE_PURCHASE = "ValidatePurchase";
|
|
13
|
+
static #GET_AVAILABLE_ITEMS = "GetAvailableItems";
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* Purchase specific product. After calling you'll be redirected depending on the result to success or cancel (failed) url
|
|
@@ -47,6 +48,14 @@ class Payments
|
|
|
47
48
|
|
|
48
49
|
return APIController.IntToBool(res);
|
|
49
50
|
}
|
|
51
|
+
|
|
52
|
+
// Array of avaialable item names. returned as parsed json.
|
|
53
|
+
static async GetAvailableItems()
|
|
54
|
+
{
|
|
55
|
+
var res = await APIController.Get(this.#MODULE, this.#GET_AVAILABLE_ITEMS);
|
|
56
|
+
|
|
57
|
+
return JSON.parse(res);
|
|
58
|
+
}
|
|
50
59
|
}
|
|
51
60
|
|
|
52
61
|
export default Payments;
|
package/objects/Event.js
CHANGED
|
@@ -83,6 +83,7 @@ class iEvent
|
|
|
83
83
|
Place;
|
|
84
84
|
Class;
|
|
85
85
|
Students;
|
|
86
|
+
Item;
|
|
86
87
|
|
|
87
88
|
|
|
88
89
|
CreateFromJSON(json)
|
|
@@ -108,6 +109,7 @@ class iEvent
|
|
|
108
109
|
this.Class = json['Class'];
|
|
109
110
|
this.Place = json['Place'];
|
|
110
111
|
this.Students = json['Students'];
|
|
112
|
+
this.Item = json['Item'];
|
|
111
113
|
}
|
|
112
114
|
}
|
|
113
115
|
|