@signalhousellc/sdk 1.0.35 → 1.0.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalhousellc/sdk",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "description": "Signal House SDK for use with the Signal House platform",
5
5
  "type": "module",
6
6
  "main": "src/SignalHouseSDK.js",
@@ -26,6 +26,27 @@ export class Billing {
26
26
  ...options,
27
27
  });
28
28
  },
29
+
30
+ /**
31
+ * Update fee schedule pricing for a customer group
32
+ * @async
33
+ * @roles signalhouse_admin, signalhouse_api, signalhouse_user
34
+ * @param {Object} params
35
+ * @param {string} params.groupId - The group ID to update fees for
36
+ * @param {Object} params.fees - Object of fee field names to microdollar values
37
+ * @param {boolean} [params.overrideActiveSubscription=false] - If true, also update the active subscription fees
38
+ * @param {import('../SignalHouseSDK').RequestOptions} [params.options] - Additional options for the request
39
+ * @returns {Promise<Object>} The updated fee schedule
40
+ */
41
+ updateFees: async ({ groupId, fees, overrideActiveSubscription, options = {} }) => {
42
+ this.client._require({ groupId, fees });
43
+ const safeGroupId = encodeURIComponent(groupId);
44
+ return this.client(`/billing/fees/${safeGroupId}`, {
45
+ method: "PUT",
46
+ body: { fees, overrideActiveSubscription },
47
+ ...options,
48
+ });
49
+ },
29
50
  };
30
51
  }
31
52
  }