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
53
53
mass = 1_000_000 # Pass in the mass in grams (i.e. 1 metric tonne)
54
54
Patch ::Order .create_order(mass_g: mass)
55
55
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
+
56
64
# Retrieve an order
57
65
order_id = ' ord_test_1234' # Pass in the order's id
58
66
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
81
89
mass = 1_000_000 # Pass in the mass in grams (i.e. 1 metric tonne)
82
90
Patch ::Estimate .create_mass_estimate(mass_g: mass)
83
91
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
+
84
96
# Retrieve an estimate
85
97
estimate_id = ' est_test_1234'
86
98
Patch ::Estimate .retrieve_estimate(estimate_id)
You can’t perform that action at this time.
0 commit comments