Skip to content

Commit d761e7f

Browse files
committed
Fix conflicts
2 parents 6345855 + 04d64a5 commit d761e7f

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Removes `create_mass_estimate` and `create_bitcoin_estimate` method
1313
- Retires all remaining estimates functionalities
1414

15+
## [2.5.0] - 2025-08-19
16+
17+
### Removed
18+
19+
- Removes `Patch::Estimate.create_flight_estimate` method
20+
1521
## [2.4.0] - 2025-05-16
1622

1723
### Removed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,43 @@ page = 1 # Pass in which page of orders you'd like
108108
patch.orders.retrieve_orders(page=page)
109109
```
110110

111+
<<<<<<< HEAD
112+
=======
113+
### Estimates
114+
115+
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.
116+
117+
[API Reference](https://docs.patch.io/#/estimates)
118+
119+
#### Examples
120+
121+
```python
122+
import patch_api
123+
124+
patch = patch_api.ApiClient(api_key=os.environ.get('SANDBOX_API_KEY'))
125+
126+
# Create an estimate
127+
mass_g = 1_000_000 # Pass in the mass in grams (i.e. 1 metric tonne)
128+
patch.estimates.create_mass_estimate(mass_g=mass_g)
129+
130+
## You can also specify a project-id field (optional) to be used instead of the preferred one
131+
project_id = 'pro_test_1234' # Pass in the project's ID
132+
patch.estimates.create_mass_estimate(mass_g=mass_g, project_id=project_id)
133+
134+
# Create a bitcoin estimate
135+
transaction_value_btc_sats = 1000 # [Optional] Pass in the transaction value in satoshis
136+
patch.estimates.create_bitcoin_estimate(transaction_value_btc_sats=transaction_value_btc_sats)
137+
138+
# Retrieve an estimate
139+
estimate_id = 'est_test_1234'
140+
patch.estimates.retrieve_estimate(id=estimate_id)
141+
142+
# Retrieve a list of estimates
143+
page = 1 # Pass in which page of estimates you'd like
144+
patch.estimates.retrieve_estimates(page=page)
145+
```
146+
147+
>>>>>>> origin/main
111148
### Projects
112149

113150
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.

0 commit comments

Comments
 (0)