twilio-ruby 5.22.0 → 5.22.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +15 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
- data/lib/twilio-ruby/rest/messaging/v1/session.rb +1 -7
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +34 -32
- data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +37 -35
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +45 -38
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +38 -34
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +67 -52
- data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +32 -23
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +123 -79
- data/lib/twilio-ruby/rest/proxy/v1.rb +2 -1
- data/lib/twilio-ruby/rest/proxy.rb +2 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +366 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +384 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +348 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +358 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +398 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +417 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +366 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +384 -0
- data/lib/twilio-ruby/rest/{verify → serverless}/v1/service.rb +139 -175
- data/lib/twilio-ruby/rest/{verify → serverless}/v1.rb +6 -6
- data/lib/twilio-ruby/rest/serverless.rb +46 -0
- data/lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb +419 -0
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +26 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +46 -38
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +24 -20
- data/lib/twilio-ruby/rest/verify/v2/service.rb +59 -57
- data/lib/twilio-ruby/rest/verify/v2.rb +2 -1
- data/lib/twilio-ruby/rest/verify.rb +2 -8
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/flex_api/v1/configuration_spec.rb +15 -0
- data/spec/integration/messaging/v1/session/participant_spec.rb +10 -10
- data/spec/integration/serverless/v1/service/asset/asset_version_spec.rb +144 -0
- data/spec/integration/serverless/v1/service/asset_spec.rb +177 -0
- data/spec/integration/serverless/v1/service/build_spec.rb +184 -0
- data/spec/integration/serverless/v1/service/environment/deployment_spec.rb +137 -0
- data/spec/integration/serverless/v1/service/environment/variable_spec.rb +181 -0
- data/spec/integration/serverless/v1/service/environment_spec.rb +143 -0
- data/spec/integration/serverless/v1/service/function/function_version_spec.rb +144 -0
- data/spec/integration/serverless/v1/service/function_spec.rb +177 -0
- data/spec/integration/serverless/v1/service_spec.rb +180 -0
- data/spec/integration/trunking/v1/trunk/terminating_sip_domain_spec.rb +231 -0
- data/spec/integration/trunking/v1/trunk_spec.rb +12 -6
- metadata +34 -12
- data/lib/twilio-ruby/rest/verify/v1/service/verification.rb +0 -340
- data/lib/twilio-ruby/rest/verify/v1/service/verification_check.rb +0 -209
- data/spec/integration/verify/v1/service/verification_check_spec.rb +0 -54
- data/spec/integration/verify/v1/service/verification_spec.rb +0 -169
- data/spec/integration/verify/v1/service_spec.rb +0 -231
@@ -17,7 +17,8 @@ module Twilio
|
|
17
17
|
##
|
18
18
|
# Initialize the ShortCodeList
|
19
19
|
# @param [Version] version Version that contains the resource
|
20
|
-
# @param [String] service_sid The
|
20
|
+
# @param [String] service_sid The SID of the ShortCode resource's parent
|
21
|
+
# [Service](https://www.twilio.com/docs/proxy/api/service) resource.
|
21
22
|
# @return [ShortCodeList] ShortCodeList
|
22
23
|
def initialize(version, service_sid: nil)
|
23
24
|
super(version)
|
@@ -30,8 +31,9 @@ module Twilio
|
|
30
31
|
##
|
31
32
|
# Retrieve a single page of ShortCodeInstance records from the API.
|
32
33
|
# Request is executed immediately.
|
33
|
-
# @param [String] sid
|
34
|
-
#
|
34
|
+
# @param [String] sid The SID of a Twilio
|
35
|
+
# [ShortCode](https://www.twilio.com/docs/sms/api/short-code) resource that
|
36
|
+
# represents the short code you would like to assign to your Proxy Service.
|
35
37
|
# @return [ShortCodeInstance] Newly created ShortCodeInstance
|
36
38
|
def create(sid: nil)
|
37
39
|
data = Twilio::Values.of({'Sid' => sid, })
|
@@ -171,9 +173,11 @@ module Twilio
|
|
171
173
|
##
|
172
174
|
# Initialize the ShortCodeContext
|
173
175
|
# @param [Version] version Version that contains the resource
|
174
|
-
# @param [String] service_sid The
|
175
|
-
#
|
176
|
-
#
|
176
|
+
# @param [String] service_sid The SID of the parent
|
177
|
+
# [Service](https://www.twilio.com/docs/proxy/api/service) to fetch the resource
|
178
|
+
# from.
|
179
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
180
|
+
# ShortCode resource to fetch.
|
177
181
|
# @return [ShortCodeContext] ShortCodeContext
|
178
182
|
def initialize(version, service_sid, sid)
|
179
183
|
super(version)
|
@@ -207,8 +211,10 @@ module Twilio
|
|
207
211
|
|
208
212
|
##
|
209
213
|
# Update the ShortCodeInstance
|
210
|
-
# @param [Boolean] is_reserved Whether
|
211
|
-
#
|
214
|
+
# @param [Boolean] is_reserved Whether the short code should be reserved and not
|
215
|
+
# be assigned to a participant using proxy pool logic. See [Reserved Phone
|
216
|
+
# Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more
|
217
|
+
# information.
|
212
218
|
# @return [ShortCodeInstance] Updated ShortCodeInstance
|
213
219
|
def update(is_reserved: :unset)
|
214
220
|
data = Twilio::Values.of({'IsReserved' => is_reserved, })
|
@@ -244,9 +250,10 @@ module Twilio
|
|
244
250
|
# Initialize the ShortCodeInstance
|
245
251
|
# @param [Version] version Version that contains the resource
|
246
252
|
# @param [Hash] payload payload that contains response from Twilio
|
247
|
-
# @param [String] service_sid The
|
248
|
-
#
|
249
|
-
#
|
253
|
+
# @param [String] service_sid The SID of the ShortCode resource's parent
|
254
|
+
# [Service](https://www.twilio.com/docs/proxy/api/service) resource.
|
255
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
256
|
+
# ShortCode resource to fetch.
|
250
257
|
# @return [ShortCodeInstance] ShortCodeInstance
|
251
258
|
def initialize(version, payload, service_sid: nil, sid: nil)
|
252
259
|
super(version)
|
@@ -282,61 +289,61 @@ module Twilio
|
|
282
289
|
end
|
283
290
|
|
284
291
|
##
|
285
|
-
# @return [String]
|
292
|
+
# @return [String] The unique string that identifies the resource
|
286
293
|
def sid
|
287
294
|
@properties['sid']
|
288
295
|
end
|
289
296
|
|
290
297
|
##
|
291
|
-
# @return [String] Account
|
298
|
+
# @return [String] The SID of the Account that created the resource
|
292
299
|
def account_sid
|
293
300
|
@properties['account_sid']
|
294
301
|
end
|
295
302
|
|
296
303
|
##
|
297
|
-
# @return [String] Service
|
304
|
+
# @return [String] The SID of the resource's parent Service
|
298
305
|
def service_sid
|
299
306
|
@properties['service_sid']
|
300
307
|
end
|
301
308
|
|
302
309
|
##
|
303
|
-
# @return [Time] The date
|
310
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
304
311
|
def date_created
|
305
312
|
@properties['date_created']
|
306
313
|
end
|
307
314
|
|
308
315
|
##
|
309
|
-
# @return [Time] The date
|
316
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
310
317
|
def date_updated
|
311
318
|
@properties['date_updated']
|
312
319
|
end
|
313
320
|
|
314
321
|
##
|
315
|
-
# @return [String]
|
322
|
+
# @return [String] The short code's number
|
316
323
|
def short_code
|
317
324
|
@properties['short_code']
|
318
325
|
end
|
319
326
|
|
320
327
|
##
|
321
|
-
# @return [String] ISO Country Code
|
328
|
+
# @return [String] The ISO Country Code
|
322
329
|
def iso_country
|
323
330
|
@properties['iso_country']
|
324
331
|
end
|
325
332
|
|
326
333
|
##
|
327
|
-
# @return [String]
|
334
|
+
# @return [String] The capabilities of the short code
|
328
335
|
def capabilities
|
329
336
|
@properties['capabilities']
|
330
337
|
end
|
331
338
|
|
332
339
|
##
|
333
|
-
# @return [String] The URL of
|
340
|
+
# @return [String] The absolute URL of the ShortCode resource
|
334
341
|
def url
|
335
342
|
@properties['url']
|
336
343
|
end
|
337
344
|
|
338
345
|
##
|
339
|
-
# @return [Boolean]
|
346
|
+
# @return [Boolean] Whether the short code should be reserved for manual assignment to participants only
|
340
347
|
def is_reserved
|
341
348
|
@properties['is_reserved']
|
342
349
|
end
|
@@ -357,8 +364,10 @@ module Twilio
|
|
357
364
|
|
358
365
|
##
|
359
366
|
# Update the ShortCodeInstance
|
360
|
-
# @param [Boolean] is_reserved Whether
|
361
|
-
#
|
367
|
+
# @param [Boolean] is_reserved Whether the short code should be reserved and not
|
368
|
+
# be assigned to a participant using proxy pool logic. See [Reserved Phone
|
369
|
+
# Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more
|
370
|
+
# information.
|
362
371
|
# @return [ShortCodeInstance] Updated ShortCodeInstance
|
363
372
|
def update(is_reserved: :unset)
|
364
373
|
context.update(is_reserved: is_reserved, )
|
@@ -110,30 +110,44 @@ module Twilio
|
|
110
110
|
##
|
111
111
|
# Retrieve a single page of ServiceInstance records from the API.
|
112
112
|
# Request is executed immediately.
|
113
|
-
# @param [String] unique_name
|
114
|
-
#
|
115
|
-
#
|
116
|
-
#
|
117
|
-
#
|
118
|
-
#
|
119
|
-
#
|
120
|
-
#
|
121
|
-
#
|
122
|
-
#
|
123
|
-
#
|
124
|
-
#
|
125
|
-
#
|
126
|
-
#
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
130
|
-
#
|
113
|
+
# @param [String] unique_name An application-defined string that uniquely
|
114
|
+
# identifies the resource. This value must be 191 characters or fewer in length
|
115
|
+
# and be unique. **This value should not have PII.**
|
116
|
+
# @param [String] default_ttl The default `ttl` value to set for Sessions created
|
117
|
+
# in the Service. The TTL (time to live) is measured in seconds after the
|
118
|
+
# Session's last create or last Interaction. The default value of `0` indicates an
|
119
|
+
# unlimited Session length. You can override a Session's default TTL value by
|
120
|
+
# setting its `ttl` value.
|
121
|
+
# @param [String] callback_url The URL we should call when the interaction status
|
122
|
+
# changes.
|
123
|
+
# @param [service.GeoMatchLevel] geo_match_level Where a proxy number must be
|
124
|
+
# located relative to the participant identifier. Can be: `country`, `area-code`,
|
125
|
+
# or `extended-area-code`. The default value is `country` and more specific areas
|
126
|
+
# than `country` are only available in North America.
|
127
|
+
# @param [service.NumberSelectionBehavior] number_selection_behavior The
|
128
|
+
# preference for Proxy Number selection in the Service instance. Can be:
|
129
|
+
# `prefer-sticky` or `avoid-sticky` and the default is `prefer-sticky`.
|
130
|
+
# `prefer-sticky` means that we will try and select the same Proxy Number for a
|
131
|
+
# given participant if they have previous
|
132
|
+
# [Sessions](https://www.twilio.com/docs/proxy/api/session), but we will not fail
|
133
|
+
# if that Proxy Number cannot be used. `avoid-sticky` means that we will try to
|
134
|
+
# use different Proxy Numbers as long as that is possible within a given pool
|
135
|
+
# rather than try and use a previously assigned number.
|
136
|
+
# @param [String] intercept_callback_url The URL we call on each interaction. If
|
137
|
+
# we receive a 403 status, we block the interaction; otherwise the interaction
|
138
|
+
# continues.
|
139
|
+
# @param [String] out_of_session_callback_url The URL we should call when an
|
140
|
+
# inbound call or SMS action occurs on a closed or non-existent Session. If your
|
141
|
+
# server (or a Twilio [function](https://www.twilio.com/functions)) responds with
|
142
|
+
# valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This
|
143
|
+
# means it is possible, for example, to play a message for a call, send an
|
144
|
+
# automated text message response, or redirect a call to another Phone Number. See
|
131
145
|
# [Out-of-Session Callback Response
|
132
146
|
# Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide)
|
133
147
|
# for more information.
|
134
|
-
# @param [String] chat_instance_sid The Chat Service Instance
|
135
|
-
# Service.
|
136
|
-
# instance. This is a one-to-one relationship.
|
148
|
+
# @param [String] chat_instance_sid The SID of the Chat Service Instance managed
|
149
|
+
# by Proxy Service. The Chat Service enables Proxy to forward SMS and channel
|
150
|
+
# messages to this chat instance. This is a one-to-one relationship.
|
137
151
|
# @return [ServiceInstance] Newly created ServiceInstance
|
138
152
|
def create(unique_name: nil, default_ttl: :unset, callback_url: :unset, geo_match_level: :unset, number_selection_behavior: :unset, intercept_callback_url: :unset, out_of_session_callback_url: :unset, chat_instance_sid: :unset)
|
139
153
|
data = Twilio::Values.of({
|
@@ -200,7 +214,8 @@ module Twilio
|
|
200
214
|
##
|
201
215
|
# Initialize the ServiceContext
|
202
216
|
# @param [Version] version Version that contains the resource
|
203
|
-
# @param [String] sid
|
217
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
218
|
+
# Service resource to fetch.
|
204
219
|
# @return [ServiceContext] ServiceContext
|
205
220
|
def initialize(version, sid)
|
206
221
|
super(version)
|
@@ -239,30 +254,44 @@ module Twilio
|
|
239
254
|
|
240
255
|
##
|
241
256
|
# Update the ServiceInstance
|
242
|
-
# @param [String] unique_name
|
243
|
-
#
|
244
|
-
#
|
245
|
-
#
|
246
|
-
#
|
247
|
-
#
|
248
|
-
#
|
249
|
-
#
|
250
|
-
#
|
251
|
-
#
|
252
|
-
#
|
253
|
-
#
|
254
|
-
#
|
255
|
-
#
|
256
|
-
#
|
257
|
-
#
|
258
|
-
#
|
259
|
-
#
|
257
|
+
# @param [String] unique_name An application-defined string that uniquely
|
258
|
+
# identifies the resource. This value must be 191 characters or fewer in length
|
259
|
+
# and be unique. **This value should not have PII.**
|
260
|
+
# @param [String] default_ttl The default `ttl` value to set for Sessions created
|
261
|
+
# in the Service. The TTL (time to live) is measured in seconds after the
|
262
|
+
# Session's last create or last Interaction. The default value of `0` indicates an
|
263
|
+
# unlimited Session length. You can override a Session's default TTL value by
|
264
|
+
# setting its `ttl` value.
|
265
|
+
# @param [String] callback_url The URL we should call when the interaction status
|
266
|
+
# changes.
|
267
|
+
# @param [service.GeoMatchLevel] geo_match_level Where a proxy number must be
|
268
|
+
# located relative to the participant identifier. Can be: `country`, `area-code`,
|
269
|
+
# or `extended-area-code`. The default value is `country` and more specific areas
|
270
|
+
# than `country` are only available in North America.
|
271
|
+
# @param [service.NumberSelectionBehavior] number_selection_behavior The
|
272
|
+
# preference for Proxy Number selection in the Service instance. Can be:
|
273
|
+
# `prefer-sticky` or `avoid-sticky` and the default is `prefer-sticky`.
|
274
|
+
# `prefer-sticky` means that we will try and select the same Proxy Number for a
|
275
|
+
# given participant if they have previous
|
276
|
+
# [Sessions](https://www.twilio.com/docs/proxy/api/session), but we will not fail
|
277
|
+
# if that Proxy Number cannot be used. `avoid-sticky` means that we will try to
|
278
|
+
# use different Proxy Numbers as long as that is possible within a given pool
|
279
|
+
# rather than try and use a previously assigned number.
|
280
|
+
# @param [String] intercept_callback_url The URL we call on each interaction. If
|
281
|
+
# we receive a 403 status, we block the interaction; otherwise the interaction
|
282
|
+
# continues.
|
283
|
+
# @param [String] out_of_session_callback_url The URL we should call when an
|
284
|
+
# inbound call or SMS action occurs on a closed or non-existent Session. If your
|
285
|
+
# server (or a Twilio [function](https://www.twilio.com/functions)) responds with
|
286
|
+
# valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This
|
287
|
+
# means it is possible, for example, to play a message for a call, send an
|
288
|
+
# automated text message response, or redirect a call to another Phone Number. See
|
260
289
|
# [Out-of-Session Callback Response
|
261
290
|
# Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide)
|
262
291
|
# for more information.
|
263
|
-
# @param [String] chat_instance_sid The Chat Service Instance
|
264
|
-
# Service.
|
265
|
-
# instance. This is a one-to-one relationship.
|
292
|
+
# @param [String] chat_instance_sid The SID of the Chat Service Instance managed
|
293
|
+
# by Proxy Service. The Chat Service enables Proxy to forward SMS and channel
|
294
|
+
# messages to this chat instance. This is a one-to-one relationship.
|
266
295
|
# @return [ServiceInstance] Updated ServiceInstance
|
267
296
|
def update(unique_name: :unset, default_ttl: :unset, callback_url: :unset, geo_match_level: :unset, number_selection_behavior: :unset, intercept_callback_url: :unset, out_of_session_callback_url: :unset, chat_instance_sid: :unset)
|
268
297
|
data = Twilio::Values.of({
|
@@ -361,7 +390,8 @@ module Twilio
|
|
361
390
|
# Initialize the ServiceInstance
|
362
391
|
# @param [Version] version Version that contains the resource
|
363
392
|
# @param [Hash] payload payload that contains response from Twilio
|
364
|
-
# @param [String] sid
|
393
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
394
|
+
# Service resource to fetch.
|
365
395
|
# @return [ServiceInstance] ServiceInstance
|
366
396
|
def initialize(version, payload, sid: nil)
|
367
397
|
super(version)
|
@@ -401,85 +431,85 @@ module Twilio
|
|
401
431
|
end
|
402
432
|
|
403
433
|
##
|
404
|
-
# @return [String]
|
434
|
+
# @return [String] The unique string that identifies the resource
|
405
435
|
def sid
|
406
436
|
@properties['sid']
|
407
437
|
end
|
408
438
|
|
409
439
|
##
|
410
|
-
# @return [String]
|
440
|
+
# @return [String] An application-defined string that uniquely identifies the resource
|
411
441
|
def unique_name
|
412
442
|
@properties['unique_name']
|
413
443
|
end
|
414
444
|
|
415
445
|
##
|
416
|
-
# @return [String] Account
|
446
|
+
# @return [String] The SID of the Account that created the resource
|
417
447
|
def account_sid
|
418
448
|
@properties['account_sid']
|
419
449
|
end
|
420
450
|
|
421
451
|
##
|
422
|
-
# @return [String] The Chat Service Instance
|
452
|
+
# @return [String] The SID of the Chat Service Instance
|
423
453
|
def chat_instance_sid
|
424
454
|
@properties['chat_instance_sid']
|
425
455
|
end
|
426
456
|
|
427
457
|
##
|
428
|
-
# @return [String] URL
|
458
|
+
# @return [String] The URL we call when the interaction status changes
|
429
459
|
def callback_url
|
430
460
|
@properties['callback_url']
|
431
461
|
end
|
432
462
|
|
433
463
|
##
|
434
|
-
# @return [String] Default TTL for a Session, in seconds
|
464
|
+
# @return [String] Default TTL for a Session, in seconds
|
435
465
|
def default_ttl
|
436
466
|
@properties['default_ttl']
|
437
467
|
end
|
438
468
|
|
439
469
|
##
|
440
|
-
# @return [service.NumberSelectionBehavior]
|
470
|
+
# @return [service.NumberSelectionBehavior] The preference for Proxy Number selection for the Service instance
|
441
471
|
def number_selection_behavior
|
442
472
|
@properties['number_selection_behavior']
|
443
473
|
end
|
444
474
|
|
445
475
|
##
|
446
|
-
# @return [service.GeoMatchLevel]
|
476
|
+
# @return [service.GeoMatchLevel] Where a proxy number must be located relative to the participant identifier
|
447
477
|
def geo_match_level
|
448
478
|
@properties['geo_match_level']
|
449
479
|
end
|
450
480
|
|
451
481
|
##
|
452
|
-
# @return [String]
|
482
|
+
# @return [String] The URL we call on each interaction
|
453
483
|
def intercept_callback_url
|
454
484
|
@properties['intercept_callback_url']
|
455
485
|
end
|
456
486
|
|
457
487
|
##
|
458
|
-
# @return [String]
|
488
|
+
# @return [String] The URL we call when an inbound call or SMS action occurs on a closed or non-existent Session
|
459
489
|
def out_of_session_callback_url
|
460
490
|
@properties['out_of_session_callback_url']
|
461
491
|
end
|
462
492
|
|
463
493
|
##
|
464
|
-
# @return [Time] The date
|
494
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
465
495
|
def date_created
|
466
496
|
@properties['date_created']
|
467
497
|
end
|
468
498
|
|
469
499
|
##
|
470
|
-
# @return [Time] The date
|
500
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
471
501
|
def date_updated
|
472
502
|
@properties['date_updated']
|
473
503
|
end
|
474
504
|
|
475
505
|
##
|
476
|
-
# @return [String] The URL of
|
506
|
+
# @return [String] The absolute URL of the Service resource
|
477
507
|
def url
|
478
508
|
@properties['url']
|
479
509
|
end
|
480
510
|
|
481
511
|
##
|
482
|
-
# @return [String]
|
512
|
+
# @return [String] The URLs of resources related to the Service
|
483
513
|
def links
|
484
514
|
@properties['links']
|
485
515
|
end
|
@@ -500,30 +530,44 @@ module Twilio
|
|
500
530
|
|
501
531
|
##
|
502
532
|
# Update the ServiceInstance
|
503
|
-
# @param [String] unique_name
|
504
|
-
#
|
505
|
-
#
|
506
|
-
#
|
507
|
-
#
|
508
|
-
#
|
509
|
-
#
|
510
|
-
#
|
511
|
-
#
|
512
|
-
#
|
513
|
-
#
|
514
|
-
#
|
515
|
-
#
|
516
|
-
#
|
517
|
-
#
|
518
|
-
#
|
519
|
-
#
|
520
|
-
#
|
533
|
+
# @param [String] unique_name An application-defined string that uniquely
|
534
|
+
# identifies the resource. This value must be 191 characters or fewer in length
|
535
|
+
# and be unique. **This value should not have PII.**
|
536
|
+
# @param [String] default_ttl The default `ttl` value to set for Sessions created
|
537
|
+
# in the Service. The TTL (time to live) is measured in seconds after the
|
538
|
+
# Session's last create or last Interaction. The default value of `0` indicates an
|
539
|
+
# unlimited Session length. You can override a Session's default TTL value by
|
540
|
+
# setting its `ttl` value.
|
541
|
+
# @param [String] callback_url The URL we should call when the interaction status
|
542
|
+
# changes.
|
543
|
+
# @param [service.GeoMatchLevel] geo_match_level Where a proxy number must be
|
544
|
+
# located relative to the participant identifier. Can be: `country`, `area-code`,
|
545
|
+
# or `extended-area-code`. The default value is `country` and more specific areas
|
546
|
+
# than `country` are only available in North America.
|
547
|
+
# @param [service.NumberSelectionBehavior] number_selection_behavior The
|
548
|
+
# preference for Proxy Number selection in the Service instance. Can be:
|
549
|
+
# `prefer-sticky` or `avoid-sticky` and the default is `prefer-sticky`.
|
550
|
+
# `prefer-sticky` means that we will try and select the same Proxy Number for a
|
551
|
+
# given participant if they have previous
|
552
|
+
# [Sessions](https://www.twilio.com/docs/proxy/api/session), but we will not fail
|
553
|
+
# if that Proxy Number cannot be used. `avoid-sticky` means that we will try to
|
554
|
+
# use different Proxy Numbers as long as that is possible within a given pool
|
555
|
+
# rather than try and use a previously assigned number.
|
556
|
+
# @param [String] intercept_callback_url The URL we call on each interaction. If
|
557
|
+
# we receive a 403 status, we block the interaction; otherwise the interaction
|
558
|
+
# continues.
|
559
|
+
# @param [String] out_of_session_callback_url The URL we should call when an
|
560
|
+
# inbound call or SMS action occurs on a closed or non-existent Session. If your
|
561
|
+
# server (or a Twilio [function](https://www.twilio.com/functions)) responds with
|
562
|
+
# valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This
|
563
|
+
# means it is possible, for example, to play a message for a call, send an
|
564
|
+
# automated text message response, or redirect a call to another Phone Number. See
|
521
565
|
# [Out-of-Session Callback Response
|
522
566
|
# Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide)
|
523
567
|
# for more information.
|
524
|
-
# @param [String] chat_instance_sid The Chat Service Instance
|
525
|
-
# Service.
|
526
|
-
# instance. This is a one-to-one relationship.
|
568
|
+
# @param [String] chat_instance_sid The SID of the Chat Service Instance managed
|
569
|
+
# by Proxy Service. The Chat Service enables Proxy to forward SMS and channel
|
570
|
+
# messages to this chat instance. This is a one-to-one relationship.
|
527
571
|
# @return [ServiceInstance] Updated ServiceInstance
|
528
572
|
def update(unique_name: :unset, default_ttl: :unset, callback_url: :unset, geo_match_level: :unset, number_selection_behavior: :unset, intercept_callback_url: :unset, out_of_session_callback_url: :unset, chat_instance_sid: :unset)
|
529
573
|
context.update(
|