crisp-api 8.3.0 → 8.3.1
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/CHANGELOG.md +6 -0
- package/README.md +13 -0
- package/lib/resources/PluginSubscription.js +17 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -3206,6 +3206,19 @@ _👉 Notice: The `peopleID` argument can be an email or the `peopleID`._
|
|
|
3206
3206
|
```
|
|
3207
3207
|
</details>
|
|
3208
3208
|
|
|
3209
|
+
* **Get Plugin Usage Bills** [`user`, `plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#get-plugin-usage-bills)
|
|
3210
|
+
* `CrispClient.plugin.getPluginUsageBills(websiteID, pluginID)`
|
|
3211
|
+
* <details>
|
|
3212
|
+
<summary>See Example</summary>
|
|
3213
|
+
|
|
3214
|
+
```javascript
|
|
3215
|
+
var websiteID = "8c842203-7ed8-4e29-a608-7cf78a7d2fcc";
|
|
3216
|
+
var pluginID = "c64f3595-adee-425a-8d3a-89d47f7ed6bb";
|
|
3217
|
+
|
|
3218
|
+
CrispClient.plugin.getPluginUsageBills(websiteID, pluginID);
|
|
3219
|
+
```
|
|
3220
|
+
</details>
|
|
3221
|
+
|
|
3209
3222
|
* **Report Plugin Usage To Bill** [`plugin`]: [Reference](https://docs.crisp.chat/references/rest-api/v1/#report-plugin-usage-to-bill)
|
|
3210
3223
|
* `CrispClient.plugin.reportPluginUsageToBill(websiteID, pluginID, usage)`
|
|
3211
3224
|
* <details>
|
|
@@ -150,6 +150,23 @@ function PluginSubscription(service, crisp) {
|
|
|
150
150
|
);
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Get Plugin Usage Bills
|
|
155
|
+
* @memberof PluginSubscription
|
|
156
|
+
* @public
|
|
157
|
+
* @method getPluginUsageBills
|
|
158
|
+
* @param {string} websiteID
|
|
159
|
+
* @param {string} pluginID
|
|
160
|
+
* @return {Promise}
|
|
161
|
+
*/
|
|
162
|
+
service.getPluginUsageBills = function(websiteID, pluginID) {
|
|
163
|
+
return crisp.get(
|
|
164
|
+
crisp._prepareRestUrl([
|
|
165
|
+
"plugins", "subscription", websiteID, pluginID, "bill", "usage"
|
|
166
|
+
])
|
|
167
|
+
);
|
|
168
|
+
};
|
|
169
|
+
|
|
153
170
|
/**
|
|
154
171
|
* Report Plugin Usage To Bill
|
|
155
172
|
* @memberof PluginSubscription
|
package/package.json
CHANGED