Skip to content

Commit 5ab2b31

Browse files
committed
update readme
1 parent 8dd8a84 commit 5ab2b31

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ In Patch, orders represent a purchase of carbon offsets or negative emissions by
5353
mass = 1_000_000 # Pass in the mass in grams (i.e. 1 metric tonne)
5454
Patch::Order.create_order(mass_g: mass)
5555

56+
## You can also specify a project-id field (optional) to be used instead of the preferred one
57+
project_id = 'pro_test_1234' # Pass in the project's ID
58+
Patch::Order.create_order(mass_g: mass, project_id: project_id)
59+
60+
## Orders also accept a metadata field (optional)
61+
metadata = {user: "john doe"}
62+
Patch::Order.create_order(mass_g: mass, metadata: metadata)
63+
5664
# Retrieve an order
5765
order_id = 'ord_test_1234' # Pass in the order's id
5866
Patch::Order.retrieve_order(order_id)
@@ -81,6 +89,10 @@ Estimates allow API users to get a quote for the cost of compensating a certain
8189
mass = 1_000_000 # Pass in the mass in grams (i.e. 1 metric tonne)
8290
Patch::Estimate.create_mass_estimate(mass_g: mass)
8391

92+
## You can also specify a project-id field (optional) to be used instead of the preferred one
93+
project_id = 'pro_test_1234' # Pass in the project's ID
94+
Patch::Estimate.create_mass_estimate(mass_g: mass, project_id: project_id)
95+
8496
# Retrieve an estimate
8597
estimate_id = 'est_test_1234'
8698
Patch::Estimate.retrieve_estimate(estimate_id)

0 commit comments

Comments
 (0)