lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb in twilio-ruby-5.0.0.rc9 vs lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb in twilio-ruby-5.0.0.rc10
- old
+ new
@@ -13,11 +13,10 @@
class WorkersStatisticsList < ListResource
##
# Initialize the WorkersStatisticsList
# @param [Version] version Version that contains the resource
# @param [String] workspace_sid The workspace_sid
-
# @return [WorkersStatisticsList] WorkersStatisticsList
def initialize(version, workspace_sid: nil)
super(version)
# Path Solution
@@ -38,11 +37,10 @@
# Initialize the WorkersStatisticsPage
# @param [Version] version Version that contains the resource
# @param [Response] response Response from the API
# @param [Hash] solution Path solution for the resource
# @param [String] workspace_sid The workspace_sid
-
# @return [WorkersStatisticsPage] WorkersStatisticsPage
def initialize(version, response, solution)
super(version, response)
# Path Solution
@@ -50,17 +48,16 @@
end
##
# Build an instance of WorkersStatisticsInstance
# @param [Hash] payload Payload response from the API
-
# @return [WorkersStatisticsInstance] WorkersStatisticsInstance
def get_instance(payload)
return WorkersStatisticsInstance.new(
@version,
payload,
- workspace_sid: @solution['workspace_sid'],
+ workspace_sid: @solution[:workspace_sid],
)
end
##
# Provide a user friendly representation
@@ -72,11 +69,10 @@
class WorkersStatisticsContext < InstanceContext
##
# Initialize the WorkersStatisticsContext
# @param [Version] version Version that contains the resource
# @param [String] workspace_sid The workspace_sid
-
# @return [WorkersStatisticsContext] WorkersStatisticsContext
def initialize(version, workspace_sid)
super(version)
# Path Solution
@@ -92,11 +88,10 @@
# @param [Time] start_date The start_date
# @param [Time] end_date The end_date
# @param [String] task_queue_sid The task_queue_sid
# @param [String] task_queue_name The task_queue_name
# @param [String] friendly_name The friendly_name
-
# @return [WorkersStatisticsInstance] Fetched WorkersStatisticsInstance
def fetch(minutes: nil, start_date: nil, end_date: nil, task_queue_sid: nil, task_queue_name: nil, friendly_name: nil)
params = {
'Minutes' => minutes,
'StartDate' => Twilio.serialize_iso8601(start_date),
@@ -113,11 +108,11 @@
)
return WorkersStatisticsInstance.new(
@version,
payload,
- workspace_sid: @solution['workspace_sid'],
+ workspace_sid: @solution[:workspace_sid],
)
end
##
# Provide a user friendly representation
@@ -131,11 +126,10 @@
##
# Initialize the WorkersStatisticsInstance
# @param [Version] version Version that contains the resource
# @param [Hash] payload payload that contains response from Twilio
# @param [String] workspace_sid The workspace_sid
-
# @return [WorkersStatisticsInstance] WorkersStatisticsInstance
def initialize(version, payload, workspace_sid: nil)
super(version)
# Marshaled Properties
@@ -155,11 +149,10 @@
##
# Generate an instance context for the instance, the context is capable of
# performing various actions. All instance actions are proxied to the context
# @param [Version] version Version that contains the resource
-
# @return [WorkersStatisticsContext] WorkersStatisticsContext for this WorkersStatisticsInstance
def context
unless @instance_context
@instance_context = WorkersStatisticsContext.new(
@version,
@@ -191,14 +184,14 @@
# @param [Time] start_date The start_date
# @param [Time] end_date The end_date
# @param [String] task_queue_sid The task_queue_sid
# @param [String] task_queue_name The task_queue_name
# @param [String] friendly_name The friendly_name
-
# @return [WorkersStatisticsInstance] Fetched WorkersStatisticsInstance
def fetch(minutes: nil, start_date: nil, end_date: nil, task_queue_sid: nil, task_queue_name: nil, friendly_name: nil)
- @context.fetch(
+ context.fetch(
+ minutes: minutes,
start_date: start_date,
end_date: end_date,
task_queue_sid: task_queue_sid,
task_queue_name: task_queue_name,
friendly_name: friendly_name,
@@ -206,11 +199,11 @@
end
##
# Provide a user friendly representation
def to_s
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
- "<Twilio.Taskrouter.V1.WorkersStatisticsInstance #{context}>"
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
+ "<Twilio.Taskrouter.V1.WorkersStatisticsInstance #{values}>"
end
end
end
end
end
\ No newline at end of file