twilio-ruby 5.25.3 → 5.25.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +26 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +1 -8
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +4 -4
- data/lib/twilio-ruby/rest/flex_api.rb +16 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +30 -0
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +352 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +358 -0
- data/lib/twilio-ruby/rest/insights/v1/summary.rb +0 -14
- data/lib/twilio-ruby/rest/ip_messaging.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service.rb +22 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +5 -5
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +2 -2
- data/lib/twilio-ruby/twiml/voice_response.rb +19 -7
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/conversations/v1/conversation_spec.rb +1 -1
- data/spec/integration/flex_api/v1/channel_spec.rb +191 -0
- data/spec/integration/flex_api/v1/configuration_spec.rb +24 -0
- data/spec/integration/flex_api/v1/web_channel_spec.rb +220 -0
- data/spec/integration/insights/v1/summary_spec.rb +0 -2
- data/spec/integration/ip_messaging/v1/credential_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +4 -4
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +1 -1
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +5 -5
- data/spec/integration/ip_messaging/v1/service_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/credential_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/binding_spec.rb +3 -3
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +4 -4
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +3 -3
- data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +3 -3
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +5 -5
- data/spec/integration/ip_messaging/v2/service_spec.rb +5 -5
- data/spec/integration/monitor/v1/alert_spec.rb +8 -8
- data/spec/integration/sync/v1/service_spec.rb +4 -0
- data/spec/integration/wireless/v1/rate_plan_spec.rb +8 -0
- metadata +8 -2
@@ -175,6 +175,7 @@ module Twilio
|
|
175
175
|
'plugin_service_enabled' => payload['plugin_service_enabled'],
|
176
176
|
'plugin_service_attributes' => payload['plugin_service_attributes'],
|
177
177
|
'integrations' => payload['integrations'],
|
178
|
+
'outbound_call_flows' => payload['outbound_call_flows'],
|
178
179
|
'url' => payload['url'],
|
179
180
|
}
|
180
181
|
|
@@ -380,6 +381,12 @@ module Twilio
|
|
380
381
|
@properties['integrations']
|
381
382
|
end
|
382
383
|
|
384
|
+
##
|
385
|
+
# @return [Hash] Outbound call flows Attributes
|
386
|
+
def outbound_call_flows
|
387
|
+
@properties['outbound_call_flows']
|
388
|
+
end
|
389
|
+
|
383
390
|
##
|
384
391
|
# @return [String] The URL for this resource
|
385
392
|
def url
|
@@ -0,0 +1,358 @@
|
|
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 FlexApi < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class WebChannelList < ListResource
|
14
|
+
##
|
15
|
+
# Initialize the WebChannelList
|
16
|
+
# @param [Version] version Version that contains the resource
|
17
|
+
# @return [WebChannelList] WebChannelList
|
18
|
+
def initialize(version)
|
19
|
+
super(version)
|
20
|
+
|
21
|
+
# Path Solution
|
22
|
+
@solution = {}
|
23
|
+
@uri = "/WebChannels"
|
24
|
+
end
|
25
|
+
|
26
|
+
##
|
27
|
+
# Lists WebChannelInstance records from the API as a list.
|
28
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
29
|
+
# memory before returning.
|
30
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
31
|
+
# guarantees to never return more than limit. Default is no limit
|
32
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
33
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
34
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
35
|
+
# efficient page size, i.e. min(limit, 1000)
|
36
|
+
# @return [Array] Array of up to limit results
|
37
|
+
def list(limit: nil, page_size: nil)
|
38
|
+
self.stream(limit: limit, page_size: page_size).entries
|
39
|
+
end
|
40
|
+
|
41
|
+
##
|
42
|
+
# Streams WebChannelInstance records from the API as an Enumerable.
|
43
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
44
|
+
# is reached.
|
45
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
46
|
+
# guarantees to never return more than limit. Default is no limit.
|
47
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
48
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
49
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
50
|
+
# efficient page size, i.e. min(limit, 1000)
|
51
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
52
|
+
def stream(limit: nil, page_size: nil)
|
53
|
+
limits = @version.read_limits(limit, page_size)
|
54
|
+
|
55
|
+
page = self.page(page_size: limits[:page_size], )
|
56
|
+
|
57
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
58
|
+
end
|
59
|
+
|
60
|
+
##
|
61
|
+
# When passed a block, yields WebChannelInstance records from the API.
|
62
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
63
|
+
# is reached.
|
64
|
+
def each
|
65
|
+
limits = @version.read_limits
|
66
|
+
|
67
|
+
page = self.page(page_size: limits[:page_size], )
|
68
|
+
|
69
|
+
@version.stream(page,
|
70
|
+
limit: limits[:limit],
|
71
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# Retrieve a single page of WebChannelInstance records from the API.
|
76
|
+
# Request is executed immediately.
|
77
|
+
# @param [String] page_token PageToken provided by the API
|
78
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
79
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
80
|
+
# @return [Page] Page of WebChannelInstance
|
81
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
82
|
+
params = Twilio::Values.of({
|
83
|
+
'PageToken' => page_token,
|
84
|
+
'Page' => page_number,
|
85
|
+
'PageSize' => page_size,
|
86
|
+
})
|
87
|
+
response = @version.page(
|
88
|
+
'GET',
|
89
|
+
@uri,
|
90
|
+
params
|
91
|
+
)
|
92
|
+
WebChannelPage.new(@version, response, @solution)
|
93
|
+
end
|
94
|
+
|
95
|
+
##
|
96
|
+
# Retrieve a single page of WebChannelInstance records from the API.
|
97
|
+
# Request is executed immediately.
|
98
|
+
# @param [String] target_url API-generated URL for the requested results page
|
99
|
+
# @return [Page] Page of WebChannelInstance
|
100
|
+
def get_page(target_url)
|
101
|
+
response = @version.domain.request(
|
102
|
+
'GET',
|
103
|
+
target_url
|
104
|
+
)
|
105
|
+
WebChannelPage.new(@version, response, @solution)
|
106
|
+
end
|
107
|
+
|
108
|
+
##
|
109
|
+
# Retrieve a single page of WebChannelInstance records from the API.
|
110
|
+
# Request is executed immediately.
|
111
|
+
# @param [String] flex_flow_sid The unique ID of the FlexFlow
|
112
|
+
# @param [String] identity Chat identity
|
113
|
+
# @param [String] customer_friendly_name Customer friendly name (chat participant)
|
114
|
+
# @param [String] chat_friendly_name Chat channel friendly name
|
115
|
+
# @param [String] chat_unique_name Chat channel unique name
|
116
|
+
# @param [String] pre_engagement_data Pre-engagement data
|
117
|
+
# @return [WebChannelInstance] Newly created WebChannelInstance
|
118
|
+
def create(flex_flow_sid: nil, identity: nil, customer_friendly_name: nil, chat_friendly_name: nil, chat_unique_name: :unset, pre_engagement_data: :unset)
|
119
|
+
data = Twilio::Values.of({
|
120
|
+
'FlexFlowSid' => flex_flow_sid,
|
121
|
+
'Identity' => identity,
|
122
|
+
'CustomerFriendlyName' => customer_friendly_name,
|
123
|
+
'ChatFriendlyName' => chat_friendly_name,
|
124
|
+
'ChatUniqueName' => chat_unique_name,
|
125
|
+
'PreEngagementData' => pre_engagement_data,
|
126
|
+
})
|
127
|
+
|
128
|
+
payload = @version.create(
|
129
|
+
'POST',
|
130
|
+
@uri,
|
131
|
+
data: data
|
132
|
+
)
|
133
|
+
|
134
|
+
WebChannelInstance.new(@version, payload, )
|
135
|
+
end
|
136
|
+
|
137
|
+
##
|
138
|
+
# Provide a user friendly representation
|
139
|
+
def to_s
|
140
|
+
'#<Twilio.FlexApi.V1.WebChannelList>'
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
class WebChannelPage < Page
|
145
|
+
##
|
146
|
+
# Initialize the WebChannelPage
|
147
|
+
# @param [Version] version Version that contains the resource
|
148
|
+
# @param [Response] response Response from the API
|
149
|
+
# @param [Hash] solution Path solution for the resource
|
150
|
+
# @return [WebChannelPage] WebChannelPage
|
151
|
+
def initialize(version, response, solution)
|
152
|
+
super(version, response)
|
153
|
+
|
154
|
+
# Path Solution
|
155
|
+
@solution = solution
|
156
|
+
end
|
157
|
+
|
158
|
+
##
|
159
|
+
# Build an instance of WebChannelInstance
|
160
|
+
# @param [Hash] payload Payload response from the API
|
161
|
+
# @return [WebChannelInstance] WebChannelInstance
|
162
|
+
def get_instance(payload)
|
163
|
+
WebChannelInstance.new(@version, payload, )
|
164
|
+
end
|
165
|
+
|
166
|
+
##
|
167
|
+
# Provide a user friendly representation
|
168
|
+
def to_s
|
169
|
+
'<Twilio.FlexApi.V1.WebChannelPage>'
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
class WebChannelContext < InstanceContext
|
174
|
+
##
|
175
|
+
# Initialize the WebChannelContext
|
176
|
+
# @param [Version] version Version that contains the resource
|
177
|
+
# @param [String] sid The unique SID identifier of the Flex Chat Channel
|
178
|
+
# @return [WebChannelContext] WebChannelContext
|
179
|
+
def initialize(version, sid)
|
180
|
+
super(version)
|
181
|
+
|
182
|
+
# Path Solution
|
183
|
+
@solution = {sid: sid, }
|
184
|
+
@uri = "/WebChannels/#{@solution[:sid]}"
|
185
|
+
end
|
186
|
+
|
187
|
+
##
|
188
|
+
# Fetch a WebChannelInstance
|
189
|
+
# @return [WebChannelInstance] Fetched WebChannelInstance
|
190
|
+
def fetch
|
191
|
+
params = Twilio::Values.of({})
|
192
|
+
|
193
|
+
payload = @version.fetch(
|
194
|
+
'GET',
|
195
|
+
@uri,
|
196
|
+
params,
|
197
|
+
)
|
198
|
+
|
199
|
+
WebChannelInstance.new(@version, payload, sid: @solution[:sid], )
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# Update the WebChannelInstance
|
204
|
+
# @param [web_channel.ChatStatus] chat_status Chat status, can only used to make
|
205
|
+
# chat 'inactive'
|
206
|
+
# @param [String] post_engagement_data Post-engagement data
|
207
|
+
# @return [WebChannelInstance] Updated WebChannelInstance
|
208
|
+
def update(chat_status: :unset, post_engagement_data: :unset)
|
209
|
+
data = Twilio::Values.of({
|
210
|
+
'ChatStatus' => chat_status,
|
211
|
+
'PostEngagementData' => post_engagement_data,
|
212
|
+
})
|
213
|
+
|
214
|
+
payload = @version.update(
|
215
|
+
'POST',
|
216
|
+
@uri,
|
217
|
+
data: data,
|
218
|
+
)
|
219
|
+
|
220
|
+
WebChannelInstance.new(@version, payload, sid: @solution[:sid], )
|
221
|
+
end
|
222
|
+
|
223
|
+
##
|
224
|
+
# Deletes the WebChannelInstance
|
225
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
226
|
+
def delete
|
227
|
+
@version.delete('delete', @uri)
|
228
|
+
end
|
229
|
+
|
230
|
+
##
|
231
|
+
# Provide a user friendly representation
|
232
|
+
def to_s
|
233
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
234
|
+
"#<Twilio.FlexApi.V1.WebChannelContext #{context}>"
|
235
|
+
end
|
236
|
+
|
237
|
+
##
|
238
|
+
# Provide a detailed, user friendly representation
|
239
|
+
def inspect
|
240
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
241
|
+
"#<Twilio.FlexApi.V1.WebChannelContext #{context}>"
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
class WebChannelInstance < InstanceResource
|
246
|
+
##
|
247
|
+
# Initialize the WebChannelInstance
|
248
|
+
# @param [Version] version Version that contains the resource
|
249
|
+
# @param [Hash] payload payload that contains response from Twilio
|
250
|
+
# @param [String] sid The unique SID identifier of the Flex Chat Channel
|
251
|
+
# @return [WebChannelInstance] WebChannelInstance
|
252
|
+
def initialize(version, payload, sid: nil)
|
253
|
+
super(version)
|
254
|
+
|
255
|
+
# Marshaled Properties
|
256
|
+
@properties = {
|
257
|
+
'account_sid' => payload['account_sid'],
|
258
|
+
'flex_flow_sid' => payload['flex_flow_sid'],
|
259
|
+
'sid' => payload['sid'],
|
260
|
+
'url' => payload['url'],
|
261
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
262
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
263
|
+
}
|
264
|
+
|
265
|
+
# Context
|
266
|
+
@instance_context = nil
|
267
|
+
@params = {'sid' => sid || @properties['sid'], }
|
268
|
+
end
|
269
|
+
|
270
|
+
##
|
271
|
+
# Generate an instance context for the instance, the context is capable of
|
272
|
+
# performing various actions. All instance actions are proxied to the context
|
273
|
+
# @return [WebChannelContext] WebChannelContext for this WebChannelInstance
|
274
|
+
def context
|
275
|
+
unless @instance_context
|
276
|
+
@instance_context = WebChannelContext.new(@version, @params['sid'], )
|
277
|
+
end
|
278
|
+
@instance_context
|
279
|
+
end
|
280
|
+
|
281
|
+
##
|
282
|
+
# @return [String] The ID of the account that owns this Workflow
|
283
|
+
def account_sid
|
284
|
+
@properties['account_sid']
|
285
|
+
end
|
286
|
+
|
287
|
+
##
|
288
|
+
# @return [String] The unique ID of the FlexFlow
|
289
|
+
def flex_flow_sid
|
290
|
+
@properties['flex_flow_sid']
|
291
|
+
end
|
292
|
+
|
293
|
+
##
|
294
|
+
# @return [String] Flex Chat Channel Sid
|
295
|
+
def sid
|
296
|
+
@properties['sid']
|
297
|
+
end
|
298
|
+
|
299
|
+
##
|
300
|
+
# @return [String] The url
|
301
|
+
def url
|
302
|
+
@properties['url']
|
303
|
+
end
|
304
|
+
|
305
|
+
##
|
306
|
+
# @return [Time] The time the Flex Chat Channel was created, given as GMT in ISO 8601 format.
|
307
|
+
def date_created
|
308
|
+
@properties['date_created']
|
309
|
+
end
|
310
|
+
|
311
|
+
##
|
312
|
+
# @return [Time] The time the Flex Chat Channel was last updated, given as GMT in ISO 8601 format.
|
313
|
+
def date_updated
|
314
|
+
@properties['date_updated']
|
315
|
+
end
|
316
|
+
|
317
|
+
##
|
318
|
+
# Fetch a WebChannelInstance
|
319
|
+
# @return [WebChannelInstance] Fetched WebChannelInstance
|
320
|
+
def fetch
|
321
|
+
context.fetch
|
322
|
+
end
|
323
|
+
|
324
|
+
##
|
325
|
+
# Update the WebChannelInstance
|
326
|
+
# @param [web_channel.ChatStatus] chat_status Chat status, can only used to make
|
327
|
+
# chat 'inactive'
|
328
|
+
# @param [String] post_engagement_data Post-engagement data
|
329
|
+
# @return [WebChannelInstance] Updated WebChannelInstance
|
330
|
+
def update(chat_status: :unset, post_engagement_data: :unset)
|
331
|
+
context.update(chat_status: chat_status, post_engagement_data: post_engagement_data, )
|
332
|
+
end
|
333
|
+
|
334
|
+
##
|
335
|
+
# Deletes the WebChannelInstance
|
336
|
+
# @return [Boolean] true if delete succeeds, true otherwise
|
337
|
+
def delete
|
338
|
+
context.delete
|
339
|
+
end
|
340
|
+
|
341
|
+
##
|
342
|
+
# Provide a user friendly representation
|
343
|
+
def to_s
|
344
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
345
|
+
"<Twilio.FlexApi.V1.WebChannelInstance #{values}>"
|
346
|
+
end
|
347
|
+
|
348
|
+
##
|
349
|
+
# Provide a detailed, user friendly representation
|
350
|
+
def inspect
|
351
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
352
|
+
"<Twilio.FlexApi.V1.WebChannelInstance #{values}>"
|
353
|
+
end
|
354
|
+
end
|
355
|
+
end
|
356
|
+
end
|
357
|
+
end
|
358
|
+
end
|
@@ -128,8 +128,6 @@ module Twilio
|
|
128
128
|
'call_type' => payload['call_type'],
|
129
129
|
'call_state' => payload['call_state'],
|
130
130
|
'processing_state' => payload['processing_state'],
|
131
|
-
'direction' => payload['direction'],
|
132
|
-
'disconnected_by' => payload['disconnected_by'],
|
133
131
|
'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
|
134
132
|
'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
|
135
133
|
'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
|
@@ -192,18 +190,6 @@ module Twilio
|
|
192
190
|
@properties['processing_state']
|
193
191
|
end
|
194
192
|
|
195
|
-
##
|
196
|
-
# @return [call_summary.Direction] The direction
|
197
|
-
def direction
|
198
|
-
@properties['direction']
|
199
|
-
end
|
200
|
-
|
201
|
-
##
|
202
|
-
# @return [call_summary.DisconnectedBy] The disconnected_by
|
203
|
-
def disconnected_by
|
204
|
-
@properties['disconnected_by']
|
205
|
-
end
|
206
|
-
|
207
193
|
##
|
208
194
|
# @return [Time] The start_time
|
209
195
|
def start_time
|
@@ -50,8 +50,11 @@ module Twilio
|
|
50
50
|
# webhooks will be fired (if enabled). A reconnection by any endpoint during this
|
51
51
|
# window — from the same identity — means no reachability webhook would be fired.
|
52
52
|
# Must be between 1000 and 30000. Defaults to 5000.
|
53
|
+
# @param [Boolean] webhooks_from_rest_enabled `true` or `false` - controls whether
|
54
|
+
# this instance fires webhooks when Sync objects are updated through REST.
|
55
|
+
# Defaults to false.
|
53
56
|
# @return [ServiceInstance] Newly created ServiceInstance
|
54
|
-
def create(friendly_name: :unset, webhook_url: :unset, reachability_webhooks_enabled: :unset, acl_enabled: :unset, reachability_debouncing_enabled: :unset, reachability_debouncing_window: :unset)
|
57
|
+
def create(friendly_name: :unset, webhook_url: :unset, reachability_webhooks_enabled: :unset, acl_enabled: :unset, reachability_debouncing_enabled: :unset, reachability_debouncing_window: :unset, webhooks_from_rest_enabled: :unset)
|
55
58
|
data = Twilio::Values.of({
|
56
59
|
'FriendlyName' => friendly_name,
|
57
60
|
'WebhookUrl' => webhook_url,
|
@@ -59,6 +62,7 @@ module Twilio
|
|
59
62
|
'AclEnabled' => acl_enabled,
|
60
63
|
'ReachabilityDebouncingEnabled' => reachability_debouncing_enabled,
|
61
64
|
'ReachabilityDebouncingWindow' => reachability_debouncing_window,
|
65
|
+
'WebhooksFromRestEnabled' => webhooks_from_rest_enabled,
|
62
66
|
})
|
63
67
|
|
64
68
|
payload = @version.create(
|
@@ -258,8 +262,11 @@ module Twilio
|
|
258
262
|
# webhooks will be fired (if enabled). A reconnection by any endpoint during this
|
259
263
|
# window — from the same identity — means no reachability webhook would be fired.
|
260
264
|
# Must be between 1000 and 30000. Defaults to 5000.
|
265
|
+
# @param [Boolean] webhooks_from_rest_enabled `true` or `false` - controls whether
|
266
|
+
# this instance fires webhooks when Sync objects are updated through REST.
|
267
|
+
# Defaults to false.
|
261
268
|
# @return [ServiceInstance] Updated ServiceInstance
|
262
|
-
def update(webhook_url: :unset, friendly_name: :unset, reachability_webhooks_enabled: :unset, acl_enabled: :unset, reachability_debouncing_enabled: :unset, reachability_debouncing_window: :unset)
|
269
|
+
def update(webhook_url: :unset, friendly_name: :unset, reachability_webhooks_enabled: :unset, acl_enabled: :unset, reachability_debouncing_enabled: :unset, reachability_debouncing_window: :unset, webhooks_from_rest_enabled: :unset)
|
263
270
|
data = Twilio::Values.of({
|
264
271
|
'WebhookUrl' => webhook_url,
|
265
272
|
'FriendlyName' => friendly_name,
|
@@ -267,6 +274,7 @@ module Twilio
|
|
267
274
|
'AclEnabled' => acl_enabled,
|
268
275
|
'ReachabilityDebouncingEnabled' => reachability_debouncing_enabled,
|
269
276
|
'ReachabilityDebouncingWindow' => reachability_debouncing_window,
|
277
|
+
'WebhooksFromRestEnabled' => webhooks_from_rest_enabled,
|
270
278
|
})
|
271
279
|
|
272
280
|
payload = @version.update(
|
@@ -387,6 +395,7 @@ module Twilio
|
|
387
395
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
388
396
|
'url' => payload['url'],
|
389
397
|
'webhook_url' => payload['webhook_url'],
|
398
|
+
'webhooks_from_rest_enabled' => payload['webhooks_from_rest_enabled'],
|
390
399
|
'reachability_webhooks_enabled' => payload['reachability_webhooks_enabled'],
|
391
400
|
'acl_enabled' => payload['acl_enabled'],
|
392
401
|
'reachability_debouncing_enabled' => payload['reachability_debouncing_enabled'],
|
@@ -458,6 +467,12 @@ module Twilio
|
|
458
467
|
@properties['webhook_url']
|
459
468
|
end
|
460
469
|
|
470
|
+
##
|
471
|
+
# @return [Boolean] true or false - controls whether this instance fires webhooks when Sync objects are updated through REST
|
472
|
+
def webhooks_from_rest_enabled
|
473
|
+
@properties['webhooks_from_rest_enabled']
|
474
|
+
end
|
475
|
+
|
461
476
|
##
|
462
477
|
# @return [Boolean] true or false - controls whether this instance fires webhooks when client endpoints connect to Sync
|
463
478
|
def reachability_webhooks_enabled
|
@@ -526,8 +541,11 @@ module Twilio
|
|
526
541
|
# webhooks will be fired (if enabled). A reconnection by any endpoint during this
|
527
542
|
# window — from the same identity — means no reachability webhook would be fired.
|
528
543
|
# Must be between 1000 and 30000. Defaults to 5000.
|
544
|
+
# @param [Boolean] webhooks_from_rest_enabled `true` or `false` - controls whether
|
545
|
+
# this instance fires webhooks when Sync objects are updated through REST.
|
546
|
+
# Defaults to false.
|
529
547
|
# @return [ServiceInstance] Updated ServiceInstance
|
530
|
-
def update(webhook_url: :unset, friendly_name: :unset, reachability_webhooks_enabled: :unset, acl_enabled: :unset, reachability_debouncing_enabled: :unset, reachability_debouncing_window: :unset)
|
548
|
+
def update(webhook_url: :unset, friendly_name: :unset, reachability_webhooks_enabled: :unset, acl_enabled: :unset, reachability_debouncing_enabled: :unset, reachability_debouncing_window: :unset, webhooks_from_rest_enabled: :unset)
|
531
549
|
context.update(
|
532
550
|
webhook_url: webhook_url,
|
533
551
|
friendly_name: friendly_name,
|
@@ -535,6 +553,7 @@ module Twilio
|
|
535
553
|
acl_enabled: acl_enabled,
|
536
554
|
reachability_debouncing_enabled: reachability_debouncing_enabled,
|
537
555
|
reachability_debouncing_window: reachability_debouncing_window,
|
556
|
+
webhooks_from_rest_enabled: webhooks_from_rest_enabled,
|
538
557
|
)
|
539
558
|
end
|
540
559
|
|