twilio-ruby 5.21.1 → 5.21.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +13 -0
- data/README.md +7 -4
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +14 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +6 -4
- data/lib/twilio-ruby/rest/chat.rb +2 -2
- data/lib/twilio-ruby/rest/chat/v2.rb +4 -2
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +50 -45
- data/lib/twilio-ruby/rest/chat/v2/service.rb +197 -146
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +43 -30
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +85 -77
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +48 -46
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +117 -113
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +98 -96
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +90 -36
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +38 -25
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +49 -51
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +42 -34
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +37 -31
- data/lib/twilio-ruby/rest/flex_api.rb +8 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +15 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +515 -0
- data/lib/twilio-ruby/rest/ip_messaging.rb +2 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +4 -2
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +50 -45
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +197 -146
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +43 -30
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +85 -77
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +48 -46
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +117 -113
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +98 -96
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +90 -36
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +38 -25
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +49 -51
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +42 -34
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +37 -31
- data/lib/twilio-ruby/rest/verify/v1/service/verification.rb +1 -4
- data/lib/twilio-ruby/rest/voice/v1/voice_permission/settings.rb +207 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/flex_api/v1/flex_flow_spec.rb +255 -0
- data/spec/integration/voice/v1/voice_permission/settings_spec.rb +77 -0
- metadata +8 -2
@@ -16,11 +16,11 @@ 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/
|
21
|
-
#
|
22
|
-
# @param [String] channel_sid The
|
23
|
-
# [Channel](https://www.twilio.com/docs/
|
19
|
+
# @param [String] service_sid The SID of the
|
20
|
+
# [Service](https://www.twilio.com/docs/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/chat/channels) the resource belongs to.
|
24
24
|
# @return [InviteList] InviteList
|
25
25
|
def initialize(version, service_sid: nil, channel_sid: nil)
|
26
26
|
super(version)
|
@@ -33,13 +33,12 @@ module Twilio
|
|
33
33
|
##
|
34
34
|
# Retrieve a single page of InviteInstance records from the API.
|
35
35
|
# Request is executed immediately.
|
36
|
-
# @param [String] identity
|
37
|
-
# [User](https://www.twilio.com/docs/
|
38
|
-
# [Service](https://www.twilio.com/docs/
|
39
|
-
# tokens](https://www.twilio.com/docs/
|
40
|
-
#
|
41
|
-
#
|
42
|
-
# [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this member.
|
36
|
+
# @param [String] identity The `identity` value that uniquely identifies the new
|
37
|
+
# resource's [User](https://www.twilio.com/docs/chat/rest/users) within the
|
38
|
+
# [Service](https://www.twilio.com/docs/chat/rest/services). See [access
|
39
|
+
# tokens](https://www.twilio.com/docs/chat/create-tokens) for more info.
|
40
|
+
# @param [String] role_sid The SID of the
|
41
|
+
# [Role](https://www.twilio.com/docs/chat/rest/roles) assigned to the new member.
|
43
42
|
# @return [InviteInstance] Newly created InviteInstance
|
44
43
|
def create(identity: nil, role_sid: :unset)
|
45
44
|
data = Twilio::Values.of({'Identity' => identity, 'RoleSid' => role_sid, })
|
@@ -62,11 +61,10 @@ module Twilio
|
|
62
61
|
# Lists InviteInstance records from the API as a list.
|
63
62
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
64
63
|
# memory before returning.
|
65
|
-
# @param [String] identity
|
66
|
-
# [User](https://www.twilio.com/docs/
|
67
|
-
#
|
68
|
-
# tokens](https://www.twilio.com/docs/
|
69
|
-
# details.
|
64
|
+
# @param [String] identity The
|
65
|
+
# [User](https://www.twilio.com/docs/chat/rest/users)'s `identity` value of the
|
66
|
+
# resources to read. See [access
|
67
|
+
# tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
|
70
68
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
71
69
|
# guarantees to never return more than limit. Default is no limit
|
72
70
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -82,11 +80,10 @@ module Twilio
|
|
82
80
|
# Streams InviteInstance records from the API as an Enumerable.
|
83
81
|
# This operation lazily loads records as efficiently as possible until the limit
|
84
82
|
# is reached.
|
85
|
-
# @param [String] identity
|
86
|
-
# [User](https://www.twilio.com/docs/
|
87
|
-
#
|
88
|
-
# tokens](https://www.twilio.com/docs/
|
89
|
-
# details.
|
83
|
+
# @param [String] identity The
|
84
|
+
# [User](https://www.twilio.com/docs/chat/rest/users)'s `identity` value of the
|
85
|
+
# resources to read. See [access
|
86
|
+
# tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
|
90
87
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
91
88
|
# guarantees to never return more than limit. Default is no limit.
|
92
89
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -119,11 +116,10 @@ module Twilio
|
|
119
116
|
##
|
120
117
|
# Retrieve a single page of InviteInstance records from the API.
|
121
118
|
# Request is executed immediately.
|
122
|
-
# @param [String] identity
|
123
|
-
# [User](https://www.twilio.com/docs/
|
124
|
-
#
|
125
|
-
# tokens](https://www.twilio.com/docs/
|
126
|
-
# details.
|
119
|
+
# @param [String] identity The
|
120
|
+
# [User](https://www.twilio.com/docs/chat/rest/users)'s `identity` value of the
|
121
|
+
# resources to read. See [access
|
122
|
+
# tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
|
127
123
|
# @param [String] page_token PageToken provided by the API
|
128
124
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
129
125
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -201,9 +197,14 @@ module Twilio
|
|
201
197
|
##
|
202
198
|
# Initialize the InviteContext
|
203
199
|
# @param [Version] version Version that contains the resource
|
204
|
-
# @param [String] service_sid The
|
205
|
-
#
|
206
|
-
#
|
200
|
+
# @param [String] service_sid The SID of the
|
201
|
+
# [Service](https://www.twilio.com/docs/chat/rest/services) to fetch the resource
|
202
|
+
# from.
|
203
|
+
# @param [String] channel_sid The SID of the
|
204
|
+
# [Channel](https://www.twilio.com/docs/chat/channels) the resource to fetch
|
205
|
+
# belongs to.
|
206
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
207
|
+
# Invite resource to fetch.
|
207
208
|
# @return [InviteContext] InviteContext
|
208
209
|
def initialize(version, service_sid, channel_sid, sid)
|
209
210
|
super(version)
|
@@ -261,12 +262,13 @@ module Twilio
|
|
261
262
|
# Initialize the InviteInstance
|
262
263
|
# @param [Version] version Version that contains the resource
|
263
264
|
# @param [Hash] payload payload that contains response from Twilio
|
264
|
-
# @param [String] service_sid The
|
265
|
-
# [Service](https://www.twilio.com/docs/
|
266
|
-
#
|
267
|
-
# @param [String] channel_sid The
|
268
|
-
# [Channel](https://www.twilio.com/docs/
|
269
|
-
# @param [String] sid The
|
265
|
+
# @param [String] service_sid The SID of the
|
266
|
+
# [Service](https://www.twilio.com/docs/chat/rest/services) the resource is
|
267
|
+
# associated with.
|
268
|
+
# @param [String] channel_sid The SID of the
|
269
|
+
# [Channel](https://www.twilio.com/docs/chat/channels) the resource belongs to.
|
270
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
271
|
+
# Invite resource to fetch.
|
270
272
|
# @return [InviteInstance] InviteInstance
|
271
273
|
def initialize(version, payload, service_sid: nil, channel_sid: nil, sid: nil)
|
272
274
|
super(version)
|
@@ -311,61 +313,61 @@ module Twilio
|
|
311
313
|
end
|
312
314
|
|
313
315
|
##
|
314
|
-
# @return [String]
|
316
|
+
# @return [String] The unique string that identifies the resource
|
315
317
|
def sid
|
316
318
|
@properties['sid']
|
317
319
|
end
|
318
320
|
|
319
321
|
##
|
320
|
-
# @return [String] The
|
322
|
+
# @return [String] The SID of the Account that created the resource
|
321
323
|
def account_sid
|
322
324
|
@properties['account_sid']
|
323
325
|
end
|
324
326
|
|
325
327
|
##
|
326
|
-
# @return [String] The
|
328
|
+
# @return [String] The SID of the Channel the new resource belongs to
|
327
329
|
def channel_sid
|
328
330
|
@properties['channel_sid']
|
329
331
|
end
|
330
332
|
|
331
333
|
##
|
332
|
-
# @return [String] The
|
334
|
+
# @return [String] The SID of the Service that the resource is associated with
|
333
335
|
def service_sid
|
334
336
|
@properties['service_sid']
|
335
337
|
end
|
336
338
|
|
337
339
|
##
|
338
|
-
# @return [String]
|
340
|
+
# @return [String] The string that identifies the resource's User
|
339
341
|
def identity
|
340
342
|
@properties['identity']
|
341
343
|
end
|
342
344
|
|
343
345
|
##
|
344
|
-
# @return [Time] The date
|
346
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
345
347
|
def date_created
|
346
348
|
@properties['date_created']
|
347
349
|
end
|
348
350
|
|
349
351
|
##
|
350
|
-
# @return [Time] The date
|
352
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
|
351
353
|
def date_updated
|
352
354
|
@properties['date_updated']
|
353
355
|
end
|
354
356
|
|
355
357
|
##
|
356
|
-
# @return [String] The Role assigned to
|
358
|
+
# @return [String] The SID of the Role assigned to the member
|
357
359
|
def role_sid
|
358
360
|
@properties['role_sid']
|
359
361
|
end
|
360
362
|
|
361
363
|
##
|
362
|
-
# @return [String] The
|
364
|
+
# @return [String] The identity of the User that created the invite
|
363
365
|
def created_by
|
364
366
|
@properties['created_by']
|
365
367
|
end
|
366
368
|
|
367
369
|
##
|
368
|
-
# @return [String]
|
370
|
+
# @return [String] The absolute URL of the Invite resource
|
369
371
|
def url
|
370
372
|
@properties['url']
|
371
373
|
end
|
@@ -16,11 +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/
|
21
|
-
#
|
22
|
-
# @param [String] channel_sid The unique
|
23
|
-
# [Channel](https://www.twilio.com/docs/
|
19
|
+
# @param [String] service_sid The SID of the
|
20
|
+
# [Service](https://www.twilio.com/docs/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/chat/channels) for the member.
|
24
24
|
# @return [MemberList] MemberList
|
25
25
|
def initialize(version, service_sid: nil, channel_sid: nil)
|
26
26
|
super(version)
|
@@ -33,32 +33,35 @@ module Twilio
|
|
33
33
|
##
|
34
34
|
# Retrieve a single page of MemberInstance records from the API.
|
35
35
|
# Request is executed immediately.
|
36
|
-
# @param [String] identity
|
37
|
-
# [User](https://www.twilio.com/docs/
|
38
|
-
# [Service](https://www.twilio.com/docs/
|
39
|
-
# tokens](https://www.twilio.com/docs/
|
40
|
-
#
|
41
|
-
#
|
42
|
-
# roles specified on the
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
49
|
-
# @param [Time]
|
50
|
-
#
|
51
|
-
#
|
52
|
-
# Member
|
53
|
-
# @param [Time]
|
54
|
-
#
|
55
|
-
#
|
56
|
-
#
|
57
|
-
#
|
58
|
-
# @param [
|
59
|
-
#
|
60
|
-
#
|
61
|
-
#
|
36
|
+
# @param [String] identity The `identity` value that uniquely identifies the new
|
37
|
+
# resource's [User](https://www.twilio.com/docs/chat/rest/users) within the
|
38
|
+
# [Service](https://www.twilio.com/docs/chat/rest/services). See [access
|
39
|
+
# tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
|
40
|
+
# @param [String] role_sid The SID of the
|
41
|
+
# [Role](https://www.twilio.com/docs/chat/rest/roles) to assign to the member. The
|
42
|
+
# default roles are those specified on the
|
43
|
+
# [Service](https://www.twilio.com/docs/chat/api/services).
|
44
|
+
# @param [String] last_consumed_message_index The index of the last
|
45
|
+
# [Message](https://www.twilio.com/docs/chat/rest/messages) in the
|
46
|
+
# [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read.
|
47
|
+
# This parameter should only be used when recreating a Member from a
|
48
|
+
# backup/separate source.
|
49
|
+
# @param [Time] last_consumption_timestamp The ISO 8601 timestamp string that
|
50
|
+
# represents the date-time of the last
|
51
|
+
# [Message](https://www.twilio.com/docs/chat/rest/messages) read event for the
|
52
|
+
# Member within the [Channel](https://www.twilio.com/docs/chat/channels).
|
53
|
+
# @param [Time] date_created The date, specified in [ISO
|
54
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource
|
55
|
+
# as the date it was created. The default value is the current time set by the
|
56
|
+
# Chat service. Note that this parameter should only be used when a Member is
|
57
|
+
# being recreated from a backup/separate source.
|
58
|
+
# @param [Time] date_updated The date, specified in [ISO
|
59
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource
|
60
|
+
# as the date it was last updated. The default value is `null`. Note that this
|
61
|
+
# parameter should only be used when a Member is being recreated from a
|
62
|
+
# backup/separate source and where a Member was previously updated.
|
63
|
+
# @param [String] attributes A valid JSON string that contains
|
64
|
+
# application-specific data.
|
62
65
|
# @return [MemberInstance] Newly created MemberInstance
|
63
66
|
def create(identity: nil, role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset, attributes: :unset)
|
64
67
|
data = Twilio::Values.of({
|
@@ -89,11 +92,10 @@ module Twilio
|
|
89
92
|
# Lists MemberInstance records from the API as a list.
|
90
93
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
91
94
|
# memory before returning.
|
92
|
-
# @param [String] identity
|
93
|
-
# [User](https://www.twilio.com/docs/
|
94
|
-
#
|
95
|
-
# tokens](https://www.twilio.com/docs/
|
96
|
-
# details.
|
95
|
+
# @param [String] identity The
|
96
|
+
# [User](https://www.twilio.com/docs/chat/rest/users)'s `identity` value of the
|
97
|
+
# resources to read. See [access
|
98
|
+
# tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
|
97
99
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
98
100
|
# guarantees to never return more than limit. Default is no limit
|
99
101
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -109,11 +111,10 @@ module Twilio
|
|
109
111
|
# Streams MemberInstance records from the API as an Enumerable.
|
110
112
|
# This operation lazily loads records as efficiently as possible until the limit
|
111
113
|
# is reached.
|
112
|
-
# @param [String] identity
|
113
|
-
# [User](https://www.twilio.com/docs/
|
114
|
-
#
|
115
|
-
# tokens](https://www.twilio.com/docs/
|
116
|
-
# details.
|
114
|
+
# @param [String] identity The
|
115
|
+
# [User](https://www.twilio.com/docs/chat/rest/users)'s `identity` value of the
|
116
|
+
# resources to read. See [access
|
117
|
+
# tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
|
117
118
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
118
119
|
# guarantees to never return more than limit. Default is no limit.
|
119
120
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -146,11 +147,10 @@ module Twilio
|
|
146
147
|
##
|
147
148
|
# Retrieve a single page of MemberInstance records from the API.
|
148
149
|
# Request is executed immediately.
|
149
|
-
# @param [String] identity
|
150
|
-
# [User](https://www.twilio.com/docs/
|
151
|
-
#
|
152
|
-
# tokens](https://www.twilio.com/docs/
|
153
|
-
# details.
|
150
|
+
# @param [String] identity The
|
151
|
+
# [User](https://www.twilio.com/docs/chat/rest/users)'s `identity` value of the
|
152
|
+
# resources to read. See [access
|
153
|
+
# tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
|
154
154
|
# @param [String] page_token PageToken provided by the API
|
155
155
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
156
156
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -228,14 +228,14 @@ module Twilio
|
|
228
228
|
##
|
229
229
|
# Initialize the MemberContext
|
230
230
|
# @param [Version] version Version that contains the resource
|
231
|
-
# @param [String] service_sid
|
232
|
-
# [Service](https://www.twilio.com/docs/
|
233
|
-
#
|
234
|
-
# @param [String] channel_sid
|
235
|
-
# [Channel](https://www.twilio.com/docs/
|
236
|
-
#
|
237
|
-
# @param [String] sid
|
238
|
-
# Member
|
231
|
+
# @param [String] service_sid The SID of the
|
232
|
+
# [Service](https://www.twilio.com/docs/chat/rest/services) to fetch the resource
|
233
|
+
# from.
|
234
|
+
# @param [String] channel_sid The unique ID of the
|
235
|
+
# [Channel](https://www.twilio.com/docs/chat/channels) the member to fetch belongs
|
236
|
+
# to. Can be the Channel resource's `sid` or `unique_name` value.
|
237
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
238
|
+
# Member resource to fetch.
|
239
239
|
# @return [MemberContext] MemberContext
|
240
240
|
def initialize(version, service_sid, channel_sid, sid)
|
241
241
|
super(version)
|
@@ -275,27 +275,29 @@ module Twilio
|
|
275
275
|
|
276
276
|
##
|
277
277
|
# Update the MemberInstance
|
278
|
-
# @param [String] role_sid The
|
279
|
-
#
|
280
|
-
#
|
281
|
-
#
|
282
|
-
#
|
283
|
-
#
|
284
|
-
#
|
285
|
-
#
|
286
|
-
#
|
287
|
-
#
|
288
|
-
#
|
289
|
-
#
|
290
|
-
#
|
291
|
-
#
|
292
|
-
#
|
293
|
-
#
|
278
|
+
# @param [String] role_sid The SID of the
|
279
|
+
# [Role](https://www.twilio.com/docs/chat/rest/roles) to assign to the member. The
|
280
|
+
# default roles are those specified on the
|
281
|
+
# [Service](https://www.twilio.com/docs/chat/api/services).
|
282
|
+
# @param [String] last_consumed_message_index The index of the last
|
283
|
+
# [Message](https://www.twilio.com/docs/chat/rest/messages) that the Member has
|
284
|
+
# read within the [Channel](https://www.twilio.com/docs/chat/channels).
|
285
|
+
# @param [Time] last_consumption_timestamp The ISO 8601 timestamp string that
|
286
|
+
# represents the date-time of the last
|
287
|
+
# [Message](https://www.twilio.com/docs/chat/rest/messages) read event for the
|
288
|
+
# Member within the [Channel](https://www.twilio.com/docs/chat/channels).
|
289
|
+
# @param [Time] date_created The date, specified in [ISO
|
290
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource
|
291
|
+
# as the date it was created. The default is the current time set by the Chat
|
292
|
+
# service. Note that this parameter should only be used when a Member is being
|
293
|
+
# recreated from a backup/separate source.
|
294
|
+
# @param [Time] date_updated The date, specified in [ISO
|
295
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource
|
296
|
+
# as the date it was last updated. Note that this parameter should only be used
|
297
|
+
# when a Member is being recreated from a backup/separate source and where a
|
294
298
|
# Member was previously updated.
|
295
|
-
# @param [String] attributes
|
296
|
-
#
|
297
|
-
# if specified. **Note** that if the attributes are not set "{}" will be
|
298
|
-
# returned.
|
299
|
+
# @param [String] attributes A valid JSON string that contains
|
300
|
+
# application-specific data.
|
299
301
|
# @return [MemberInstance] Updated MemberInstance
|
300
302
|
def update(role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset, attributes: :unset)
|
301
303
|
data = Twilio::Values.of({
|
@@ -342,13 +344,13 @@ module Twilio
|
|
342
344
|
# Initialize the MemberInstance
|
343
345
|
# @param [Version] version Version that contains the resource
|
344
346
|
# @param [Hash] payload payload that contains response from Twilio
|
345
|
-
# @param [String] service_sid The
|
346
|
-
# [Service](https://www.twilio.com/docs/
|
347
|
-
#
|
348
|
-
# @param [String] channel_sid The unique
|
349
|
-
# [Channel](https://www.twilio.com/docs/
|
350
|
-
# @param [String] sid
|
351
|
-
# Member
|
347
|
+
# @param [String] service_sid The SID of the
|
348
|
+
# [Service](https://www.twilio.com/docs/chat/rest/services) the resource is
|
349
|
+
# associated with.
|
350
|
+
# @param [String] channel_sid The unique ID of the
|
351
|
+
# [Channel](https://www.twilio.com/docs/chat/channels) for the member.
|
352
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
353
|
+
# Member resource to fetch.
|
352
354
|
# @return [MemberInstance] MemberInstance
|
353
355
|
def initialize(version, payload, service_sid: nil, channel_sid: nil, sid: nil)
|
354
356
|
super(version)
|
@@ -395,73 +397,73 @@ module Twilio
|
|
395
397
|
end
|
396
398
|
|
397
399
|
##
|
398
|
-
# @return [String]
|
400
|
+
# @return [String] The unique string that identifies the resource
|
399
401
|
def sid
|
400
402
|
@properties['sid']
|
401
403
|
end
|
402
404
|
|
403
405
|
##
|
404
|
-
# @return [String] The
|
406
|
+
# @return [String] The SID of the Account that created the resource
|
405
407
|
def account_sid
|
406
408
|
@properties['account_sid']
|
407
409
|
end
|
408
410
|
|
409
411
|
##
|
410
|
-
# @return [String] The unique
|
412
|
+
# @return [String] The unique ID of the Channel for the member
|
411
413
|
def channel_sid
|
412
414
|
@properties['channel_sid']
|
413
415
|
end
|
414
416
|
|
415
417
|
##
|
416
|
-
# @return [String] The
|
418
|
+
# @return [String] The SID of the Service that the resource is associated with
|
417
419
|
def service_sid
|
418
420
|
@properties['service_sid']
|
419
421
|
end
|
420
422
|
|
421
423
|
##
|
422
|
-
# @return [String]
|
424
|
+
# @return [String] The string that identifies the resource's User
|
423
425
|
def identity
|
424
426
|
@properties['identity']
|
425
427
|
end
|
426
428
|
|
427
429
|
##
|
428
|
-
# @return [Time] The date
|
430
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
429
431
|
def date_created
|
430
432
|
@properties['date_created']
|
431
433
|
end
|
432
434
|
|
433
435
|
##
|
434
|
-
# @return [Time] The date
|
436
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
|
435
437
|
def date_updated
|
436
438
|
@properties['date_updated']
|
437
439
|
end
|
438
440
|
|
439
441
|
##
|
440
|
-
# @return [String] The Role assigned to
|
442
|
+
# @return [String] The SID of the Role assigned to the member
|
441
443
|
def role_sid
|
442
444
|
@properties['role_sid']
|
443
445
|
end
|
444
446
|
|
445
447
|
##
|
446
|
-
# @return [String]
|
448
|
+
# @return [String] The index of the last Message that the Member has read within the Channel
|
447
449
|
def last_consumed_message_index
|
448
450
|
@properties['last_consumed_message_index']
|
449
451
|
end
|
450
452
|
|
451
453
|
##
|
452
|
-
# @return [Time]
|
454
|
+
# @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
|
453
455
|
def last_consumption_timestamp
|
454
456
|
@properties['last_consumption_timestamp']
|
455
457
|
end
|
456
458
|
|
457
459
|
##
|
458
|
-
# @return [String]
|
460
|
+
# @return [String] The absolute URL of the Member resource
|
459
461
|
def url
|
460
462
|
@properties['url']
|
461
463
|
end
|
462
464
|
|
463
465
|
##
|
464
|
-
# @return [String]
|
466
|
+
# @return [String] The JSON string that stores application-specific data
|
465
467
|
def attributes
|
466
468
|
@properties['attributes']
|
467
469
|
end
|
@@ -482,27 +484,29 @@ module Twilio
|
|
482
484
|
|
483
485
|
##
|
484
486
|
# Update the MemberInstance
|
485
|
-
# @param [String] role_sid The
|
486
|
-
#
|
487
|
-
#
|
488
|
-
#
|
489
|
-
#
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
#
|
500
|
-
#
|
487
|
+
# @param [String] role_sid The SID of the
|
488
|
+
# [Role](https://www.twilio.com/docs/chat/rest/roles) to assign to the member. The
|
489
|
+
# default roles are those specified on the
|
490
|
+
# [Service](https://www.twilio.com/docs/chat/api/services).
|
491
|
+
# @param [String] last_consumed_message_index The index of the last
|
492
|
+
# [Message](https://www.twilio.com/docs/chat/rest/messages) that the Member has
|
493
|
+
# read within the [Channel](https://www.twilio.com/docs/chat/channels).
|
494
|
+
# @param [Time] last_consumption_timestamp The ISO 8601 timestamp string that
|
495
|
+
# represents the date-time of the last
|
496
|
+
# [Message](https://www.twilio.com/docs/chat/rest/messages) read event for the
|
497
|
+
# Member within the [Channel](https://www.twilio.com/docs/chat/channels).
|
498
|
+
# @param [Time] date_created The date, specified in [ISO
|
499
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource
|
500
|
+
# as the date it was created. The default is the current time set by the Chat
|
501
|
+
# service. Note that this parameter should only be used when a Member is being
|
502
|
+
# recreated from a backup/separate source.
|
503
|
+
# @param [Time] date_updated The date, specified in [ISO
|
504
|
+
# 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource
|
505
|
+
# as the date it was last updated. Note that this parameter should only be used
|
506
|
+
# when a Member is being recreated from a backup/separate source and where a
|
501
507
|
# Member was previously updated.
|
502
|
-
# @param [String] attributes
|
503
|
-
#
|
504
|
-
# if specified. **Note** that if the attributes are not set "{}" will be
|
505
|
-
# returned.
|
508
|
+
# @param [String] attributes A valid JSON string that contains
|
509
|
+
# application-specific data.
|
506
510
|
# @return [MemberInstance] Updated MemberInstance
|
507
511
|
def update(role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset, attributes: :unset)
|
508
512
|
context.update(
|