@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 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
- billingEmail: 'billing@acme.com'
51
+ email: 'billing@acme.com'
52
52
  });
53
53
 
54
54
  // Subscribe them to a plan
55
55
  await commet.subscriptions.create({
56
- externalId: 'user_123',
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 feature = await commet.features.get({
90
- externalId: 'user_123',
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
- externalId: 'user_123'
96
+ customerId: 'cus_123'
97
97
  });
98
98
  ```
99
99