@ikonintegration/mod-license-client 2.0.0 → 2.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.
- package/README.md +3 -1
- package/lib/operations/Order.js +6 -0
- package/lib/operations/Vault.js +7 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -55,6 +55,7 @@ The following header must be specified in every request!
|
|
|
55
55
|
- API.order.getOrder(externalID, orderID) - Admin, users and services
|
|
56
56
|
- API.order.getOrdersByExternalID(externalID) - Admin, users and services
|
|
57
57
|
- API.order.getOrdersFromToTimestamp(from, to /*timestamps*/) - Admin and services
|
|
58
|
+
- API.order.getOrderReceipt(externalID, orderID) - Admin, users and services
|
|
58
59
|
- API.order.getPendingOrders() - Admin and services
|
|
59
60
|
- API.order.submitInvoiceOrder(orderObj) - Admin and services
|
|
60
61
|
- API.order.approveInvoiceOrder(orderObj) - Admin and services
|
|
@@ -87,4 +88,5 @@ The following header must be specified in every request!
|
|
|
87
88
|
- API.key.getKey(activationKey) - Service only
|
|
88
89
|
|
|
89
90
|
**Vault**
|
|
90
|
-
- API.vault.getVaultNonce(externalID, userInfo) - Sysadmins, Admins and users (no services here)
|
|
91
|
+
- API.vault.getVaultNonce(externalID, userInfo) - Sysadmins, Admins and users (no services here)
|
|
92
|
+
- API.vault.setVaultDefaultPaymentMethod(paymentMethodNonce, externalID) - Sysadmins, Admins and users (no services here)
|
package/lib/operations/Order.js
CHANGED
|
@@ -89,4 +89,10 @@ export default class Order {
|
|
|
89
89
|
req.path = '/orders/invoices';
|
|
90
90
|
return await req.exec();
|
|
91
91
|
}
|
|
92
|
+
async getOrderReceipt(externalID, orderID) {
|
|
93
|
+
const req = await this.api.newBaseRequest('GET');
|
|
94
|
+
req.path = `/order/${externalID}/${orderID}/receipt`;
|
|
95
|
+
req.bodyType = 'BINARY';
|
|
96
|
+
return await req.exec();
|
|
97
|
+
}
|
|
92
98
|
}
|
package/lib/operations/Vault.js
CHANGED
|
@@ -8,4 +8,11 @@ export default class Vault {
|
|
|
8
8
|
req.body = { ...userInfo };
|
|
9
9
|
return await req.exec();
|
|
10
10
|
}
|
|
11
|
+
async setVaultDefaultPaymentMethod(paymentMethodNonce, externalID) {
|
|
12
|
+
const req = await this.api.newBaseRequest('POST');
|
|
13
|
+
if (externalID) req.path = '/vault/defaultPayment/' + (externalID || '');
|
|
14
|
+
else req.path = '/vault/defaultPayment';
|
|
15
|
+
req.body = { paymentMethodNonce };
|
|
16
|
+
return req.exec();
|
|
17
|
+
}
|
|
11
18
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikonintegration/mod-license-client",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Shared module license API client",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"pre-publish": "npm i -production && curl -sf https://gobinaries.com/tj/node-prune | sh && node-prune"
|
|
8
9
|
},
|
|
9
10
|
"author": "Ikon Integration",
|
|
10
11
|
"dependencies": {
|