Module: Genability::Client::Price
- Included in:
- Genability::Client
- Defined in:
- lib/genability/client/price.rb
Overview
Given a start date and time, Price returns the price of a specified Tariff as well as all the changes in price over the course of the next week. Optional parameters allow you to retrieve more specific pricing based on Territory and Consumption and Demand usage.
Instance Method Summary collapse
-
#prices(tariff_id, from_date_time = Time.now.iso8601, options = {}) ⇒ Array
Returns the price of the specified tariff for the passed in date and time, and also the changes in price for this tariff for the next week.
Instance Method Details
#prices(tariff_id, from_date_time = Time.now.iso8601, options = {}) ⇒ Array
31 32 33 34 35 |
# File 'lib/genability/client/price.rb', line 31 def prices(tariff_id, *args) = args.last.is_a?(Hash) ? args.pop : {} from_date_time = args.first || Time.now get("public/prices/#{tariff_id}", prices_params(from_date_time, )).results end |