Module: Genability::Client::TimeOfUse
- Included in:
- Genability::Client
- Defined in:
- lib/genability/client/time_of_use.rb
Overview
Many tariffs have pricing that depends on the time of day the energy is being used. We call these times the Time of Use for a tariff. The most common examples are On Peak and Off Peak. Some examples here may help:
- Within a single Time of Use, e.g. On Peak, the price for a tariff will always be the same.
- Within a single Time of Use, e.g. On Peak, you may have multiple Periods. A Period is a range of days and times that this TOU applies to.
Instance Method Summary collapse
-
#time_of_use_intervals(load_serving_entity_id, time_of_use_group_id, options = {}) ⇒ Array
(also: #tou_intervals, #intervals, #toui)
Returns all the Intervals for a Time of Use Group for an optionally specified from and to date and time range.
-
#time_of_uses(load_serving_entity_id, time_of_use_group_id, options = {}) ⇒ Hashie::Mash
(also: #tou)
Returns a particular time of use group using its time of use group ID and the load serving entity ID.
Instance Method Details
#time_of_use_intervals(load_serving_entity_id, time_of_use_group_id, options = {}) ⇒ Array Also known as: tou_intervals, intervals, toui
Returns all the Intervals for a Time of Use Group for an optionally specified from and to date and time range. Defaults to current time if fromDateTime is not specified and to a one week look ahead window if toDateTime is not specified.
87 88 89 |
# File 'lib/genability/client/time_of_use.rb', line 87 def time_of_use_intervals(load_serving_entity_id, time_of_use_group_id, = {}) get("public/timeofuses/#{load_serving_entity_id}/#{time_of_use_group_id}/intervals", interval_params()).results end |
#time_of_uses(load_serving_entity_id, time_of_use_group_id, options = {}) ⇒ Hashie::Mash Also known as: tou
Returns a particular time of use group using its time of use group ID and the load serving entity ID.
58 59 60 |
# File 'lib/genability/client/time_of_use.rb', line 58 def time_of_uses(load_serving_entity_id, time_of_use_group_id, = {}) get("public/timeofuses/#{load_serving_entity_id}/#{time_of_use_group_id}", tou_params()).results.first end |