@ikonintegration/mod-license-client 3.0.3 → 3.0.5
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,22 @@ export default class License {
|
|
|
8
8
|
req.body = { productID, externalID, sessionID };
|
|
9
9
|
return await req.exec();
|
|
10
10
|
}
|
|
11
|
-
async redeemLicense(
|
|
11
|
+
async redeemLicense(
|
|
12
|
+
activationCode,
|
|
13
|
+
productID,
|
|
14
|
+
externalID,
|
|
15
|
+
referralID,
|
|
16
|
+
sessionID
|
|
17
|
+
) {
|
|
12
18
|
const req = await this.api.newBaseRequest("POST");
|
|
13
19
|
req.path = "/license/redeem";
|
|
14
|
-
req.body = {
|
|
20
|
+
req.body = {
|
|
21
|
+
key: activationCode,
|
|
22
|
+
productID,
|
|
23
|
+
externalID,
|
|
24
|
+
referralID,
|
|
25
|
+
sessionID,
|
|
26
|
+
};
|
|
15
27
|
return await req.exec();
|
|
16
28
|
}
|
|
17
29
|
async revokeLicense(licenseID) {
|
|
@@ -46,9 +58,15 @@ export default class License {
|
|
|
46
58
|
req.body = { IDs: externalIDs };
|
|
47
59
|
return await req.exec();
|
|
48
60
|
}
|
|
49
|
-
async getAvailableLicensesByExternalAndProductIDs(
|
|
61
|
+
async getAvailableLicensesByExternalAndProductIDs(
|
|
62
|
+
extID,
|
|
63
|
+
productID,
|
|
64
|
+
expanded = false
|
|
65
|
+
) {
|
|
50
66
|
const req = await this.api.newBaseRequest("GET");
|
|
51
|
-
req.path =
|
|
67
|
+
req.path =
|
|
68
|
+
`/licenses/${extID}/product/${productID}/available` +
|
|
69
|
+
(expanded ? "?expanded=true" : "");
|
|
52
70
|
return await req.exec();
|
|
53
71
|
}
|
|
54
72
|
async reserveLicense(reservationID, activationKey, body) {
|
|
@@ -72,4 +90,10 @@ export default class License {
|
|
|
72
90
|
req.path = `/license/reservation/${reservationID}/${activationKey}`;
|
|
73
91
|
return await req.exec();
|
|
74
92
|
}
|
|
93
|
+
async transferOrgLicenses(sourceOrg, targetOrg) {
|
|
94
|
+
const req = await this.api.newBaseRequest("POST");
|
|
95
|
+
req.path = "/licenses/transfer";
|
|
96
|
+
req.body = { sourceOrg, targetOrg };
|
|
97
|
+
return await req.exec();
|
|
98
|
+
}
|
|
75
99
|
}
|
|
@@ -13,7 +13,7 @@ export default class LicenseConsumption {
|
|
|
13
13
|
req.path = "/licenses/consumptions";
|
|
14
14
|
return await req.exec();
|
|
15
15
|
}
|
|
16
|
-
async
|
|
16
|
+
async updateLicenseConsumption(consumptionID, consumptionObj) {
|
|
17
17
|
const req = await this.api.newBaseRequest("PUT");
|
|
18
18
|
req.body = { ...consumptionObj };
|
|
19
19
|
req.path = "/license/consumption/" + consumptionID;
|