twilio-ruby 5.11.2 → 5.12.0
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/CHANGES.md +20 -0
- data/Makefile +2 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +13 -6
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +10 -4
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +18 -6
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +7 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +13 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +10 -4
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +18 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +7 -3
- data/lib/twilio-ruby/rest/notify/v1/service.rb +0 -46
- data/lib/twilio-ruby/rest/preview.rb +13 -20
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent.rb +16 -0
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb +226 -0
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +102 -50
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/twiml/voice_response.rb +42 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/chat/v2/service/channel/message_spec.rb +1 -1
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +1 -1
- data/spec/integration/preview/understand/assistant/intent/intent_statistics_spec.rb +50 -0
- data/spec/integration/preview/understand/assistant/intent_spec.rb +8 -4
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +31 -0
- metadata +6 -37
- data/lib/twilio-ruby/rest/notify/v1/service/segment.rb +0 -225
- data/lib/twilio-ruby/rest/notify/v1/service/user.rb +0 -438
- data/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb +0 -262
- data/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb +0 -438
- data/lib/twilio-ruby/rest/preview/proxy.rb +0 -43
- data/lib/twilio-ruby/rest/preview/proxy/service.rb +0 -464
- data/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb +0 -347
- data/lib/twilio-ruby/rest/preview/proxy/service/session.rb +0 -497
- data/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb +0 -437
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +0 -514
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb +0 -455
- data/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb +0 -342
- data/spec/integration/notify/v1/service/segment_spec.rb +0 -86
- data/spec/integration/notify/v1/service/user/segment_memberships_spec.rb +0 -118
- data/spec/integration/notify/v1/service/user/user_binding_spec.rb +0 -268
- data/spec/integration/notify/v1/service/user_spec.rb +0 -213
- data/spec/integration/preview/proxy/service/phone_number_spec.rb +0 -173
- data/spec/integration/preview/proxy/service/session/interaction_spec.rb +0 -106
- data/spec/integration/preview/proxy/service/session/participant/message_interaction_spec.rb +0 -166
- data/spec/integration/preview/proxy/service/session/participant_spec.rb +0 -226
- data/spec/integration/preview/proxy/service/session_spec.rb +0 -218
- data/spec/integration/preview/proxy/service/short_code_spec.rb +0 -173
- data/spec/integration/preview/proxy/service_spec.rb +0 -202
@@ -23,7 +23,6 @@ module Twilio
|
|
23
23
|
@deployed_devices = nil
|
24
24
|
@hosted_numbers = nil
|
25
25
|
@marketplace = nil
|
26
|
-
@proxy = nil
|
27
26
|
@studio = nil
|
28
27
|
@acc_security = nil
|
29
28
|
@sync = nil
|
@@ -55,12 +54,6 @@ module Twilio
|
|
55
54
|
@marketplace ||= Marketplace.new self
|
56
55
|
end
|
57
56
|
|
58
|
-
##
|
59
|
-
# Version proxy of preview
|
60
|
-
def proxy
|
61
|
-
@proxy ||= Proxy.new self
|
62
|
-
end
|
63
|
-
|
64
57
|
##
|
65
58
|
# Version studio of preview
|
66
59
|
def studio
|
@@ -134,14 +127,6 @@ module Twilio
|
|
134
127
|
self.hosted_numbers.hosted_number_orders(sid)
|
135
128
|
end
|
136
129
|
|
137
|
-
##
|
138
|
-
# @param [String] sid A 34 character string that uniquely identifies this Add-on.
|
139
|
-
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed.
|
140
|
-
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
141
|
-
def available_add_ons(sid=:unset)
|
142
|
-
self.marketplace.available_add_ons(sid)
|
143
|
-
end
|
144
|
-
|
145
130
|
##
|
146
131
|
# @param [String] sid 34 character string that uniquely identifies the Add-on.
|
147
132
|
# This Sid can also be found in the Console on that specific Add-ons page as the
|
@@ -153,11 +138,11 @@ module Twilio
|
|
153
138
|
end
|
154
139
|
|
155
140
|
##
|
156
|
-
# @param [String] sid
|
157
|
-
# @return [Twilio::REST::Preview::
|
158
|
-
# @return [Twilio::REST::Preview::
|
159
|
-
def
|
160
|
-
self.
|
141
|
+
# @param [String] sid A 34 character string that uniquely identifies this Add-on.
|
142
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnInstance] if sid was passed.
|
143
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
144
|
+
def available_add_ons(sid=:unset)
|
145
|
+
self.marketplace.available_add_ons(sid)
|
161
146
|
end
|
162
147
|
|
163
148
|
##
|
@@ -168,6 +153,14 @@ module Twilio
|
|
168
153
|
self.studio.flows(sid)
|
169
154
|
end
|
170
155
|
|
156
|
+
##
|
157
|
+
# @param [String] sid The sid
|
158
|
+
# @return [Twilio::REST::Preview::Sync::ServiceInstance] if sid was passed.
|
159
|
+
# @return [Twilio::REST::Preview::Sync::ServiceList]
|
160
|
+
def services(sid=:unset)
|
161
|
+
self.sync.services(sid)
|
162
|
+
end
|
163
|
+
|
171
164
|
##
|
172
165
|
# @param [String] sid A 34 character string that uniquely identifies this
|
173
166
|
# resource.
|
@@ -15,37 +15,37 @@ module Twilio
|
|
15
15
|
def initialize(domain)
|
16
16
|
super
|
17
17
|
@version = 'marketplace'
|
18
|
-
@available_add_ons = nil
|
19
18
|
@installed_add_ons = nil
|
19
|
+
@available_add_ons = nil
|
20
20
|
end
|
21
21
|
|
22
22
|
##
|
23
|
-
# @param [String] sid The
|
23
|
+
# @param [String] sid The Installed Add-on Sid that uniquely identifies this
|
24
24
|
# resource
|
25
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
26
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
27
|
-
def
|
25
|
+
# @return [Twilio::REST::Preview::Marketplace::InstalledAddOnContext] if sid was passed.
|
26
|
+
# @return [Twilio::REST::Preview::Marketplace::InstalledAddOnList]
|
27
|
+
def installed_add_ons(sid=:unset)
|
28
28
|
if sid.nil?
|
29
29
|
raise ArgumentError, 'sid cannot be nil'
|
30
30
|
elsif sid == :unset
|
31
|
-
@
|
31
|
+
@installed_add_ons ||= InstalledAddOnList.new self
|
32
32
|
else
|
33
|
-
|
33
|
+
InstalledAddOnContext.new(self, sid)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
37
|
##
|
38
|
-
# @param [String] sid The
|
38
|
+
# @param [String] sid The Available Add-on Sid that uniquely identifies this
|
39
39
|
# resource
|
40
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
41
|
-
# @return [Twilio::REST::Preview::Marketplace::
|
42
|
-
def
|
40
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnContext] if sid was passed.
|
41
|
+
# @return [Twilio::REST::Preview::Marketplace::AvailableAddOnList]
|
42
|
+
def available_add_ons(sid=:unset)
|
43
43
|
if sid.nil?
|
44
44
|
raise ArgumentError, 'sid cannot be nil'
|
45
45
|
elsif sid == :unset
|
46
|
-
@
|
46
|
+
@available_add_ons ||= AvailableAddOnList.new self
|
47
47
|
else
|
48
|
-
|
48
|
+
AvailableAddOnContext.new(self, sid)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -186,6 +186,7 @@ module Twilio
|
|
186
186
|
# Dependents
|
187
187
|
@fields = nil
|
188
188
|
@samples = nil
|
189
|
+
@statistics = nil
|
189
190
|
end
|
190
191
|
|
191
192
|
##
|
@@ -283,6 +284,14 @@ module Twilio
|
|
283
284
|
@samples
|
284
285
|
end
|
285
286
|
|
287
|
+
##
|
288
|
+
# Access the statistics
|
289
|
+
# @return [IntentStatisticsList]
|
290
|
+
# @return [IntentStatisticsContext]
|
291
|
+
def statistics
|
292
|
+
IntentStatisticsContext.new(@version, @solution[:assistant_sid], @solution[:sid], )
|
293
|
+
end
|
294
|
+
|
286
295
|
##
|
287
296
|
# Provide a user friendly representation
|
288
297
|
def to_s
|
@@ -426,6 +435,13 @@ module Twilio
|
|
426
435
|
context.samples
|
427
436
|
end
|
428
437
|
|
438
|
+
##
|
439
|
+
# Access the statistics
|
440
|
+
# @return [statistics] statistics
|
441
|
+
def statistics
|
442
|
+
context.statistics
|
443
|
+
end
|
444
|
+
|
429
445
|
##
|
430
446
|
# Provide a user friendly representation
|
431
447
|
def to_s
|
@@ -0,0 +1,226 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Preview < Domain
|
12
|
+
class Understand < Version
|
13
|
+
class AssistantContext < InstanceContext
|
14
|
+
class IntentContext < InstanceContext
|
15
|
+
##
|
16
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
17
|
+
class IntentStatisticsList < ListResource
|
18
|
+
##
|
19
|
+
# Initialize the IntentStatisticsList
|
20
|
+
# @param [Version] version Version that contains the resource
|
21
|
+
# @param [String] assistant_sid The unique ID of the parent Assistant.
|
22
|
+
# @param [String] intent_sid The unique ID of the Intent associated with this
|
23
|
+
# Field.
|
24
|
+
# @return [IntentStatisticsList] IntentStatisticsList
|
25
|
+
def initialize(version, assistant_sid: nil, intent_sid: nil)
|
26
|
+
super(version)
|
27
|
+
|
28
|
+
# Path Solution
|
29
|
+
@solution = {assistant_sid: assistant_sid, intent_sid: intent_sid}
|
30
|
+
end
|
31
|
+
|
32
|
+
##
|
33
|
+
# Provide a user friendly representation
|
34
|
+
def to_s
|
35
|
+
'#<Twilio.Preview.Understand.IntentStatisticsList>'
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
##
|
40
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
41
|
+
class IntentStatisticsPage < Page
|
42
|
+
##
|
43
|
+
# Initialize the IntentStatisticsPage
|
44
|
+
# @param [Version] version Version that contains the resource
|
45
|
+
# @param [Response] response Response from the API
|
46
|
+
# @param [Hash] solution Path solution for the resource
|
47
|
+
# @return [IntentStatisticsPage] IntentStatisticsPage
|
48
|
+
def initialize(version, response, solution)
|
49
|
+
super(version, response)
|
50
|
+
|
51
|
+
# Path Solution
|
52
|
+
@solution = solution
|
53
|
+
end
|
54
|
+
|
55
|
+
##
|
56
|
+
# Build an instance of IntentStatisticsInstance
|
57
|
+
# @param [Hash] payload Payload response from the API
|
58
|
+
# @return [IntentStatisticsInstance] IntentStatisticsInstance
|
59
|
+
def get_instance(payload)
|
60
|
+
IntentStatisticsInstance.new(
|
61
|
+
@version,
|
62
|
+
payload,
|
63
|
+
assistant_sid: @solution[:assistant_sid],
|
64
|
+
intent_sid: @solution[:intent_sid],
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
##
|
69
|
+
# Provide a user friendly representation
|
70
|
+
def to_s
|
71
|
+
'<Twilio.Preview.Understand.IntentStatisticsPage>'
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
##
|
76
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
77
|
+
class IntentStatisticsContext < InstanceContext
|
78
|
+
##
|
79
|
+
# Initialize the IntentStatisticsContext
|
80
|
+
# @param [Version] version Version that contains the resource
|
81
|
+
# @param [String] assistant_sid The assistant_sid
|
82
|
+
# @param [String] intent_sid The intent_sid
|
83
|
+
# @return [IntentStatisticsContext] IntentStatisticsContext
|
84
|
+
def initialize(version, assistant_sid, intent_sid)
|
85
|
+
super(version)
|
86
|
+
|
87
|
+
# Path Solution
|
88
|
+
@solution = {assistant_sid: assistant_sid, intent_sid: intent_sid, }
|
89
|
+
@uri = "/Assistants/#{@solution[:assistant_sid]}/Intents/#{@solution[:intent_sid]}/Statistics"
|
90
|
+
end
|
91
|
+
|
92
|
+
##
|
93
|
+
# Fetch a IntentStatisticsInstance
|
94
|
+
# @return [IntentStatisticsInstance] Fetched IntentStatisticsInstance
|
95
|
+
def fetch
|
96
|
+
params = Twilio::Values.of({})
|
97
|
+
|
98
|
+
payload = @version.fetch(
|
99
|
+
'GET',
|
100
|
+
@uri,
|
101
|
+
params,
|
102
|
+
)
|
103
|
+
|
104
|
+
IntentStatisticsInstance.new(
|
105
|
+
@version,
|
106
|
+
payload,
|
107
|
+
assistant_sid: @solution[:assistant_sid],
|
108
|
+
intent_sid: @solution[:intent_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.Preview.Understand.IntentStatisticsContext #{context}>"
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
##
|
121
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
122
|
+
class IntentStatisticsInstance < InstanceResource
|
123
|
+
##
|
124
|
+
# Initialize the IntentStatisticsInstance
|
125
|
+
# @param [Version] version Version that contains the resource
|
126
|
+
# @param [Hash] payload payload that contains response from Twilio
|
127
|
+
# @param [String] assistant_sid The unique ID of the parent Assistant.
|
128
|
+
# @param [String] intent_sid The unique ID of the Intent associated with this
|
129
|
+
# Field.
|
130
|
+
# @return [IntentStatisticsInstance] IntentStatisticsInstance
|
131
|
+
def initialize(version, payload, assistant_sid: nil, intent_sid: nil)
|
132
|
+
super(version)
|
133
|
+
|
134
|
+
# Marshaled Properties
|
135
|
+
@properties = {
|
136
|
+
'account_sid' => payload['account_sid'],
|
137
|
+
'assistant_sid' => payload['assistant_sid'],
|
138
|
+
'intent_sid' => payload['intent_sid'],
|
139
|
+
'samples_count' => payload['samples_count'].to_i,
|
140
|
+
'fields_count' => payload['fields_count'].to_i,
|
141
|
+
'url' => payload['url'],
|
142
|
+
}
|
143
|
+
|
144
|
+
# Context
|
145
|
+
@instance_context = nil
|
146
|
+
@params = {'assistant_sid' => assistant_sid, 'intent_sid' => intent_sid, }
|
147
|
+
end
|
148
|
+
|
149
|
+
##
|
150
|
+
# Generate an instance context for the instance, the context is capable of
|
151
|
+
# performing various actions. All instance actions are proxied to the context
|
152
|
+
# @return [IntentStatisticsContext] IntentStatisticsContext for this IntentStatisticsInstance
|
153
|
+
def context
|
154
|
+
unless @instance_context
|
155
|
+
@instance_context = IntentStatisticsContext.new(
|
156
|
+
@version,
|
157
|
+
@params['assistant_sid'],
|
158
|
+
@params['intent_sid'],
|
159
|
+
)
|
160
|
+
end
|
161
|
+
@instance_context
|
162
|
+
end
|
163
|
+
|
164
|
+
##
|
165
|
+
# @return [String] The unique ID of the Account that created this Field.
|
166
|
+
def account_sid
|
167
|
+
@properties['account_sid']
|
168
|
+
end
|
169
|
+
|
170
|
+
##
|
171
|
+
# @return [String] The unique ID of the parent Assistant.
|
172
|
+
def assistant_sid
|
173
|
+
@properties['assistant_sid']
|
174
|
+
end
|
175
|
+
|
176
|
+
##
|
177
|
+
# @return [String] The unique ID of the Intent associated with this Field.
|
178
|
+
def intent_sid
|
179
|
+
@properties['intent_sid']
|
180
|
+
end
|
181
|
+
|
182
|
+
##
|
183
|
+
# @return [String] The total number of Samples associated with this Intent.
|
184
|
+
def samples_count
|
185
|
+
@properties['samples_count']
|
186
|
+
end
|
187
|
+
|
188
|
+
##
|
189
|
+
# @return [String] The total number of Fields associated with this Intent.
|
190
|
+
def fields_count
|
191
|
+
@properties['fields_count']
|
192
|
+
end
|
193
|
+
|
194
|
+
##
|
195
|
+
# @return [String] The url
|
196
|
+
def url
|
197
|
+
@properties['url']
|
198
|
+
end
|
199
|
+
|
200
|
+
##
|
201
|
+
# Fetch a IntentStatisticsInstance
|
202
|
+
# @return [IntentStatisticsInstance] Fetched IntentStatisticsInstance
|
203
|
+
def fetch
|
204
|
+
context.fetch
|
205
|
+
end
|
206
|
+
|
207
|
+
##
|
208
|
+
# Provide a user friendly representation
|
209
|
+
def to_s
|
210
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
211
|
+
"<Twilio.Preview.Understand.IntentStatisticsInstance #{values}>"
|
212
|
+
end
|
213
|
+
|
214
|
+
##
|
215
|
+
# Provide a detailed, user friendly representation
|
216
|
+
def inspect
|
217
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
218
|
+
"<Twilio.Preview.Understand.IntentStatisticsInstance #{values}>"
|
219
|
+
end
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
@@ -197,31 +197,49 @@ module Twilio
|
|
197
197
|
|
198
198
|
##
|
199
199
|
# Update the ReservationInstance
|
200
|
-
# @param [reservation.Status] reservation_status
|
201
|
-
# @param [String] worker_activity_sid
|
202
|
-
#
|
203
|
-
# @param [String]
|
204
|
-
# @param [String]
|
205
|
-
#
|
206
|
-
# @param [String]
|
207
|
-
#
|
208
|
-
# @param [String]
|
209
|
-
#
|
210
|
-
# @param [String]
|
211
|
-
#
|
212
|
-
# @param [String]
|
213
|
-
#
|
214
|
-
# @param [String]
|
215
|
-
#
|
216
|
-
# @param [String]
|
217
|
-
#
|
218
|
-
# @param [String]
|
219
|
-
#
|
220
|
-
# @param [String]
|
200
|
+
# @param [reservation.Status] reservation_status New reservation status
|
201
|
+
# @param [String] worker_activity_sid New worker activity sid if rejecting a
|
202
|
+
# reservation
|
203
|
+
# @param [String] instruction Assignment instruction for reservation
|
204
|
+
# @param [String] dequeue_post_work_activity_sid New worker activity sid after
|
205
|
+
# executing a Dequeue instruction
|
206
|
+
# @param [String] dequeue_from Caller ID for the call to the worker when executing
|
207
|
+
# a Dequeue instruction
|
208
|
+
# @param [String] dequeue_record Attribute to record both legs of a call when
|
209
|
+
# executing a Dequeue instruction
|
210
|
+
# @param [String] dequeue_timeout Timeout for call when executing a Dequeue
|
211
|
+
# instruction
|
212
|
+
# @param [String] dequeue_to Contact URI of the worker when executing a Dequeue
|
213
|
+
# instruction
|
214
|
+
# @param [String] dequeue_status_callback_url Callback URL for completed call
|
215
|
+
# event when executing a Dequeue instruction
|
216
|
+
# @param [String] call_from Caller ID for the outbound call when executing a Call
|
217
|
+
# instruction
|
218
|
+
# @param [String] call_record Attribute to record both legs of a call when
|
219
|
+
# executing a Call instruction
|
220
|
+
# @param [String] call_timeout Timeout for call when executing a Call instruction
|
221
|
+
# @param [String] call_to Contact URI of the worker when executing a Call
|
222
|
+
# instruction
|
223
|
+
# @param [String] call_url TwiML URI executed on answering the worker's leg as a
|
224
|
+
# result of the Call instruction
|
225
|
+
# @param [String] call_status_callback_url Callback URL for completed call event
|
226
|
+
# when executing a Call instruction
|
227
|
+
# @param [Boolean] call_accept Flag to determine if reservation should be accepted
|
228
|
+
# when executing a Call instruction
|
229
|
+
# @param [String] redirect_call_sid Call sid of the call parked in the queue when
|
230
|
+
# executing a Redirect instruction
|
231
|
+
# @param [Boolean] redirect_accept Flag to determine if reservation should be
|
232
|
+
# accepted when executing a Redirect instruction
|
233
|
+
# @param [String] redirect_url TwiML URI to redirect the call to when executing
|
234
|
+
# the Redirect instruction
|
235
|
+
# @param [String] to Contact URI of the worker when executing a Conference
|
236
|
+
# instruction
|
237
|
+
# @param [String] from Caller ID for the call to the worker when executing a
|
238
|
+
# Conference instruction
|
221
239
|
# @param [String] status_callback The status_callback
|
222
240
|
# @param [String] status_callback_method The status_callback_method
|
223
241
|
# @param [reservation.CallStatus] status_callback_event The status_callback_event
|
224
|
-
# @param [String] timeout
|
242
|
+
# @param [String] timeout Timeout for call when executing a Conference instruction
|
225
243
|
# @param [Boolean] record The record
|
226
244
|
# @param [Boolean] muted The muted
|
227
245
|
# @param [String] beep The beep
|
@@ -249,10 +267,16 @@ module Twilio
|
|
249
267
|
# @param [String] region The region
|
250
268
|
# @param [String] sip_auth_username The sip_auth_username
|
251
269
|
# @param [String] sip_auth_password The sip_auth_password
|
252
|
-
# @param [String] dequeue_status_callback_event
|
253
|
-
#
|
270
|
+
# @param [String] dequeue_status_callback_event Call progress events sent via
|
271
|
+
# webhooks as a result of a Dequeue instruction
|
272
|
+
# @param [String] post_work_activity_sid New worker activity sid after executing a
|
273
|
+
# Conference instruction
|
274
|
+
# @param [reservation.SupervisorMode] supervisor_mode Supervisor mode when
|
275
|
+
# executing the Supervise instruction
|
276
|
+
# @param [String] supervisor Supervisor sid/uri when executing the Supervise
|
277
|
+
# instruction
|
254
278
|
# @return [ReservationInstance] Updated ReservationInstance
|
255
|
-
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset)
|
279
|
+
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset, supervisor_mode: :unset, supervisor: :unset)
|
256
280
|
data = Twilio::Values.of({
|
257
281
|
'ReservationStatus' => reservation_status,
|
258
282
|
'WorkerActivitySid' => worker_activity_sid,
|
@@ -303,6 +327,8 @@ module Twilio
|
|
303
327
|
'SipAuthPassword' => sip_auth_password,
|
304
328
|
'DequeueStatusCallbackEvent' => Twilio.serialize_list(dequeue_status_callback_event) { |e| e },
|
305
329
|
'PostWorkActivitySid' => post_work_activity_sid,
|
330
|
+
'SupervisorMode' => supervisor_mode,
|
331
|
+
'Supervisor' => supervisor,
|
306
332
|
})
|
307
333
|
|
308
334
|
payload = @version.update(
|
@@ -456,31 +482,49 @@ module Twilio
|
|
456
482
|
|
457
483
|
##
|
458
484
|
# Update the ReservationInstance
|
459
|
-
# @param [reservation.Status] reservation_status
|
460
|
-
# @param [String] worker_activity_sid
|
461
|
-
#
|
462
|
-
# @param [String]
|
463
|
-
# @param [String]
|
464
|
-
#
|
465
|
-
# @param [String]
|
466
|
-
#
|
467
|
-
# @param [String]
|
468
|
-
#
|
469
|
-
# @param [String]
|
470
|
-
#
|
471
|
-
# @param [String]
|
472
|
-
#
|
473
|
-
# @param [String]
|
474
|
-
#
|
475
|
-
# @param [String]
|
476
|
-
#
|
477
|
-
# @param [String]
|
478
|
-
#
|
479
|
-
# @param [String]
|
485
|
+
# @param [reservation.Status] reservation_status New reservation status
|
486
|
+
# @param [String] worker_activity_sid New worker activity sid if rejecting a
|
487
|
+
# reservation
|
488
|
+
# @param [String] instruction Assignment instruction for reservation
|
489
|
+
# @param [String] dequeue_post_work_activity_sid New worker activity sid after
|
490
|
+
# executing a Dequeue instruction
|
491
|
+
# @param [String] dequeue_from Caller ID for the call to the worker when executing
|
492
|
+
# a Dequeue instruction
|
493
|
+
# @param [String] dequeue_record Attribute to record both legs of a call when
|
494
|
+
# executing a Dequeue instruction
|
495
|
+
# @param [String] dequeue_timeout Timeout for call when executing a Dequeue
|
496
|
+
# instruction
|
497
|
+
# @param [String] dequeue_to Contact URI of the worker when executing a Dequeue
|
498
|
+
# instruction
|
499
|
+
# @param [String] dequeue_status_callback_url Callback URL for completed call
|
500
|
+
# event when executing a Dequeue instruction
|
501
|
+
# @param [String] call_from Caller ID for the outbound call when executing a Call
|
502
|
+
# instruction
|
503
|
+
# @param [String] call_record Attribute to record both legs of a call when
|
504
|
+
# executing a Call instruction
|
505
|
+
# @param [String] call_timeout Timeout for call when executing a Call instruction
|
506
|
+
# @param [String] call_to Contact URI of the worker when executing a Call
|
507
|
+
# instruction
|
508
|
+
# @param [String] call_url TwiML URI executed on answering the worker's leg as a
|
509
|
+
# result of the Call instruction
|
510
|
+
# @param [String] call_status_callback_url Callback URL for completed call event
|
511
|
+
# when executing a Call instruction
|
512
|
+
# @param [Boolean] call_accept Flag to determine if reservation should be accepted
|
513
|
+
# when executing a Call instruction
|
514
|
+
# @param [String] redirect_call_sid Call sid of the call parked in the queue when
|
515
|
+
# executing a Redirect instruction
|
516
|
+
# @param [Boolean] redirect_accept Flag to determine if reservation should be
|
517
|
+
# accepted when executing a Redirect instruction
|
518
|
+
# @param [String] redirect_url TwiML URI to redirect the call to when executing
|
519
|
+
# the Redirect instruction
|
520
|
+
# @param [String] to Contact URI of the worker when executing a Conference
|
521
|
+
# instruction
|
522
|
+
# @param [String] from Caller ID for the call to the worker when executing a
|
523
|
+
# Conference instruction
|
480
524
|
# @param [String] status_callback The status_callback
|
481
525
|
# @param [String] status_callback_method The status_callback_method
|
482
526
|
# @param [reservation.CallStatus] status_callback_event The status_callback_event
|
483
|
-
# @param [String] timeout
|
527
|
+
# @param [String] timeout Timeout for call when executing a Conference instruction
|
484
528
|
# @param [Boolean] record The record
|
485
529
|
# @param [Boolean] muted The muted
|
486
530
|
# @param [String] beep The beep
|
@@ -508,10 +552,16 @@ module Twilio
|
|
508
552
|
# @param [String] region The region
|
509
553
|
# @param [String] sip_auth_username The sip_auth_username
|
510
554
|
# @param [String] sip_auth_password The sip_auth_password
|
511
|
-
# @param [String] dequeue_status_callback_event
|
512
|
-
#
|
555
|
+
# @param [String] dequeue_status_callback_event Call progress events sent via
|
556
|
+
# webhooks as a result of a Dequeue instruction
|
557
|
+
# @param [String] post_work_activity_sid New worker activity sid after executing a
|
558
|
+
# Conference instruction
|
559
|
+
# @param [reservation.SupervisorMode] supervisor_mode Supervisor mode when
|
560
|
+
# executing the Supervise instruction
|
561
|
+
# @param [String] supervisor Supervisor sid/uri when executing the Supervise
|
562
|
+
# instruction
|
513
563
|
# @return [ReservationInstance] Updated ReservationInstance
|
514
|
-
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset)
|
564
|
+
def update(reservation_status: :unset, worker_activity_sid: :unset, instruction: :unset, dequeue_post_work_activity_sid: :unset, dequeue_from: :unset, dequeue_record: :unset, dequeue_timeout: :unset, dequeue_to: :unset, dequeue_status_callback_url: :unset, call_from: :unset, call_record: :unset, call_timeout: :unset, call_to: :unset, call_url: :unset, call_status_callback_url: :unset, call_accept: :unset, redirect_call_sid: :unset, redirect_accept: :unset, redirect_url: :unset, to: :unset, from: :unset, status_callback: :unset, status_callback_method: :unset, status_callback_event: :unset, timeout: :unset, record: :unset, muted: :unset, beep: :unset, start_conference_on_enter: :unset, end_conference_on_exit: :unset, wait_url: :unset, wait_method: :unset, early_media: :unset, max_participants: :unset, conference_status_callback: :unset, conference_status_callback_method: :unset, conference_status_callback_event: :unset, conference_record: :unset, conference_trim: :unset, recording_channels: :unset, recording_status_callback: :unset, recording_status_callback_method: :unset, conference_recording_status_callback: :unset, conference_recording_status_callback_method: :unset, region: :unset, sip_auth_username: :unset, sip_auth_password: :unset, dequeue_status_callback_event: :unset, post_work_activity_sid: :unset, supervisor_mode: :unset, supervisor: :unset)
|
515
565
|
context.update(
|
516
566
|
reservation_status: reservation_status,
|
517
567
|
worker_activity_sid: worker_activity_sid,
|
@@ -562,6 +612,8 @@ module Twilio
|
|
562
612
|
sip_auth_password: sip_auth_password,
|
563
613
|
dequeue_status_callback_event: dequeue_status_callback_event,
|
564
614
|
post_work_activity_sid: post_work_activity_sid,
|
615
|
+
supervisor_mode: supervisor_mode,
|
616
|
+
supervisor: supervisor,
|
565
617
|
)
|
566
618
|
end
|
567
619
|
|