twilio-ruby 5.10.0 → 5.10.1
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 +11 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +4 -2
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +9 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +9 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +9 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +9 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +9 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +9 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +9 -3
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +9 -3
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +69 -29
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +21 -17
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +13 -9
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +69 -29
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +21 -17
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +13 -9
- data/lib/twilio-ruby/rest/notify/v1/service/user.rb +21 -9
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +4 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +13 -9
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +28 -12
- data/lib/twilio-ruby/rest/video/v1/composition.rb +36 -28
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +22 -17
- data/lib/twilio-ruby/rest/video/v1.rb +2 -1
- data/lib/twilio-ruby/rest/video.rb +2 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +9 -9
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +15 -15
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +15 -15
- data/spec/integration/trunking/v1/trunk_spec.rb +32 -28
- metadata +2 -2
@@ -42,6 +42,7 @@ module Twilio
|
|
42
42
|
# date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
|
43
43
|
# also specify offsets to today. For example, `EndDate=+30days` will make
|
44
44
|
# `EndDate` be 30 days from today.
|
45
|
+
# @param [Boolean] include_subaccounts The include_subaccounts
|
45
46
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
46
47
|
# guarantees to never return more than limit. Default is no limit
|
47
48
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -49,11 +50,12 @@ module Twilio
|
|
49
50
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
50
51
|
# efficient page size, i.e. min(limit, 1000)
|
51
52
|
# @return [Array] Array of up to limit results
|
52
|
-
def list(category: :unset, start_date: :unset, end_date: :unset, limit: nil, page_size: nil)
|
53
|
+
def list(category: :unset, start_date: :unset, end_date: :unset, include_subaccounts: :unset, limit: nil, page_size: nil)
|
53
54
|
self.stream(
|
54
55
|
category: category,
|
55
56
|
start_date: start_date,
|
56
57
|
end_date: end_date,
|
58
|
+
include_subaccounts: include_subaccounts,
|
57
59
|
limit: limit,
|
58
60
|
page_size: page_size
|
59
61
|
).entries
|
@@ -73,6 +75,7 @@ module Twilio
|
|
73
75
|
# date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
|
74
76
|
# also specify offsets to today. For example, `EndDate=+30days` will make
|
75
77
|
# `EndDate` be 30 days from today.
|
78
|
+
# @param [Boolean] include_subaccounts The include_subaccounts
|
76
79
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
77
80
|
# guarantees to never return more than limit. Default is no limit.
|
78
81
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -80,13 +83,14 @@ module Twilio
|
|
80
83
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
81
84
|
# efficient page size, i.e. min(limit, 1000)
|
82
85
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
83
|
-
def stream(category: :unset, start_date: :unset, end_date: :unset, limit: nil, page_size: nil)
|
86
|
+
def stream(category: :unset, start_date: :unset, end_date: :unset, include_subaccounts: :unset, limit: nil, page_size: nil)
|
84
87
|
limits = @version.read_limits(limit, page_size)
|
85
88
|
|
86
89
|
page = self.page(
|
87
90
|
category: category,
|
88
91
|
start_date: start_date,
|
89
92
|
end_date: end_date,
|
93
|
+
include_subaccounts: include_subaccounts,
|
90
94
|
page_size: limits[:page_size],
|
91
95
|
)
|
92
96
|
|
@@ -120,15 +124,17 @@ module Twilio
|
|
120
124
|
# date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
|
121
125
|
# also specify offsets to today. For example, `EndDate=+30days` will make
|
122
126
|
# `EndDate` be 30 days from today.
|
127
|
+
# @param [Boolean] include_subaccounts The include_subaccounts
|
123
128
|
# @param [String] page_token PageToken provided by the API
|
124
129
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
125
130
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
126
131
|
# @return [Page] Page of YearlyInstance
|
127
|
-
def page(category: :unset, start_date: :unset, end_date: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
132
|
+
def page(category: :unset, start_date: :unset, end_date: :unset, include_subaccounts: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
128
133
|
params = Twilio::Values.of({
|
129
134
|
'Category' => category,
|
130
135
|
'StartDate' => Twilio.serialize_iso8601_date(start_date),
|
131
136
|
'EndDate' => Twilio.serialize_iso8601_date(end_date),
|
137
|
+
'IncludeSubaccounts' => include_subaccounts,
|
132
138
|
'PageToken' => page_token,
|
133
139
|
'Page' => page_number,
|
134
140
|
'PageSize' => page_size,
|
@@ -42,6 +42,7 @@ module Twilio
|
|
42
42
|
# date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
|
43
43
|
# also specify offsets to today. For example, `EndDate=+30days` will make
|
44
44
|
# `EndDate` be 30 days from today.
|
45
|
+
# @param [Boolean] include_subaccounts The include_subaccounts
|
45
46
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
46
47
|
# guarantees to never return more than limit. Default is no limit
|
47
48
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -49,11 +50,12 @@ module Twilio
|
|
49
50
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
50
51
|
# efficient page size, i.e. min(limit, 1000)
|
51
52
|
# @return [Array] Array of up to limit results
|
52
|
-
def list(category: :unset, start_date: :unset, end_date: :unset, limit: nil, page_size: nil)
|
53
|
+
def list(category: :unset, start_date: :unset, end_date: :unset, include_subaccounts: :unset, limit: nil, page_size: nil)
|
53
54
|
self.stream(
|
54
55
|
category: category,
|
55
56
|
start_date: start_date,
|
56
57
|
end_date: end_date,
|
58
|
+
include_subaccounts: include_subaccounts,
|
57
59
|
limit: limit,
|
58
60
|
page_size: page_size
|
59
61
|
).entries
|
@@ -73,6 +75,7 @@ module Twilio
|
|
73
75
|
# date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
|
74
76
|
# also specify offsets to today. For example, `EndDate=+30days` will make
|
75
77
|
# `EndDate` be 30 days from today.
|
78
|
+
# @param [Boolean] include_subaccounts The include_subaccounts
|
76
79
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
77
80
|
# guarantees to never return more than limit. Default is no limit.
|
78
81
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -80,13 +83,14 @@ module Twilio
|
|
80
83
|
# but a limit is defined, stream() will attempt to read the limit with the most
|
81
84
|
# efficient page size, i.e. min(limit, 1000)
|
82
85
|
# @return [Enumerable] Enumerable that will yield up to limit results
|
83
|
-
def stream(category: :unset, start_date: :unset, end_date: :unset, limit: nil, page_size: nil)
|
86
|
+
def stream(category: :unset, start_date: :unset, end_date: :unset, include_subaccounts: :unset, limit: nil, page_size: nil)
|
84
87
|
limits = @version.read_limits(limit, page_size)
|
85
88
|
|
86
89
|
page = self.page(
|
87
90
|
category: category,
|
88
91
|
start_date: start_date,
|
89
92
|
end_date: end_date,
|
93
|
+
include_subaccounts: include_subaccounts,
|
90
94
|
page_size: limits[:page_size],
|
91
95
|
)
|
92
96
|
|
@@ -120,15 +124,17 @@ module Twilio
|
|
120
124
|
# date. Format is YYYY-MM-DD. All dates are in GMT. As a convenience, you can
|
121
125
|
# also specify offsets to today. For example, `EndDate=+30days` will make
|
122
126
|
# `EndDate` be 30 days from today.
|
127
|
+
# @param [Boolean] include_subaccounts The include_subaccounts
|
123
128
|
# @param [String] page_token PageToken provided by the API
|
124
129
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
125
130
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
126
131
|
# @return [Page] Page of YesterdayInstance
|
127
|
-
def page(category: :unset, start_date: :unset, end_date: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
132
|
+
def page(category: :unset, start_date: :unset, end_date: :unset, include_subaccounts: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
128
133
|
params = Twilio::Values.of({
|
129
134
|
'Category' => category,
|
130
135
|
'StartDate' => Twilio.serialize_iso8601_date(start_date),
|
131
136
|
'EndDate' => Twilio.serialize_iso8601_date(end_date),
|
137
|
+
'IncludeSubaccounts' => include_subaccounts,
|
132
138
|
'PageToken' => page_token,
|
133
139
|
'Page' => page_number,
|
134
140
|
'PageSize' => page_size,
|
@@ -33,12 +33,28 @@ 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
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
# @param [
|
36
|
+
# @param [String] identity A unique string identifier for this
|
37
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/users) in this
|
38
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services). See the [access
|
39
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) docs for more
|
40
|
+
# details.
|
41
|
+
# @param [String] role_sid The role to be assigned to this member. Defaults to the
|
42
|
+
# roles specified on the [Service](https://www.twilio.com/docs/chat/api/services).
|
43
|
+
# @param [String] last_consumed_message_index Field used to specify the last
|
44
|
+
# consumed Message index for the Channel for this Member. Should only be used
|
45
|
+
# when recreating a Member from a backup/separate source.
|
46
|
+
# @param [Time] last_consumption_timestamp ISO8601 time indicating the last
|
47
|
+
# datetime the Member consumed a Message in the Channel. Should only be used when
|
48
|
+
# recreating a Member from a backup/separate source
|
49
|
+
# @param [Time] date_created The ISO8601 time specifying the datetime the Members
|
50
|
+
# should be set as being created. Will be set to the current time by the Chat
|
51
|
+
# service if not specified. Note that this should only be used in cases where a
|
52
|
+
# Member is being recreated from a backup/separate source
|
53
|
+
# @param [Time] date_updated The ISO8601 time specifying the datetime the Member
|
54
|
+
# should be set as having been last updated. Will be set to the `null` by the
|
55
|
+
# Chat service if not specified. Note that this should only be used in cases
|
56
|
+
# where a Member is being recreated from a backup/separate source and where a
|
57
|
+
# Member was previously updated.
|
42
58
|
# @return [MemberInstance] Newly created MemberInstance
|
43
59
|
def create(identity: nil, role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset)
|
44
60
|
data = Twilio::Values.of({
|
@@ -68,7 +84,11 @@ module Twilio
|
|
68
84
|
# Lists MemberInstance records from the API as a list.
|
69
85
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
70
86
|
# memory before returning.
|
71
|
-
# @param [String] identity
|
87
|
+
# @param [String] identity A unique string identifier for this
|
88
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/users) in this
|
89
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services). See the [access
|
90
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) docs for more
|
91
|
+
# details.
|
72
92
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
73
93
|
# guarantees to never return more than limit. Default is no limit
|
74
94
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -84,7 +104,11 @@ module Twilio
|
|
84
104
|
# Streams MemberInstance records from the API as an Enumerable.
|
85
105
|
# This operation lazily loads records as efficiently as possible until the limit
|
86
106
|
# is reached.
|
87
|
-
# @param [String] identity
|
107
|
+
# @param [String] identity A unique string identifier for this
|
108
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/users) in this
|
109
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services). See the [access
|
110
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) docs for more
|
111
|
+
# details.
|
88
112
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
89
113
|
# guarantees to never return more than limit. Default is no limit.
|
90
114
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -117,7 +141,11 @@ module Twilio
|
|
117
141
|
##
|
118
142
|
# Retrieve a single page of MemberInstance records from the API.
|
119
143
|
# Request is executed immediately.
|
120
|
-
# @param [String] identity
|
144
|
+
# @param [String] identity A unique string identifier for this
|
145
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/users) in this
|
146
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services). See the [access
|
147
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) docs for more
|
148
|
+
# details.
|
121
149
|
# @param [String] page_token PageToken provided by the API
|
122
150
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
123
151
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -238,16 +266,22 @@ module Twilio
|
|
238
266
|
##
|
239
267
|
# Update the MemberInstance
|
240
268
|
# @param [String] role_sid The role to be assigned to this member. Defaults to the
|
241
|
-
# roles specified on the
|
242
|
-
#
|
243
|
-
#
|
244
|
-
#
|
245
|
-
# @param [Time] last_consumption_timestamp
|
246
|
-
#
|
247
|
-
#
|
248
|
-
#
|
249
|
-
#
|
250
|
-
#
|
269
|
+
# roles specified on the [Service](https://www.twilio.com/docs/chat/api/services).
|
270
|
+
# @param [String] last_consumed_message_index Field used to specify the last
|
271
|
+
# consumed Message index for the Channel for this Member. Should only be used
|
272
|
+
# when recreating a Member from a backup/separate source.
|
273
|
+
# @param [Time] last_consumption_timestamp ISO8601 time indicating the last
|
274
|
+
# datetime the Member consumed a Message in the Channel. Should only be used when
|
275
|
+
# recreating a Member from a backup/separate source
|
276
|
+
# @param [Time] date_created The ISO8601 time specifying the datetime the Members
|
277
|
+
# should be set as being created. Will be set to the current time by the Chat
|
278
|
+
# service if not specified. Note that this should only be used in cases where a
|
279
|
+
# Member is being recreated from a backup/separate source
|
280
|
+
# @param [Time] date_updated The ISO8601 time specifying the datetime the Member
|
281
|
+
# should be set as having been last updated. Will be set to the `null` by the
|
282
|
+
# Chat service if not specified. Note that this should only be used in cases
|
283
|
+
# where a Member is being recreated from a backup/separate source and where a
|
284
|
+
# Member was previously updated.
|
251
285
|
# @return [MemberInstance] Updated MemberInstance
|
252
286
|
def update(role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset)
|
253
287
|
data = Twilio::Values.of({
|
@@ -419,16 +453,22 @@ module Twilio
|
|
419
453
|
##
|
420
454
|
# Update the MemberInstance
|
421
455
|
# @param [String] role_sid The role to be assigned to this member. Defaults to the
|
422
|
-
# roles specified on the
|
423
|
-
#
|
424
|
-
#
|
425
|
-
#
|
426
|
-
# @param [Time] last_consumption_timestamp
|
427
|
-
#
|
428
|
-
#
|
429
|
-
#
|
430
|
-
#
|
431
|
-
#
|
456
|
+
# roles specified on the [Service](https://www.twilio.com/docs/chat/api/services).
|
457
|
+
# @param [String] last_consumed_message_index Field used to specify the last
|
458
|
+
# consumed Message index for the Channel for this Member. Should only be used
|
459
|
+
# when recreating a Member from a backup/separate source.
|
460
|
+
# @param [Time] last_consumption_timestamp ISO8601 time indicating the last
|
461
|
+
# datetime the Member consumed a Message in the Channel. Should only be used when
|
462
|
+
# recreating a Member from a backup/separate source
|
463
|
+
# @param [Time] date_created The ISO8601 time specifying the datetime the Members
|
464
|
+
# should be set as being created. Will be set to the current time by the Chat
|
465
|
+
# service if not specified. Note that this should only be used in cases where a
|
466
|
+
# Member is being recreated from a backup/separate source
|
467
|
+
# @param [Time] date_updated The ISO8601 time specifying the datetime the Member
|
468
|
+
# should be set as having been last updated. Will be set to the `null` by the
|
469
|
+
# Chat service if not specified. Note that this should only be used in cases
|
470
|
+
# where a Member is being recreated from a backup/separate source and where a
|
471
|
+
# Member was previously updated.
|
432
472
|
# @return [MemberInstance] Updated MemberInstance
|
433
473
|
def update(role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset)
|
434
474
|
context.update(
|
@@ -17,8 +17,8 @@ module Twilio
|
|
17
17
|
# Initialize the MessageList
|
18
18
|
# @param [Version] version Version that contains the resource
|
19
19
|
# @param [String] service_sid The unique id of the
|
20
|
-
# [Service](https://www.twilio.com/docs/
|
21
|
-
#
|
20
|
+
# [Service](https://www.twilio.com/docs/chat/api/services) this message belongs
|
21
|
+
# to.
|
22
22
|
# @param [String] channel_sid The channel_sid
|
23
23
|
# @return [MessageList] MessageList
|
24
24
|
def initialize(version, service_sid: nil, channel_sid: nil)
|
@@ -34,9 +34,11 @@ module Twilio
|
|
34
34
|
# Request is executed immediately.
|
35
35
|
# @param [String] from The
|
36
36
|
# [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the
|
37
|
-
# message's author. Defaults to `system
|
38
|
-
# @param [String] attributes
|
39
|
-
# wish.
|
37
|
+
# message's author. Defaults to `system`.
|
38
|
+
# @param [String] attributes An string metadata field you can use to store any
|
39
|
+
# data you wish. The string value must contain structurally valid JSON if
|
40
|
+
# specified. **Note** that this will always be null for resources returned via
|
41
|
+
# LIST GET operations, but will be present for single GET operations.
|
40
42
|
# @param [Time] date_created The ISO8601 time specifying the datetime the Message
|
41
43
|
# should be set as being created. Will be set to the current time by the Chat
|
42
44
|
# service if not specified. Note that this should only be used in cases where a
|
@@ -262,9 +264,10 @@ module Twilio
|
|
262
264
|
# @param [String] body The message body string. You can also send structured data
|
263
265
|
# by serializing it into a string. May be updated to empty string or `null`, will
|
264
266
|
# be set as empty string as a result in this cases.
|
265
|
-
# @param [String] attributes
|
266
|
-
#
|
267
|
-
#
|
267
|
+
# @param [String] attributes A string metadata field you can use to store any data
|
268
|
+
# you wish. The string value must contain structurally valid JSON if specified.
|
269
|
+
# **Note** that this will always be null for resources returned via LIST GET
|
270
|
+
# operations, but will be present for single GET operations.
|
268
271
|
# @param [Time] date_created The ISO8601 time specifying the datetime the Message
|
269
272
|
# should be set as being created.
|
270
273
|
# @param [Time] date_updated The ISO8601 time specifying the datetime the Message
|
@@ -310,8 +313,8 @@ module Twilio
|
|
310
313
|
# @param [Version] version Version that contains the resource
|
311
314
|
# @param [Hash] payload payload that contains response from Twilio
|
312
315
|
# @param [String] service_sid The unique id of the
|
313
|
-
# [Service](https://www.twilio.com/docs/
|
314
|
-
#
|
316
|
+
# [Service](https://www.twilio.com/docs/chat/api/services) this message belongs
|
317
|
+
# to.
|
315
318
|
# @param [String] channel_sid The channel_sid
|
316
319
|
# @param [String] sid The sid
|
317
320
|
# @return [MessageInstance] MessageInstance
|
@@ -376,7 +379,7 @@ module Twilio
|
|
376
379
|
end
|
377
380
|
|
378
381
|
##
|
379
|
-
# @return [String]
|
382
|
+
# @return [String] A string metadata field you can use to store any data you wish.
|
380
383
|
def attributes
|
381
384
|
@properties['attributes']
|
382
385
|
end
|
@@ -412,7 +415,7 @@ module Twilio
|
|
412
415
|
end
|
413
416
|
|
414
417
|
##
|
415
|
-
# @return [String]
|
418
|
+
# @return [String] Field to specify the Identity of the User that last updated the Message
|
416
419
|
def last_updated_by
|
417
420
|
@properties['last_updated_by']
|
418
421
|
end
|
@@ -430,7 +433,7 @@ module Twilio
|
|
430
433
|
end
|
431
434
|
|
432
435
|
##
|
433
|
-
# @return [String]
|
436
|
+
# @return [String] The contents of the message.
|
434
437
|
def body
|
435
438
|
@properties['body']
|
436
439
|
end
|
@@ -448,7 +451,7 @@ module Twilio
|
|
448
451
|
end
|
449
452
|
|
450
453
|
##
|
451
|
-
# @return [Hash]
|
454
|
+
# @return [Hash] If a Media resource instance is attached to the Message, this will contain the Media object for the attached Media.
|
452
455
|
def media
|
453
456
|
@properties['media']
|
454
457
|
end
|
@@ -478,9 +481,10 @@ module Twilio
|
|
478
481
|
# @param [String] body The message body string. You can also send structured data
|
479
482
|
# by serializing it into a string. May be updated to empty string or `null`, will
|
480
483
|
# be set as empty string as a result in this cases.
|
481
|
-
# @param [String] attributes
|
482
|
-
#
|
483
|
-
#
|
484
|
+
# @param [String] attributes A string metadata field you can use to store any data
|
485
|
+
# you wish. The string value must contain structurally valid JSON if specified.
|
486
|
+
# **Note** that this will always be null for resources returned via LIST GET
|
487
|
+
# operations, but will be present for single GET operations.
|
484
488
|
# @param [Time] date_created The ISO8601 time specifying the datetime the Message
|
485
489
|
# should be set as being created.
|
486
490
|
# @param [Time] date_updated The ISO8601 time specifying the datetime the Message
|
@@ -16,7 +16,9 @@ module Twilio
|
|
16
16
|
##
|
17
17
|
# Initialize the UserChannelList
|
18
18
|
# @param [Version] version Version that contains the resource
|
19
|
-
# @param [String] service_sid The
|
19
|
+
# @param [String] service_sid The unique id of the
|
20
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this channel
|
21
|
+
# belongs to.
|
20
22
|
# @param [String] user_sid A 34 character string that uniquely identifies this
|
21
23
|
# resource.
|
22
24
|
# @return [UserChannelList] UserChannelList
|
@@ -156,7 +158,9 @@ module Twilio
|
|
156
158
|
# Initialize the UserChannelInstance
|
157
159
|
# @param [Version] version Version that contains the resource
|
158
160
|
# @param [Hash] payload payload that contains response from Twilio
|
159
|
-
# @param [String] service_sid The
|
161
|
+
# @param [String] service_sid The unique id of the
|
162
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services) this channel
|
163
|
+
# belongs to.
|
160
164
|
# @param [String] user_sid A 34 character string that uniquely identifies this
|
161
165
|
# resource.
|
162
166
|
# @return [UserChannelInstance] UserChannelInstance
|
@@ -177,43 +181,43 @@ module Twilio
|
|
177
181
|
end
|
178
182
|
|
179
183
|
##
|
180
|
-
# @return [String] The
|
184
|
+
# @return [String] The unique id of the Account responsible for this channel.
|
181
185
|
def account_sid
|
182
186
|
@properties['account_sid']
|
183
187
|
end
|
184
188
|
|
185
189
|
##
|
186
|
-
# @return [String] The
|
190
|
+
# @return [String] The unique id of the Service this channel belongs to.
|
187
191
|
def service_sid
|
188
192
|
@properties['service_sid']
|
189
193
|
end
|
190
194
|
|
191
195
|
##
|
192
|
-
# @return [String] The
|
196
|
+
# @return [String] The unique id of a Channel.
|
193
197
|
def channel_sid
|
194
198
|
@properties['channel_sid']
|
195
199
|
end
|
196
200
|
|
197
201
|
##
|
198
|
-
# @return [String] The
|
202
|
+
# @return [String] The unique id of this User as a Member in this Channel.
|
199
203
|
def member_sid
|
200
204
|
@properties['member_sid']
|
201
205
|
end
|
202
206
|
|
203
207
|
##
|
204
|
-
# @return [user_channel.ChannelStatus] The status
|
208
|
+
# @return [user_channel.ChannelStatus] The status of the User on this Channel.
|
205
209
|
def status
|
206
210
|
@properties['status']
|
207
211
|
end
|
208
212
|
|
209
213
|
##
|
210
|
-
# @return [String] The
|
214
|
+
# @return [String] The index of the last read Message in this Channel for this User.
|
211
215
|
def last_consumed_message_index
|
212
216
|
@properties['last_consumed_message_index']
|
213
217
|
end
|
214
218
|
|
215
219
|
##
|
216
|
-
# @return [String] The
|
220
|
+
# @return [String] The count of unread Messages in this Channel for this User.
|
217
221
|
def unread_messages_count
|
218
222
|
@properties['unread_messages_count']
|
219
223
|
end
|
@@ -33,12 +33,28 @@ 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
|
-
#
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
# @param [
|
36
|
+
# @param [String] identity A unique string identifier for this
|
37
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/users) in this
|
38
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services). See the [access
|
39
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) docs for more
|
40
|
+
# details.
|
41
|
+
# @param [String] role_sid The role to be assigned to this member. Defaults to the
|
42
|
+
# roles specified on the [Service](https://www.twilio.com/docs/chat/api/services).
|
43
|
+
# @param [String] last_consumed_message_index Field used to specify the last
|
44
|
+
# consumed Message index for the Channel for this Member. Should only be used
|
45
|
+
# when recreating a Member from a backup/separate source.
|
46
|
+
# @param [Time] last_consumption_timestamp ISO8601 time indicating the last
|
47
|
+
# datetime the Member consumed a Message in the Channel. Should only be used when
|
48
|
+
# recreating a Member from a backup/separate source
|
49
|
+
# @param [Time] date_created The ISO8601 time specifying the datetime the Members
|
50
|
+
# should be set as being created. Will be set to the current time by the Chat
|
51
|
+
# service if not specified. Note that this should only be used in cases where a
|
52
|
+
# Member is being recreated from a backup/separate source
|
53
|
+
# @param [Time] date_updated The ISO8601 time specifying the datetime the Member
|
54
|
+
# should be set as having been last updated. Will be set to the `null` by the
|
55
|
+
# Chat service if not specified. Note that this should only be used in cases
|
56
|
+
# where a Member is being recreated from a backup/separate source and where a
|
57
|
+
# Member was previously updated.
|
42
58
|
# @return [MemberInstance] Newly created MemberInstance
|
43
59
|
def create(identity: nil, role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset)
|
44
60
|
data = Twilio::Values.of({
|
@@ -68,7 +84,11 @@ module Twilio
|
|
68
84
|
# Lists MemberInstance records from the API as a list.
|
69
85
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
70
86
|
# memory before returning.
|
71
|
-
# @param [String] identity
|
87
|
+
# @param [String] identity A unique string identifier for this
|
88
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/users) in this
|
89
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services). See the [access
|
90
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) docs for more
|
91
|
+
# details.
|
72
92
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
73
93
|
# guarantees to never return more than limit. Default is no limit
|
74
94
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -84,7 +104,11 @@ module Twilio
|
|
84
104
|
# Streams MemberInstance records from the API as an Enumerable.
|
85
105
|
# This operation lazily loads records as efficiently as possible until the limit
|
86
106
|
# is reached.
|
87
|
-
# @param [String] identity
|
107
|
+
# @param [String] identity A unique string identifier for this
|
108
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/users) in this
|
109
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services). See the [access
|
110
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) docs for more
|
111
|
+
# details.
|
88
112
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
89
113
|
# guarantees to never return more than limit. Default is no limit.
|
90
114
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -117,7 +141,11 @@ module Twilio
|
|
117
141
|
##
|
118
142
|
# Retrieve a single page of MemberInstance records from the API.
|
119
143
|
# Request is executed immediately.
|
120
|
-
# @param [String] identity
|
144
|
+
# @param [String] identity A unique string identifier for this
|
145
|
+
# [User](https://www.twilio.com/docs/api/chat/rest/users) in this
|
146
|
+
# [Service](https://www.twilio.com/docs/api/chat/rest/services). See the [access
|
147
|
+
# tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) docs for more
|
148
|
+
# details.
|
121
149
|
# @param [String] page_token PageToken provided by the API
|
122
150
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
123
151
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -238,16 +266,22 @@ module Twilio
|
|
238
266
|
##
|
239
267
|
# Update the MemberInstance
|
240
268
|
# @param [String] role_sid The role to be assigned to this member. Defaults to the
|
241
|
-
# roles specified on the
|
242
|
-
#
|
243
|
-
#
|
244
|
-
#
|
245
|
-
# @param [Time] last_consumption_timestamp
|
246
|
-
#
|
247
|
-
#
|
248
|
-
#
|
249
|
-
#
|
250
|
-
#
|
269
|
+
# roles specified on the [Service](https://www.twilio.com/docs/chat/api/services).
|
270
|
+
# @param [String] last_consumed_message_index Field used to specify the last
|
271
|
+
# consumed Message index for the Channel for this Member. Should only be used
|
272
|
+
# when recreating a Member from a backup/separate source.
|
273
|
+
# @param [Time] last_consumption_timestamp ISO8601 time indicating the last
|
274
|
+
# datetime the Member consumed a Message in the Channel. Should only be used when
|
275
|
+
# recreating a Member from a backup/separate source
|
276
|
+
# @param [Time] date_created The ISO8601 time specifying the datetime the Members
|
277
|
+
# should be set as being created. Will be set to the current time by the Chat
|
278
|
+
# service if not specified. Note that this should only be used in cases where a
|
279
|
+
# Member is being recreated from a backup/separate source
|
280
|
+
# @param [Time] date_updated The ISO8601 time specifying the datetime the Member
|
281
|
+
# should be set as having been last updated. Will be set to the `null` by the
|
282
|
+
# Chat service if not specified. Note that this should only be used in cases
|
283
|
+
# where a Member is being recreated from a backup/separate source and where a
|
284
|
+
# Member was previously updated.
|
251
285
|
# @return [MemberInstance] Updated MemberInstance
|
252
286
|
def update(role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset)
|
253
287
|
data = Twilio::Values.of({
|
@@ -419,16 +453,22 @@ module Twilio
|
|
419
453
|
##
|
420
454
|
# Update the MemberInstance
|
421
455
|
# @param [String] role_sid The role to be assigned to this member. Defaults to the
|
422
|
-
# roles specified on the
|
423
|
-
#
|
424
|
-
#
|
425
|
-
#
|
426
|
-
# @param [Time] last_consumption_timestamp
|
427
|
-
#
|
428
|
-
#
|
429
|
-
#
|
430
|
-
#
|
431
|
-
#
|
456
|
+
# roles specified on the [Service](https://www.twilio.com/docs/chat/api/services).
|
457
|
+
# @param [String] last_consumed_message_index Field used to specify the last
|
458
|
+
# consumed Message index for the Channel for this Member. Should only be used
|
459
|
+
# when recreating a Member from a backup/separate source.
|
460
|
+
# @param [Time] last_consumption_timestamp ISO8601 time indicating the last
|
461
|
+
# datetime the Member consumed a Message in the Channel. Should only be used when
|
462
|
+
# recreating a Member from a backup/separate source
|
463
|
+
# @param [Time] date_created The ISO8601 time specifying the datetime the Members
|
464
|
+
# should be set as being created. Will be set to the current time by the Chat
|
465
|
+
# service if not specified. Note that this should only be used in cases where a
|
466
|
+
# Member is being recreated from a backup/separate source
|
467
|
+
# @param [Time] date_updated The ISO8601 time specifying the datetime the Member
|
468
|
+
# should be set as having been last updated. Will be set to the `null` by the
|
469
|
+
# Chat service if not specified. Note that this should only be used in cases
|
470
|
+
# where a Member is being recreated from a backup/separate source and where a
|
471
|
+
# Member was previously updated.
|
432
472
|
# @return [MemberInstance] Updated MemberInstance
|
433
473
|
def update(role_sid: :unset, last_consumed_message_index: :unset, last_consumption_timestamp: :unset, date_created: :unset, date_updated: :unset)
|
434
474
|
context.update(
|