File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,14 @@ In Patch, orders represent a purchase of carbon offsets or negative emissions by
5353mass = 1_000_000 # Pass in the mass in grams (i.e. 1 metric tonne)
5454Patch ::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
5765order_id = ' ord_test_1234' # Pass in the order's id
5866Patch ::Order .retrieve_order(order_id)
@@ -81,6 +89,10 @@ Estimates allow API users to get a quote for the cost of compensating a certain
8189mass = 1_000_000 # Pass in the mass in grams (i.e. 1 metric tonne)
8290Patch ::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
8597estimate_id = ' est_test_1234'
8698Patch ::Estimate .retrieve_estimate(estimate_id)
You can’t perform that action at this time.
0 commit comments