lib/twilio-ruby/rest/taskrouter/v1/workspace.rb in twilio-ruby-5.4.4 vs lib/twilio-ruby/rest/taskrouter/v1/workspace.rb in twilio-ruby-5.4.5

- old
+ new

@@ -50,11 +50,11 @@ # efficient page size, i.e. min(limit, 1000) # @return [Enumerable] Enumerable that will yield up to limit results def stream(friendly_name: :unset, limit: nil, page_size: nil) limits = @version.read_limits(limit, page_size) - page = self.page(friendly_name: friendly_name, page_size: limits[:page_size],) + page = self.page(friendly_name: friendly_name, page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]) end ## @@ -62,11 +62,11 @@ # This operation lazily loads records as efficiently as possible until the limit # is reached. def each limits = @version.read_limits - page = self.page(page_size: limits[:page_size],) + page = self.page(page_size: limits[:page_size]) @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit]).each {|x| yield x} end @@ -131,11 +131,11 @@ 'POST', @uri, data: data ) - WorkspaceInstance.new(@version, payload,) + WorkspaceInstance.new(@version, payload) end ## # Provide a user friendly representation def to_s @@ -160,11 +160,11 @@ ## # Build an instance of WorkspaceInstance # @param [Hash] payload Payload response from the API # @return [WorkspaceInstance] WorkspaceInstance def get_instance(payload) - WorkspaceInstance.new(@version, payload,) + WorkspaceInstance.new(@version, payload) end ## # Provide a user friendly representation def to_s @@ -180,11 +180,11 @@ # @return [WorkspaceContext] WorkspaceContext def initialize(version, sid) super(version) # Path Solution - @solution = {sid: sid,} + @solution = {sid: sid} @uri = "/Workspaces/#{@solution[:sid]}" # Dependents @activities = nil @events = nil @@ -208,11 +208,11 @@ 'GET', @uri, params, ) - WorkspaceInstance.new(@version, payload, sid: @solution[:sid],) + WorkspaceInstance.new(@version, payload, sid: @solution[:sid]) end ## # Update the WorkspaceInstance # @param [String] default_activity_sid The default_activity_sid @@ -238,11 +238,11 @@ 'POST', @uri, data: data, ) - WorkspaceInstance.new(@version, payload, sid: @solution[:sid],) + WorkspaceInstance.new(@version, payload, sid: @solution[:sid]) end ## # Deletes the WorkspaceInstance # @return [Boolean] true if delete succeeds, true otherwise @@ -256,15 +256,15 @@ # @return [ActivityContext] if sid was passed. def activities(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return ActivityContext.new(@version, @solution[:sid], sid,) + return ActivityContext.new(@version, @solution[:sid], sid) end unless @activities - @activities = ActivityList.new(@version, workspace_sid: @solution[:sid],) + @activities = ActivityList.new(@version, workspace_sid: @solution[:sid]) end @activities end @@ -274,15 +274,15 @@ # @return [EventContext] if sid was passed. def events(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return EventContext.new(@version, @solution[:sid], sid,) + return EventContext.new(@version, @solution[:sid], sid) end unless @events - @events = EventList.new(@version, workspace_sid: @solution[:sid],) + @events = EventList.new(@version, workspace_sid: @solution[:sid]) end @events end @@ -292,15 +292,15 @@ # @return [TaskContext] if sid was passed. def tasks(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return TaskContext.new(@version, @solution[:sid], sid,) + return TaskContext.new(@version, @solution[:sid], sid) end unless @tasks - @tasks = TaskList.new(@version, workspace_sid: @solution[:sid],) + @tasks = TaskList.new(@version, workspace_sid: @solution[:sid]) end @tasks end @@ -310,15 +310,15 @@ # @return [TaskQueueContext] if sid was passed. def task_queues(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return TaskQueueContext.new(@version, @solution[:sid], sid,) + return TaskQueueContext.new(@version, @solution[:sid], sid) end unless @task_queues - @task_queues = TaskQueueList.new(@version, workspace_sid: @solution[:sid],) + @task_queues = TaskQueueList.new(@version, workspace_sid: @solution[:sid]) end @task_queues end @@ -328,15 +328,15 @@ # @return [WorkerContext] if sid was passed. def workers(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return WorkerContext.new(@version, @solution[:sid], sid,) + return WorkerContext.new(@version, @solution[:sid], sid) end unless @workers - @workers = WorkerList.new(@version, workspace_sid: @solution[:sid],) + @workers = WorkerList.new(@version, workspace_sid: @solution[:sid]) end @workers end @@ -346,57 +346,57 @@ # @return [WorkflowContext] if sid was passed. def workflows(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return WorkflowContext.new(@version, @solution[:sid], sid,) + return WorkflowContext.new(@version, @solution[:sid], sid) end unless @workflows - @workflows = WorkflowList.new(@version, workspace_sid: @solution[:sid],) + @workflows = WorkflowList.new(@version, workspace_sid: @solution[:sid]) end @workflows end ## # Access the statistics # @return [WorkspaceStatisticsList] # @return [WorkspaceStatisticsContext] def statistics - WorkspaceStatisticsContext.new(@version, @solution[:sid],) + WorkspaceStatisticsContext.new(@version, @solution[:sid]) end ## # Access the real_time_statistics # @return [WorkspaceRealTimeStatisticsList] # @return [WorkspaceRealTimeStatisticsContext] def real_time_statistics - WorkspaceRealTimeStatisticsContext.new(@version, @solution[:sid],) + WorkspaceRealTimeStatisticsContext.new(@version, @solution[:sid]) end ## # Access the cumulative_statistics # @return [WorkspaceCumulativeStatisticsList] # @return [WorkspaceCumulativeStatisticsContext] def cumulative_statistics - WorkspaceCumulativeStatisticsContext.new(@version, @solution[:sid],) + WorkspaceCumulativeStatisticsContext.new(@version, @solution[:sid]) end ## # Access the task_channels # @return [TaskChannelList] # @return [TaskChannelContext] if sid was passed. def task_channels(sid=:unset) raise ArgumentError, 'sid cannot be nil' if sid.nil? if sid != :unset - return TaskChannelContext.new(@version, @solution[:sid], sid,) + return TaskChannelContext.new(@version, @solution[:sid], sid) end unless @task_channels - @task_channels = TaskChannelList.new(@version, workspace_sid: @solution[:sid],) + @task_channels = TaskChannelList.new(@version, workspace_sid: @solution[:sid]) end @task_channels end @@ -437,19 +437,19 @@ 'links' => payload['links'], } # Context @instance_context = nil - @params = {'sid' => sid || @properties['sid'],} + @params = {'sid' => sid || @properties['sid']} end ## # Generate an instance context for the instance, the context is capable of # performing various actions. All instance actions are proxied to the context # @return [WorkspaceContext] WorkspaceContext for this WorkspaceInstance def context unless @instance_context - @instance_context = WorkspaceContext.new(@version, @params['sid'],) + @instance_context = WorkspaceContext.new(@version, @params['sid']) end @instance_context end ## \ No newline at end of file