Class: Ecologi::CarbonOffsetsResource
- Defined in:
- lib/ecologi/resources/carbon_offsets.rb
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Ecologi::Resource
Instance Method Details
#purchase(number:, units:) ⇒ Object
4 5 6 7 |
# File 'lib/ecologi/resources/carbon_offsets.rb', line 4 def purchase(number:, units:) response = post_request("impact/carbon", body: {number: number, units: units}) CarbonOffsetPurchase.new response.body end |