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
@@ -91,12 +91,16 @@ module Twilio
91
91
  # @param [Time] end_date The end_date
92
92
  # @param [String] minutes The minutes
93
93
  # @param [Time] start_date The start_date
94
+ # @param [String] task_channel The task_channel
95
+ # @param [String] split_by_wait_time The split_by_wait_time
94
96
  # @return [TaskQueueStatisticsInstance] Fetched TaskQueueStatisticsInstance
95
- def fetch(end_date: :unset, minutes: :unset, start_date: :unset)
97
+ def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
96
98
  params = Twilio::Values.of({
97
99
  'EndDate' => Twilio.serialize_iso8601_datetime(end_date),
98
100
  'Minutes' => minutes,
99
101
  'StartDate' => Twilio.serialize_iso8601_datetime(start_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 [Time] end_date The end_date
207
211
  # @param [String] minutes The minutes
208
212
  # @param [Time] start_date The start_date
213
+ # @param [String] task_channel The task_channel
214
+ # @param [String] split_by_wait_time The split_by_wait_time
209
215
  # @return [TaskQueueStatisticsInstance] Fetched TaskQueueStatisticsInstance
210
- def fetch(end_date: :unset, minutes: :unset, start_date: :unset)
216
+ def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
211
217
  context.fetch(
212
218
  end_date: end_date,
213
219
  minutes: minutes,
214
220
  start_date: start_date,
221
+ task_channel: task_channel,
222
+ split_by_wait_time: split_by_wait_time,
215
223
  )
216
224
  end
217
225
 
@@ -34,6 +34,8 @@ module Twilio
34
34
  # @param [String] friendly_name The friendly_name
35
35
  # @param [String] minutes The minutes
36
36
  # @param [Time] start_date The start_date
37
+ # @param [String] task_channel The task_channel
38
+ # @param [String] split_by_wait_time The split_by_wait_time
37
39
  # @param [Integer] limit Upper limit for the number of records to return. stream()
38
40
  # guarantees to never return more than limit. Default is no limit
39
41
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -41,12 +43,14 @@ module Twilio
41
43
  # but a limit is defined, stream() will attempt to read the limit with the most
42
44
  # efficient page size, i.e. min(limit, 1000)
43
45
  # @return [Array] Array of up to limit results
44
- def list(end_date: :unset, friendly_name: :unset, minutes: :unset, start_date: :unset, limit: nil, page_size: nil)
46
+ def list(end_date: :unset, friendly_name: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset, limit: nil, page_size: nil)
45
47
  self.stream(
46
48
  end_date: end_date,
47
49
  friendly_name: friendly_name,
48
50
  minutes: minutes,
49
51
  start_date: start_date,
52
+ task_channel: task_channel,
53
+ split_by_wait_time: split_by_wait_time,
50
54
  limit: limit,
51
55
  page_size: page_size
52
56
  ).entries
@@ -60,6 +64,8 @@ module Twilio
60
64
  # @param [String] friendly_name The friendly_name
61
65
  # @param [String] minutes The minutes
62
66
  # @param [Time] start_date The start_date
67
+ # @param [String] task_channel The task_channel
68
+ # @param [String] split_by_wait_time The split_by_wait_time
63
69
  # @param [Integer] limit Upper limit for the number of records to return. stream()
64
70
  # guarantees to never return more than limit. Default is no limit.
65
71
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -67,7 +73,7 @@ module Twilio
67
73
  # but a limit is defined, stream() will attempt to read the limit with the most
68
74
  # efficient page size, i.e. min(limit, 1000)
69
75
  # @return [Enumerable] Enumerable that will yield up to limit results
70
- def stream(end_date: :unset, friendly_name: :unset, minutes: :unset, start_date: :unset, limit: nil, page_size: nil)
76
+ def stream(end_date: :unset, friendly_name: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset, limit: nil, page_size: nil)
71
77
  limits = @version.read_limits(limit, page_size)
72
78
 
73
79
  page = self.page(
@@ -75,6 +81,8 @@ module Twilio
75
81
  friendly_name: friendly_name,
76
82
  minutes: minutes,
77
83
  start_date: start_date,
84
+ task_channel: task_channel,
85
+ split_by_wait_time: split_by_wait_time,
78
86
  page_size: limits[:page_size],
79
87
  )
80
88
 
@@ -104,16 +112,20 @@ module Twilio
104
112
  # @param [String] friendly_name The friendly_name
105
113
  # @param [String] minutes The minutes
106
114
  # @param [Time] start_date The start_date
115
+ # @param [String] task_channel The task_channel
116
+ # @param [String] split_by_wait_time The split_by_wait_time
107
117
  # @param [String] page_token PageToken provided by the API
108
118
  # @param [Integer] page_number Page Number, this value is simply for client state
109
119
  # @param [Integer] page_size Number of records to return, defaults to 50
110
120
  # @return [Page] Page of TaskQueuesStatisticsInstance
111
- def page(end_date: :unset, friendly_name: :unset, minutes: :unset, start_date: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
121
+ def page(end_date: :unset, friendly_name: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
112
122
  params = Twilio::Values.of({
113
123
  'EndDate' => Twilio.serialize_iso8601_datetime(end_date),
114
124
  'FriendlyName' => friendly_name,
115
125
  'Minutes' => minutes,
116
126
  'StartDate' => Twilio.serialize_iso8601_datetime(start_date),
127
+ 'TaskChannel' => task_channel,
128
+ 'SplitByWaitTime' => split_by_wait_time,
117
129
  'PageToken' => page_token,
118
130
  'Page' => page_number,
119
131
  'PageSize' => page_size,
@@ -260,6 +260,8 @@ module Twilio
260
260
  @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workers/#{@solution[:sid]}"
261
261
 
262
262
  # Dependents
263
+ @workers_real_time_statistics = nil
264
+ @workers_cumulative_statistics = nil
263
265
  @statistics = nil
264
266
  @reservations = nil
265
267
  @worker_channels = nil
@@ -319,6 +321,28 @@ module Twilio
319
321
  @version.delete('delete', @uri)
320
322
  end
321
323
 
324
+ ##
325
+ # Access the workers_real_time_statistics
326
+ # @return [WorkersRealTimeStatisticsList]
327
+ # @return [WorkersRealTimeStatisticsContext]
328
+ def workers_real_time_statistics
329
+ WorkersRealTimeStatisticsContext.new(
330
+ @version,
331
+ @solution[:workspace_sid],
332
+ )
333
+ end
334
+
335
+ ##
336
+ # Access the workers_cumulative_statistics
337
+ # @return [WorkersCumulativeStatisticsList]
338
+ # @return [WorkersCumulativeStatisticsContext]
339
+ def workers_cumulative_statistics
340
+ WorkersCumulativeStatisticsContext.new(
341
+ @version,
342
+ @solution[:workspace_sid],
343
+ )
344
+ end
345
+
322
346
  ##
323
347
  # Access the statistics
324
348
  # @return [WorkerStatisticsList]
@@ -550,6 +574,20 @@ module Twilio
550
574
  context.delete
551
575
  end
552
576
 
577
+ ##
578
+ # Access the workers_real_time_statistics
579
+ # @return [workers_real_time_statistics] workers_real_time_statistics
580
+ def workers_real_time_statistics
581
+ context.workers_real_time_statistics
582
+ end
583
+
584
+ ##
585
+ # Access the workers_cumulative_statistics
586
+ # @return [workers_cumulative_statistics] workers_cumulative_statistics
587
+ def workers_cumulative_statistics
588
+ context.workers_cumulative_statistics
589
+ end
590
+
553
591
  ##
554
592
  # Access the statistics
555
593
  # @return [statistics] statistics
@@ -91,12 +91,14 @@ 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
94
95
  # @return [WorkerStatisticsInstance] Fetched WorkerStatisticsInstance
95
- def fetch(minutes: :unset, start_date: :unset, end_date: :unset)
96
+ def fetch(minutes: :unset, start_date: :unset, end_date: :unset, task_channel: :unset)
96
97
  params = Twilio::Values.of({
97
98
  'Minutes' => minutes,
98
99
  'StartDate' => Twilio.serialize_iso8601_datetime(start_date),
99
100
  'EndDate' => Twilio.serialize_iso8601_datetime(end_date),
101
+ 'TaskChannel' => task_channel,
100
102
  })
101
103
 
102
104
  payload = @version.fetch(
@@ -199,12 +201,14 @@ module Twilio
199
201
  # @param [String] minutes The minutes
200
202
  # @param [Time] start_date The start_date
201
203
  # @param [Time] end_date The end_date
204
+ # @param [String] task_channel The task_channel
202
205
  # @return [WorkerStatisticsInstance] Fetched WorkerStatisticsInstance
203
- def fetch(minutes: :unset, start_date: :unset, end_date: :unset)
206
+ def fetch(minutes: :unset, start_date: :unset, end_date: :unset, task_channel: :unset)
204
207
  context.fetch(
205
208
  minutes: minutes,
206
209
  start_date: start_date,
207
210
  end_date: end_date,
211
+ task_channel: task_channel,
208
212
  )
209
213
  end
210
214
 
@@ -0,0 +1,274 @@
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 WorkerContext < InstanceContext
13
+ class WorkersCumulativeStatisticsList < ListResource
14
+ ##
15
+ # Initialize the WorkersCumulativeStatisticsList
16
+ # @param [Version] version Version that contains the resource
17
+ # @param [String] workspace_sid The workspace_sid
18
+ # @return [WorkersCumulativeStatisticsList] WorkersCumulativeStatisticsList
19
+ def initialize(version, workspace_sid: nil)
20
+ super(version)
21
+
22
+ # Path Solution
23
+ @solution = {
24
+ workspace_sid: workspace_sid
25
+ }
26
+ end
27
+
28
+ ##
29
+ # Provide a user friendly representation
30
+ def to_s
31
+ '#<Twilio.Taskrouter.V1.WorkersCumulativeStatisticsList>'
32
+ end
33
+ end
34
+
35
+ class WorkersCumulativeStatisticsPage < Page
36
+ ##
37
+ # Initialize the WorkersCumulativeStatisticsPage
38
+ # @param [Version] version Version that contains the resource
39
+ # @param [Response] response Response from the API
40
+ # @param [Hash] solution Path solution for the resource
41
+ # @return [WorkersCumulativeStatisticsPage] WorkersCumulativeStatisticsPage
42
+ def initialize(version, response, solution)
43
+ super(version, response)
44
+
45
+ # Path Solution
46
+ @solution = solution
47
+ end
48
+
49
+ ##
50
+ # Build an instance of WorkersCumulativeStatisticsInstance
51
+ # @param [Hash] payload Payload response from the API
52
+ # @return [WorkersCumulativeStatisticsInstance] WorkersCumulativeStatisticsInstance
53
+ def get_instance(payload)
54
+ WorkersCumulativeStatisticsInstance.new(
55
+ @version,
56
+ payload,
57
+ workspace_sid: @solution[:workspace_sid],
58
+ )
59
+ end
60
+
61
+ ##
62
+ # Provide a user friendly representation
63
+ def to_s
64
+ '<Twilio.Taskrouter.V1.WorkersCumulativeStatisticsPage>'
65
+ end
66
+ end
67
+
68
+ class WorkersCumulativeStatisticsContext < InstanceContext
69
+ ##
70
+ # Initialize the WorkersCumulativeStatisticsContext
71
+ # @param [Version] version Version that contains the resource
72
+ # @param [String] workspace_sid The workspace_sid
73
+ # @return [WorkersCumulativeStatisticsContext] WorkersCumulativeStatisticsContext
74
+ def initialize(version, workspace_sid)
75
+ super(version)
76
+
77
+ # Path Solution
78
+ @solution = {
79
+ workspace_sid: workspace_sid,
80
+ }
81
+ @uri = "/Workspaces/#{@solution[:workspace_sid]}/Workers/CumulativeStatistics"
82
+ end
83
+
84
+ ##
85
+ # Fetch a WorkersCumulativeStatisticsInstance
86
+ # @param [Time] end_date The end_date
87
+ # @param [String] minutes The minutes
88
+ # @param [Time] start_date The start_date
89
+ # @param [String] task_channel The task_channel
90
+ # @return [WorkersCumulativeStatisticsInstance] Fetched WorkersCumulativeStatisticsInstance
91
+ def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :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
+ })
98
+
99
+ payload = @version.fetch(
100
+ 'GET',
101
+ @uri,
102
+ params,
103
+ )
104
+
105
+ WorkersCumulativeStatisticsInstance.new(
106
+ @version,
107
+ payload,
108
+ workspace_sid: @solution[:workspace_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.WorkersCumulativeStatisticsContext #{context}>"
117
+ end
118
+ end
119
+
120
+ class WorkersCumulativeStatisticsInstance < InstanceResource
121
+ ##
122
+ # Initialize the WorkersCumulativeStatisticsInstance
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
+ # @return [WorkersCumulativeStatisticsInstance] WorkersCumulativeStatisticsInstance
127
+ def initialize(version, payload, workspace_sid: nil)
128
+ super(version)
129
+
130
+ # Marshaled Properties
131
+ @properties = {
132
+ 'account_sid' => payload['account_sid'],
133
+ 'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
134
+ 'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
135
+ 'activity_durations' => payload['activity_durations'],
136
+ 'reservations_created' => payload['reservations_created'].to_i,
137
+ 'reservations_accepted' => payload['reservations_accepted'].to_i,
138
+ 'reservations_rejected' => payload['reservations_rejected'].to_i,
139
+ 'reservations_timed_out' => payload['reservations_timed_out'].to_i,
140
+ 'reservations_canceled' => payload['reservations_canceled'].to_i,
141
+ 'reservations_rescinded' => payload['reservations_rescinded'].to_i,
142
+ 'workspace_sid' => payload['workspace_sid'],
143
+ 'url' => payload['url'],
144
+ }
145
+
146
+ # Context
147
+ @instance_context = nil
148
+ @params = {
149
+ 'workspace_sid' => workspace_sid,
150
+ }
151
+ end
152
+
153
+ ##
154
+ # Generate an instance context for the instance, the context is capable of
155
+ # performing various actions. All instance actions are proxied to the context
156
+ # @return [WorkersCumulativeStatisticsContext] WorkersCumulativeStatisticsContext for this WorkersCumulativeStatisticsInstance
157
+ def context
158
+ unless @instance_context
159
+ @instance_context = WorkersCumulativeStatisticsContext.new(
160
+ @version,
161
+ @params['workspace_sid'],
162
+ )
163
+ end
164
+ @instance_context
165
+ end
166
+
167
+ ##
168
+ # @return [String] The account_sid
169
+ def account_sid
170
+ @properties['account_sid']
171
+ end
172
+
173
+ ##
174
+ # @return [Time] The start_time
175
+ def start_time
176
+ @properties['start_time']
177
+ end
178
+
179
+ ##
180
+ # @return [Time] The end_time
181
+ def end_time
182
+ @properties['end_time']
183
+ end
184
+
185
+ ##
186
+ # @return [Hash] The activity_durations
187
+ def activity_durations
188
+ @properties['activity_durations']
189
+ end
190
+
191
+ ##
192
+ # @return [String] The reservations_created
193
+ def reservations_created
194
+ @properties['reservations_created']
195
+ end
196
+
197
+ ##
198
+ # @return [String] The reservations_accepted
199
+ def reservations_accepted
200
+ @properties['reservations_accepted']
201
+ end
202
+
203
+ ##
204
+ # @return [String] The reservations_rejected
205
+ def reservations_rejected
206
+ @properties['reservations_rejected']
207
+ end
208
+
209
+ ##
210
+ # @return [String] The reservations_timed_out
211
+ def reservations_timed_out
212
+ @properties['reservations_timed_out']
213
+ end
214
+
215
+ ##
216
+ # @return [String] The reservations_canceled
217
+ def reservations_canceled
218
+ @properties['reservations_canceled']
219
+ end
220
+
221
+ ##
222
+ # @return [String] The reservations_rescinded
223
+ def reservations_rescinded
224
+ @properties['reservations_rescinded']
225
+ end
226
+
227
+ ##
228
+ # @return [String] The workspace_sid
229
+ def workspace_sid
230
+ @properties['workspace_sid']
231
+ end
232
+
233
+ ##
234
+ # @return [String] The url
235
+ def url
236
+ @properties['url']
237
+ end
238
+
239
+ ##
240
+ # Fetch a WorkersCumulativeStatisticsInstance
241
+ # @param [Time] end_date The end_date
242
+ # @param [String] minutes The minutes
243
+ # @param [Time] start_date The start_date
244
+ # @param [String] task_channel The task_channel
245
+ # @return [WorkersCumulativeStatisticsInstance] Fetched WorkersCumulativeStatisticsInstance
246
+ def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset)
247
+ context.fetch(
248
+ end_date: end_date,
249
+ minutes: minutes,
250
+ start_date: start_date,
251
+ task_channel: task_channel,
252
+ )
253
+ end
254
+
255
+ ##
256
+ # Provide a user friendly representation
257
+ def to_s
258
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
259
+ "<Twilio.Taskrouter.V1.WorkersCumulativeStatisticsInstance #{values}>"
260
+ end
261
+
262
+ ##
263
+ # Provide a detailed, user friendly representation
264
+ def inspect
265
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
266
+ "<Twilio.Taskrouter.V1.WorkersCumulativeStatisticsInstance #{values}>"
267
+ end
268
+ end
269
+ end
270
+ end
271
+ end
272
+ end
273
+ end
274
+ end