twilio-ruby 5.22.3 → 5.23.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 +27 -0
- data/README.md +2 -4
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v1.rb +4 -2
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +68 -47
- data/lib/twilio-ruby/rest/chat/v1/service.rb +311 -320
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +59 -41
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +52 -40
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +71 -64
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +58 -40
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +39 -29
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +51 -48
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +16 -12
- data/lib/twilio-ruby/rest/insights/v1/summary.rb +13 -4
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +4 -2
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +68 -47
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +311 -320
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +59 -41
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +52 -40
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +71 -64
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +58 -40
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +39 -29
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +51 -48
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +16 -12
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
- data/lib/twilio-ruby/rest/preview.rb +25 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +49 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +217 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/device.rb +146 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +169 -0
- data/lib/twilio-ruby/rest/serverless/v1.rb +2 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +4 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +30 -9
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +39 -6
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +191 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +133 -99
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +3 -3
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/conference_spec.rb +86 -2
- data/spec/integration/api/v2010/account/connect_app_spec.rb +28 -6
- data/spec/integration/api/v2010/account/queue/member_spec.rb +4 -4
- data/spec/integration/insights/v1/summary_spec.rb +1 -0
- data/spec/integration/preview/trusted_comms/current_call_spec.rb +46 -0
- data/spec/integration/preview/trusted_comms/device_spec.rb +45 -0
- data/spec/integration/preview/trusted_comms/phone_call_spec.rb +48 -0
- data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +6 -0
- data/spec/integration/video/v1/room/room_participant/room_participant_subscribe_rule_spec.rb +92 -0
- data/spec/integration/video/v1/room/room_participant/room_participant_subscribed_track_spec.rb +31 -68
- data/spec/integration/video/v1/room/room_participant_spec.rb +6 -3
- data/spec/integration/wireless/v1/sim/data_session_spec.rb +2 -2
- metadata +15 -2
@@ -15,8 +15,9 @@ 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
|
19
|
-
#
|
18
|
+
# @param [String] service_sid The SID of the
|
19
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) the resource is
|
20
|
+
# associated with.
|
20
21
|
# @return [ChannelList] ChannelList
|
21
22
|
def initialize(version, service_sid: nil)
|
22
23
|
super(version)
|
@@ -29,13 +30,16 @@ module Twilio
|
|
29
30
|
##
|
30
31
|
# Retrieve a single page of ChannelInstance records from the API.
|
31
32
|
# Request is executed immediately.
|
32
|
-
# @param [String] friendly_name A
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
33
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
34
|
+
# the new resource. It can be up to 64 characters long.
|
35
|
+
# @param [String] unique_name An application-defined string that uniquely
|
36
|
+
# identifies the resource. It can be used to address the resource in place of the
|
37
|
+
# resource's `sid` in the URL. This value must be 64 characters or less in length
|
38
|
+
# and be unique within the Service.
|
39
|
+
# @param [String] attributes A valid JSON string that contains
|
40
|
+
# application-specific data.
|
41
|
+
# @param [channel.ChannelType] type The visibility of the channel. Can be:
|
42
|
+
# `public` or `private` and defaults to `public`.
|
39
43
|
# @return [ChannelInstance] Newly created ChannelInstance
|
40
44
|
def create(friendly_name: :unset, unique_name: :unset, attributes: :unset, type: :unset)
|
41
45
|
data = Twilio::Values.of({
|
@@ -58,7 +62,8 @@ module Twilio
|
|
58
62
|
# Lists ChannelInstance records from the API as a list.
|
59
63
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
60
64
|
# memory before returning.
|
61
|
-
# @param [channel.ChannelType] type The
|
65
|
+
# @param [channel.ChannelType] type The visibility of the Channels to read. Can
|
66
|
+
# be: `public` or `private` and defaults to `public`.
|
62
67
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
63
68
|
# guarantees to never return more than limit. Default is no limit
|
64
69
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -74,7 +79,8 @@ module Twilio
|
|
74
79
|
# Streams ChannelInstance records from the API as an Enumerable.
|
75
80
|
# This operation lazily loads records as efficiently as possible until the limit
|
76
81
|
# is reached.
|
77
|
-
# @param [channel.ChannelType] type The
|
82
|
+
# @param [channel.ChannelType] type The visibility of the Channels to read. Can
|
83
|
+
# be: `public` or `private` and defaults to `public`.
|
78
84
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
79
85
|
# guarantees to never return more than limit. Default is no limit.
|
80
86
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -107,7 +113,8 @@ module Twilio
|
|
107
113
|
##
|
108
114
|
# Retrieve a single page of ChannelInstance records from the API.
|
109
115
|
# Request is executed immediately.
|
110
|
-
# @param [channel.ChannelType] type The
|
116
|
+
# @param [channel.ChannelType] type The visibility of the Channels to read. Can
|
117
|
+
# be: `public` or `private` and defaults to `public`.
|
111
118
|
# @param [String] page_token PageToken provided by the API
|
112
119
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
113
120
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -180,8 +187,11 @@ module Twilio
|
|
180
187
|
##
|
181
188
|
# Initialize the ChannelContext
|
182
189
|
# @param [Version] version Version that contains the resource
|
183
|
-
# @param [String] service_sid The
|
184
|
-
#
|
190
|
+
# @param [String] service_sid The SID of the
|
191
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the
|
192
|
+
# resource from.
|
193
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
194
|
+
# Channel resource to fetch.
|
185
195
|
# @return [ChannelContext] ChannelContext
|
186
196
|
def initialize(version, service_sid, sid)
|
187
197
|
super(version)
|
@@ -220,11 +230,14 @@ module Twilio
|
|
220
230
|
|
221
231
|
##
|
222
232
|
# Update the ChannelInstance
|
223
|
-
# @param [String] friendly_name A
|
224
|
-
#
|
225
|
-
#
|
226
|
-
#
|
227
|
-
#
|
233
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
234
|
+
# the resource. It can be up to 64 characters long.
|
235
|
+
# @param [String] unique_name An application-defined string that uniquely
|
236
|
+
# identifies the resource. It can be used to address the resource in place of the
|
237
|
+
# resource's `sid` in the URL. This value must be 64 characters or less in length
|
238
|
+
# and be unique within the Service.
|
239
|
+
# @param [String] attributes A valid JSON string that contains
|
240
|
+
# application-specific data.
|
228
241
|
# @return [ChannelInstance] Updated ChannelInstance
|
229
242
|
def update(friendly_name: :unset, unique_name: :unset, attributes: :unset)
|
230
243
|
data = Twilio::Values.of({
|
@@ -328,9 +341,11 @@ module Twilio
|
|
328
341
|
# Initialize the ChannelInstance
|
329
342
|
# @param [Version] version Version that contains the resource
|
330
343
|
# @param [Hash] payload payload that contains response from Twilio
|
331
|
-
# @param [String] service_sid The
|
332
|
-
#
|
333
|
-
#
|
344
|
+
# @param [String] service_sid The SID of the
|
345
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) the resource is
|
346
|
+
# associated with.
|
347
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
348
|
+
# Channel resource to fetch.
|
334
349
|
# @return [ChannelInstance] ChannelInstance
|
335
350
|
def initialize(version, payload, service_sid: nil, sid: nil)
|
336
351
|
super(version)
|
@@ -370,85 +385,85 @@ module Twilio
|
|
370
385
|
end
|
371
386
|
|
372
387
|
##
|
373
|
-
# @return [String]
|
388
|
+
# @return [String] The unique string that identifies the resource
|
374
389
|
def sid
|
375
390
|
@properties['sid']
|
376
391
|
end
|
377
392
|
|
378
393
|
##
|
379
|
-
# @return [String] The
|
394
|
+
# @return [String] The SID of the Account that created the resource
|
380
395
|
def account_sid
|
381
396
|
@properties['account_sid']
|
382
397
|
end
|
383
398
|
|
384
399
|
##
|
385
|
-
# @return [String] The
|
400
|
+
# @return [String] The SID of the Service that the resource is associated with
|
386
401
|
def service_sid
|
387
402
|
@properties['service_sid']
|
388
403
|
end
|
389
404
|
|
390
405
|
##
|
391
|
-
# @return [String] The
|
406
|
+
# @return [String] The string that you assigned to describe the resource
|
392
407
|
def friendly_name
|
393
408
|
@properties['friendly_name']
|
394
409
|
end
|
395
410
|
|
396
411
|
##
|
397
|
-
# @return [String]
|
412
|
+
# @return [String] An application-defined string that uniquely identifies the resource
|
398
413
|
def unique_name
|
399
414
|
@properties['unique_name']
|
400
415
|
end
|
401
416
|
|
402
417
|
##
|
403
|
-
# @return [String]
|
418
|
+
# @return [String] The JSON string that stores application-specific data
|
404
419
|
def attributes
|
405
420
|
@properties['attributes']
|
406
421
|
end
|
407
422
|
|
408
423
|
##
|
409
|
-
# @return [channel.ChannelType] The visibility of
|
424
|
+
# @return [channel.ChannelType] The visibility of the channel. Can be: `public` or `private`
|
410
425
|
def type
|
411
426
|
@properties['type']
|
412
427
|
end
|
413
428
|
|
414
429
|
##
|
415
|
-
# @return [Time] The date
|
430
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
416
431
|
def date_created
|
417
432
|
@properties['date_created']
|
418
433
|
end
|
419
434
|
|
420
435
|
##
|
421
|
-
# @return [Time] The date
|
436
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
|
422
437
|
def date_updated
|
423
438
|
@properties['date_updated']
|
424
439
|
end
|
425
440
|
|
426
441
|
##
|
427
|
-
# @return [String]
|
442
|
+
# @return [String] The identity of the User that created the channel
|
428
443
|
def created_by
|
429
444
|
@properties['created_by']
|
430
445
|
end
|
431
446
|
|
432
447
|
##
|
433
|
-
# @return [String] The
|
448
|
+
# @return [String] The number of Members in the Channel
|
434
449
|
def members_count
|
435
450
|
@properties['members_count']
|
436
451
|
end
|
437
452
|
|
438
453
|
##
|
439
|
-
# @return [String] The
|
454
|
+
# @return [String] The number of Messages in the Channel
|
440
455
|
def messages_count
|
441
456
|
@properties['messages_count']
|
442
457
|
end
|
443
458
|
|
444
459
|
##
|
445
|
-
# @return [String]
|
460
|
+
# @return [String] The absolute URL of the Channel resource
|
446
461
|
def url
|
447
462
|
@properties['url']
|
448
463
|
end
|
449
464
|
|
450
465
|
##
|
451
|
-
# @return [String] Absolute URLs to access the
|
466
|
+
# @return [String] Absolute URLs to access the Members, Messages , Invites and, if it exists, the last Message for the Channel
|
452
467
|
def links
|
453
468
|
@properties['links']
|
454
469
|
end
|
@@ -469,11 +484,14 @@ module Twilio
|
|
469
484
|
|
470
485
|
##
|
471
486
|
# Update the ChannelInstance
|
472
|
-
# @param [String] friendly_name A
|
473
|
-
#
|
474
|
-
#
|
475
|
-
#
|
476
|
-
#
|
487
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
488
|
+
# the resource. It can be up to 64 characters long.
|
489
|
+
# @param [String] unique_name An application-defined string that uniquely
|
490
|
+
# identifies the resource. It can be used to address the resource in place of the
|
491
|
+
# resource's `sid` in the URL. This value must be 64 characters or less in length
|
492
|
+
# and be unique within the Service.
|
493
|
+
# @param [String] attributes A valid JSON string that contains
|
494
|
+
# application-specific data.
|
477
495
|
# @return [ChannelInstance] Updated ChannelInstance
|
478
496
|
def update(friendly_name: :unset, unique_name: :unset, attributes: :unset)
|
479
497
|
context.update(friendly_name: friendly_name, unique_name: unique_name, attributes: attributes, )
|
@@ -16,11 +16,12 @@ module Twilio
|
|
16
16
|
##
|
17
17
|
# Initialize the InviteList
|
18
18
|
# @param [Version] version Version that contains the resource
|
19
|
-
# @param [String] service_sid The
|
20
|
-
# [Service](https://www.twilio.com/docs/api/chat/rest/
|
19
|
+
# @param [String] service_sid The SID of the
|
20
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) the resource is
|
21
|
+
# associated with.
|
22
|
+
# @param [String] channel_sid The SID of the
|
23
|
+
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource
|
21
24
|
# belongs to.
|
22
|
-
# @param [String] channel_sid The unique id of the
|
23
|
-
# [Channel](https://www.twilio.com/docs/api/chat/rest/v1/channel) for this member.
|
24
25
|
# @return [InviteList] InviteList
|
25
26
|
def initialize(version, service_sid: nil, channel_sid: nil)
|
26
27
|
super(version)
|
@@ -33,12 +34,13 @@ module Twilio
|
|
33
34
|
##
|
34
35
|
# Retrieve a single page of InviteInstance records from the API.
|
35
36
|
# Request is executed immediately.
|
36
|
-
# @param [String] identity
|
37
|
-
# [User](https://www.twilio.com/docs/api/chat/rest/v1/user)
|
38
|
-
# [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). See
|
39
|
-
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens)
|
40
|
-
#
|
41
|
-
#
|
37
|
+
# @param [String] identity The `identity` value that uniquely identifies the new
|
38
|
+
# resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the
|
39
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). See [access
|
40
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more
|
41
|
+
# info.
|
42
|
+
# @param [String] role_sid The SID of the
|
43
|
+
# [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new
|
42
44
|
# member.
|
43
45
|
# @return [InviteInstance] Newly created InviteInstance
|
44
46
|
def create(identity: nil, role_sid: :unset)
|
@@ -62,10 +64,11 @@ module Twilio
|
|
62
64
|
# Lists InviteInstance records from the API as a list.
|
63
65
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
64
66
|
# memory before returning.
|
65
|
-
# @param [String] identity
|
66
|
-
# [User](https://www.twilio.com/docs/api/chat/rest/v1/user)
|
67
|
-
#
|
68
|
-
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens)
|
67
|
+
# @param [String] identity The
|
68
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of
|
69
|
+
# the resources to read. See [access
|
70
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more
|
71
|
+
# details.
|
69
72
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
70
73
|
# guarantees to never return more than limit. Default is no limit
|
71
74
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -81,10 +84,11 @@ module Twilio
|
|
81
84
|
# Streams InviteInstance records from the API as an Enumerable.
|
82
85
|
# This operation lazily loads records as efficiently as possible until the limit
|
83
86
|
# is reached.
|
84
|
-
# @param [String] identity
|
85
|
-
# [User](https://www.twilio.com/docs/api/chat/rest/v1/user)
|
86
|
-
#
|
87
|
-
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens)
|
87
|
+
# @param [String] identity The
|
88
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of
|
89
|
+
# the resources to read. See [access
|
90
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more
|
91
|
+
# details.
|
88
92
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
89
93
|
# guarantees to never return more than limit. Default is no limit.
|
90
94
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -117,10 +121,11 @@ module Twilio
|
|
117
121
|
##
|
118
122
|
# Retrieve a single page of InviteInstance records from the API.
|
119
123
|
# Request is executed immediately.
|
120
|
-
# @param [String] identity
|
121
|
-
# [User](https://www.twilio.com/docs/api/chat/rest/v1/user)
|
122
|
-
#
|
123
|
-
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens)
|
124
|
+
# @param [String] identity The
|
125
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of
|
126
|
+
# the resources to read. See [access
|
127
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more
|
128
|
+
# details.
|
124
129
|
# @param [String] page_token PageToken provided by the API
|
125
130
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
126
131
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -198,9 +203,14 @@ module Twilio
|
|
198
203
|
##
|
199
204
|
# Initialize the InviteContext
|
200
205
|
# @param [Version] version Version that contains the resource
|
201
|
-
# @param [String] service_sid The
|
202
|
-
#
|
203
|
-
#
|
206
|
+
# @param [String] service_sid The SID of the
|
207
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the
|
208
|
+
# resource from.
|
209
|
+
# @param [String] channel_sid The SID of the
|
210
|
+
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource to
|
211
|
+
# fetch belongs to.
|
212
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
213
|
+
# Invite resource to fetch.
|
204
214
|
# @return [InviteContext] InviteContext
|
205
215
|
def initialize(version, service_sid, channel_sid, sid)
|
206
216
|
super(version)
|
@@ -258,12 +268,14 @@ module Twilio
|
|
258
268
|
# Initialize the InviteInstance
|
259
269
|
# @param [Version] version Version that contains the resource
|
260
270
|
# @param [Hash] payload payload that contains response from Twilio
|
261
|
-
# @param [String] service_sid The
|
262
|
-
# [Service](https://www.twilio.com/docs/api/chat/rest/
|
271
|
+
# @param [String] service_sid The SID of the
|
272
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) the resource is
|
273
|
+
# associated with.
|
274
|
+
# @param [String] channel_sid The SID of the
|
275
|
+
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource
|
263
276
|
# belongs to.
|
264
|
-
# @param [String]
|
265
|
-
#
|
266
|
-
# @param [String] sid The sid
|
277
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
278
|
+
# Invite resource to fetch.
|
267
279
|
# @return [InviteInstance] InviteInstance
|
268
280
|
def initialize(version, payload, service_sid: nil, channel_sid: nil, sid: nil)
|
269
281
|
super(version)
|
@@ -308,61 +320,61 @@ module Twilio
|
|
308
320
|
end
|
309
321
|
|
310
322
|
##
|
311
|
-
# @return [String]
|
323
|
+
# @return [String] The unique string that identifies the resource
|
312
324
|
def sid
|
313
325
|
@properties['sid']
|
314
326
|
end
|
315
327
|
|
316
328
|
##
|
317
|
-
# @return [String] The
|
329
|
+
# @return [String] The SID of the Account that created the resource
|
318
330
|
def account_sid
|
319
331
|
@properties['account_sid']
|
320
332
|
end
|
321
333
|
|
322
334
|
##
|
323
|
-
# @return [String] The
|
335
|
+
# @return [String] The SID of the Channel the new resource belongs to
|
324
336
|
def channel_sid
|
325
337
|
@properties['channel_sid']
|
326
338
|
end
|
327
339
|
|
328
340
|
##
|
329
|
-
# @return [String] The
|
341
|
+
# @return [String] The SID of the Service that the resource is associated with
|
330
342
|
def service_sid
|
331
343
|
@properties['service_sid']
|
332
344
|
end
|
333
345
|
|
334
346
|
##
|
335
|
-
# @return [String]
|
347
|
+
# @return [String] The string that identifies the resource's User
|
336
348
|
def identity
|
337
349
|
@properties['identity']
|
338
350
|
end
|
339
351
|
|
340
352
|
##
|
341
|
-
# @return [Time] The date
|
353
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
342
354
|
def date_created
|
343
355
|
@properties['date_created']
|
344
356
|
end
|
345
357
|
|
346
358
|
##
|
347
|
-
# @return [Time] The date
|
359
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
|
348
360
|
def date_updated
|
349
361
|
@properties['date_updated']
|
350
362
|
end
|
351
363
|
|
352
364
|
##
|
353
|
-
# @return [String] The Role assigned to
|
365
|
+
# @return [String] The SID of the Role assigned to the member
|
354
366
|
def role_sid
|
355
367
|
@properties['role_sid']
|
356
368
|
end
|
357
369
|
|
358
370
|
##
|
359
|
-
# @return [String] The
|
371
|
+
# @return [String] The identity of the User that created the invite
|
360
372
|
def created_by
|
361
373
|
@properties['created_by']
|
362
374
|
end
|
363
375
|
|
364
376
|
##
|
365
|
-
# @return [String]
|
377
|
+
# @return [String] The absolute URL of the Invite resource
|
366
378
|
def url
|
367
379
|
@properties['url']
|
368
380
|
end
|
@@ -16,12 +16,11 @@ module Twilio
|
|
16
16
|
##
|
17
17
|
# Initialize the MemberList
|
18
18
|
# @param [Version] version Version that contains the resource
|
19
|
-
# @param [String] service_sid The
|
20
|
-
# [Service](https://www.twilio.com/docs/api/chat/rest/
|
21
|
-
#
|
22
|
-
# @param [String] channel_sid The unique
|
23
|
-
# [Channel](https://www.twilio.com/docs/api/chat/rest/
|
24
|
-
# member.
|
19
|
+
# @param [String] service_sid The SID of the
|
20
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) the resource is
|
21
|
+
# associated with.
|
22
|
+
# @param [String] channel_sid The unique ID of the
|
23
|
+
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels) for the member.
|
25
24
|
# @return [MemberList] MemberList
|
26
25
|
def initialize(version, service_sid: nil, channel_sid: nil)
|
27
26
|
super(version)
|
@@ -34,14 +33,15 @@ module Twilio
|
|
34
33
|
##
|
35
34
|
# Retrieve a single page of MemberInstance records from the API.
|
36
35
|
# Request is executed immediately.
|
37
|
-
# @param [String] identity
|
38
|
-
# [User](https://www.twilio.com/docs/api/chat/rest/v1/
|
39
|
-
# [Service](https://www.twilio.com/docs/api/chat/rest/
|
40
|
-
#
|
41
|
-
#
|
42
|
-
# @param [String] role_sid The
|
43
|
-
# [Role](https://www.twilio.com/docs/api/chat/rest/
|
44
|
-
#
|
36
|
+
# @param [String] identity The `identity` value that uniquely identifies the new
|
37
|
+
# resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the
|
38
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services). See [access
|
39
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more
|
40
|
+
# details.
|
41
|
+
# @param [String] role_sid The SID of the
|
42
|
+
# [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member.
|
43
|
+
# The default roles are those specified on the
|
44
|
+
# [Service](https://www.twilio.com/docs/chat/api/services).
|
45
45
|
# @return [MemberInstance] Newly created MemberInstance
|
46
46
|
def create(identity: nil, role_sid: :unset)
|
47
47
|
data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid, })
|
@@ -64,11 +64,11 @@ module Twilio
|
|
64
64
|
# Lists MemberInstance records from the API as a list.
|
65
65
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
66
66
|
# memory before returning.
|
67
|
-
# @param [String] identity
|
68
|
-
# [User](https://www.twilio.com/docs/api/chat/rest/v1/
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
67
|
+
# @param [String] identity The
|
68
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of
|
69
|
+
# the resources to read. See [access
|
70
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more
|
71
|
+
# details.
|
72
72
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
73
73
|
# guarantees to never return more than limit. Default is no limit
|
74
74
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -84,11 +84,11 @@ module Twilio
|
|
84
84
|
# Streams MemberInstance records from the API as an Enumerable.
|
85
85
|
# This operation lazily loads records as efficiently as possible until the limit
|
86
86
|
# is reached.
|
87
|
-
# @param [String] identity
|
88
|
-
# [User](https://www.twilio.com/docs/api/chat/rest/v1/
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
87
|
+
# @param [String] identity The
|
88
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of
|
89
|
+
# the resources to read. See [access
|
90
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more
|
91
|
+
# details.
|
92
92
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
93
93
|
# guarantees to never return more than limit. Default is no limit.
|
94
94
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -121,11 +121,11 @@ module Twilio
|
|
121
121
|
##
|
122
122
|
# Retrieve a single page of MemberInstance records from the API.
|
123
123
|
# Request is executed immediately.
|
124
|
-
# @param [String] identity
|
125
|
-
# [User](https://www.twilio.com/docs/api/chat/rest/v1/
|
126
|
-
#
|
127
|
-
#
|
128
|
-
#
|
124
|
+
# @param [String] identity The
|
125
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of
|
126
|
+
# the resources to read. See [access
|
127
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more
|
128
|
+
# details.
|
129
129
|
# @param [String] page_token PageToken provided by the API
|
130
130
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
131
131
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -203,9 +203,14 @@ module Twilio
|
|
203
203
|
##
|
204
204
|
# Initialize the MemberContext
|
205
205
|
# @param [Version] version Version that contains the resource
|
206
|
-
# @param [String] service_sid The
|
207
|
-
#
|
208
|
-
#
|
206
|
+
# @param [String] service_sid The SID of the
|
207
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the
|
208
|
+
# resource from.
|
209
|
+
# @param [String] channel_sid The unique ID of the
|
210
|
+
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the member to
|
211
|
+
# fetch belongs to. Can be the Channel resource's `sid` or `unique_name` value.
|
212
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
213
|
+
# Member resource to fetch.
|
209
214
|
# @return [MemberContext] MemberContext
|
210
215
|
def initialize(version, service_sid, channel_sid, sid)
|
211
216
|
super(version)
|
@@ -245,13 +250,14 @@ module Twilio
|
|
245
250
|
|
246
251
|
##
|
247
252
|
# Update the MemberInstance
|
248
|
-
# @param [String] role_sid The
|
249
|
-
# [Role](https://www.twilio.com/docs/api/chat/rest/
|
250
|
-
#
|
251
|
-
#
|
252
|
-
#
|
253
|
-
#
|
254
|
-
#
|
253
|
+
# @param [String] role_sid The SID of the
|
254
|
+
# [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member.
|
255
|
+
# The default roles are those specified on the
|
256
|
+
# [Service](https://www.twilio.com/docs/chat/api/services).
|
257
|
+
# @param [String] last_consumed_message_index The index of the last
|
258
|
+
# [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member
|
259
|
+
# has read within the
|
260
|
+
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels).
|
255
261
|
# @return [MemberInstance] Updated MemberInstance
|
256
262
|
def update(role_sid: :unset, last_consumed_message_index: :unset)
|
257
263
|
data = Twilio::Values.of({
|
@@ -294,13 +300,13 @@ module Twilio
|
|
294
300
|
# Initialize the MemberInstance
|
295
301
|
# @param [Version] version Version that contains the resource
|
296
302
|
# @param [Hash] payload payload that contains response from Twilio
|
297
|
-
# @param [String] service_sid The
|
298
|
-
# [Service](https://www.twilio.com/docs/api/chat/rest/
|
299
|
-
#
|
300
|
-
# @param [String] channel_sid The unique
|
301
|
-
# [Channel](https://www.twilio.com/docs/api/chat/rest/
|
302
|
-
#
|
303
|
-
#
|
303
|
+
# @param [String] service_sid The SID of the
|
304
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) the resource is
|
305
|
+
# associated with.
|
306
|
+
# @param [String] channel_sid The unique ID of the
|
307
|
+
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels) for the member.
|
308
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
309
|
+
# Member resource to fetch.
|
304
310
|
# @return [MemberInstance] MemberInstance
|
305
311
|
def initialize(version, payload, service_sid: nil, channel_sid: nil, sid: nil)
|
306
312
|
super(version)
|
@@ -346,67 +352,67 @@ module Twilio
|
|
346
352
|
end
|
347
353
|
|
348
354
|
##
|
349
|
-
# @return [String]
|
355
|
+
# @return [String] The unique string that identifies the resource
|
350
356
|
def sid
|
351
357
|
@properties['sid']
|
352
358
|
end
|
353
359
|
|
354
360
|
##
|
355
|
-
# @return [String] The
|
361
|
+
# @return [String] The SID of the Account that created the resource
|
356
362
|
def account_sid
|
357
363
|
@properties['account_sid']
|
358
364
|
end
|
359
365
|
|
360
366
|
##
|
361
|
-
# @return [String] The unique
|
367
|
+
# @return [String] The unique ID of the Channel for the member
|
362
368
|
def channel_sid
|
363
369
|
@properties['channel_sid']
|
364
370
|
end
|
365
371
|
|
366
372
|
##
|
367
|
-
# @return [String] The
|
373
|
+
# @return [String] The SID of the Service that the resource is associated with
|
368
374
|
def service_sid
|
369
375
|
@properties['service_sid']
|
370
376
|
end
|
371
377
|
|
372
378
|
##
|
373
|
-
# @return [String]
|
379
|
+
# @return [String] The string that identifies the resource's User
|
374
380
|
def identity
|
375
381
|
@properties['identity']
|
376
382
|
end
|
377
383
|
|
378
384
|
##
|
379
|
-
# @return [Time] The date
|
385
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
380
386
|
def date_created
|
381
387
|
@properties['date_created']
|
382
388
|
end
|
383
389
|
|
384
390
|
##
|
385
|
-
# @return [Time] The date
|
391
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
|
386
392
|
def date_updated
|
387
393
|
@properties['date_updated']
|
388
394
|
end
|
389
395
|
|
390
396
|
##
|
391
|
-
# @return [String] The Role assigned to
|
397
|
+
# @return [String] The SID of the Role assigned to the member
|
392
398
|
def role_sid
|
393
399
|
@properties['role_sid']
|
394
400
|
end
|
395
401
|
|
396
402
|
##
|
397
|
-
# @return [String]
|
403
|
+
# @return [String] The index of the last Message that the Member has read within the Channel
|
398
404
|
def last_consumed_message_index
|
399
405
|
@properties['last_consumed_message_index']
|
400
406
|
end
|
401
407
|
|
402
408
|
##
|
403
|
-
# @return [Time]
|
409
|
+
# @return [Time] The ISO 8601 based timestamp string that represents the date-time of the last Message read event for the Member within the Channel
|
404
410
|
def last_consumption_timestamp
|
405
411
|
@properties['last_consumption_timestamp']
|
406
412
|
end
|
407
413
|
|
408
414
|
##
|
409
|
-
# @return [String]
|
415
|
+
# @return [String] The absolute URL of the Member resource
|
410
416
|
def url
|
411
417
|
@properties['url']
|
412
418
|
end
|
@@ -427,13 +433,14 @@ module Twilio
|
|
427
433
|
|
428
434
|
##
|
429
435
|
# Update the MemberInstance
|
430
|
-
# @param [String] role_sid The
|
431
|
-
# [Role](https://www.twilio.com/docs/api/chat/rest/
|
432
|
-
#
|
433
|
-
#
|
434
|
-
#
|
435
|
-
#
|
436
|
-
#
|
436
|
+
# @param [String] role_sid The SID of the
|
437
|
+
# [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member.
|
438
|
+
# The default roles are those specified on the
|
439
|
+
# [Service](https://www.twilio.com/docs/chat/api/services).
|
440
|
+
# @param [String] last_consumed_message_index The index of the last
|
441
|
+
# [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member
|
442
|
+
# has read within the
|
443
|
+
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels).
|
437
444
|
# @return [MemberInstance] Updated MemberInstance
|
438
445
|
def update(role_sid: :unset, last_consumed_message_index: :unset)
|
439
446
|
context.update(role_sid: role_sid, last_consumed_message_index: last_consumed_message_index, )
|