Module: Genability::Client::Tariff
- Included in:
- Genability::Client
- Defined in:
- lib/genability/client/tariff.rb
Overview
Tariffs are rate plans for electricity. They describe who the plan applies to (service and applicability), what the charges are, and other information about this electricity service:
- We have residential tariffs currently. General tariffs (commercial & industrial and speciality tariffs) are coming soon.
- You can specify whether you want the tariff fully populated, or whether you just want a sub section of the data (to avoid charges and to speed up your queries).
Instance Method Summary collapse
-
#tariff(tariff_id, options = {}) ⇒ Hashie::Mash
Returns one tariff.
-
#tariffs(options = {}) ⇒ Array
Returns a list of tariffs.
Instance Method Details
#tariff(tariff_id, options = {}) ⇒ Hashie::Mash
Returns one tariff.
53 54 55 |
# File 'lib/genability/client/tariff.rb', line 53 def tariff(tariff_id, = {}) get("public/tariffs/#{tariff_id}", tariff_params()).results.first end |
#tariffs(options = {}) ⇒ Array
Returns a list of tariffs.
37 38 39 |
# File 'lib/genability/client/tariff.rb', line 37 def tariffs( = {}) get("public/tariffs", tariffs_params()).results end |