twilio-ruby 5.11.2 → 5.12.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 +20 -0
- data/Makefile +2 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +13 -6
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +10 -4
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +18 -6
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +7 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +13 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +10 -4
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +18 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +7 -3
- data/lib/twilio-ruby/rest/notify/v1/service.rb +0 -46
- data/lib/twilio-ruby/rest/preview.rb +13 -20
- data/lib/twilio-ruby/rest/preview/marketplace.rb +13 -13
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent.rb +16 -0
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent/intent_statistics.rb +226 -0
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +102 -50
- data/lib/twilio-ruby/rest/video.rb +9 -9
- data/lib/twilio-ruby/rest/video/v1.rb +16 -16
- data/lib/twilio-ruby/twiml/voice_response.rb +42 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/chat/v2/service/channel/message_spec.rb +1 -1
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +1 -1
- data/spec/integration/preview/understand/assistant/intent/intent_statistics_spec.rb +50 -0
- data/spec/integration/preview/understand/assistant/intent_spec.rb +8 -4
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +31 -0
- metadata +6 -37
- data/lib/twilio-ruby/rest/notify/v1/service/segment.rb +0 -225
- data/lib/twilio-ruby/rest/notify/v1/service/user.rb +0 -438
- data/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb +0 -262
- data/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb +0 -438
- data/lib/twilio-ruby/rest/preview/proxy.rb +0 -43
- data/lib/twilio-ruby/rest/preview/proxy/service.rb +0 -464
- data/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb +0 -347
- data/lib/twilio-ruby/rest/preview/proxy/service/session.rb +0 -497
- data/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb +0 -437
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +0 -514
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb +0 -455
- data/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb +0 -342
- data/spec/integration/notify/v1/service/segment_spec.rb +0 -86
- data/spec/integration/notify/v1/service/user/segment_memberships_spec.rb +0 -118
- data/spec/integration/notify/v1/service/user/user_binding_spec.rb +0 -268
- data/spec/integration/notify/v1/service/user_spec.rb +0 -213
- data/spec/integration/preview/proxy/service/phone_number_spec.rb +0 -173
- data/spec/integration/preview/proxy/service/session/interaction_spec.rb +0 -106
- data/spec/integration/preview/proxy/service/session/participant/message_interaction_spec.rb +0 -166
- data/spec/integration/preview/proxy/service/session/participant_spec.rb +0 -226
- data/spec/integration/preview/proxy/service/session_spec.rb +0 -218
- data/spec/integration/preview/proxy/service/short_code_spec.rb +0 -173
- data/spec/integration/preview/proxy/service_spec.rb +0 -202
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02849d8df876c76f3c0e29a3d4ec38493bcf5ecd
|
4
|
+
data.tar.gz: f4514adc1ef619b30c6b0c42c92613acf11d1465
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 641f98ebe268e4d053634aab266a8bd82557dd4707a8e1d1fb975a3f21d89f3e61079ce2a27a6250aedf8f446e3ecac40d78571f8171b7e43ff8021df47f2d22
|
7
|
+
data.tar.gz: b83458bd8141c8aabb1c4c8430a3d848ff154b572677462f1f581284475ee8c581a21f3defb403e2e497ac870a903dc23427103f2707f8262e9277e94ef541f3
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,26 @@
|
|
1
1
|
twilio-ruby changelog
|
2
2
|
=====================
|
3
3
|
|
4
|
+
[2018-08-03] Version 5.12.0
|
5
|
+
----------------------------
|
6
|
+
**Library**
|
7
|
+
- PR #420: Tag and push Docker latest image when deploying with TravisCI. Thanks to @jonatasbaldin!
|
8
|
+
|
9
|
+
**Chat**
|
10
|
+
- Make message From field updatable
|
11
|
+
- Add REST API webhooks
|
12
|
+
|
13
|
+
**Notify**
|
14
|
+
- Removing deprecated `segments`, `users`, `segment_memberships`, `user_bindings` classes from helper libraries. **(breaking change)**
|
15
|
+
|
16
|
+
**Preview**
|
17
|
+
- Add new Intent Statistics endpoint
|
18
|
+
- Remove `ttl` from Assistants
|
19
|
+
|
20
|
+
**Twiml**
|
21
|
+
- Add `Connect` and `Room` for Programmable Video Rooms
|
22
|
+
|
23
|
+
|
4
24
|
[2018-07-26] Version 5.11.2
|
5
25
|
----------------------------
|
6
26
|
**Library**
|
data/Makefile
CHANGED
@@ -33,8 +33,10 @@ docker-build:
|
|
33
33
|
docker build -t twilio/twilio-ruby .
|
34
34
|
docker tag twilio/twilio-ruby twilio/twilio-ruby:${TRAVIS_TAG}
|
35
35
|
docker tag twilio/twilio-ruby twilio/twilio-ruby:apidefs-${API_DEFINITIONS_SHA}
|
36
|
+
docker tag twilio/twilio-ruby twilio/twilio-ruby:latest
|
36
37
|
|
37
38
|
docker-push:
|
38
39
|
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin
|
39
40
|
docker push twilio/twilio-ruby:${TRAVIS_TAG}
|
40
41
|
docker push twilio/twilio-ruby:apidefs-${API_DEFINITIONS_SHA}
|
42
|
+
docker push twilio/twilio-ruby:latest
|
data/README.md
CHANGED
@@ -27,13 +27,13 @@ in-line code documentation here in the library.
|
|
27
27
|
To install using [Bundler][bundler] grab the latest stable version:
|
28
28
|
|
29
29
|
```ruby
|
30
|
-
gem 'twilio-ruby', '~> 5.
|
30
|
+
gem 'twilio-ruby', '~> 5.12.0'
|
31
31
|
```
|
32
32
|
|
33
33
|
To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
|
34
34
|
|
35
35
|
```bash
|
36
|
-
gem install twilio-ruby -v 5.
|
36
|
+
gem install twilio-ruby -v 5.12.0
|
37
37
|
```
|
38
38
|
|
39
39
|
To build and install the development branch yourself from the latest source:
|
@@ -73,7 +73,8 @@ module Twilio
|
|
73
73
|
# Lists ChannelInstance records from the API as a list.
|
74
74
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
75
75
|
# memory before returning.
|
76
|
-
# @param [channel.ChannelType] type The
|
76
|
+
# @param [channel.ChannelType] type The visibility of the channel - `public` or
|
77
|
+
# `private`. Defaults to `public`.
|
77
78
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
78
79
|
# guarantees to never return more than limit. Default is no limit
|
79
80
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -89,7 +90,8 @@ module Twilio
|
|
89
90
|
# Streams ChannelInstance records from the API as an Enumerable.
|
90
91
|
# This operation lazily loads records as efficiently as possible until the limit
|
91
92
|
# is reached.
|
92
|
-
# @param [channel.ChannelType] type The
|
93
|
+
# @param [channel.ChannelType] type The visibility of the channel - `public` or
|
94
|
+
# `private`. Defaults to `public`.
|
93
95
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
94
96
|
# guarantees to never return more than limit. Default is no limit.
|
95
97
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -122,7 +124,8 @@ module Twilio
|
|
122
124
|
##
|
123
125
|
# Retrieve a single page of ChannelInstance records from the API.
|
124
126
|
# Request is executed immediately.
|
125
|
-
# @param [channel.ChannelType] type The
|
127
|
+
# @param [channel.ChannelType] type The visibility of the channel - `public` or
|
128
|
+
# `private`. Defaults to `public`.
|
126
129
|
# @param [String] page_token PageToken provided by the API
|
127
130
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
128
131
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -195,8 +198,11 @@ module Twilio
|
|
195
198
|
##
|
196
199
|
# Initialize the ChannelContext
|
197
200
|
# @param [Version] version Version that contains the resource
|
198
|
-
# @param [String] service_sid
|
199
|
-
#
|
201
|
+
# @param [String] service_sid Sid of the
|
202
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) channel belongs
|
203
|
+
# to.
|
204
|
+
# @param [String] sid Key that uniquely defines the channel to fetch. Could be Sid
|
205
|
+
# or UniqueName.
|
200
206
|
# @return [ChannelContext] ChannelContext
|
201
207
|
def initialize(version, service_sid, sid)
|
202
208
|
super(version)
|
@@ -371,7 +377,8 @@ module Twilio
|
|
371
377
|
# @param [String] service_sid The unique id of the
|
372
378
|
# [Service](https://www.twilio.com/docs/chat/api/services) this channel belongs
|
373
379
|
# to.
|
374
|
-
# @param [String] sid
|
380
|
+
# @param [String] sid Key that uniquely defines the channel to fetch. Could be Sid
|
381
|
+
# or UniqueName.
|
375
382
|
# @return [ChannelInstance] ChannelInstance
|
376
383
|
def initialize(version, payload, service_sid: nil, sid: nil)
|
377
384
|
super(version)
|
@@ -223,9 +223,14 @@ module Twilio
|
|
223
223
|
##
|
224
224
|
# Initialize the MemberContext
|
225
225
|
# @param [Version] version Version that contains the resource
|
226
|
-
# @param [String] service_sid
|
227
|
-
#
|
228
|
-
#
|
226
|
+
# @param [String] service_sid Sid of the
|
227
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this member
|
228
|
+
# belongs to.
|
229
|
+
# @param [String] channel_sid Key of the
|
230
|
+
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels) this member
|
231
|
+
# belongs to. Could be Sid or UniqueName
|
232
|
+
# @param [String] sid Key that uniquely defines the member to fetch. Could be
|
233
|
+
# Member Sid or Identity
|
229
234
|
# @return [MemberContext] MemberContext
|
230
235
|
def initialize(version, service_sid, channel_sid, sid)
|
231
236
|
super(version)
|
@@ -325,7 +330,8 @@ module Twilio
|
|
325
330
|
# belongs to.
|
326
331
|
# @param [String] channel_sid The unique id of the
|
327
332
|
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels) for this member.
|
328
|
-
# @param [String] sid
|
333
|
+
# @param [String] sid Key that uniquely defines the member to fetch. Could be
|
334
|
+
# Member Sid or Identity
|
329
335
|
# @return [MemberInstance] MemberInstance
|
330
336
|
def initialize(version, payload, service_sid: nil, channel_sid: nil, sid: nil)
|
331
337
|
super(version)
|
@@ -219,9 +219,13 @@ module Twilio
|
|
219
219
|
##
|
220
220
|
# Initialize the MessageContext
|
221
221
|
# @param [Version] version Version that contains the resource
|
222
|
-
# @param [String] service_sid
|
223
|
-
#
|
224
|
-
#
|
222
|
+
# @param [String] service_sid Sid of the
|
223
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this message
|
224
|
+
# belongs to.
|
225
|
+
# @param [String] channel_sid Key of the
|
226
|
+
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels) message belongs
|
227
|
+
# to. Could be Sid or UniqueName
|
228
|
+
# @param [String] sid Key that uniquely defines the message to fetch.
|
225
229
|
# @return [MessageContext] MessageContext
|
226
230
|
def initialize(version, service_sid, channel_sid, sid)
|
227
231
|
super(version)
|
@@ -274,14 +278,18 @@ module Twilio
|
|
274
278
|
# should be set as having been last updated.
|
275
279
|
# @param [String] last_updated_by Specify the Identity of the User that last
|
276
280
|
# updated the Message (if relevant)
|
281
|
+
# @param [String] from The
|
282
|
+
# [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the
|
283
|
+
# message's author.
|
277
284
|
# @return [MessageInstance] Updated MessageInstance
|
278
|
-
def update(body: :unset, attributes: :unset, date_created: :unset, date_updated: :unset, last_updated_by: :unset)
|
285
|
+
def update(body: :unset, attributes: :unset, date_created: :unset, date_updated: :unset, last_updated_by: :unset, from: :unset)
|
279
286
|
data = Twilio::Values.of({
|
280
287
|
'Body' => body,
|
281
288
|
'Attributes' => attributes,
|
282
289
|
'DateCreated' => Twilio.serialize_iso8601_datetime(date_created),
|
283
290
|
'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated),
|
284
291
|
'LastUpdatedBy' => last_updated_by,
|
292
|
+
'From' => from,
|
285
293
|
})
|
286
294
|
|
287
295
|
payload = @version.update(
|
@@ -316,7 +324,7 @@ module Twilio
|
|
316
324
|
# [Service](https://www.twilio.com/docs/chat/api/services) this message belongs
|
317
325
|
# to.
|
318
326
|
# @param [String] channel_sid The channel_sid
|
319
|
-
# @param [String] sid
|
327
|
+
# @param [String] sid Key that uniquely defines the message to fetch.
|
320
328
|
# @return [MessageInstance] MessageInstance
|
321
329
|
def initialize(version, payload, service_sid: nil, channel_sid: nil, sid: nil)
|
322
330
|
super(version)
|
@@ -491,14 +499,18 @@ module Twilio
|
|
491
499
|
# should be set as having been last updated.
|
492
500
|
# @param [String] last_updated_by Specify the Identity of the User that last
|
493
501
|
# updated the Message (if relevant)
|
502
|
+
# @param [String] from The
|
503
|
+
# [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the
|
504
|
+
# message's author.
|
494
505
|
# @return [MessageInstance] Updated MessageInstance
|
495
|
-
def update(body: :unset, attributes: :unset, date_created: :unset, date_updated: :unset, last_updated_by: :unset)
|
506
|
+
def update(body: :unset, attributes: :unset, date_created: :unset, date_updated: :unset, last_updated_by: :unset, from: :unset)
|
496
507
|
context.update(
|
497
508
|
body: body,
|
498
509
|
attributes: attributes,
|
499
510
|
date_created: date_created,
|
500
511
|
date_updated: date_updated,
|
501
512
|
last_updated_by: last_updated_by,
|
513
|
+
from: from,
|
502
514
|
)
|
503
515
|
end
|
504
516
|
|
@@ -180,8 +180,11 @@ module Twilio
|
|
180
180
|
##
|
181
181
|
# Initialize the UserContext
|
182
182
|
# @param [Version] version Version that contains the resource
|
183
|
-
# @param [String] service_sid
|
184
|
-
#
|
183
|
+
# @param [String] service_sid Sid of the
|
184
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this user belongs
|
185
|
+
# to.
|
186
|
+
# @param [String] sid Key that uniquely defines the user to fetch. Could be Sid or
|
187
|
+
# Identity.
|
185
188
|
# @return [UserContext] UserContext
|
186
189
|
def initialize(version, service_sid, sid)
|
187
190
|
super(version)
|
@@ -297,7 +300,8 @@ module Twilio
|
|
297
300
|
# @param [String] service_sid The unique id of the
|
298
301
|
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this user belongs
|
299
302
|
# to.
|
300
|
-
# @param [String] sid
|
303
|
+
# @param [String] sid Key that uniquely defines the user to fetch. Could be Sid or
|
304
|
+
# Identity.
|
301
305
|
# @return [UserInstance] UserInstance
|
302
306
|
def initialize(version, payload, service_sid: nil, sid: nil)
|
303
307
|
super(version)
|
@@ -73,7 +73,8 @@ module Twilio
|
|
73
73
|
# Lists ChannelInstance records from the API as a list.
|
74
74
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
75
75
|
# memory before returning.
|
76
|
-
# @param [channel.ChannelType] type The
|
76
|
+
# @param [channel.ChannelType] type The visibility of the channel - `public` or
|
77
|
+
# `private`. Defaults to `public`.
|
77
78
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
78
79
|
# guarantees to never return more than limit. Default is no limit
|
79
80
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -89,7 +90,8 @@ module Twilio
|
|
89
90
|
# Streams ChannelInstance records from the API as an Enumerable.
|
90
91
|
# This operation lazily loads records as efficiently as possible until the limit
|
91
92
|
# is reached.
|
92
|
-
# @param [channel.ChannelType] type The
|
93
|
+
# @param [channel.ChannelType] type The visibility of the channel - `public` or
|
94
|
+
# `private`. Defaults to `public`.
|
93
95
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
94
96
|
# guarantees to never return more than limit. Default is no limit.
|
95
97
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -122,7 +124,8 @@ module Twilio
|
|
122
124
|
##
|
123
125
|
# Retrieve a single page of ChannelInstance records from the API.
|
124
126
|
# Request is executed immediately.
|
125
|
-
# @param [channel.ChannelType] type The
|
127
|
+
# @param [channel.ChannelType] type The visibility of the channel - `public` or
|
128
|
+
# `private`. Defaults to `public`.
|
126
129
|
# @param [String] page_token PageToken provided by the API
|
127
130
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
128
131
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -195,8 +198,11 @@ module Twilio
|
|
195
198
|
##
|
196
199
|
# Initialize the ChannelContext
|
197
200
|
# @param [Version] version Version that contains the resource
|
198
|
-
# @param [String] service_sid
|
199
|
-
#
|
201
|
+
# @param [String] service_sid Sid of the
|
202
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) channel belongs
|
203
|
+
# to.
|
204
|
+
# @param [String] sid Key that uniquely defines the channel to fetch. Could be Sid
|
205
|
+
# or UniqueName.
|
200
206
|
# @return [ChannelContext] ChannelContext
|
201
207
|
def initialize(version, service_sid, sid)
|
202
208
|
super(version)
|
@@ -371,7 +377,8 @@ module Twilio
|
|
371
377
|
# @param [String] service_sid The unique id of the
|
372
378
|
# [Service](https://www.twilio.com/docs/chat/api/services) this channel belongs
|
373
379
|
# to.
|
374
|
-
# @param [String] sid
|
380
|
+
# @param [String] sid Key that uniquely defines the channel to fetch. Could be Sid
|
381
|
+
# or UniqueName.
|
375
382
|
# @return [ChannelInstance] ChannelInstance
|
376
383
|
def initialize(version, payload, service_sid: nil, sid: nil)
|
377
384
|
super(version)
|
@@ -223,9 +223,14 @@ module Twilio
|
|
223
223
|
##
|
224
224
|
# Initialize the MemberContext
|
225
225
|
# @param [Version] version Version that contains the resource
|
226
|
-
# @param [String] service_sid
|
227
|
-
#
|
228
|
-
#
|
226
|
+
# @param [String] service_sid Sid of the
|
227
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this member
|
228
|
+
# belongs to.
|
229
|
+
# @param [String] channel_sid Key of the
|
230
|
+
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels) this member
|
231
|
+
# belongs to. Could be Sid or UniqueName
|
232
|
+
# @param [String] sid Key that uniquely defines the member to fetch. Could be
|
233
|
+
# Member Sid or Identity
|
229
234
|
# @return [MemberContext] MemberContext
|
230
235
|
def initialize(version, service_sid, channel_sid, sid)
|
231
236
|
super(version)
|
@@ -325,7 +330,8 @@ module Twilio
|
|
325
330
|
# belongs to.
|
326
331
|
# @param [String] channel_sid The unique id of the
|
327
332
|
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels) for this member.
|
328
|
-
# @param [String] sid
|
333
|
+
# @param [String] sid Key that uniquely defines the member to fetch. Could be
|
334
|
+
# Member Sid or Identity
|
329
335
|
# @return [MemberInstance] MemberInstance
|
330
336
|
def initialize(version, payload, service_sid: nil, channel_sid: nil, sid: nil)
|
331
337
|
super(version)
|
@@ -219,9 +219,13 @@ module Twilio
|
|
219
219
|
##
|
220
220
|
# Initialize the MessageContext
|
221
221
|
# @param [Version] version Version that contains the resource
|
222
|
-
# @param [String] service_sid
|
223
|
-
#
|
224
|
-
#
|
222
|
+
# @param [String] service_sid Sid of the
|
223
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this message
|
224
|
+
# belongs to.
|
225
|
+
# @param [String] channel_sid Key of the
|
226
|
+
# [Channel](https://www.twilio.com/docs/api/chat/rest/channels) message belongs
|
227
|
+
# to. Could be Sid or UniqueName
|
228
|
+
# @param [String] sid Key that uniquely defines the message to fetch.
|
225
229
|
# @return [MessageContext] MessageContext
|
226
230
|
def initialize(version, service_sid, channel_sid, sid)
|
227
231
|
super(version)
|
@@ -274,14 +278,18 @@ module Twilio
|
|
274
278
|
# should be set as having been last updated.
|
275
279
|
# @param [String] last_updated_by Specify the Identity of the User that last
|
276
280
|
# updated the Message (if relevant)
|
281
|
+
# @param [String] from The
|
282
|
+
# [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the
|
283
|
+
# message's author.
|
277
284
|
# @return [MessageInstance] Updated MessageInstance
|
278
|
-
def update(body: :unset, attributes: :unset, date_created: :unset, date_updated: :unset, last_updated_by: :unset)
|
285
|
+
def update(body: :unset, attributes: :unset, date_created: :unset, date_updated: :unset, last_updated_by: :unset, from: :unset)
|
279
286
|
data = Twilio::Values.of({
|
280
287
|
'Body' => body,
|
281
288
|
'Attributes' => attributes,
|
282
289
|
'DateCreated' => Twilio.serialize_iso8601_datetime(date_created),
|
283
290
|
'DateUpdated' => Twilio.serialize_iso8601_datetime(date_updated),
|
284
291
|
'LastUpdatedBy' => last_updated_by,
|
292
|
+
'From' => from,
|
285
293
|
})
|
286
294
|
|
287
295
|
payload = @version.update(
|
@@ -316,7 +324,7 @@ module Twilio
|
|
316
324
|
# [Service](https://www.twilio.com/docs/chat/api/services) this message belongs
|
317
325
|
# to.
|
318
326
|
# @param [String] channel_sid The channel_sid
|
319
|
-
# @param [String] sid
|
327
|
+
# @param [String] sid Key that uniquely defines the message to fetch.
|
320
328
|
# @return [MessageInstance] MessageInstance
|
321
329
|
def initialize(version, payload, service_sid: nil, channel_sid: nil, sid: nil)
|
322
330
|
super(version)
|
@@ -491,14 +499,18 @@ module Twilio
|
|
491
499
|
# should be set as having been last updated.
|
492
500
|
# @param [String] last_updated_by Specify the Identity of the User that last
|
493
501
|
# updated the Message (if relevant)
|
502
|
+
# @param [String] from The
|
503
|
+
# [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the
|
504
|
+
# message's author.
|
494
505
|
# @return [MessageInstance] Updated MessageInstance
|
495
|
-
def update(body: :unset, attributes: :unset, date_created: :unset, date_updated: :unset, last_updated_by: :unset)
|
506
|
+
def update(body: :unset, attributes: :unset, date_created: :unset, date_updated: :unset, last_updated_by: :unset, from: :unset)
|
496
507
|
context.update(
|
497
508
|
body: body,
|
498
509
|
attributes: attributes,
|
499
510
|
date_created: date_created,
|
500
511
|
date_updated: date_updated,
|
501
512
|
last_updated_by: last_updated_by,
|
513
|
+
from: from,
|
502
514
|
)
|
503
515
|
end
|
504
516
|
|
@@ -180,8 +180,11 @@ module Twilio
|
|
180
180
|
##
|
181
181
|
# Initialize the UserContext
|
182
182
|
# @param [Version] version Version that contains the resource
|
183
|
-
# @param [String] service_sid
|
184
|
-
#
|
183
|
+
# @param [String] service_sid Sid of the
|
184
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this user belongs
|
185
|
+
# to.
|
186
|
+
# @param [String] sid Key that uniquely defines the user to fetch. Could be Sid or
|
187
|
+
# Identity.
|
185
188
|
# @return [UserContext] UserContext
|
186
189
|
def initialize(version, service_sid, sid)
|
187
190
|
super(version)
|
@@ -297,7 +300,8 @@ module Twilio
|
|
297
300
|
# @param [String] service_sid The unique id of the
|
298
301
|
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this user belongs
|
299
302
|
# to.
|
300
|
-
# @param [String] sid
|
303
|
+
# @param [String] sid Key that uniquely defines the user to fetch. Could be Sid or
|
304
|
+
# Identity.
|
301
305
|
# @return [UserInstance] UserInstance
|
302
306
|
def initialize(version, payload, service_sid: nil, sid: nil)
|
303
307
|
super(version)
|
@@ -228,8 +228,6 @@ module Twilio
|
|
228
228
|
# Dependents
|
229
229
|
@bindings = nil
|
230
230
|
@notifications = nil
|
231
|
-
@users = nil
|
232
|
-
@segments = nil
|
233
231
|
end
|
234
232
|
|
235
233
|
##
|
@@ -339,36 +337,6 @@ module Twilio
|
|
339
337
|
@notifications
|
340
338
|
end
|
341
339
|
|
342
|
-
##
|
343
|
-
# Access the users
|
344
|
-
# @return [UserList]
|
345
|
-
# @return [UserContext] if identity was passed.
|
346
|
-
def users(identity=:unset)
|
347
|
-
raise ArgumentError, 'identity cannot be nil' if identity.nil?
|
348
|
-
|
349
|
-
if identity != :unset
|
350
|
-
return UserContext.new(@version, @solution[:sid], identity, )
|
351
|
-
end
|
352
|
-
|
353
|
-
unless @users
|
354
|
-
@users = UserList.new(@version, service_sid: @solution[:sid], )
|
355
|
-
end
|
356
|
-
|
357
|
-
@users
|
358
|
-
end
|
359
|
-
|
360
|
-
##
|
361
|
-
# Access the segments
|
362
|
-
# @return [SegmentList]
|
363
|
-
# @return [SegmentContext]
|
364
|
-
def segments
|
365
|
-
unless @segments
|
366
|
-
@segments = SegmentList.new(@version, service_sid: @solution[:sid], )
|
367
|
-
end
|
368
|
-
|
369
|
-
@segments
|
370
|
-
end
|
371
|
-
|
372
340
|
##
|
373
341
|
# Provide a user friendly representation
|
374
342
|
def to_s
|
@@ -610,20 +578,6 @@ module Twilio
|
|
610
578
|
context.notifications
|
611
579
|
end
|
612
580
|
|
613
|
-
##
|
614
|
-
# Access the users
|
615
|
-
# @return [users] users
|
616
|
-
def users
|
617
|
-
context.users
|
618
|
-
end
|
619
|
-
|
620
|
-
##
|
621
|
-
# Access the segments
|
622
|
-
# @return [segments] segments
|
623
|
-
def segments
|
624
|
-
context.segments
|
625
|
-
end
|
626
|
-
|
627
581
|
##
|
628
582
|
# Provide a user friendly representation
|
629
583
|
def to_s
|