Class: Twilio::REST::Taskrouter::V1::WorkspaceContext::TaskQueueContext::TaskQueueStatisticsContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Taskrouter::V1::WorkspaceContext::TaskQueueContext::TaskQueueStatisticsContext
- Defined in:
- lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb
Instance Method Summary collapse
-
#fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset) ⇒ TaskQueueStatisticsInstance
Fetch the TaskQueueStatisticsInstance.
-
#initialize(version, workspace_sid, task_queue_sid) ⇒ TaskQueueStatisticsContext
constructor
Initialize the TaskQueueStatisticsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, workspace_sid, task_queue_sid) ⇒ TaskQueueStatisticsContext
Initialize the TaskQueueStatisticsContext
52 53 54 55 56 57 58 59 60 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 52 def initialize(version, workspace_sid, task_queue_sid) super(version) # Path Solution @solution = { workspace_sid: workspace_sid, task_queue_sid: task_queue_sid, } @uri = "/Workspaces/#{@solution[:workspace_sid]}/TaskQueues/#{@solution[:task_queue_sid]}/Statistics" end |
Instance Method Details
#fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset) ⇒ TaskQueueStatisticsInstance
Fetch the TaskQueueStatisticsInstance
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 69 def fetch( end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset ) params = Twilio::Values.of({ 'EndDate' => Twilio.serialize_iso8601_datetime(end_date), 'Minutes' => minutes, 'StartDate' => Twilio.serialize_iso8601_datetime(start_date), 'TaskChannel' => task_channel, 'SplitByWaitTime' => split_by_wait_time, }) payload = @version.fetch('GET', @uri, params: params) TaskQueueStatisticsInstance.new( @version, payload, workspace_sid: @solution[:workspace_sid], task_queue_sid: @solution[:task_queue_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
103 104 105 106 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 103 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Taskrouter.V1.TaskQueueStatisticsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
96 97 98 99 |
# File 'lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb', line 96 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Taskrouter.V1.TaskQueueStatisticsContext #{context}>" end |