@ikonintegration/mod-license-client 0.4.1 → 0.4.4

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/README.md CHANGED
@@ -17,7 +17,7 @@ const API = new SMLicense({
17
17
  port: 9090, //isOptional
18
18
  endpoint: SharedModules_LicenseEndpoint,
19
19
  //Must be specified when using service routes
20
- apiKey: config.examProvider.key, //API token on IDM.AppID format (generate from APIKey at https://runkit.com/gwdp/idm-appid)
20
+ apiKey: config.examProvider.key, //API token on IDM.AppID format (generate from APIKey at https://runkit.com/gwdp/idm-appid-v1)
21
21
  //Must be specified when using admin or user routes
22
22
  authorizationToken: '', -- optional, IDM JWT for shared module admins and user routes -- Accepts a function to be called async and return the token
23
23
  namespace: ''
@@ -67,8 +67,9 @@ The following header must be specified in every request!
67
67
  - API.license.getLicensesByExternalID(externalID) - Admin, users and services
68
68
  - API.license.getLicensesByExternalIDs(externalIDs) - Admin and services
69
69
 
70
- **License:**
71
- - API.licenseConsumption.getLicenseConsumption(licenseID, consumptionID) - Admin and services
70
+ **License Consumption:**
71
+ - API.licenseConsumption.getLicenseConsumption(licenseID, consumptionID) - User, Admin and services
72
+ - API.licenseConsumption.getLicenseConsumptions(consumptionIDs) - User, Admin and services
72
73
 
73
74
  **Voucher:**
74
75
  - API.voucher.createVoucher(body, optionalVoucherID) - Admin only
@@ -7,4 +7,10 @@ export default class LicenseConsumption {
7
7
  req.path = '/license/' + licenseID + '/consumption/' + consumptionID;
8
8
  return await req.exec();
9
9
  }
10
+ async getLicenseConsumptions(consumptionIDs) {
11
+ const req = await this.api.newBaseRequest('POST');
12
+ req.body = { IDs: consumptionIDs };
13
+ req.path = '/licenses/consumptions';
14
+ return await req.exec();
15
+ }
10
16
  }
@@ -6,7 +6,7 @@ export default class Order {
6
6
  return product.allowedProviders[0].toLowerCase();
7
7
  }
8
8
  isMonerisEnabledForProduct(product) {
9
- return (this.getProviderFromProduct(product).indexOf('MONERIS') != -1);
9
+ return (this.getProviderFromProduct(product).indexOf('moneris') != -1);
10
10
  }
11
11
  //CC/Skip order
12
12
  async beginOrder(orderObj, provider) {
@@ -53,6 +53,11 @@ export default class Order {
53
53
  return await req.exec();
54
54
  }
55
55
  //Get order(s)
56
+ async getOrderByID(orderID) {
57
+ const req = await this.api.newBaseRequest('GET');
58
+ req.path = `/order/${orderID}`;
59
+ return await req.exec();
60
+ }
56
61
  async getOrder(externalID, orderID) {
57
62
  const req = await this.api.newBaseRequest('GET');
58
63
  req.path = `/order/${externalID}/${orderID}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikonintegration/mod-license-client",
3
- "version": "0.4.1",
3
+ "version": "0.4.4",
4
4
  "description": "Shared module license API client",
5
5
  "main": "index.js",
6
6
  "scripts": {