lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb in twilio-ruby-5.0.0.rc9 vs lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb in twilio-ruby-5.0.0.rc10
- old
+ new
@@ -12,11 +12,10 @@
class WorkspaceStatisticsList < ListResource
##
# Initialize the WorkspaceStatisticsList
# @param [Version] version Version that contains the resource
# @param [String] workspace_sid The workspace_sid
-
# @return [WorkspaceStatisticsList] WorkspaceStatisticsList
def initialize(version, workspace_sid: nil)
super(version)
# Path Solution
@@ -37,11 +36,10 @@
# Initialize the WorkspaceStatisticsPage
# @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 [WorkspaceStatisticsPage] WorkspaceStatisticsPage
def initialize(version, response, solution)
super(version, response)
# Path Solution
@@ -49,17 +47,16 @@
end
##
# Build an instance of WorkspaceStatisticsInstance
# @param [Hash] payload Payload response from the API
-
# @return [WorkspaceStatisticsInstance] WorkspaceStatisticsInstance
def get_instance(payload)
return WorkspaceStatisticsInstance.new(
@version,
payload,
- workspace_sid: @solution['workspace_sid'],
+ workspace_sid: @solution[:workspace_sid],
)
end
##
# Provide a user friendly representation
@@ -71,11 +68,10 @@
class WorkspaceStatisticsContext < InstanceContext
##
# Initialize the WorkspaceStatisticsContext
# @param [Version] version Version that contains the resource
# @param [String] workspace_sid The workspace_sid
-
# @return [WorkspaceStatisticsContext] WorkspaceStatisticsContext
def initialize(version, workspace_sid)
super(version)
# Path Solution
@@ -92,11 +88,10 @@
# @param [Time] start_date The start_date
# @param [Time] start_date_after: The start_date
# @param [Time] end_date_before The end_date
# @param [Time] end_date The end_date
# @param [Time] end_date_after: The end_date
-
# @return [WorkspaceStatisticsInstance] Fetched WorkspaceStatisticsInstance
def fetch(minutes: nil, start_date_before: nil, start_date: nil, start_date_after: nil, end_date_before: nil, end_date: nil, end_date_after: nil)
params = {
'Minutes' => minutes,
'StartDate<' => Twilio.serialize_iso8601(start_date_before),
@@ -114,11 +109,11 @@
)
return WorkspaceStatisticsInstance.new(
@version,
payload,
- workspace_sid: @solution['workspace_sid'],
+ workspace_sid: @solution[:workspace_sid],
)
end
##
# Provide a user friendly representation
@@ -132,11 +127,10 @@
##
# Initialize the WorkspaceStatisticsInstance
# @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 [WorkspaceStatisticsInstance] WorkspaceStatisticsInstance
def initialize(version, payload, workspace_sid: nil)
super(version)
# Marshaled Properties
@@ -156,11 +150,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 [WorkspaceStatisticsContext] WorkspaceStatisticsContext for this WorkspaceStatisticsInstance
def context
unless @instance_context
@instance_context = WorkspaceStatisticsContext.new(
@version,
@@ -193,14 +186,14 @@
# @param [Time] start_date The start_date
# @param [Time] start_date_after: The start_date
# @param [Time] end_date_before The end_date
# @param [Time] end_date The end_date
# @param [Time] end_date_after: The end_date
-
# @return [WorkspaceStatisticsInstance] Fetched WorkspaceStatisticsInstance
def fetch(minutes: nil, start_date_before: nil, start_date: nil, start_date_after: nil, end_date_before: nil, end_date: nil, end_date_after: nil)
- @context.fetch(
+ context.fetch(
+ minutes: minutes,
start_date_before: start_date_before,
start_date: start_date,
start_date_after: start_date_after,
end_date_before: end_date_before,
end_date: end_date,
@@ -209,11 +202,11 @@
end
##
# Provide a user friendly representation
def to_s
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
- "<Twilio.Taskrouter.V1.WorkspaceStatisticsInstance #{context}>"
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
+ "<Twilio.Taskrouter.V1.WorkspaceStatisticsInstance #{values}>"
end
end
end
end
end
\ No newline at end of file