Method: Forecasting::Client#future_scheduled_hours

Defined in:
lib/forecasting/client.rb

#future_scheduled_hours(opts = {}) ⇒ Array<Forecasting::Models::FutureScheduledHours>



53
54
55
56
57
58
# File 'lib/forecasting/client.rb', line 53

def future_scheduled_hours(opts = {})
  start_date = opts.delete(:start_date) || Time.now.strftime("%Y-%m-%d")
  get("aggregate/future_scheduled_hours/#{start_date}", opts)["future_scheduled_hours"].map do |entry|
    Forecasting::Models::FutureScheduledHours.new(entry, forecast_client: self)
  end
end