vayu-ts 0.0.13 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +17 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -133,6 +133,23 @@ const response = await vayu.customers.delete('customer-id');
133
133
  console.log(response.customer);
134
134
  ```
135
135
 
136
+ ### Contracts
137
+
138
+ #### Assigning a contract to a customer
139
+
140
+ In order to assign a contract to a customer you would need to provide the customer Id and the relevant plan
141
+
142
+ ```typescript
143
+ const response = await vayu.contracts.create({
144
+ startDate: new Date(),
145
+ endDate: undefined,
146
+ customerId: '1f4cf23x-2c4y-483z-1111-158621f77a21',
147
+ planId: '4f6cf35x-1234-483z-a0a9-158621f77a21',
148
+ })
149
+
150
+ console.log(response.contract)
151
+ ```
152
+
136
153
  ### Meters
137
154
 
138
155
  Meters are entities that track and aggregate usage data based on events. They are crucial for billing and monitoring purposes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vayu-ts",
3
- "version": "0.0.13",
3
+ "version": "0.1.1",
4
4
  "description": "Simple and easy to use typescript package for utilizing vayu billing system",
5
5
  "main": "dist/index.js",
6
6
  "homepage": "https://withvayu.com",