twilio-ruby 5.0.0.rc9 → 5.0.0.rc10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +2 -9
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +13 -24
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +12 -23
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +6 -15
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -9
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -9
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -9
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +9 -18
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +15 -23
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +8 -15
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +9 -18
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +9 -18
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +20 -28
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +15 -24
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +7 -16
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +10 -20
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +2 -10
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +2 -10
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +2 -10
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +12 -23
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +324 -0
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +4 -9
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +9 -18
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +23 -29
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +145 -0
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +145 -0
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +7 -16
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +12 -21
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +13 -23
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +13 -24
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +9 -18
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +8 -17
- data/lib/twilio-ruby/rest/api/v2010/account/sandbox.rb +8 -15
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +324 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +16 -27
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +14 -24
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -21
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -21
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +23 -31
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +16 -27
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +14 -24
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/sms/short_code.rb +10 -20
- data/lib/twilio-ruby/rest/api/v2010/account/sms/sms_message.rb +13 -23
- data/lib/twilio-ruby/rest/api/v2010/account/sms.rb +1 -7
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +2 -7
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +7 -16
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -8
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +12 -23
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +1 -6
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +2 -7
- data/lib/twilio-ruby/rest/api/v2010/account.rb +131 -38
- data/lib/twilio-ruby/rest/api/v2010.rb +17 -1
- data/lib/twilio-ruby/rest/api.rb +16 -0
- data/lib/twilio-ruby/rest/client.rb +16 -0
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +13 -28
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +11 -21
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +62 -20
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +17 -28
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +12 -23
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +23 -25
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +13 -24
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +1 -1
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +5 -12
- data/lib/twilio-ruby/rest/lookups/v1.rb +1 -1
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +5 -14
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +4 -13
- data/lib/twilio-ruby/rest/monitor/v1.rb +1 -1
- data/lib/twilio-ruby/rest/notifications/v1/credential.rb +13 -28
- data/lib/twilio-ruby/rest/notifications/v1/service/binding.rb +8 -18
- data/lib/twilio-ruby/rest/notifications/v1/service/notification.rb +8 -8
- data/lib/twilio-ruby/rest/notifications/v1/service.rb +10 -21
- data/lib/twilio-ruby/rest/notifications/v1.rb +1 -1
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +4 -14
- data/lib/twilio-ruby/rest/preview/wireless/device/usage.rb +6 -13
- data/lib/twilio-ruby/rest/preview/wireless/device.rb +8 -19
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +4 -13
- data/lib/twilio-ruby/rest/preview/wireless.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +4 -13
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +0 -5
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +4 -13
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +0 -5
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +4 -13
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +4 -10
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +0 -6
- data/lib/twilio-ruby/rest/pricing/v1.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +13 -23
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +6 -15
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +13 -23
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +13 -24
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +8 -15
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +1 -8
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +13 -24
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +8 -15
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +6 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +13 -24
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +8 -15
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +13 -24
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +6 -13
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +15 -26
- data/lib/twilio-ruby/rest/taskrouter/v1.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +8 -18
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +8 -18
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +12 -23
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +8 -18
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +12 -23
- data/lib/twilio-ruby/rest/trunking/v1.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/key_spec.rb +178 -0
- data/spec/integration/api/v2010/account/message_spec.rb +2 -3
- data/spec/integration/api/v2010/account/new_key_spec.rb +45 -0
- data/spec/integration/api/v2010/account/new_signing_key_spec.rb +45 -0
- data/spec/integration/api/v2010/account/signing_key_spec.rb +178 -0
- data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +3 -7
- data/spec/integration/ip_messaging/v1/credential_spec.rb +5 -10
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +37 -0
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +3 -7
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +3 -6
- data/spec/integration/notifications/v1/credential_spec.rb +5 -10
- data/spec/integration/notifications/v1/service/notification_spec.rb +1 -0
- data/spec/integration/preview/wireless/device_spec.rb +4 -4
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +3 -6
- metadata +15 -3
|
@@ -14,7 +14,6 @@ module Twilio
|
|
|
14
14
|
# Initialize the EventList
|
|
15
15
|
# @param [Version] version Version that contains the resource
|
|
16
16
|
# @param [String] workspace_sid The sid
|
|
17
|
-
|
|
18
17
|
# @return [EventList] EventList
|
|
19
18
|
def initialize(version, workspace_sid: nil)
|
|
20
19
|
super(version)
|
|
@@ -45,7 +44,6 @@ module Twilio
|
|
|
45
44
|
# the default value of 50 records. If no page_size is defined
|
|
46
45
|
# but a limit is defined, stream() will attempt to read the
|
|
47
46
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
48
|
-
|
|
49
47
|
# @return [Array] Array of up to limit results
|
|
50
48
|
def list(end_date: nil, event_type: nil, minutes: nil, reservation_sid: nil, start_date: nil, task_queue_sid: nil, task_sid: nil, worker_sid: nil, workflow_sid: nil, limit: nil, page_size: nil)
|
|
51
49
|
self.stream(
|
|
@@ -82,7 +80,6 @@ module Twilio
|
|
|
82
80
|
# the default value of 50 records. If no page_size is defined
|
|
83
81
|
# but a limit is defined, stream() will attempt to read the
|
|
84
82
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
85
|
-
|
|
86
83
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
87
84
|
def stream(end_date: nil, event_type: nil, minutes: nil, reservation_sid: nil, start_date: nil, task_queue_sid: nil, task_sid: nil, worker_sid: nil, workflow_sid: nil, limit: nil, page_size: nil)
|
|
88
85
|
limits = @version.read_limits(limit, page_size)
|
|
@@ -149,7 +146,6 @@ module Twilio
|
|
|
149
146
|
# @param [String] page_token PageToken provided by the API
|
|
150
147
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
151
148
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
152
|
-
|
|
153
149
|
# @return [Page] Page of EventInstance
|
|
154
150
|
def page(end_date: nil, event_type: nil, minutes: nil, reservation_sid: nil, start_date: nil, task_queue_sid: nil, task_sid: nil, worker_sid: nil, workflow_sid: nil, page_token: nil, page_number: nil, page_size: nil)
|
|
155
151
|
params = {
|
|
@@ -188,7 +184,6 @@ module Twilio
|
|
|
188
184
|
# @param [Response] response Response from the API
|
|
189
185
|
# @param [Hash] solution Path solution for the resource
|
|
190
186
|
# @param [String] workspace_sid The sid
|
|
191
|
-
|
|
192
187
|
# @return [EventPage] EventPage
|
|
193
188
|
def initialize(version, response, solution)
|
|
194
189
|
super(version, response)
|
|
@@ -200,13 +195,12 @@ module Twilio
|
|
|
200
195
|
##
|
|
201
196
|
# Build an instance of EventInstance
|
|
202
197
|
# @param [Hash] payload Payload response from the API
|
|
203
|
-
|
|
204
198
|
# @return [EventInstance] EventInstance
|
|
205
199
|
def get_instance(payload)
|
|
206
200
|
return EventInstance.new(
|
|
207
201
|
@version,
|
|
208
202
|
payload,
|
|
209
|
-
workspace_sid: @solution[
|
|
203
|
+
workspace_sid: @solution[:workspace_sid],
|
|
210
204
|
)
|
|
211
205
|
end
|
|
212
206
|
|
|
@@ -223,7 +217,6 @@ module Twilio
|
|
|
223
217
|
# @param [Version] version Version that contains the resource
|
|
224
218
|
# @param [String] workspace_sid The workspace_sid
|
|
225
219
|
# @param [String] sid The sid
|
|
226
|
-
|
|
227
220
|
# @return [EventContext] EventContext
|
|
228
221
|
def initialize(version, workspace_sid, sid)
|
|
229
222
|
super(version)
|
|
@@ -251,8 +244,8 @@ module Twilio
|
|
|
251
244
|
return EventInstance.new(
|
|
252
245
|
@version,
|
|
253
246
|
payload,
|
|
254
|
-
workspace_sid: @solution[
|
|
255
|
-
sid: @solution[
|
|
247
|
+
workspace_sid: @solution[:workspace_sid],
|
|
248
|
+
sid: @solution[:sid],
|
|
256
249
|
)
|
|
257
250
|
end
|
|
258
251
|
|
|
@@ -271,7 +264,6 @@ module Twilio
|
|
|
271
264
|
# @param [Hash] payload payload that contains response from Twilio
|
|
272
265
|
# @param [String] workspace_sid The sid
|
|
273
266
|
# @param [String] sid The sid
|
|
274
|
-
|
|
275
267
|
# @return [EventInstance] EventInstance
|
|
276
268
|
def initialize(version, payload, workspace_sid: nil, sid: nil)
|
|
277
269
|
super(version)
|
|
@@ -307,7 +299,6 @@ module Twilio
|
|
|
307
299
|
# Generate an instance context for the instance, the context is capable of
|
|
308
300
|
# performing various actions. All instance actions are proxied to the context
|
|
309
301
|
# @param [Version] version Version that contains the resource
|
|
310
|
-
|
|
311
302
|
# @return [EventContext] EventContext for this EventInstance
|
|
312
303
|
def context
|
|
313
304
|
unless @instance_context
|
|
@@ -384,14 +375,14 @@ module Twilio
|
|
|
384
375
|
# Fetch a EventInstance
|
|
385
376
|
# @return [EventInstance] Fetched EventInstance
|
|
386
377
|
def fetch
|
|
387
|
-
|
|
378
|
+
context.fetch
|
|
388
379
|
end
|
|
389
380
|
|
|
390
381
|
##
|
|
391
382
|
# Provide a user friendly representation
|
|
392
383
|
def to_s
|
|
393
|
-
|
|
394
|
-
"<Twilio.Taskrouter.V1.EventInstance #{
|
|
384
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
385
|
+
"<Twilio.Taskrouter.V1.EventInstance #{values}>"
|
|
395
386
|
end
|
|
396
387
|
end
|
|
397
388
|
end
|
|
@@ -16,7 +16,6 @@ module Twilio
|
|
|
16
16
|
# @param [Version] version Version that contains the resource
|
|
17
17
|
# @param [String] workspace_sid The workspace_sid
|
|
18
18
|
# @param [String] task_sid The task_sid
|
|
19
|
-
|
|
20
19
|
# @return [ReservationList] ReservationList
|
|
21
20
|
def initialize(version, workspace_sid: nil, task_sid: nil)
|
|
22
21
|
super(version)
|
|
@@ -42,7 +41,6 @@ module Twilio
|
|
|
42
41
|
# the default value of 50 records. If no page_size is defined
|
|
43
42
|
# but a limit is defined, stream() will attempt to read the
|
|
44
43
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
45
|
-
|
|
46
44
|
# @return [Array] Array of up to limit results
|
|
47
45
|
def list(status: nil, assignment_status: nil, reservation_status: nil, limit: nil, page_size: nil)
|
|
48
46
|
self.stream(
|
|
@@ -67,7 +65,6 @@ module Twilio
|
|
|
67
65
|
# the default value of 50 records. If no page_size is defined
|
|
68
66
|
# but a limit is defined, stream() will attempt to read the
|
|
69
67
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
70
|
-
|
|
71
68
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
72
69
|
def stream(status: nil, assignment_status: nil, reservation_status: nil, limit: nil, page_size: nil)
|
|
73
70
|
limits = @version.read_limits(limit, page_size)
|
|
@@ -116,7 +113,6 @@ module Twilio
|
|
|
116
113
|
# @param [String] page_token PageToken provided by the API
|
|
117
114
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
118
115
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
119
|
-
|
|
120
116
|
# @return [Page] Page of ReservationInstance
|
|
121
117
|
def page(status: nil, assignment_status: nil, reservation_status: nil, page_token: nil, page_number: nil, page_size: nil)
|
|
122
118
|
params = {
|
|
@@ -150,7 +146,6 @@ module Twilio
|
|
|
150
146
|
# @param [Hash] solution Path solution for the resource
|
|
151
147
|
# @param [String] workspace_sid The workspace_sid
|
|
152
148
|
# @param [String] task_sid The task_sid
|
|
153
|
-
|
|
154
149
|
# @return [ReservationPage] ReservationPage
|
|
155
150
|
def initialize(version, response, solution)
|
|
156
151
|
super(version, response)
|
|
@@ -162,14 +157,13 @@ module Twilio
|
|
|
162
157
|
##
|
|
163
158
|
# Build an instance of ReservationInstance
|
|
164
159
|
# @param [Hash] payload Payload response from the API
|
|
165
|
-
|
|
166
160
|
# @return [ReservationInstance] ReservationInstance
|
|
167
161
|
def get_instance(payload)
|
|
168
162
|
return ReservationInstance.new(
|
|
169
163
|
@version,
|
|
170
164
|
payload,
|
|
171
|
-
workspace_sid: @solution[
|
|
172
|
-
task_sid: @solution[
|
|
165
|
+
workspace_sid: @solution[:workspace_sid],
|
|
166
|
+
task_sid: @solution[:task_sid],
|
|
173
167
|
)
|
|
174
168
|
end
|
|
175
169
|
|
|
@@ -187,7 +181,6 @@ module Twilio
|
|
|
187
181
|
# @param [String] workspace_sid The workspace_sid
|
|
188
182
|
# @param [String] task_sid The task_sid
|
|
189
183
|
# @param [String] sid The sid
|
|
190
|
-
|
|
191
184
|
# @return [ReservationContext] ReservationContext
|
|
192
185
|
def initialize(version, workspace_sid, task_sid, sid)
|
|
193
186
|
super(version)
|
|
@@ -216,9 +209,9 @@ module Twilio
|
|
|
216
209
|
return ReservationInstance.new(
|
|
217
210
|
@version,
|
|
218
211
|
payload,
|
|
219
|
-
workspace_sid: @solution[
|
|
220
|
-
task_sid: @solution[
|
|
221
|
-
sid: @solution[
|
|
212
|
+
workspace_sid: @solution[:workspace_sid],
|
|
213
|
+
task_sid: @solution[:task_sid],
|
|
214
|
+
sid: @solution[:sid],
|
|
222
215
|
)
|
|
223
216
|
end
|
|
224
217
|
|
|
@@ -244,7 +237,6 @@ module Twilio
|
|
|
244
237
|
# @param [String] redirect_call_sid The redirect_call_sid
|
|
245
238
|
# @param [Boolean] redirect_accept The redirect_accept
|
|
246
239
|
# @param [String] redirect_url The redirect_url
|
|
247
|
-
|
|
248
240
|
# @return [ReservationInstance] Updated ReservationInstance
|
|
249
241
|
def update(reservation_status: nil, worker_activity_sid: nil, instruction: nil, dequeue_post_work_activity_sid: nil, dequeue_from: nil, dequeue_record: nil, dequeue_timeout: nil, dequeue_to: nil, dequeue_status_callback_url: nil, call_from: nil, call_record: nil, call_timeout: nil, call_to: nil, call_url: nil, call_status_callback_url: nil, call_accept: nil, redirect_call_sid: nil, redirect_accept: nil, redirect_url: nil)
|
|
250
242
|
data = {
|
|
@@ -278,9 +270,9 @@ module Twilio
|
|
|
278
270
|
return ReservationInstance.new(
|
|
279
271
|
@version,
|
|
280
272
|
payload,
|
|
281
|
-
workspace_sid: @solution[
|
|
282
|
-
task_sid: @solution[
|
|
283
|
-
sid: @solution[
|
|
273
|
+
workspace_sid: @solution[:workspace_sid],
|
|
274
|
+
task_sid: @solution[:task_sid],
|
|
275
|
+
sid: @solution[:sid],
|
|
284
276
|
)
|
|
285
277
|
end
|
|
286
278
|
|
|
@@ -300,7 +292,6 @@ module Twilio
|
|
|
300
292
|
# @param [String] workspace_sid The workspace_sid
|
|
301
293
|
# @param [String] task_sid The task_sid
|
|
302
294
|
# @param [String] sid The sid
|
|
303
|
-
|
|
304
295
|
# @return [ReservationInstance] ReservationInstance
|
|
305
296
|
def initialize(version, payload, workspace_sid: nil, task_sid: nil, sid: nil)
|
|
306
297
|
super(version)
|
|
@@ -331,7 +322,6 @@ module Twilio
|
|
|
331
322
|
# Generate an instance context for the instance, the context is capable of
|
|
332
323
|
# performing various actions. All instance actions are proxied to the context
|
|
333
324
|
# @param [Version] version Version that contains the resource
|
|
334
|
-
|
|
335
325
|
# @return [ReservationContext] ReservationContext for this ReservationInstance
|
|
336
326
|
def context
|
|
337
327
|
unless @instance_context
|
|
@@ -385,7 +375,7 @@ module Twilio
|
|
|
385
375
|
# Fetch a ReservationInstance
|
|
386
376
|
# @return [ReservationInstance] Fetched ReservationInstance
|
|
387
377
|
def fetch
|
|
388
|
-
|
|
378
|
+
context.fetch
|
|
389
379
|
end
|
|
390
380
|
|
|
391
381
|
##
|
|
@@ -410,10 +400,10 @@ module Twilio
|
|
|
410
400
|
# @param [String] redirect_call_sid The redirect_call_sid
|
|
411
401
|
# @param [Boolean] redirect_accept The redirect_accept
|
|
412
402
|
# @param [String] redirect_url The redirect_url
|
|
413
|
-
|
|
414
403
|
# @return [ReservationInstance] Updated ReservationInstance
|
|
415
404
|
def update(reservation_status: nil, worker_activity_sid: nil, instruction: nil, dequeue_post_work_activity_sid: nil, dequeue_from: nil, dequeue_record: nil, dequeue_timeout: nil, dequeue_to: nil, dequeue_status_callback_url: nil, call_from: nil, call_record: nil, call_timeout: nil, call_to: nil, call_url: nil, call_status_callback_url: nil, call_accept: nil, redirect_call_sid: nil, redirect_accept: nil, redirect_url: nil)
|
|
416
|
-
|
|
405
|
+
context.update(
|
|
406
|
+
reservation_status: reservation_status,
|
|
417
407
|
worker_activity_sid: worker_activity_sid,
|
|
418
408
|
instruction: instruction,
|
|
419
409
|
dequeue_post_work_activity_sid: dequeue_post_work_activity_sid,
|
|
@@ -438,8 +428,8 @@ module Twilio
|
|
|
438
428
|
##
|
|
439
429
|
# Provide a user friendly representation
|
|
440
430
|
def to_s
|
|
441
|
-
|
|
442
|
-
"<Twilio.Taskrouter.V1.ReservationInstance #{
|
|
431
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
432
|
+
"<Twilio.Taskrouter.V1.ReservationInstance #{values}>"
|
|
443
433
|
end
|
|
444
434
|
end
|
|
445
435
|
end
|
|
@@ -14,7 +14,6 @@ module Twilio
|
|
|
14
14
|
# Initialize the TaskList
|
|
15
15
|
# @param [Version] version Version that contains the resource
|
|
16
16
|
# @param [String] workspace_sid The workspace_sid
|
|
17
|
-
|
|
18
17
|
# @return [TaskList] TaskList
|
|
19
18
|
def initialize(version, workspace_sid: nil)
|
|
20
19
|
super(version)
|
|
@@ -42,7 +41,6 @@ module Twilio
|
|
|
42
41
|
# the default value of 50 records. If no page_size is defined
|
|
43
42
|
# but a limit is defined, stream() will attempt to read the
|
|
44
43
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
45
|
-
|
|
46
44
|
# @return [Array] Array of up to limit results
|
|
47
45
|
def list(priority: nil, assignment_status: nil, workflow_sid: nil, workflow_name: nil, task_queue_sid: nil, task_queue_name: nil, limit: nil, page_size: nil)
|
|
48
46
|
self.stream(
|
|
@@ -73,7 +71,6 @@ module Twilio
|
|
|
73
71
|
# the default value of 50 records. If no page_size is defined
|
|
74
72
|
# but a limit is defined, stream() will attempt to read the
|
|
75
73
|
# limit with the most efficient page size, i.e. min(limit, 1000)
|
|
76
|
-
|
|
77
74
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
78
75
|
def stream(priority: nil, assignment_status: nil, workflow_sid: nil, workflow_name: nil, task_queue_sid: nil, task_queue_name: nil, limit: nil, page_size: nil)
|
|
79
76
|
limits = @version.read_limits(limit, page_size)
|
|
@@ -131,7 +128,6 @@ module Twilio
|
|
|
131
128
|
# @param [String] page_token PageToken provided by the API
|
|
132
129
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
133
130
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
134
|
-
|
|
135
131
|
# @return [Page] Page of TaskInstance
|
|
136
132
|
def page(priority: nil, assignment_status: nil, workflow_sid: nil, workflow_name: nil, task_queue_sid: nil, task_queue_name: nil, page_token: nil, page_number: nil, page_size: nil)
|
|
137
133
|
params = {
|
|
@@ -160,7 +156,6 @@ module Twilio
|
|
|
160
156
|
# @param [String] workflow_sid The workflow_sid
|
|
161
157
|
# @param [String] timeout The timeout
|
|
162
158
|
# @param [String] priority The priority
|
|
163
|
-
|
|
164
159
|
# @return [TaskInstance] Newly created TaskInstance
|
|
165
160
|
def create(attributes: nil, workflow_sid: nil, timeout: nil, priority: nil)
|
|
166
161
|
data = {
|
|
@@ -179,7 +174,7 @@ module Twilio
|
|
|
179
174
|
return TaskInstance.new(
|
|
180
175
|
@version,
|
|
181
176
|
payload,
|
|
182
|
-
workspace_sid: @solution[
|
|
177
|
+
workspace_sid: @solution[:workspace_sid],
|
|
183
178
|
)
|
|
184
179
|
end
|
|
185
180
|
|
|
@@ -197,7 +192,6 @@ module Twilio
|
|
|
197
192
|
# @param [Response] response Response from the API
|
|
198
193
|
# @param [Hash] solution Path solution for the resource
|
|
199
194
|
# @param [String] workspace_sid The workspace_sid
|
|
200
|
-
|
|
201
195
|
# @return [TaskPage] TaskPage
|
|
202
196
|
def initialize(version, response, solution)
|
|
203
197
|
super(version, response)
|
|
@@ -209,13 +203,12 @@ module Twilio
|
|
|
209
203
|
##
|
|
210
204
|
# Build an instance of TaskInstance
|
|
211
205
|
# @param [Hash] payload Payload response from the API
|
|
212
|
-
|
|
213
206
|
# @return [TaskInstance] TaskInstance
|
|
214
207
|
def get_instance(payload)
|
|
215
208
|
return TaskInstance.new(
|
|
216
209
|
@version,
|
|
217
210
|
payload,
|
|
218
|
-
workspace_sid: @solution[
|
|
211
|
+
workspace_sid: @solution[:workspace_sid],
|
|
219
212
|
)
|
|
220
213
|
end
|
|
221
214
|
|
|
@@ -232,7 +225,6 @@ module Twilio
|
|
|
232
225
|
# @param [Version] version Version that contains the resource
|
|
233
226
|
# @param [String] workspace_sid The workspace_sid
|
|
234
227
|
# @param [String] sid The sid
|
|
235
|
-
|
|
236
228
|
# @return [TaskContext] TaskContext
|
|
237
229
|
def initialize(version, workspace_sid, sid)
|
|
238
230
|
super(version)
|
|
@@ -263,8 +255,8 @@ module Twilio
|
|
|
263
255
|
return TaskInstance.new(
|
|
264
256
|
@version,
|
|
265
257
|
payload,
|
|
266
|
-
workspace_sid: @solution[
|
|
267
|
-
sid: @solution[
|
|
258
|
+
workspace_sid: @solution[:workspace_sid],
|
|
259
|
+
sid: @solution[:sid],
|
|
268
260
|
)
|
|
269
261
|
end
|
|
270
262
|
|
|
@@ -274,7 +266,6 @@ module Twilio
|
|
|
274
266
|
# @param [task.Status] assignment_status The assignment_status
|
|
275
267
|
# @param [String] reason The reason
|
|
276
268
|
# @param [String] priority The priority
|
|
277
|
-
|
|
278
269
|
# @return [TaskInstance] Updated TaskInstance
|
|
279
270
|
def update(attributes: nil, assignment_status: nil, reason: nil, priority: nil)
|
|
280
271
|
data = {
|
|
@@ -293,8 +284,8 @@ module Twilio
|
|
|
293
284
|
return TaskInstance.new(
|
|
294
285
|
@version,
|
|
295
286
|
payload,
|
|
296
|
-
workspace_sid: @solution[
|
|
297
|
-
sid: @solution[
|
|
287
|
+
workspace_sid: @solution[:workspace_sid],
|
|
288
|
+
sid: @solution[:sid],
|
|
298
289
|
)
|
|
299
290
|
end
|
|
300
291
|
|
|
@@ -344,7 +335,6 @@ module Twilio
|
|
|
344
335
|
# @param [Hash] payload payload that contains response from Twilio
|
|
345
336
|
# @param [String] workspace_sid The workspace_sid
|
|
346
337
|
# @param [String] sid The sid
|
|
347
|
-
|
|
348
338
|
# @return [TaskInstance] TaskInstance
|
|
349
339
|
def initialize(version, payload, workspace_sid: nil, sid: nil)
|
|
350
340
|
super(version)
|
|
@@ -378,7 +368,6 @@ module Twilio
|
|
|
378
368
|
# Generate an instance context for the instance, the context is capable of
|
|
379
369
|
# performing various actions. All instance actions are proxied to the context
|
|
380
370
|
# @param [Version] version Version that contains the resource
|
|
381
|
-
|
|
382
371
|
# @return [TaskContext] TaskContext for this TaskInstance
|
|
383
372
|
def context
|
|
384
373
|
unless @instance_context
|
|
@@ -447,7 +436,7 @@ module Twilio
|
|
|
447
436
|
# Fetch a TaskInstance
|
|
448
437
|
# @return [TaskInstance] Fetched TaskInstance
|
|
449
438
|
def fetch
|
|
450
|
-
|
|
439
|
+
context.fetch
|
|
451
440
|
end
|
|
452
441
|
|
|
453
442
|
##
|
|
@@ -456,10 +445,10 @@ module Twilio
|
|
|
456
445
|
# @param [task.Status] assignment_status The assignment_status
|
|
457
446
|
# @param [String] reason The reason
|
|
458
447
|
# @param [String] priority The priority
|
|
459
|
-
|
|
460
448
|
# @return [TaskInstance] Updated TaskInstance
|
|
461
449
|
def update(attributes: nil, assignment_status: nil, reason: nil, priority: nil)
|
|
462
|
-
|
|
450
|
+
context.update(
|
|
451
|
+
attributes: attributes,
|
|
463
452
|
assignment_status: assignment_status,
|
|
464
453
|
reason: reason,
|
|
465
454
|
priority: priority,
|
|
@@ -470,21 +459,21 @@ module Twilio
|
|
|
470
459
|
# Deletes the TaskInstance
|
|
471
460
|
# @return [Boolean] true if delete succeeds, true otherwise
|
|
472
461
|
def delete
|
|
473
|
-
|
|
462
|
+
context.delete
|
|
474
463
|
end
|
|
475
464
|
|
|
476
465
|
##
|
|
477
466
|
# Access the reservations
|
|
478
467
|
# @return [reservations] reservations
|
|
479
468
|
def reservations
|
|
480
|
-
|
|
469
|
+
context.reservations
|
|
481
470
|
end
|
|
482
471
|
|
|
483
472
|
##
|
|
484
473
|
# Provide a user friendly representation
|
|
485
474
|
def to_s
|
|
486
|
-
|
|
487
|
-
"<Twilio.Taskrouter.V1.TaskInstance #{
|
|
475
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
476
|
+
"<Twilio.Taskrouter.V1.TaskInstance #{values}>"
|
|
488
477
|
end
|
|
489
478
|
end
|
|
490
479
|
end
|
|
@@ -16,7 +16,6 @@ module Twilio
|
|
|
16
16
|
# @param [Version] version Version that contains the resource
|
|
17
17
|
# @param [String] workspace_sid The workspace_sid
|
|
18
18
|
# @param [String] task_queue_sid The task_queue_sid
|
|
19
|
-
|
|
20
19
|
# @return [TaskQueueStatisticsList] TaskQueueStatisticsList
|
|
21
20
|
def initialize(version, workspace_sid: nil, task_queue_sid: nil)
|
|
22
21
|
super(version)
|
|
@@ -43,7 +42,6 @@ module Twilio
|
|
|
43
42
|
# @param [Hash] solution Path solution for the resource
|
|
44
43
|
# @param [String] workspace_sid The workspace_sid
|
|
45
44
|
# @param [String] task_queue_sid The task_queue_sid
|
|
46
|
-
|
|
47
45
|
# @return [TaskQueueStatisticsPage] TaskQueueStatisticsPage
|
|
48
46
|
def initialize(version, response, solution)
|
|
49
47
|
super(version, response)
|
|
@@ -55,14 +53,13 @@ module Twilio
|
|
|
55
53
|
##
|
|
56
54
|
# Build an instance of TaskQueueStatisticsInstance
|
|
57
55
|
# @param [Hash] payload Payload response from the API
|
|
58
|
-
|
|
59
56
|
# @return [TaskQueueStatisticsInstance] TaskQueueStatisticsInstance
|
|
60
57
|
def get_instance(payload)
|
|
61
58
|
return TaskQueueStatisticsInstance.new(
|
|
62
59
|
@version,
|
|
63
60
|
payload,
|
|
64
|
-
workspace_sid: @solution[
|
|
65
|
-
task_queue_sid: @solution[
|
|
61
|
+
workspace_sid: @solution[:workspace_sid],
|
|
62
|
+
task_queue_sid: @solution[:task_queue_sid],
|
|
66
63
|
)
|
|
67
64
|
end
|
|
68
65
|
|
|
@@ -79,7 +76,6 @@ module Twilio
|
|
|
79
76
|
# @param [Version] version Version that contains the resource
|
|
80
77
|
# @param [String] workspace_sid The workspace_sid
|
|
81
78
|
# @param [String] task_queue_sid The task_queue_sid
|
|
82
|
-
|
|
83
79
|
# @return [TaskQueueStatisticsContext] TaskQueueStatisticsContext
|
|
84
80
|
def initialize(version, workspace_sid, task_queue_sid)
|
|
85
81
|
super(version)
|
|
@@ -98,7 +94,6 @@ module Twilio
|
|
|
98
94
|
# @param [String] friendly_name The friendly_name
|
|
99
95
|
# @param [String] minutes The minutes
|
|
100
96
|
# @param [Time] start_date The start_date
|
|
101
|
-
|
|
102
97
|
# @return [TaskQueueStatisticsInstance] Fetched TaskQueueStatisticsInstance
|
|
103
98
|
def fetch(end_date: nil, friendly_name: nil, minutes: nil, start_date: nil)
|
|
104
99
|
params = {
|
|
@@ -117,8 +112,8 @@ module Twilio
|
|
|
117
112
|
return TaskQueueStatisticsInstance.new(
|
|
118
113
|
@version,
|
|
119
114
|
payload,
|
|
120
|
-
workspace_sid: @solution[
|
|
121
|
-
task_queue_sid: @solution[
|
|
115
|
+
workspace_sid: @solution[:workspace_sid],
|
|
116
|
+
task_queue_sid: @solution[:task_queue_sid],
|
|
122
117
|
)
|
|
123
118
|
end
|
|
124
119
|
|
|
@@ -137,7 +132,6 @@ module Twilio
|
|
|
137
132
|
# @param [Hash] payload payload that contains response from Twilio
|
|
138
133
|
# @param [String] workspace_sid The workspace_sid
|
|
139
134
|
# @param [String] task_queue_sid The task_queue_sid
|
|
140
|
-
|
|
141
135
|
# @return [TaskQueueStatisticsInstance] TaskQueueStatisticsInstance
|
|
142
136
|
def initialize(version, payload, workspace_sid: nil, task_queue_sid: nil)
|
|
143
137
|
super(version)
|
|
@@ -163,7 +157,6 @@ module Twilio
|
|
|
163
157
|
# Generate an instance context for the instance, the context is capable of
|
|
164
158
|
# performing various actions. All instance actions are proxied to the context
|
|
165
159
|
# @param [Version] version Version that contains the resource
|
|
166
|
-
|
|
167
160
|
# @return [TaskQueueStatisticsContext] TaskQueueStatisticsContext for this TaskQueueStatisticsInstance
|
|
168
161
|
def context
|
|
169
162
|
unless @instance_context
|
|
@@ -202,10 +195,10 @@ module Twilio
|
|
|
202
195
|
# @param [String] friendly_name The friendly_name
|
|
203
196
|
# @param [String] minutes The minutes
|
|
204
197
|
# @param [Time] start_date The start_date
|
|
205
|
-
|
|
206
198
|
# @return [TaskQueueStatisticsInstance] Fetched TaskQueueStatisticsInstance
|
|
207
199
|
def fetch(end_date: nil, friendly_name: nil, minutes: nil, start_date: nil)
|
|
208
|
-
|
|
200
|
+
context.fetch(
|
|
201
|
+
end_date: end_date,
|
|
209
202
|
friendly_name: friendly_name,
|
|
210
203
|
minutes: minutes,
|
|
211
204
|
start_date: start_date,
|
|
@@ -215,8 +208,8 @@ module Twilio
|
|
|
215
208
|
##
|
|
216
209
|
# Provide a user friendly representation
|
|
217
210
|
def to_s
|
|
218
|
-
|
|
219
|
-
"<Twilio.Taskrouter.V1.TaskQueueStatisticsInstance #{
|
|
211
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
212
|
+
"<Twilio.Taskrouter.V1.TaskQueueStatisticsInstance #{values}>"
|
|
220
213
|
end
|
|
221
214
|
end
|
|
222
215
|
end
|