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.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +27 -0
  3. data/README.md +2 -4
  4. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +14 -0
  5. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +2 -2
  6. data/lib/twilio-ruby/rest/chat/v1.rb +4 -2
  7. data/lib/twilio-ruby/rest/chat/v1/credential.rb +68 -47
  8. data/lib/twilio-ruby/rest/chat/v1/service.rb +311 -320
  9. data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +59 -41
  10. data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +52 -40
  11. data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +71 -64
  12. data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +58 -40
  13. data/lib/twilio-ruby/rest/chat/v1/service/role.rb +39 -29
  14. data/lib/twilio-ruby/rest/chat/v1/service/user.rb +51 -48
  15. data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +16 -12
  16. data/lib/twilio-ruby/rest/insights/v1/summary.rb +13 -4
  17. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +4 -2
  18. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +68 -47
  19. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +311 -320
  20. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +59 -41
  21. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +52 -40
  22. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +71 -64
  23. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +58 -40
  24. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +39 -29
  25. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +51 -48
  26. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +16 -12
  27. data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +1 -1
  28. data/lib/twilio-ruby/rest/preview.rb +25 -0
  29. data/lib/twilio-ruby/rest/preview/trusted_comms.rb +49 -0
  30. data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +217 -0
  31. data/lib/twilio-ruby/rest/preview/trusted_comms/device.rb +146 -0
  32. data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +169 -0
  33. data/lib/twilio-ruby/rest/serverless/v1.rb +2 -1
  34. data/lib/twilio-ruby/rest/serverless/v1/service.rb +4 -2
  35. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +30 -9
  36. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
  37. data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +39 -6
  38. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +191 -0
  39. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +133 -99
  40. data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +3 -3
  41. data/lib/twilio-ruby/version.rb +1 -1
  42. data/spec/integration/api/v2010/account/conference_spec.rb +86 -2
  43. data/spec/integration/api/v2010/account/connect_app_spec.rb +28 -6
  44. data/spec/integration/api/v2010/account/queue/member_spec.rb +4 -4
  45. data/spec/integration/insights/v1/summary_spec.rb +1 -0
  46. data/spec/integration/preview/trusted_comms/current_call_spec.rb +46 -0
  47. data/spec/integration/preview/trusted_comms/device_spec.rb +45 -0
  48. data/spec/integration/preview/trusted_comms/phone_call_spec.rb +48 -0
  49. data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +6 -0
  50. data/spec/integration/video/v1/room/room_participant/room_participant_subscribe_rule_spec.rb +92 -0
  51. data/spec/integration/video/v1/room/room_participant/room_participant_subscribed_track_spec.rb +31 -68
  52. data/spec/integration/video/v1/room/room_participant_spec.rb +6 -3
  53. data/spec/integration/wireless/v1/sim/data_session_spec.rb +2 -2
  54. metadata +15 -2
@@ -16,10 +16,12 @@ 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 unique id of the
20
- # [Service](https://www.twilio.com/docs/api/chat/rest/v1/services) this message
21
- # belongs to.
22
- # @param [String] channel_sid The channel_sid
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) the Message
24
+ # resource belongs to.
23
25
  # @return [MessageList] MessageList
24
26
  def initialize(version, service_sid: nil, channel_sid: nil)
25
27
  super(version)
@@ -32,9 +34,14 @@ module Twilio
32
34
  ##
33
35
  # Retrieve a single page of MessageInstance records from the API.
34
36
  # Request is executed immediately.
35
- # @param [String] body The body
36
- # @param [String] from The from
37
- # @param [String] attributes The attributes
37
+ # @param [String] body The message to send to the channel. Can also be an empty
38
+ # string or `null`, which sets the value as an empty string. You can send
39
+ # structured data in the body by serializing it as a string.
40
+ # @param [String] from The
41
+ # [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new
42
+ # message's author. The default value is `system`.
43
+ # @param [String] attributes A valid JSON string that contains
44
+ # application-specific data.
38
45
  # @return [MessageInstance] Newly created MessageInstance
39
46
  def create(body: nil, from: :unset, attributes: :unset)
40
47
  data = Twilio::Values.of({'Body' => body, 'From' => from, 'Attributes' => attributes, })
@@ -57,7 +64,8 @@ module Twilio
57
64
  # Lists MessageInstance records from the API as a list.
58
65
  # Unlike stream(), this operation is eager and will load `limit` records into
59
66
  # memory before returning.
60
- # @param [message.OrderType] order The order
67
+ # @param [message.OrderType] order The sort order of the returned messages. Can
68
+ # be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
61
69
  # @param [Integer] limit Upper limit for the number of records to return. stream()
62
70
  # guarantees to never return more than limit. Default is no limit
63
71
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -73,7 +81,8 @@ module Twilio
73
81
  # Streams MessageInstance records from the API as an Enumerable.
74
82
  # This operation lazily loads records as efficiently as possible until the limit
75
83
  # is reached.
76
- # @param [message.OrderType] order The order
84
+ # @param [message.OrderType] order The sort order of the returned messages. Can
85
+ # be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
77
86
  # @param [Integer] limit Upper limit for the number of records to return. stream()
78
87
  # guarantees to never return more than limit. Default is no limit.
79
88
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -106,7 +115,8 @@ module Twilio
106
115
  ##
107
116
  # Retrieve a single page of MessageInstance records from the API.
108
117
  # Request is executed immediately.
109
- # @param [message.OrderType] order The order
118
+ # @param [message.OrderType] order The sort order of the returned messages. Can
119
+ # be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
110
120
  # @param [String] page_token PageToken provided by the API
111
121
  # @param [Integer] page_number Page Number, this value is simply for client state
112
122
  # @param [Integer] page_size Number of records to return, defaults to 50
@@ -184,9 +194,14 @@ module Twilio
184
194
  ##
185
195
  # Initialize the MessageContext
186
196
  # @param [Version] version Version that contains the resource
187
- # @param [String] service_sid The service_sid
188
- # @param [String] channel_sid The channel_sid
189
- # @param [String] sid The sid
197
+ # @param [String] service_sid The SID of the
198
+ # [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the
199
+ # resource from.
200
+ # @param [String] channel_sid The unique ID of the
201
+ # [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the message to
202
+ # fetch belongs to. Can be the Channel's `sid` or `unique_name`.
203
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
204
+ # Message resource to fetch.
190
205
  # @return [MessageContext] MessageContext
191
206
  def initialize(version, service_sid, channel_sid, sid)
192
207
  super(version)
@@ -226,11 +241,11 @@ module Twilio
226
241
 
227
242
  ##
228
243
  # Update the MessageInstance
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.
244
+ # @param [String] body The message to send to the channel. Can also be an empty
245
+ # string or `null`, which sets the value as an empty string. You can send
246
+ # structured data in the body by serializing it as a string.
247
+ # @param [String] attributes A valid JSON string that contains
248
+ # application-specific data.
234
249
  # @return [MessageInstance] Updated MessageInstance
235
250
  def update(body: :unset, attributes: :unset)
236
251
  data = Twilio::Values.of({'Body' => body, 'Attributes' => attributes, })
@@ -270,11 +285,14 @@ module Twilio
270
285
  # Initialize the MessageInstance
271
286
  # @param [Version] version Version that contains the resource
272
287
  # @param [Hash] payload payload that contains response from Twilio
273
- # @param [String] service_sid The unique id of the
274
- # [Service](https://www.twilio.com/docs/api/chat/rest/v1/services) this message
275
- # belongs to.
276
- # @param [String] channel_sid The channel_sid
277
- # @param [String] sid The sid
288
+ # @param [String] service_sid The SID of the
289
+ # [Service](https://www.twilio.com/docs/api/chat/rest/services) the resource is
290
+ # associated with.
291
+ # @param [String] channel_sid The unique ID of the
292
+ # [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the Message
293
+ # resource belongs to.
294
+ # @param [String] sid The Twilio-provided string that uniquely identifies the
295
+ # Message resource to fetch.
278
296
  # @return [MessageInstance] MessageInstance
279
297
  def initialize(version, payload, service_sid: nil, channel_sid: nil, sid: nil)
280
298
  super(version)
@@ -322,67 +340,67 @@ module Twilio
322
340
  end
323
341
 
324
342
  ##
325
- # @return [String] A 34 character string that uniquely identifies this resource.
343
+ # @return [String] The unique string that identifies the resource
326
344
  def sid
327
345
  @properties['sid']
328
346
  end
329
347
 
330
348
  ##
331
- # @return [String] The unique id of the Account responsible for this message.
349
+ # @return [String] The SID of the Account that created the resource
332
350
  def account_sid
333
351
  @properties['account_sid']
334
352
  end
335
353
 
336
354
  ##
337
- # @return [String] An optional string metadata field you can use to store any data you wish.
355
+ # @return [String] The JSON string that stores application-specific data
338
356
  def attributes
339
357
  @properties['attributes']
340
358
  end
341
359
 
342
360
  ##
343
- # @return [String] The unique id of the Service this message belongs to.
361
+ # @return [String] The SID of the Service that the resource is associated with
344
362
  def service_sid
345
363
  @properties['service_sid']
346
364
  end
347
365
 
348
366
  ##
349
- # @return [String] The unique id of the Channel this message was sent to.
367
+ # @return [String] The SID of the Channel that the message was sent to
350
368
  def to
351
369
  @properties['to']
352
370
  end
353
371
 
354
372
  ##
355
- # @return [String] The channel_sid
373
+ # @return [String] The unique ID of the Channel the Message resource belongs to
356
374
  def channel_sid
357
375
  @properties['channel_sid']
358
376
  end
359
377
 
360
378
  ##
361
- # @return [Time] The date that this resource was created.
379
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was created
362
380
  def date_created
363
381
  @properties['date_created']
364
382
  end
365
383
 
366
384
  ##
367
- # @return [Time] The date that this resource was last updated.
385
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
368
386
  def date_updated
369
387
  @properties['date_updated']
370
388
  end
371
389
 
372
390
  ##
373
- # @return [Boolean] true if the message has been updated since it was created.
391
+ # @return [Boolean] Whether the message has been edited since it was created
374
392
  def was_edited
375
393
  @properties['was_edited']
376
394
  end
377
395
 
378
396
  ##
379
- # @return [String] The identity of the message's author.
397
+ # @return [String] The identity of the message's author
380
398
  def from
381
399
  @properties['from']
382
400
  end
383
401
 
384
402
  ##
385
- # @return [String] The contents of the message.
403
+ # @return [String] The content of the message
386
404
  def body
387
405
  @properties['body']
388
406
  end
@@ -394,7 +412,7 @@ module Twilio
394
412
  end
395
413
 
396
414
  ##
397
- # @return [String] An absolute URL for this message.
415
+ # @return [String] The absolute URL of the Message resource
398
416
  def url
399
417
  @properties['url']
400
418
  end
@@ -415,11 +433,11 @@ module Twilio
415
433
 
416
434
  ##
417
435
  # Update the MessageInstance
418
- # @param [String] body The new message body string. You can also send structured
419
- # data by serializing it into a string.
420
- # @param [String] attributes The new attributes metadata field you can use to
421
- # store any data you wish. The string value must contain structurally valid JSON
422
- # if specified.
436
+ # @param [String] body The message to send to the channel. Can also be an empty
437
+ # string or `null`, which sets the value as an empty string. You can send
438
+ # structured data in the body by serializing it as a string.
439
+ # @param [String] attributes A valid JSON string that contains
440
+ # application-specific data.
423
441
  # @return [MessageInstance] Updated MessageInstance
424
442
  def update(body: :unset, attributes: :unset)
425
443
  context.update(body: body, attributes: attributes, )
@@ -15,9 +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 unique id of the
19
- # [Service](https://www.twilio.com/docs/api/chat/rest/v1/services) this role
20
- # belongs to.
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.
21
21
  # @return [RoleList] RoleList
22
22
  def initialize(version, service_sid: nil)
23
23
  super(version)
@@ -30,13 +30,15 @@ module Twilio
30
30
  ##
31
31
  # Retrieve a single page of RoleInstance records from the API.
32
32
  # Request is executed immediately.
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.
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 [role.RoleType] type The type of role. Can be: `channel` for
36
+ # [Channel](https://www.twilio.com/docs/chat/api/channels) roles or `deployment`
37
+ # for [Service](https://www.twilio.com/docs/chat/api/services) roles.
38
+ # @param [String] permission A permission that you grant to the new role. Only one
39
+ # permission can be granted per parameter. To assign more than one permission,
40
+ # repeat this parameter for each permission value. The values for this parameter
41
+ # depend on the role's `type` and are described in the documentation.
40
42
  # @return [RoleInstance] Newly created RoleInstance
41
43
  def create(friendly_name: nil, type: nil, permission: nil)
42
44
  data = Twilio::Values.of({
@@ -176,8 +178,11 @@ module Twilio
176
178
  ##
177
179
  # Initialize the RoleContext
178
180
  # @param [Version] version Version that contains the resource
179
- # @param [String] service_sid The service_sid
180
- # @param [String] sid The sid
181
+ # @param [String] service_sid The SID of the
182
+ # [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the
183
+ # resource from.
184
+ # @param [String] sid The Twilio-provided string that uniquely identifies the Role
185
+ # resource to fetch.
181
186
  # @return [RoleContext] RoleContext
182
187
  def initialize(version, service_sid, sid)
183
188
  super(version)
@@ -211,8 +216,10 @@ module Twilio
211
216
 
212
217
  ##
213
218
  # Update the RoleInstance
214
- # @param [String] permission (multiple) A permission this role should have.
215
- # Consult the table above for the list of possible permissions.
219
+ # @param [String] permission A permission that you grant to the role. Only one
220
+ # permission can be granted per parameter. To assign more than one permission,
221
+ # repeat this parameter for each permission value. The values for this parameter
222
+ # depend on the role's `type` and are described in the documentation.
216
223
  # @return [RoleInstance] Updated RoleInstance
217
224
  def update(permission: nil)
218
225
  data = Twilio::Values.of({'Permission' => Twilio.serialize_list(permission) { |e| e }, })
@@ -246,10 +253,11 @@ module Twilio
246
253
  # Initialize the RoleInstance
247
254
  # @param [Version] version Version that contains the resource
248
255
  # @param [Hash] payload payload that contains response from Twilio
249
- # @param [String] service_sid The unique id of the
250
- # [Service](https://www.twilio.com/docs/api/chat/rest/v1/services) this role
251
- # belongs to.
252
- # @param [String] sid The sid
256
+ # @param [String] service_sid The SID of the
257
+ # [Service](https://www.twilio.com/docs/api/chat/rest/services) the resource is
258
+ # associated with.
259
+ # @param [String] sid The Twilio-provided string that uniquely identifies the Role
260
+ # resource to fetch.
253
261
  # @return [RoleInstance] RoleInstance
254
262
  def initialize(version, payload, service_sid: nil, sid: nil)
255
263
  super(version)
@@ -284,55 +292,55 @@ module Twilio
284
292
  end
285
293
 
286
294
  ##
287
- # @return [String] A 34 character string that uniquely identifies this resource.
295
+ # @return [String] The unique string that identifies the resource
288
296
  def sid
289
297
  @properties['sid']
290
298
  end
291
299
 
292
300
  ##
293
- # @return [String] The unique id of the Account responsible for this role.
301
+ # @return [String] The SID of the Account that created the resource
294
302
  def account_sid
295
303
  @properties['account_sid']
296
304
  end
297
305
 
298
306
  ##
299
- # @return [String] The unique id of the Service this role belongs to.
307
+ # @return [String] The SID of the Service that the resource is associated with
300
308
  def service_sid
301
309
  @properties['service_sid']
302
310
  end
303
311
 
304
312
  ##
305
- # @return [String] The human-readable name of this role.
313
+ # @return [String] The string that you assigned to describe the resource
306
314
  def friendly_name
307
315
  @properties['friendly_name']
308
316
  end
309
317
 
310
318
  ##
311
- # @return [role.RoleType] What kind of role this is.
319
+ # @return [role.RoleType] The type of role
312
320
  def type
313
321
  @properties['type']
314
322
  end
315
323
 
316
324
  ##
317
- # @return [String] A JSON array of the permissions this role has.
325
+ # @return [String] An array of the permissions the role has been granted
318
326
  def permissions
319
327
  @properties['permissions']
320
328
  end
321
329
 
322
330
  ##
323
- # @return [Time] The date that this resource was created in ISO 8601 format.
331
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was created
324
332
  def date_created
325
333
  @properties['date_created']
326
334
  end
327
335
 
328
336
  ##
329
- # @return [Time] The date that this resource was last updated in ISO 8601 format.
337
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
330
338
  def date_updated
331
339
  @properties['date_updated']
332
340
  end
333
341
 
334
342
  ##
335
- # @return [String] An absolute URL for this role.
343
+ # @return [String] The absolute URL of the Role resource
336
344
  def url
337
345
  @properties['url']
338
346
  end
@@ -353,8 +361,10 @@ module Twilio
353
361
 
354
362
  ##
355
363
  # Update the RoleInstance
356
- # @param [String] permission (multiple) A permission this role should have.
357
- # Consult the table above for the list of possible permissions.
364
+ # @param [String] permission A permission that you grant to the role. Only one
365
+ # permission can be granted per parameter. To assign more than one permission,
366
+ # repeat this parameter for each permission value. The values for this parameter
367
+ # depend on the role's `type` and are described in the documentation.
358
368
  # @return [RoleInstance] Updated RoleInstance
359
369
  def update(permission: nil)
360
370
  context.update(permission: permission, )
@@ -15,9 +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 unique id of the
19
- # [Service](https://www.twilio.com/docs/api/chat/rest/v1/services) this user
20
- # belongs to.
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.
21
21
  # @return [UserList] UserList
22
22
  def initialize(version, service_sid: nil)
23
23
  super(version)
@@ -30,17 +30,18 @@ module Twilio
30
30
  ##
31
31
  # Retrieve a single page of UserInstance records from the API.
32
32
  # Request is executed immediately.
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.
33
+ # @param [String] identity The `identity` value that uniquely identifies the new
34
+ # resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the
35
+ # [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). This value is
36
+ # often a username or email address. See the Identity documentation for more
37
+ # details.
38
+ # @param [String] role_sid The SID of the
39
+ # [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new
40
+ # User.
41
+ # @param [String] attributes A valid JSON string that contains
42
+ # application-specific data.
43
+ # @param [String] friendly_name A descriptive string that you create to describe
44
+ # the new resource. This value is often used for display purposes.
44
45
  # @return [UserInstance] Newly created UserInstance
45
46
  def create(identity: nil, role_sid: :unset, attributes: :unset, friendly_name: :unset)
46
47
  data = Twilio::Values.of({
@@ -181,8 +182,11 @@ module Twilio
181
182
  ##
182
183
  # Initialize the UserContext
183
184
  # @param [Version] version Version that contains the resource
184
- # @param [String] service_sid The service_sid
185
- # @param [String] sid The sid
185
+ # @param [String] service_sid The SID of the
186
+ # [Service](https://www.twilio.com/docs/api/chat/rest/services) to fetch the
187
+ # resource from.
188
+ # @param [String] sid The Twilio-provided string that uniquely identifies the User
189
+ # resource to fetch.
186
190
  # @return [UserContext] UserContext
187
191
  def initialize(version, service_sid, sid)
188
192
  super(version)
@@ -219,13 +223,12 @@ module Twilio
219
223
 
220
224
  ##
221
225
  # Update the UserInstance
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.
226
+ # @param [String] role_sid The SID of the
227
+ # [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user.
228
+ # @param [String] attributes A valid JSON string that contains
229
+ # application-specific data.
230
+ # @param [String] friendly_name A descriptive string that you create to describe
231
+ # the resource. It is often used for display purposes.
229
232
  # @return [UserInstance] Updated UserInstance
230
233
  def update(role_sid: :unset, attributes: :unset, friendly_name: :unset)
231
234
  data = Twilio::Values.of({
@@ -279,10 +282,11 @@ module Twilio
279
282
  # Initialize the UserInstance
280
283
  # @param [Version] version Version that contains the resource
281
284
  # @param [Hash] payload payload that contains response from Twilio
282
- # @param [String] service_sid The unique id of the
283
- # [Service](https://www.twilio.com/docs/api/chat/rest/v1/services) this user
284
- # belongs to.
285
- # @param [String] sid The sid
285
+ # @param [String] service_sid The SID of the
286
+ # [Service](https://www.twilio.com/docs/api/chat/rest/services) the resource is
287
+ # associated with.
288
+ # @param [String] sid The Twilio-provided string that uniquely identifies the User
289
+ # resource to fetch.
286
290
  # @return [UserInstance] UserInstance
287
291
  def initialize(version, payload, service_sid: nil, sid: nil)
288
292
  super(version)
@@ -322,85 +326,85 @@ module Twilio
322
326
  end
323
327
 
324
328
  ##
325
- # @return [String] A 34 character string that uniquely identifies this resource.
329
+ # @return [String] The unique string that identifies the resource
326
330
  def sid
327
331
  @properties['sid']
328
332
  end
329
333
 
330
334
  ##
331
- # @return [String] The unique id of the Account responsible for this user.
335
+ # @return [String] The SID of the Account that created the resource
332
336
  def account_sid
333
337
  @properties['account_sid']
334
338
  end
335
339
 
336
340
  ##
337
- # @return [String] The unique id of the Service this user belongs to.
341
+ # @return [String] The SID of the Service that the resource is associated with
338
342
  def service_sid
339
343
  @properties['service_sid']
340
344
  end
341
345
 
342
346
  ##
343
- # @return [String] An optional string metadata field you can use to store any data you wish.
347
+ # @return [String] The JSON string that stores application-specific data
344
348
  def attributes
345
349
  @properties['attributes']
346
350
  end
347
351
 
348
352
  ##
349
- # @return [String] The human-readable name of this user.
353
+ # @return [String] The string that you assigned to describe the resource
350
354
  def friendly_name
351
355
  @properties['friendly_name']
352
356
  end
353
357
 
354
358
  ##
355
- # @return [String] The unique id of the [Role][role] assigned to this user.
359
+ # @return [String] The SID of the assigned to the user
356
360
  def role_sid
357
361
  @properties['role_sid']
358
362
  end
359
363
 
360
364
  ##
361
- # @return [String] A unique string that identifies the user within this service - often a username or email address.
365
+ # @return [String] The string that identifies the resource's User
362
366
  def identity
363
367
  @properties['identity']
364
368
  end
365
369
 
366
370
  ##
367
- # @return [Boolean] Indicates whether the User is actively connected to the Service instance and online.
371
+ # @return [Boolean] Whether the User is actively connected to the Service instance and online
368
372
  def is_online
369
373
  @properties['is_online']
370
374
  end
371
375
 
372
376
  ##
373
- # @return [Boolean] Indicates whether the User has a potentially valid Push Notification registration for the Service instance.
377
+ # @return [Boolean] Whether the User has a potentially valid Push Notification registration for the Service instance
374
378
  def is_notifiable
375
379
  @properties['is_notifiable']
376
380
  end
377
381
 
378
382
  ##
379
- # @return [Time] The date that this resource was created in ISO 8601 format.
383
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was created
380
384
  def date_created
381
385
  @properties['date_created']
382
386
  end
383
387
 
384
388
  ##
385
- # @return [Time] The date that this resource was last updated in ISO 8601 format.
389
+ # @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
386
390
  def date_updated
387
391
  @properties['date_updated']
388
392
  end
389
393
 
390
394
  ##
391
- # @return [String] The joined_channels_count
395
+ # @return [String] The number of Channels this User is a Member of
392
396
  def joined_channels_count
393
397
  @properties['joined_channels_count']
394
398
  end
395
399
 
396
400
  ##
397
- # @return [String] The links
401
+ # @return [String] The absolute URLs of the Channel and Binding resources related to the user
398
402
  def links
399
403
  @properties['links']
400
404
  end
401
405
 
402
406
  ##
403
- # @return [String] An absolute URL for this user.
407
+ # @return [String] The absolute URL of the User resource
404
408
  def url
405
409
  @properties['url']
406
410
  end
@@ -421,13 +425,12 @@ module Twilio
421
425
 
422
426
  ##
423
427
  # Update the UserInstance
424
- # @param [String] role_sid The unique id of the [Role][role] assigned to this
425
- # user.
426
- # @param [String] attributes An optional string used to contain any metadata or
427
- # other information for the User. The string must contain structurally valid JSON
428
- # if specified.
429
- # @param [String] friendly_name An optional human readable string representing the
430
- # user. Often used for display purposes.
428
+ # @param [String] role_sid The SID of the
429
+ # [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user.
430
+ # @param [String] attributes A valid JSON string that contains
431
+ # application-specific data.
432
+ # @param [String] friendly_name A descriptive string that you create to describe
433
+ # the resource. It is often used for display purposes.
431
434
  # @return [UserInstance] Updated UserInstance
432
435
  def update(role_sid: :unset, attributes: :unset, friendly_name: :unset)
433
436
  context.update(role_sid: role_sid, attributes: attributes, friendly_name: friendly_name, )