@ikonintegration/mod-license-client 3.0.1 → 3.0.3
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.
|
@@ -8,10 +8,10 @@ export default class License {
|
|
|
8
8
|
req.body = { productID, externalID, sessionID };
|
|
9
9
|
return await req.exec();
|
|
10
10
|
}
|
|
11
|
-
async redeemLicense(activationCode, productID, externalID, referralID) {
|
|
11
|
+
async redeemLicense(activationCode, productID, externalID, referralID, sessionID) {
|
|
12
12
|
const req = await this.api.newBaseRequest("POST");
|
|
13
13
|
req.path = "/license/redeem";
|
|
14
|
-
req.body = { key: activationCode, productID, externalID, referralID };
|
|
14
|
+
req.body = { key: activationCode, productID, externalID, referralID, sessionID };
|
|
15
15
|
return await req.exec();
|
|
16
16
|
}
|
|
17
17
|
async revokeLicense(licenseID) {
|
|
@@ -3,14 +3,20 @@ export default class LicenseConsumption {
|
|
|
3
3
|
this.api = API;
|
|
4
4
|
}
|
|
5
5
|
async getLicenseConsumption(licenseID, consumptionID) {
|
|
6
|
-
const req = await this.api.newBaseRequest(
|
|
7
|
-
req.path =
|
|
6
|
+
const req = await this.api.newBaseRequest("GET");
|
|
7
|
+
req.path = "/license/" + licenseID + "/consumption/" + consumptionID;
|
|
8
8
|
return await req.exec();
|
|
9
9
|
}
|
|
10
10
|
async getLicenseConsumptions(consumptionIDs) {
|
|
11
|
-
const req = await this.api.newBaseRequest(
|
|
11
|
+
const req = await this.api.newBaseRequest("POST");
|
|
12
12
|
req.body = { IDs: consumptionIDs };
|
|
13
|
-
req.path =
|
|
13
|
+
req.path = "/licenses/consumptions";
|
|
14
|
+
return await req.exec();
|
|
15
|
+
}
|
|
16
|
+
async updateLicenseConsumptions(consumptionID, consumptionObj) {
|
|
17
|
+
const req = await this.api.newBaseRequest("PUT");
|
|
18
|
+
req.body = { ...consumptionObj };
|
|
19
|
+
req.path = "/license/consumption/" + consumptionID;
|
|
14
20
|
return await req.exec();
|
|
15
21
|
}
|
|
16
22
|
}
|