twilio-ruby 5.2.3 → 5.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +26 -0
  3. data/README.md +3 -3
  4. data/UPGRADE.md +30 -0
  5. data/lib/twilio-ruby.rb +0 -18
  6. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +2 -2
  7. data/lib/twilio-ruby/rest/chat/v2/service.rb +24 -2
  8. data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +5 -3
  9. data/lib/twilio-ruby/rest/client.rb +3 -3
  10. data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +24 -2
  11. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +5 -3
  12. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +12 -12
  13. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +38 -0
  14. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +40 -0
  15. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +350 -0
  16. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +264 -0
  17. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +10 -2
  18. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +15 -3
  19. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +38 -0
  20. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +6 -2
  21. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +274 -0
  22. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +213 -0
  23. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +14 -10
  24. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +40 -0
  25. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +357 -0
  26. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +243 -0
  27. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +10 -2
  28. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +339 -0
  29. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +239 -0
  30. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +10 -2
  31. data/lib/twilio-ruby/rest/video/v1/room.rb +7 -0
  32. data/lib/twilio-ruby/security/request_validator.rb +1 -1
  33. data/lib/twilio-ruby/version.rb +1 -1
  34. data/spec/integration/chat/v2/service/channel/message_spec.rb +41 -7
  35. data/spec/integration/chat/v2/service_spec.rb +8 -0
  36. data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +41 -7
  37. data/spec/integration/ip_messaging/v2/service_spec.rb +8 -0
  38. data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics_spec.rb +94 -0
  39. data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics_spec.rb +79 -0
  40. data/spec/integration/taskrouter/v1/workspace/task_queue_spec.rb +8 -0
  41. data/spec/integration/taskrouter/v1/workspace/worker/worker_statistics_spec.rb +21 -38
  42. data/spec/integration/taskrouter/v1/workspace/worker/workers_cumulative_statistics_spec.rb +87 -0
  43. data/spec/integration/taskrouter/v1/workspace/worker/workers_real_time_statistics_spec.rb +68 -0
  44. data/spec/integration/taskrouter/v1/workspace/worker/workers_statistics_spec.rb +34 -61
  45. data/spec/integration/taskrouter/v1/workspace/worker_spec.rb +8 -0
  46. data/spec/integration/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics_spec.rb +95 -0
  47. data/spec/integration/taskrouter/v1/workspace/workflow/workflow_real_time_statistics_spec.rb +55 -0
  48. data/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +12 -4
  49. data/spec/integration/taskrouter/v1/workspace/workspace_cumulative_statistics_spec.rb +92 -0
  50. data/spec/integration/taskrouter/v1/workspace/workspace_real_time_statistics_spec.rb +70 -0
  51. data/spec/integration/taskrouter/v1/workspace_spec.rb +8 -0
  52. data/spec/integration/video/v1/room_spec.rb +12 -0
  53. data/spec/security/request_validator_spec.rb +0 -28
  54. data/spec/twilio_spec.rb +0 -15
  55. metadata +28 -9
  56. data/lib/rack/twilio_webhook_authentication.rb +0 -46
  57. data/lib/twilio-ruby/util/configuration.rb +0 -7
  58. data/spec/rack/twilio_webhook_authentication_spec.rb +0 -106
  59. data/spec/util/configuration_spec.rb +0 -15
@@ -0,0 +1,243 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+
7
+ module Twilio
8
+ module REST
9
+ class Taskrouter < Domain
10
+ class V1 < Version
11
+ class WorkspaceContext < InstanceContext
12
+ class WorkflowContext < InstanceContext
13
+ class WorkflowRealTimeStatisticsList < ListResource
14
+ ##
15
+ # Initialize the WorkflowRealTimeStatisticsList
16
+ # @param [Version] version Version that contains the resource
17
+ # @param [String] workspace_sid The workspace_sid
18
+ # @param [String] workflow_sid The workflow_sid
19
+ # @return [WorkflowRealTimeStatisticsList] WorkflowRealTimeStatisticsList
20
+ def initialize(version, workspace_sid: nil, workflow_sid: nil)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {
25
+ workspace_sid: workspace_sid,
26
+ workflow_sid: workflow_sid
27
+ }
28
+ end
29
+
30
+ ##
31
+ # Provide a user friendly representation
32
+ def to_s
33
+ '#<Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsList>'
34
+ end
35
+ end
36
+
37
+ class WorkflowRealTimeStatisticsPage < Page
38
+ ##
39
+ # Initialize the WorkflowRealTimeStatisticsPage
40
+ # @param [Version] version Version that contains the resource
41
+ # @param [Response] response Response from the API
42
+ # @param [Hash] solution Path solution for the resource
43
+ # @return [WorkflowRealTimeStatisticsPage] WorkflowRealTimeStatisticsPage
44
+ def initialize(version, response, solution)
45
+ super(version, response)
46
+
47
+ # Path Solution
48
+ @solution = solution
49
+ end
50
+
51
+ ##
52
+ # Build an instance of WorkflowRealTimeStatisticsInstance
53
+ # @param [Hash] payload Payload response from the API
54
+ # @return [WorkflowRealTimeStatisticsInstance] WorkflowRealTimeStatisticsInstance
55
+ def get_instance(payload)
56
+ WorkflowRealTimeStatisticsInstance.new(
57
+ @version,
58
+ payload,
59
+ workspace_sid: @solution[:workspace_sid],
60
+ workflow_sid: @solution[:workflow_sid],
61
+ )
62
+ end
63
+
64
+ ##
65
+ # Provide a user friendly representation
66
+ def to_s
67
+ '<Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsPage>'
68
+ end
69
+ end
70
+
71
+ class WorkflowRealTimeStatisticsContext < InstanceContext
72
+ ##
73
+ # Initialize the WorkflowRealTimeStatisticsContext
74
+ # @param [Version] version Version that contains the resource
75
+ # @param [String] workspace_sid The workspace_sid
76
+ # @param [String] workflow_sid The workflow_sid
77
+ # @return [WorkflowRealTimeStatisticsContext] WorkflowRealTimeStatisticsContext
78
+ def initialize(version, workspace_sid, workflow_sid)
79
+ super(version)
80
+
81
+ # Path Solution
82
+ @solution = {
83
+ workspace_sid: workspace_sid,
84
+ workflow_sid: workflow_sid,
85
+ }
86
+ @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workflows/#{@solution[:workflow_sid]}/RealTimeStatistics"
87
+ end
88
+
89
+ ##
90
+ # Fetch a WorkflowRealTimeStatisticsInstance
91
+ # @param [String] task_channel The task_channel
92
+ # @return [WorkflowRealTimeStatisticsInstance] Fetched WorkflowRealTimeStatisticsInstance
93
+ def fetch(task_channel: :unset)
94
+ params = Twilio::Values.of({
95
+ 'TaskChannel' => task_channel,
96
+ })
97
+
98
+ payload = @version.fetch(
99
+ 'GET',
100
+ @uri,
101
+ params,
102
+ )
103
+
104
+ WorkflowRealTimeStatisticsInstance.new(
105
+ @version,
106
+ payload,
107
+ workspace_sid: @solution[:workspace_sid],
108
+ workflow_sid: @solution[:workflow_sid],
109
+ )
110
+ end
111
+
112
+ ##
113
+ # Provide a user friendly representation
114
+ def to_s
115
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
116
+ "#<Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsContext #{context}>"
117
+ end
118
+ end
119
+
120
+ class WorkflowRealTimeStatisticsInstance < InstanceResource
121
+ ##
122
+ # Initialize the WorkflowRealTimeStatisticsInstance
123
+ # @param [Version] version Version that contains the resource
124
+ # @param [Hash] payload payload that contains response from Twilio
125
+ # @param [String] workspace_sid The workspace_sid
126
+ # @param [String] workflow_sid The workflow_sid
127
+ # @return [WorkflowRealTimeStatisticsInstance] WorkflowRealTimeStatisticsInstance
128
+ def initialize(version, payload, workspace_sid: nil, workflow_sid: nil)
129
+ super(version)
130
+
131
+ # Marshaled Properties
132
+ @properties = {
133
+ 'account_sid' => payload['account_sid'],
134
+ 'longest_task_waiting_age' => payload['longest_task_waiting_age'].to_i,
135
+ 'tasks_by_priority' => payload['tasks_by_priority'],
136
+ 'tasks_by_status' => payload['tasks_by_status'],
137
+ 'total_tasks' => payload['total_tasks'].to_i,
138
+ 'workflow_sid' => payload['workflow_sid'],
139
+ 'workspace_sid' => payload['workspace_sid'],
140
+ 'url' => payload['url'],
141
+ }
142
+
143
+ # Context
144
+ @instance_context = nil
145
+ @params = {
146
+ 'workspace_sid' => workspace_sid,
147
+ 'workflow_sid' => workflow_sid,
148
+ }
149
+ end
150
+
151
+ ##
152
+ # Generate an instance context for the instance, the context is capable of
153
+ # performing various actions. All instance actions are proxied to the context
154
+ # @return [WorkflowRealTimeStatisticsContext] WorkflowRealTimeStatisticsContext for this WorkflowRealTimeStatisticsInstance
155
+ def context
156
+ unless @instance_context
157
+ @instance_context = WorkflowRealTimeStatisticsContext.new(
158
+ @version,
159
+ @params['workspace_sid'],
160
+ @params['workflow_sid'],
161
+ )
162
+ end
163
+ @instance_context
164
+ end
165
+
166
+ ##
167
+ # @return [String] The account_sid
168
+ def account_sid
169
+ @properties['account_sid']
170
+ end
171
+
172
+ ##
173
+ # @return [String] The longest_task_waiting_age
174
+ def longest_task_waiting_age
175
+ @properties['longest_task_waiting_age']
176
+ end
177
+
178
+ ##
179
+ # @return [Hash] The tasks_by_priority
180
+ def tasks_by_priority
181
+ @properties['tasks_by_priority']
182
+ end
183
+
184
+ ##
185
+ # @return [Hash] The tasks_by_status
186
+ def tasks_by_status
187
+ @properties['tasks_by_status']
188
+ end
189
+
190
+ ##
191
+ # @return [String] The total_tasks
192
+ def total_tasks
193
+ @properties['total_tasks']
194
+ end
195
+
196
+ ##
197
+ # @return [String] The workflow_sid
198
+ def workflow_sid
199
+ @properties['workflow_sid']
200
+ end
201
+
202
+ ##
203
+ # @return [String] The workspace_sid
204
+ def workspace_sid
205
+ @properties['workspace_sid']
206
+ end
207
+
208
+ ##
209
+ # @return [String] The url
210
+ def url
211
+ @properties['url']
212
+ end
213
+
214
+ ##
215
+ # Fetch a WorkflowRealTimeStatisticsInstance
216
+ # @param [String] task_channel The task_channel
217
+ # @return [WorkflowRealTimeStatisticsInstance] Fetched WorkflowRealTimeStatisticsInstance
218
+ def fetch(task_channel: :unset)
219
+ context.fetch(
220
+ task_channel: task_channel,
221
+ )
222
+ end
223
+
224
+ ##
225
+ # Provide a user friendly representation
226
+ def to_s
227
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
228
+ "<Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsInstance #{values}>"
229
+ end
230
+
231
+ ##
232
+ # Provide a detailed, user friendly representation
233
+ def inspect
234
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
235
+ "<Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsInstance #{values}>"
236
+ end
237
+ end
238
+ end
239
+ end
240
+ end
241
+ end
242
+ end
243
+ end
@@ -91,12 +91,16 @@ module Twilio
91
91
  # @param [String] minutes The minutes
92
92
  # @param [Time] start_date The start_date
93
93
  # @param [Time] end_date The end_date
94
+ # @param [String] task_channel The task_channel
95
+ # @param [String] split_by_wait_time The split_by_wait_time
94
96
  # @return [WorkflowStatisticsInstance] Fetched WorkflowStatisticsInstance
95
- def fetch(minutes: :unset, start_date: :unset, end_date: :unset)
97
+ def fetch(minutes: :unset, start_date: :unset, end_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
96
98
  params = Twilio::Values.of({
97
99
  'Minutes' => minutes,
98
100
  'StartDate' => Twilio.serialize_iso8601_datetime(start_date),
99
101
  'EndDate' => Twilio.serialize_iso8601_datetime(end_date),
102
+ 'TaskChannel' => task_channel,
103
+ 'SplitByWaitTime' => split_by_wait_time,
100
104
  })
101
105
 
102
106
  payload = @version.fetch(
@@ -206,12 +210,16 @@ module Twilio
206
210
  # @param [String] minutes The minutes
207
211
  # @param [Time] start_date The start_date
208
212
  # @param [Time] end_date The end_date
213
+ # @param [String] task_channel The task_channel
214
+ # @param [String] split_by_wait_time The split_by_wait_time
209
215
  # @return [WorkflowStatisticsInstance] Fetched WorkflowStatisticsInstance
210
- def fetch(minutes: :unset, start_date: :unset, end_date: :unset)
216
+ def fetch(minutes: :unset, start_date: :unset, end_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
211
217
  context.fetch(
212
218
  minutes: minutes,
213
219
  start_date: start_date,
214
220
  end_date: end_date,
221
+ task_channel: task_channel,
222
+ split_by_wait_time: split_by_wait_time,
215
223
  )
216
224
  end
217
225
 
@@ -0,0 +1,339 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+
7
+ module Twilio
8
+ module REST
9
+ class Taskrouter < Domain
10
+ class V1 < Version
11
+ class WorkspaceContext < InstanceContext
12
+ class WorkspaceCumulativeStatisticsList < ListResource
13
+ ##
14
+ # Initialize the WorkspaceCumulativeStatisticsList
15
+ # @param [Version] version Version that contains the resource
16
+ # @param [String] workspace_sid The workspace_sid
17
+ # @return [WorkspaceCumulativeStatisticsList] WorkspaceCumulativeStatisticsList
18
+ def initialize(version, workspace_sid: nil)
19
+ super(version)
20
+
21
+ # Path Solution
22
+ @solution = {
23
+ workspace_sid: workspace_sid
24
+ }
25
+ end
26
+
27
+ ##
28
+ # Provide a user friendly representation
29
+ def to_s
30
+ '#<Twilio.Taskrouter.V1.WorkspaceCumulativeStatisticsList>'
31
+ end
32
+ end
33
+
34
+ class WorkspaceCumulativeStatisticsPage < Page
35
+ ##
36
+ # Initialize the WorkspaceCumulativeStatisticsPage
37
+ # @param [Version] version Version that contains the resource
38
+ # @param [Response] response Response from the API
39
+ # @param [Hash] solution Path solution for the resource
40
+ # @return [WorkspaceCumulativeStatisticsPage] WorkspaceCumulativeStatisticsPage
41
+ def initialize(version, response, solution)
42
+ super(version, response)
43
+
44
+ # Path Solution
45
+ @solution = solution
46
+ end
47
+
48
+ ##
49
+ # Build an instance of WorkspaceCumulativeStatisticsInstance
50
+ # @param [Hash] payload Payload response from the API
51
+ # @return [WorkspaceCumulativeStatisticsInstance] WorkspaceCumulativeStatisticsInstance
52
+ def get_instance(payload)
53
+ WorkspaceCumulativeStatisticsInstance.new(
54
+ @version,
55
+ payload,
56
+ workspace_sid: @solution[:workspace_sid],
57
+ )
58
+ end
59
+
60
+ ##
61
+ # Provide a user friendly representation
62
+ def to_s
63
+ '<Twilio.Taskrouter.V1.WorkspaceCumulativeStatisticsPage>'
64
+ end
65
+ end
66
+
67
+ class WorkspaceCumulativeStatisticsContext < InstanceContext
68
+ ##
69
+ # Initialize the WorkspaceCumulativeStatisticsContext
70
+ # @param [Version] version Version that contains the resource
71
+ # @param [String] workspace_sid The workspace_sid
72
+ # @return [WorkspaceCumulativeStatisticsContext] WorkspaceCumulativeStatisticsContext
73
+ def initialize(version, workspace_sid)
74
+ super(version)
75
+
76
+ # Path Solution
77
+ @solution = {
78
+ workspace_sid: workspace_sid,
79
+ }
80
+ @uri = "/Workspaces/#{@solution[:workspace_sid]}/CumulativeStatistics"
81
+ end
82
+
83
+ ##
84
+ # Fetch a WorkspaceCumulativeStatisticsInstance
85
+ # @param [Time] end_date The end_date
86
+ # @param [String] minutes The minutes
87
+ # @param [Time] start_date The start_date
88
+ # @param [String] task_channel The task_channel
89
+ # @param [String] split_by_wait_time The split_by_wait_time
90
+ # @return [WorkspaceCumulativeStatisticsInstance] Fetched WorkspaceCumulativeStatisticsInstance
91
+ def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
92
+ params = Twilio::Values.of({
93
+ 'EndDate' => Twilio.serialize_iso8601_datetime(end_date),
94
+ 'Minutes' => minutes,
95
+ 'StartDate' => Twilio.serialize_iso8601_datetime(start_date),
96
+ 'TaskChannel' => task_channel,
97
+ 'SplitByWaitTime' => split_by_wait_time,
98
+ })
99
+
100
+ payload = @version.fetch(
101
+ 'GET',
102
+ @uri,
103
+ params,
104
+ )
105
+
106
+ WorkspaceCumulativeStatisticsInstance.new(
107
+ @version,
108
+ payload,
109
+ workspace_sid: @solution[:workspace_sid],
110
+ )
111
+ end
112
+
113
+ ##
114
+ # Provide a user friendly representation
115
+ def to_s
116
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
117
+ "#<Twilio.Taskrouter.V1.WorkspaceCumulativeStatisticsContext #{context}>"
118
+ end
119
+ end
120
+
121
+ class WorkspaceCumulativeStatisticsInstance < InstanceResource
122
+ ##
123
+ # Initialize the WorkspaceCumulativeStatisticsInstance
124
+ # @param [Version] version Version that contains the resource
125
+ # @param [Hash] payload payload that contains response from Twilio
126
+ # @param [String] workspace_sid The workspace_sid
127
+ # @return [WorkspaceCumulativeStatisticsInstance] WorkspaceCumulativeStatisticsInstance
128
+ def initialize(version, payload, workspace_sid: nil)
129
+ super(version)
130
+
131
+ # Marshaled Properties
132
+ @properties = {
133
+ 'account_sid' => payload['account_sid'],
134
+ 'avg_task_acceptance_time' => payload['avg_task_acceptance_time'].to_i,
135
+ 'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
136
+ 'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
137
+ 'reservations_created' => payload['reservations_created'].to_i,
138
+ 'reservations_accepted' => payload['reservations_accepted'].to_i,
139
+ 'reservations_rejected' => payload['reservations_rejected'].to_i,
140
+ 'reservations_timed_out' => payload['reservations_timed_out'].to_i,
141
+ 'reservations_canceled' => payload['reservations_canceled'].to_i,
142
+ 'reservations_rescinded' => payload['reservations_rescinded'].to_i,
143
+ 'split_by_wait_time' => payload['split_by_wait_time'],
144
+ 'wait_duration_until_accepted' => payload['wait_duration_until_accepted'],
145
+ 'wait_duration_until_canceled' => payload['wait_duration_until_canceled'],
146
+ 'tasks_canceled' => payload['tasks_canceled'].to_i,
147
+ 'tasks_completed' => payload['tasks_completed'].to_i,
148
+ 'tasks_created' => payload['tasks_created'].to_i,
149
+ 'tasks_deleted' => payload['tasks_deleted'].to_i,
150
+ 'tasks_moved' => payload['tasks_moved'].to_i,
151
+ 'tasks_timed_out_in_workflow' => payload['tasks_timed_out_in_workflow'].to_i,
152
+ 'workspace_sid' => payload['workspace_sid'],
153
+ 'url' => payload['url'],
154
+ }
155
+
156
+ # Context
157
+ @instance_context = nil
158
+ @params = {
159
+ 'workspace_sid' => workspace_sid,
160
+ }
161
+ end
162
+
163
+ ##
164
+ # Generate an instance context for the instance, the context is capable of
165
+ # performing various actions. All instance actions are proxied to the context
166
+ # @return [WorkspaceCumulativeStatisticsContext] WorkspaceCumulativeStatisticsContext for this WorkspaceCumulativeStatisticsInstance
167
+ def context
168
+ unless @instance_context
169
+ @instance_context = WorkspaceCumulativeStatisticsContext.new(
170
+ @version,
171
+ @params['workspace_sid'],
172
+ )
173
+ end
174
+ @instance_context
175
+ end
176
+
177
+ ##
178
+ # @return [String] The account_sid
179
+ def account_sid
180
+ @properties['account_sid']
181
+ end
182
+
183
+ ##
184
+ # @return [String] The avg_task_acceptance_time
185
+ def avg_task_acceptance_time
186
+ @properties['avg_task_acceptance_time']
187
+ end
188
+
189
+ ##
190
+ # @return [Time] The start_time
191
+ def start_time
192
+ @properties['start_time']
193
+ end
194
+
195
+ ##
196
+ # @return [Time] The end_time
197
+ def end_time
198
+ @properties['end_time']
199
+ end
200
+
201
+ ##
202
+ # @return [String] The reservations_created
203
+ def reservations_created
204
+ @properties['reservations_created']
205
+ end
206
+
207
+ ##
208
+ # @return [String] The reservations_accepted
209
+ def reservations_accepted
210
+ @properties['reservations_accepted']
211
+ end
212
+
213
+ ##
214
+ # @return [String] The reservations_rejected
215
+ def reservations_rejected
216
+ @properties['reservations_rejected']
217
+ end
218
+
219
+ ##
220
+ # @return [String] The reservations_timed_out
221
+ def reservations_timed_out
222
+ @properties['reservations_timed_out']
223
+ end
224
+
225
+ ##
226
+ # @return [String] The reservations_canceled
227
+ def reservations_canceled
228
+ @properties['reservations_canceled']
229
+ end
230
+
231
+ ##
232
+ # @return [String] The reservations_rescinded
233
+ def reservations_rescinded
234
+ @properties['reservations_rescinded']
235
+ end
236
+
237
+ ##
238
+ # @return [Hash] The split_by_wait_time
239
+ def split_by_wait_time
240
+ @properties['split_by_wait_time']
241
+ end
242
+
243
+ ##
244
+ # @return [Hash] The wait_duration_until_accepted
245
+ def wait_duration_until_accepted
246
+ @properties['wait_duration_until_accepted']
247
+ end
248
+
249
+ ##
250
+ # @return [Hash] The wait_duration_until_canceled
251
+ def wait_duration_until_canceled
252
+ @properties['wait_duration_until_canceled']
253
+ end
254
+
255
+ ##
256
+ # @return [String] The tasks_canceled
257
+ def tasks_canceled
258
+ @properties['tasks_canceled']
259
+ end
260
+
261
+ ##
262
+ # @return [String] The tasks_completed
263
+ def tasks_completed
264
+ @properties['tasks_completed']
265
+ end
266
+
267
+ ##
268
+ # @return [String] The tasks_created
269
+ def tasks_created
270
+ @properties['tasks_created']
271
+ end
272
+
273
+ ##
274
+ # @return [String] The tasks_deleted
275
+ def tasks_deleted
276
+ @properties['tasks_deleted']
277
+ end
278
+
279
+ ##
280
+ # @return [String] The tasks_moved
281
+ def tasks_moved
282
+ @properties['tasks_moved']
283
+ end
284
+
285
+ ##
286
+ # @return [String] The tasks_timed_out_in_workflow
287
+ def tasks_timed_out_in_workflow
288
+ @properties['tasks_timed_out_in_workflow']
289
+ end
290
+
291
+ ##
292
+ # @return [String] The workspace_sid
293
+ def workspace_sid
294
+ @properties['workspace_sid']
295
+ end
296
+
297
+ ##
298
+ # @return [String] The url
299
+ def url
300
+ @properties['url']
301
+ end
302
+
303
+ ##
304
+ # Fetch a WorkspaceCumulativeStatisticsInstance
305
+ # @param [Time] end_date The end_date
306
+ # @param [String] minutes The minutes
307
+ # @param [Time] start_date The start_date
308
+ # @param [String] task_channel The task_channel
309
+ # @param [String] split_by_wait_time The split_by_wait_time
310
+ # @return [WorkspaceCumulativeStatisticsInstance] Fetched WorkspaceCumulativeStatisticsInstance
311
+ def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
312
+ context.fetch(
313
+ end_date: end_date,
314
+ minutes: minutes,
315
+ start_date: start_date,
316
+ task_channel: task_channel,
317
+ split_by_wait_time: split_by_wait_time,
318
+ )
319
+ end
320
+
321
+ ##
322
+ # Provide a user friendly representation
323
+ def to_s
324
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
325
+ "<Twilio.Taskrouter.V1.WorkspaceCumulativeStatisticsInstance #{values}>"
326
+ end
327
+
328
+ ##
329
+ # Provide a detailed, user friendly representation
330
+ def inspect
331
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
332
+ "<Twilio.Taskrouter.V1.WorkspaceCumulativeStatisticsInstance #{values}>"
333
+ end
334
+ end
335
+ end
336
+ end
337
+ end
338
+ end
339
+ end