twilio-ruby 5.9.0 → 5.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +12 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +36 -24
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +34 -25
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +30 -21
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +10 -4
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +2 -4
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +6 -4
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +6 -7
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +12 -4
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +11 -6
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +10 -8
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +10 -8
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +11 -9
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +0 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +2 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +9 -6
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +9 -3
- data/lib/twilio-ruby/rest/api/v2010/account.rb +13 -9
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +42 -24
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +38 -18
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +60 -24
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +28 -18
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +33 -24
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +26 -16
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +4 -2
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +43 -24
- data/lib/twilio-ruby/rest/chat/v1/service.rb +74 -44
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +61 -27
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +41 -18
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +43 -25
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +76 -37
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +432 -0
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +90 -35
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +23 -16
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +4 -2
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +43 -25
- data/lib/twilio-ruby/rest/chat/v2/service.rb +93 -53
- data/lib/twilio-ruby/rest/chat.rb +4 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +42 -24
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +38 -18
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +60 -24
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +28 -18
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +33 -24
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +26 -16
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +4 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +43 -24
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +74 -44
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +61 -27
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +41 -18
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +43 -25
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +76 -37
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +432 -0
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +90 -35
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +23 -16
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +4 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +43 -25
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +93 -53
- data/lib/twilio-ruby/rest/ip_messaging.rb +4 -2
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +12 -11
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +11 -11
- data/lib/twilio-ruby/rest/monitor.rb +1 -1
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +47 -22
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +59 -26
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +104 -29
- data/lib/twilio-ruby/rest/notify/v1/service.rb +86 -48
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +2 -2
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +22 -16
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +21 -15
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent/field.rb +17 -14
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent/sample.rb +36 -25
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent.rb +21 -15
- data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +19 -13
- data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +42 -28
- data/lib/twilio-ruby/rest/preview/understand/assistant.rb +39 -21
- data/lib/twilio-ruby/rest/preview.rb +10 -9
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +5 -5
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +4 -4
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +3 -3
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +5 -5
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +12 -13
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +28 -22
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +7 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +31 -14
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +3 -3
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service.rb +24 -27
- data/lib/twilio-ruby/rest/video/v1/composition.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/recording.rb +45 -31
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +18 -6
- data/lib/twilio-ruby/rest/video/v1.rb +13 -12
- data/lib/twilio-ruby/rest/video.rb +9 -8
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +43 -33
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +48 -35
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +21 -23
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +32 -22
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +121 -70
- data/lib/twilio-ruby/rest/wireless.rb +6 -3
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/chat/v2/service/channel/webhook_spec.rb +307 -0
- data/spec/integration/chat/v2/service/channel_spec.rb +4 -0
- data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +307 -0
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +4 -0
- metadata +9 -3
@@ -16,7 +16,9 @@ module Twilio
|
|
16
16
|
##
|
17
17
|
# Initialize the MessageList
|
18
18
|
# @param [Version] version Version that contains the resource
|
19
|
-
# @param [String] service_sid The
|
19
|
+
# @param [String] service_sid The unique id of the
|
20
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/v1/services) this message
|
21
|
+
# belongs to.
|
20
22
|
# @param [String] channel_sid The channel_sid
|
21
23
|
# @return [MessageList] MessageList
|
22
24
|
def initialize(version, service_sid: nil, channel_sid: nil)
|
@@ -224,8 +226,11 @@ module Twilio
|
|
224
226
|
|
225
227
|
##
|
226
228
|
# Update the MessageInstance
|
227
|
-
# @param [String] body The body
|
228
|
-
#
|
229
|
+
# @param [String] body The new message body string. You can also send structured
|
230
|
+
# data by serializing it into a string.
|
231
|
+
# @param [String] attributes The new attributes metadata field you can use to
|
232
|
+
# store any data you wish. The string value must contain structurally valid JSON
|
233
|
+
# if specified.
|
229
234
|
# @return [MessageInstance] Updated MessageInstance
|
230
235
|
def update(body: :unset, attributes: :unset)
|
231
236
|
data = Twilio::Values.of({'Body' => body, 'Attributes' => attributes, })
|
@@ -258,7 +263,9 @@ module Twilio
|
|
258
263
|
# Initialize the MessageInstance
|
259
264
|
# @param [Version] version Version that contains the resource
|
260
265
|
# @param [Hash] payload payload that contains response from Twilio
|
261
|
-
# @param [String] service_sid The
|
266
|
+
# @param [String] service_sid The unique id of the
|
267
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/v1/services) this message
|
268
|
+
# belongs to.
|
262
269
|
# @param [String] channel_sid The channel_sid
|
263
270
|
# @param [String] sid The sid
|
264
271
|
# @return [MessageInstance] MessageInstance
|
@@ -308,31 +315,31 @@ module Twilio
|
|
308
315
|
end
|
309
316
|
|
310
317
|
##
|
311
|
-
# @return [String]
|
318
|
+
# @return [String] A 34 character string that uniquely identifies this resource.
|
312
319
|
def sid
|
313
320
|
@properties['sid']
|
314
321
|
end
|
315
322
|
|
316
323
|
##
|
317
|
-
# @return [String] The
|
324
|
+
# @return [String] The unique id of the Account responsible for this message.
|
318
325
|
def account_sid
|
319
326
|
@properties['account_sid']
|
320
327
|
end
|
321
328
|
|
322
329
|
##
|
323
|
-
# @return [String]
|
330
|
+
# @return [String] An optional string metadata field you can use to store any data you wish.
|
324
331
|
def attributes
|
325
332
|
@properties['attributes']
|
326
333
|
end
|
327
334
|
|
328
335
|
##
|
329
|
-
# @return [String] The
|
336
|
+
# @return [String] The unique id of the Service this message belongs to.
|
330
337
|
def service_sid
|
331
338
|
@properties['service_sid']
|
332
339
|
end
|
333
340
|
|
334
341
|
##
|
335
|
-
# @return [String] The to
|
342
|
+
# @return [String] The unique id of the Channel this message was sent to.
|
336
343
|
def to
|
337
344
|
@properties['to']
|
338
345
|
end
|
@@ -344,43 +351,43 @@ module Twilio
|
|
344
351
|
end
|
345
352
|
|
346
353
|
##
|
347
|
-
# @return [Time] The
|
354
|
+
# @return [Time] The date that this resource was created.
|
348
355
|
def date_created
|
349
356
|
@properties['date_created']
|
350
357
|
end
|
351
358
|
|
352
359
|
##
|
353
|
-
# @return [Time] The
|
360
|
+
# @return [Time] The date that this resource was last updated.
|
354
361
|
def date_updated
|
355
362
|
@properties['date_updated']
|
356
363
|
end
|
357
364
|
|
358
365
|
##
|
359
|
-
# @return [Boolean]
|
366
|
+
# @return [Boolean] true if the message has been updated since it was created.
|
360
367
|
def was_edited
|
361
368
|
@properties['was_edited']
|
362
369
|
end
|
363
370
|
|
364
371
|
##
|
365
|
-
# @return [String] The
|
372
|
+
# @return [String] The identity of the message's author.
|
366
373
|
def from
|
367
374
|
@properties['from']
|
368
375
|
end
|
369
376
|
|
370
377
|
##
|
371
|
-
# @return [String] The
|
378
|
+
# @return [String] The contents of the message.
|
372
379
|
def body
|
373
380
|
@properties['body']
|
374
381
|
end
|
375
382
|
|
376
383
|
##
|
377
|
-
# @return [String] The index
|
384
|
+
# @return [String] The index of the message within the Channel
|
378
385
|
def index
|
379
386
|
@properties['index']
|
380
387
|
end
|
381
388
|
|
382
389
|
##
|
383
|
-
# @return [String]
|
390
|
+
# @return [String] An absolute URL for this message.
|
384
391
|
def url
|
385
392
|
@properties['url']
|
386
393
|
end
|
@@ -401,8 +408,11 @@ module Twilio
|
|
401
408
|
|
402
409
|
##
|
403
410
|
# Update the MessageInstance
|
404
|
-
# @param [String] body The body
|
405
|
-
#
|
411
|
+
# @param [String] body The new message body string. You can also send structured
|
412
|
+
# data by serializing it into a string.
|
413
|
+
# @param [String] attributes The new attributes metadata field you can use to
|
414
|
+
# store any data you wish. The string value must contain structurally valid JSON
|
415
|
+
# if specified.
|
406
416
|
# @return [MessageInstance] Updated MessageInstance
|
407
417
|
def update(body: :unset, attributes: :unset)
|
408
418
|
context.update(body: body, attributes: attributes, )
|
@@ -15,7 +15,8 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the ChannelList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] service_sid The
|
18
|
+
# @param [String] service_sid The unique id of the [Service][service] this channel
|
19
|
+
# belongs to.
|
19
20
|
# @return [ChannelList] ChannelList
|
20
21
|
def initialize(version, service_sid: nil)
|
21
22
|
super(version)
|
@@ -28,10 +29,13 @@ module Twilio
|
|
28
29
|
##
|
29
30
|
# Retrieve a single page of ChannelInstance records from the API.
|
30
31
|
# Request is executed immediately.
|
31
|
-
# @param [String] friendly_name
|
32
|
-
# @param [String] unique_name
|
33
|
-
#
|
34
|
-
# @param [
|
32
|
+
# @param [String] friendly_name A human-readable name for the Channel. Optional.
|
33
|
+
# @param [String] unique_name A unique, addressable name for the Channel.
|
34
|
+
# Optional.
|
35
|
+
# @param [String] attributes An optional metadata field you can use to store any
|
36
|
+
# data you wish. No processing or validation is done on this field.
|
37
|
+
# @param [channel.ChannelType] type The visibility of the channel - `public` or
|
38
|
+
# `private`. Defaults to `public`.
|
35
39
|
# @return [ChannelInstance] Newly created ChannelInstance
|
36
40
|
def create(friendly_name: :unset, unique_name: :unset, attributes: :unset, type: :unset)
|
37
41
|
data = Twilio::Values.of({
|
@@ -216,9 +220,11 @@ module Twilio
|
|
216
220
|
|
217
221
|
##
|
218
222
|
# Update the ChannelInstance
|
219
|
-
# @param [String] friendly_name
|
220
|
-
# @param [String] unique_name
|
221
|
-
#
|
223
|
+
# @param [String] friendly_name A human-readable name for the Channel. Optional.
|
224
|
+
# @param [String] unique_name A unique, addressable name for the Channel.
|
225
|
+
# Optional.
|
226
|
+
# @param [String] attributes An optional metadata field you can use to store any
|
227
|
+
# data you wish. No processing or validation is done on this field.
|
222
228
|
# @return [ChannelInstance] Updated ChannelInstance
|
223
229
|
def update(friendly_name: :unset, unique_name: :unset, attributes: :unset)
|
224
230
|
data = Twilio::Values.of({
|
@@ -315,7 +321,8 @@ module Twilio
|
|
315
321
|
# Initialize the ChannelInstance
|
316
322
|
# @param [Version] version Version that contains the resource
|
317
323
|
# @param [Hash] payload payload that contains response from Twilio
|
318
|
-
# @param [String] service_sid The
|
324
|
+
# @param [String] service_sid The unique id of the [Service][service] this channel
|
325
|
+
# belongs to.
|
319
326
|
# @param [String] sid The sid
|
320
327
|
# @return [ChannelInstance] ChannelInstance
|
321
328
|
def initialize(version, payload, service_sid: nil, sid: nil)
|
@@ -356,61 +363,61 @@ module Twilio
|
|
356
363
|
end
|
357
364
|
|
358
365
|
##
|
359
|
-
# @return [String]
|
366
|
+
# @return [String] A 34 character string that uniquely identifies this resource.
|
360
367
|
def sid
|
361
368
|
@properties['sid']
|
362
369
|
end
|
363
370
|
|
364
371
|
##
|
365
|
-
# @return [String] The
|
372
|
+
# @return [String] The unique id of the [Account][/console] responsible for this channel.
|
366
373
|
def account_sid
|
367
374
|
@properties['account_sid']
|
368
375
|
end
|
369
376
|
|
370
377
|
##
|
371
|
-
# @return [String] The
|
378
|
+
# @return [String] The unique id of the [Service][service] this channel belongs to.
|
372
379
|
def service_sid
|
373
380
|
@properties['service_sid']
|
374
381
|
end
|
375
382
|
|
376
383
|
##
|
377
|
-
# @return [String] The
|
384
|
+
# @return [String] The human-readable name of this channel.
|
378
385
|
def friendly_name
|
379
386
|
@properties['friendly_name']
|
380
387
|
end
|
381
388
|
|
382
389
|
##
|
383
|
-
# @return [String] The
|
390
|
+
# @return [String] The unique, addressable name of this channel.
|
384
391
|
def unique_name
|
385
392
|
@properties['unique_name']
|
386
393
|
end
|
387
394
|
|
388
395
|
##
|
389
|
-
# @return [String]
|
396
|
+
# @return [String] An optional string metadata field you can use to store any data you wish.
|
390
397
|
def attributes
|
391
398
|
@properties['attributes']
|
392
399
|
end
|
393
400
|
|
394
401
|
##
|
395
|
-
# @return [channel.ChannelType] The
|
402
|
+
# @return [channel.ChannelType] The visibility of this channel - either public or private
|
396
403
|
def type
|
397
404
|
@properties['type']
|
398
405
|
end
|
399
406
|
|
400
407
|
##
|
401
|
-
# @return [Time] The
|
408
|
+
# @return [Time] The date that this resource was created.
|
402
409
|
def date_created
|
403
410
|
@properties['date_created']
|
404
411
|
end
|
405
412
|
|
406
413
|
##
|
407
|
-
# @return [Time] The
|
414
|
+
# @return [Time] The date that this resource was last updated.
|
408
415
|
def date_updated
|
409
416
|
@properties['date_updated']
|
410
417
|
end
|
411
418
|
|
412
419
|
##
|
413
|
-
# @return [String]
|
420
|
+
# @return [String] Identity of the channel's creator.
|
414
421
|
def created_by
|
415
422
|
@properties['created_by']
|
416
423
|
end
|
@@ -428,13 +435,13 @@ module Twilio
|
|
428
435
|
end
|
429
436
|
|
430
437
|
##
|
431
|
-
# @return [String]
|
438
|
+
# @return [String] An absolute URL for this channel.
|
432
439
|
def url
|
433
440
|
@properties['url']
|
434
441
|
end
|
435
442
|
|
436
443
|
##
|
437
|
-
# @return [String]
|
444
|
+
# @return [String] Absolute URLs to access the [Members][members] and [Messages][messages] for this channel.
|
438
445
|
def links
|
439
446
|
@properties['links']
|
440
447
|
end
|
@@ -455,9 +462,11 @@ module Twilio
|
|
455
462
|
|
456
463
|
##
|
457
464
|
# Update the ChannelInstance
|
458
|
-
# @param [String] friendly_name
|
459
|
-
# @param [String] unique_name
|
460
|
-
#
|
465
|
+
# @param [String] friendly_name A human-readable name for the Channel. Optional.
|
466
|
+
# @param [String] unique_name A unique, addressable name for the Channel.
|
467
|
+
# Optional.
|
468
|
+
# @param [String] attributes An optional metadata field you can use to store any
|
469
|
+
# data you wish. No processing or validation is done on this field.
|
461
470
|
# @return [ChannelInstance] Updated ChannelInstance
|
462
471
|
def update(friendly_name: :unset, unique_name: :unset, attributes: :unset)
|
463
472
|
context.update(friendly_name: friendly_name, unique_name: unique_name, attributes: attributes, )
|
@@ -15,7 +15,9 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the RoleList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] service_sid The
|
18
|
+
# @param [String] service_sid The unique id of the
|
19
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/v1/services) this role
|
20
|
+
# belongs to.
|
19
21
|
# @return [RoleList] RoleList
|
20
22
|
def initialize(version, service_sid: nil)
|
21
23
|
super(version)
|
@@ -28,9 +30,13 @@ module Twilio
|
|
28
30
|
##
|
29
31
|
# Retrieve a single page of RoleInstance records from the API.
|
30
32
|
# Request is executed immediately.
|
31
|
-
# @param [String] friendly_name The
|
32
|
-
# @param [role.RoleType] type
|
33
|
-
#
|
33
|
+
# @param [String] friendly_name The human-readable name of this role.
|
34
|
+
# @param [role.RoleType] type What kind of role this is. Either `channel` for
|
35
|
+
# [Channel](https://www.twilio.com/docs/api/chat/rest/v1/channel) roles or
|
36
|
+
# `deployment` for
|
37
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/v1/services) roles.
|
38
|
+
# @param [String] permission (multiple) A permission this role should have.
|
39
|
+
# Consult the table above for the list of possible permissions.
|
34
40
|
# @return [RoleInstance] Newly created RoleInstance
|
35
41
|
def create(friendly_name: nil, type: nil, permission: nil)
|
36
42
|
data = Twilio::Values.of({
|
@@ -205,7 +211,8 @@ module Twilio
|
|
205
211
|
|
206
212
|
##
|
207
213
|
# Update the RoleInstance
|
208
|
-
# @param [String] permission
|
214
|
+
# @param [String] permission (multiple) A permission this role should have.
|
215
|
+
# Consult the table above for the list of possible permissions.
|
209
216
|
# @return [RoleInstance] Updated RoleInstance
|
210
217
|
def update(permission: nil)
|
211
218
|
data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e }, })
|
@@ -232,7 +239,9 @@ module Twilio
|
|
232
239
|
# Initialize the RoleInstance
|
233
240
|
# @param [Version] version Version that contains the resource
|
234
241
|
# @param [Hash] payload payload that contains response from Twilio
|
235
|
-
# @param [String] service_sid The
|
242
|
+
# @param [String] service_sid The unique id of the
|
243
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/v1/services) this role
|
244
|
+
# belongs to.
|
236
245
|
# @param [String] sid The sid
|
237
246
|
# @return [RoleInstance] RoleInstance
|
238
247
|
def initialize(version, payload, service_sid: nil, sid: nil)
|
@@ -268,55 +277,55 @@ module Twilio
|
|
268
277
|
end
|
269
278
|
|
270
279
|
##
|
271
|
-
# @return [String]
|
280
|
+
# @return [String] A 34 character string that uniquely identifies this resource.
|
272
281
|
def sid
|
273
282
|
@properties['sid']
|
274
283
|
end
|
275
284
|
|
276
285
|
##
|
277
|
-
# @return [String] The
|
286
|
+
# @return [String] The unique id of the Account responsible for this role.
|
278
287
|
def account_sid
|
279
288
|
@properties['account_sid']
|
280
289
|
end
|
281
290
|
|
282
291
|
##
|
283
|
-
# @return [String] The
|
292
|
+
# @return [String] The unique id of the Service this role belongs to.
|
284
293
|
def service_sid
|
285
294
|
@properties['service_sid']
|
286
295
|
end
|
287
296
|
|
288
297
|
##
|
289
|
-
# @return [String] The
|
298
|
+
# @return [String] The human-readable name of this role.
|
290
299
|
def friendly_name
|
291
300
|
@properties['friendly_name']
|
292
301
|
end
|
293
302
|
|
294
303
|
##
|
295
|
-
# @return [role.RoleType]
|
304
|
+
# @return [role.RoleType] What kind of role this is.
|
296
305
|
def type
|
297
306
|
@properties['type']
|
298
307
|
end
|
299
308
|
|
300
309
|
##
|
301
|
-
# @return [String]
|
310
|
+
# @return [String] A JSON array of the permissions this role has.
|
302
311
|
def permissions
|
303
312
|
@properties['permissions']
|
304
313
|
end
|
305
314
|
|
306
315
|
##
|
307
|
-
# @return [Time] The
|
316
|
+
# @return [Time] The date that this resource was created in ISO 8601 format.
|
308
317
|
def date_created
|
309
318
|
@properties['date_created']
|
310
319
|
end
|
311
320
|
|
312
321
|
##
|
313
|
-
# @return [Time] The
|
322
|
+
# @return [Time] The date that this resource was last updated in ISO 8601 format.
|
314
323
|
def date_updated
|
315
324
|
@properties['date_updated']
|
316
325
|
end
|
317
326
|
|
318
327
|
##
|
319
|
-
# @return [String]
|
328
|
+
# @return [String] An absolute URL for this role.
|
320
329
|
def url
|
321
330
|
@properties['url']
|
322
331
|
end
|
@@ -337,7 +346,8 @@ module Twilio
|
|
337
346
|
|
338
347
|
##
|
339
348
|
# Update the RoleInstance
|
340
|
-
# @param [String] permission
|
349
|
+
# @param [String] permission (multiple) A permission this role should have.
|
350
|
+
# Consult the table above for the list of possible permissions.
|
341
351
|
# @return [RoleInstance] Updated RoleInstance
|
342
352
|
def update(permission: nil)
|
343
353
|
context.update(permission: permission, )
|
@@ -17,7 +17,8 @@ module Twilio
|
|
17
17
|
# Initialize the UserChannelList
|
18
18
|
# @param [Version] version Version that contains the resource
|
19
19
|
# @param [String] service_sid The service_sid
|
20
|
-
# @param [String] user_sid
|
20
|
+
# @param [String] user_sid A 34 character string that uniquely identifies this
|
21
|
+
# resource.
|
21
22
|
# @return [UserChannelList] UserChannelList
|
22
23
|
def initialize(version, service_sid: nil, user_sid: nil)
|
23
24
|
super(version)
|
@@ -156,7 +157,8 @@ module Twilio
|
|
156
157
|
# @param [Version] version Version that contains the resource
|
157
158
|
# @param [Hash] payload payload that contains response from Twilio
|
158
159
|
# @param [String] service_sid The service_sid
|
159
|
-
# @param [String] user_sid
|
160
|
+
# @param [String] user_sid A 34 character string that uniquely identifies this
|
161
|
+
# resource.
|
160
162
|
# @return [UserChannelInstance] UserChannelInstance
|
161
163
|
def initialize(version, payload, service_sid: nil, user_sid: nil)
|
162
164
|
super(version)
|
@@ -15,7 +15,9 @@ module Twilio
|
|
15
15
|
##
|
16
16
|
# Initialize the UserList
|
17
17
|
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] service_sid The
|
18
|
+
# @param [String] service_sid The unique id of the
|
19
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/v1/services) this user
|
20
|
+
# belongs to.
|
19
21
|
# @return [UserList] UserList
|
20
22
|
def initialize(version, service_sid: nil)
|
21
23
|
super(version)
|
@@ -28,10 +30,17 @@ module Twilio
|
|
28
30
|
##
|
29
31
|
# Retrieve a single page of UserInstance records from the API.
|
30
32
|
# Request is executed immediately.
|
31
|
-
# @param [String] identity
|
32
|
-
#
|
33
|
-
#
|
34
|
-
# @param [String]
|
33
|
+
# @param [String] identity A unique string that identifies the user within this
|
34
|
+
# service - often a username or email address. See the [identity][identity] docs
|
35
|
+
# for more details.
|
36
|
+
# @param [String] role_sid The unique id of the
|
37
|
+
# [Role](https://www.twilio.com/docs/api/chat/rest/v1/roles) assigned to this
|
38
|
+
# user.
|
39
|
+
# @param [String] attributes An optional string used to contain any metadata or
|
40
|
+
# other information for the User. The string must contain structurally valid JSON
|
41
|
+
# if specified.
|
42
|
+
# @param [String] friendly_name An optional human readable string representing the
|
43
|
+
# user. Often used for display purposes.
|
35
44
|
# @return [UserInstance] Newly created UserInstance
|
36
45
|
def create(identity: nil, role_sid: :unset, attributes: :unset, friendly_name: :unset)
|
37
46
|
data = Twilio::Values.of({
|
@@ -210,9 +219,13 @@ module Twilio
|
|
210
219
|
|
211
220
|
##
|
212
221
|
# Update the UserInstance
|
213
|
-
# @param [String] role_sid The
|
214
|
-
#
|
215
|
-
# @param [String]
|
222
|
+
# @param [String] role_sid The unique id of the [Role][role] assigned to this
|
223
|
+
# user.
|
224
|
+
# @param [String] attributes An optional string used to contain any metadata or
|
225
|
+
# other information for the User. The string must contain structurally valid JSON
|
226
|
+
# if specified.
|
227
|
+
# @param [String] friendly_name An optional human readable string representing the
|
228
|
+
# user. Often used for display purposes.
|
216
229
|
# @return [UserInstance] Updated UserInstance
|
217
230
|
def update(role_sid: :unset, attributes: :unset, friendly_name: :unset)
|
218
231
|
data = Twilio::Values.of({
|
@@ -259,7 +272,9 @@ module Twilio
|
|
259
272
|
# Initialize the UserInstance
|
260
273
|
# @param [Version] version Version that contains the resource
|
261
274
|
# @param [Hash] payload payload that contains response from Twilio
|
262
|
-
# @param [String] service_sid The
|
275
|
+
# @param [String] service_sid The unique id of the
|
276
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/v1/services) this user
|
277
|
+
# belongs to.
|
263
278
|
# @param [String] sid The sid
|
264
279
|
# @return [UserInstance] UserInstance
|
265
280
|
def initialize(version, payload, service_sid: nil, sid: nil)
|
@@ -300,67 +315,67 @@ module Twilio
|
|
300
315
|
end
|
301
316
|
|
302
317
|
##
|
303
|
-
# @return [String]
|
318
|
+
# @return [String] A 34 character string that uniquely identifies this resource.
|
304
319
|
def sid
|
305
320
|
@properties['sid']
|
306
321
|
end
|
307
322
|
|
308
323
|
##
|
309
|
-
# @return [String] The
|
324
|
+
# @return [String] The unique id of the Account responsible for this user.
|
310
325
|
def account_sid
|
311
326
|
@properties['account_sid']
|
312
327
|
end
|
313
328
|
|
314
329
|
##
|
315
|
-
# @return [String] The
|
330
|
+
# @return [String] The unique id of the Service this user belongs to.
|
316
331
|
def service_sid
|
317
332
|
@properties['service_sid']
|
318
333
|
end
|
319
334
|
|
320
335
|
##
|
321
|
-
# @return [String]
|
336
|
+
# @return [String] An optional string metadata field you can use to store any data you wish.
|
322
337
|
def attributes
|
323
338
|
@properties['attributes']
|
324
339
|
end
|
325
340
|
|
326
341
|
##
|
327
|
-
# @return [String] The
|
342
|
+
# @return [String] The human-readable name of this user.
|
328
343
|
def friendly_name
|
329
344
|
@properties['friendly_name']
|
330
345
|
end
|
331
346
|
|
332
347
|
##
|
333
|
-
# @return [String] The
|
348
|
+
# @return [String] The unique id of the [Role][role] assigned to this user.
|
334
349
|
def role_sid
|
335
350
|
@properties['role_sid']
|
336
351
|
end
|
337
352
|
|
338
353
|
##
|
339
|
-
# @return [String]
|
354
|
+
# @return [String] A unique string that identifies the user within this service - often a username or email address.
|
340
355
|
def identity
|
341
356
|
@properties['identity']
|
342
357
|
end
|
343
358
|
|
344
359
|
##
|
345
|
-
# @return [Boolean]
|
360
|
+
# @return [Boolean] Indicates whether the User is actively connected to the Service instance and online.
|
346
361
|
def is_online
|
347
362
|
@properties['is_online']
|
348
363
|
end
|
349
364
|
|
350
365
|
##
|
351
|
-
# @return [Boolean]
|
366
|
+
# @return [Boolean] Indicates whether the User has a potentially valid Push Notification registration for the Service instance.
|
352
367
|
def is_notifiable
|
353
368
|
@properties['is_notifiable']
|
354
369
|
end
|
355
370
|
|
356
371
|
##
|
357
|
-
# @return [Time] The
|
372
|
+
# @return [Time] The date that this resource was created in ISO 8601 format.
|
358
373
|
def date_created
|
359
374
|
@properties['date_created']
|
360
375
|
end
|
361
376
|
|
362
377
|
##
|
363
|
-
# @return [Time] The
|
378
|
+
# @return [Time] The date that this resource was last updated in ISO 8601 format.
|
364
379
|
def date_updated
|
365
380
|
@properties['date_updated']
|
366
381
|
end
|
@@ -378,7 +393,7 @@ module Twilio
|
|
378
393
|
end
|
379
394
|
|
380
395
|
##
|
381
|
-
# @return [String]
|
396
|
+
# @return [String] An absolute URL for this user.
|
382
397
|
def url
|
383
398
|
@properties['url']
|
384
399
|
end
|
@@ -399,9 +414,13 @@ module Twilio
|
|
399
414
|
|
400
415
|
##
|
401
416
|
# Update the UserInstance
|
402
|
-
# @param [String] role_sid The
|
403
|
-
#
|
404
|
-
# @param [String]
|
417
|
+
# @param [String] role_sid The unique id of the [Role][role] assigned to this
|
418
|
+
# user.
|
419
|
+
# @param [String] attributes An optional string used to contain any metadata or
|
420
|
+
# other information for the User. The string must contain structurally valid JSON
|
421
|
+
# if specified.
|
422
|
+
# @param [String] friendly_name An optional human readable string representing the
|
423
|
+
# user. Often used for display purposes.
|
405
424
|
# @return [UserInstance] Updated UserInstance
|
406
425
|
def update(role_sid: :unset, attributes: :unset, friendly_name: :unset)
|
407
426
|
context.update(role_sid: role_sid, attributes: attributes, friendly_name: friendly_name, )
|