Class: Twilio::REST::Taskrouter::V1::WorkspaceContext::TaskQueueContext::TaskQueueStatisticsInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Taskrouter::V1::WorkspaceContext::TaskQueueContext::TaskQueueStatisticsInstance
- Defined in:
- lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the TaskQueue resource.
-
#context ⇒ TaskQueueStatisticsContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#cumulative ⇒ Hash
An object that contains the cumulative statistics for the TaskQueue.
-
#fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset) ⇒ TaskQueueStatisticsInstance
Fetch the TaskQueueStatisticsInstance.
-
#initialize(version, payload, workspace_sid: nil, task_queue_sid: nil) ⇒ TaskQueueStatisticsInstance
constructor
Initialize the TaskQueueStatisticsInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#realtime ⇒ Hash
An object that contains the real-time statistics for the TaskQueue.
-
#task_queue_sid ⇒ String
The SID of the TaskQueue from which these statistics were calculated.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the TaskQueue statistics resource.
-
#workspace_sid ⇒ String
The SID of the Workspace that contains the TaskQueue.
Constructor Details
#initialize(version, payload, workspace_sid: nil, task_queue_sid: nil) ⇒ TaskQueueStatisticsInstance
Initialize the TaskQueueStatisticsInstance
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 154 def initialize(version, payload , workspace_sid: nil, task_queue_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'cumulative' => payload['cumulative'], 'realtime' => payload['realtime'], 'task_queue_sid' => payload['task_queue_sid'], 'workspace_sid' => payload['workspace_sid'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'workspace_sid' => workspace_sid || @properties['workspace_sid'] ,'task_queue_sid' => task_queue_sid || @properties['task_queue_sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the TaskQueue resource.
185 186 187 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 185 def account_sid @properties['account_sid'] end |
#context ⇒ TaskQueueStatisticsContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
176 177 178 179 180 181 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 176 def context unless @instance_context @instance_context = TaskQueueStatisticsContext.new(@version , @params['workspace_sid'], @params['task_queue_sid']) end @instance_context end |
#cumulative ⇒ Hash
Returns An object that contains the cumulative statistics for the TaskQueue.
191 192 193 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 191 def cumulative @properties['cumulative'] end |
#fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset) ⇒ TaskQueueStatisticsInstance
Fetch the TaskQueueStatisticsInstance
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 227 def fetch( end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset ) context.fetch( end_date: end_date, minutes: minutes, start_date: start_date, task_channel: task_channel, split_by_wait_time: split_by_wait_time, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
253 254 255 256 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 253 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Taskrouter.V1.TaskQueueStatisticsInstance #{values}>" end |
#realtime ⇒ Hash
Returns An object that contains the real-time statistics for the TaskQueue.
197 198 199 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 197 def realtime @properties['realtime'] end |
#task_queue_sid ⇒ String
Returns The SID of the TaskQueue from which these statistics were calculated.
203 204 205 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 203 def task_queue_sid @properties['task_queue_sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
246 247 248 249 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 246 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Taskrouter.V1.TaskQueueStatisticsInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the TaskQueue statistics resource.
215 216 217 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 215 def url @properties['url'] end |
#workspace_sid ⇒ String
Returns The SID of the Workspace that contains the TaskQueue.
209 210 211 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 209 def workspace_sid @properties['workspace_sid'] end |