Skip to content

Commit 5d8e16c

Browse files
committed
Remove remaining estimates
1 parent 278c387 commit 5d8e16c

18 files changed

+14
-1615
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.6.0] - 2025-11-07
9+
10+
### Removed
11+
12+
- Removes `createMassEstimate` and `createBitcoinEstimate` method
13+
- Retires all remaining estimates functionalities
14+
815
## [2.5.0] - 2025-08-19
916

1017
### Removed

README.md

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,6 @@ npm install install-peers
5353

5454
### Orders
5555

56-
In Patch, orders represent a purchase of carbon offsets or negative emissions by mass.
57-
Place orders directly if you know the amount of carbon dioxide you would like to sequester.
58-
If you do not know how much to purchase, use an estimate.
59-
You can also create an order with a maximum desired price, and we'll allocate enough mass to
60-
fulfill the order for you.
61-
6256
[API Reference](https://docs.patch.io/#/?id=orders)
6357

6458
#### Examples
@@ -105,53 +99,6 @@ const page = 1; // Pass in which page of orders you'd like
10599
patch.orders.retrieveOrders({ page });
106100
```
107101

108-
### Estimates
109-
110-
Estimates allow API users to get a quote for the cost of compensating a certain amount of CO2. When creating an estimate, an order in the `draft` state will also be created, reserving the allocation of a project for 5 minutes. If you don't place your draft order within those 5 minutes, the order will automatically be cancelled.
111-
112-
[API Reference](https://docs.patch.io/#/?id=estimates)
113-
114-
#### Examples
115-
116-
```javascript
117-
// Create a mass estimate
118-
const mass_g = 1000000; // Pass in the mass in grams (i.e. 1 metric tonne)
119-
patch.estimates.createMassEstimate({ mass_g });
120-
121-
// Create an ecommerce estimate
122-
const distance_m = 9000000;
123-
// Pass in the shipping distance in meters, the transportation method, and the package mass
124-
patch.estimates.createEcommerceEstimate({
125-
distance_m,
126-
package_mass_g: 1000,
127-
transportation_method: 'air'
128-
});
129-
130-
// Create a bitcoin estimate
131-
const transaction_value_btc_sats = 1000; // [Optional] Pass in the transaction value in satoshis
132-
patch.estimates.createBitcoinEstimate({
133-
transaction_value_btc_sats
134-
});
135-
136-
// Create a vehicle estimate
137-
const distance_m = 9000000;
138-
// Pass in the driving distance in meters and the model/make/year of the vehicle
139-
patch.estimates.createVehicleEstimate({
140-
distance_m,
141-
make: 'Toyota',
142-
model: 'Corolla',
143-
year: 1995
144-
});
145-
146-
// Retrieve an estimate
147-
const estimateId = 'est_test_1234';
148-
patch.estimates.retrieveEstimate(estimate_id);
149-
150-
// Retrieve a list of estimates
151-
const page = 1; // Pass in which page of estimates you'd like
152-
patch.estimates.retrieveEstimates({ page });
153-
```
154-
155102
### Projects
156103

157104
Projects are the ways Patch takes CO2 out of the air. They can represent reforestation, enhanced weathering, direct air carbon capture, etc. When you place an order via Patch, it is allocated to a project.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@patch-technology/patch",
3-
"version": "2.5.0",
3+
"version": "2.6.0",
44
"description": "Node.js wrapper for the Patch API",
55
"license": "MIT",
66
"repository": {

src/ApiClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ApiClient {
1616
};
1717

1818
this.defaultHeaders = {
19-
'User-Agent': 'patch-node/2.5.0',
19+
'User-Agent': 'patch-node/2.6.0',
2020
'Patch-Version': 2
2121
};
2222

0 commit comments

Comments
 (0)