@commet/node 5.5.1 → 7.0.0
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 +5 -5
- package/dist/index.d.mts +1309 -992
- package/dist/index.d.ts +1309 -992
- package/dist/index.js +317 -298
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +317 -298
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -48,12 +48,12 @@ const commet = new Commet({
|
|
|
48
48
|
// Create a customer
|
|
49
49
|
const customer = await commet.customers.create({
|
|
50
50
|
fullName: 'Acme Corp',
|
|
51
|
-
|
|
51
|
+
email: 'billing@acme.com'
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
// Subscribe them to a plan
|
|
55
55
|
await commet.subscriptions.create({
|
|
56
|
-
|
|
56
|
+
customerId: 'cus_123',
|
|
57
57
|
planCode: 'pro', // autocomplete works after `commet pull`
|
|
58
58
|
billingInterval: 'yearly',
|
|
59
59
|
});
|
|
@@ -86,14 +86,14 @@ const projects = await commet.quota.get({
|
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
// Check feature access
|
|
89
|
-
const
|
|
90
|
-
|
|
89
|
+
const access = await commet.featureAccess.canUse({
|
|
90
|
+
customerId: 'cus_123',
|
|
91
91
|
code: 'api_calls'
|
|
92
92
|
});
|
|
93
93
|
|
|
94
94
|
// Generate customer portal link
|
|
95
95
|
const portal = await commet.portal.getUrl({
|
|
96
|
-
|
|
96
|
+
customerId: 'cus_123'
|
|
97
97
|
});
|
|
98
98
|
```
|
|
99
99
|
|