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 CHANGED
@@ -1,6 +1,12 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## v8.3.1
5
+
6
+ ### New Features
7
+
8
+ * Added the new `CrispClient.plugin.getPluginUsageBills` method.
9
+
4
10
  ## v8.3.0
5
11
 
6
12
  ### New Features
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "crisp-api",
3
3
  "description": "Crisp API wrapper for Node - official, maintained by Crisp",
4
- "version": "8.3.0",
4
+ "version": "8.3.1",
5
5
  "homepage": "https://github.com/crisp-im/node-crisp-api",
6
6
  "license": "MIT",
7
7
  "author": {