twilio-ruby 5.59.0 → 5.60.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +18 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/jwt/access_token.rb +13 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +7 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +7 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +7 -0
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +7 -0
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +384 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb +221 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +390 -0
- data/lib/twilio-ruby/rest/media/v1.rb +60 -0
- data/lib/twilio-ruby/rest/media.rb +56 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +272 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +36 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +29 -3
- data/lib/twilio-ruby/rest/video/v1/room.rb +12 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +8 -2
@@ -0,0 +1,56 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Media < Domain
|
12
|
+
##
|
13
|
+
# Initialize the Media Domain
|
14
|
+
def initialize(twilio)
|
15
|
+
super
|
16
|
+
|
17
|
+
@base_url = 'https://media.twilio.com'
|
18
|
+
@host = 'media.twilio.com'
|
19
|
+
@port = 443
|
20
|
+
|
21
|
+
# Versions
|
22
|
+
@v1 = nil
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Version v1 of media
|
27
|
+
def v1
|
28
|
+
@v1 ||= V1.new self
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# @param [String] sid The unique string generated to identify the MediaProcessor
|
33
|
+
# resource.
|
34
|
+
# @return [Twilio::REST::Media::V1::MediaProcessorInstance] if sid was passed.
|
35
|
+
# @return [Twilio::REST::Media::V1::MediaProcessorList]
|
36
|
+
def media_processor(sid=:unset)
|
37
|
+
self.v1.media_processor(sid)
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# @param [String] sid The unique string generated to identify the PlayerStreamer
|
42
|
+
# resource.
|
43
|
+
# @return [Twilio::REST::Media::V1::PlayerStreamerInstance] if sid was passed.
|
44
|
+
# @return [Twilio::REST::Media::V1::PlayerStreamerList]
|
45
|
+
def player_streamer(sid=:unset)
|
46
|
+
self.v1.player_streamer(sid)
|
47
|
+
end
|
48
|
+
|
49
|
+
##
|
50
|
+
# Provide a user friendly representation
|
51
|
+
def to_s
|
52
|
+
'#<Twilio::REST::Media>'
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,272 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# \ / _ _ _| _ _
|
4
|
+
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
+
# / /
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
module Twilio
|
10
|
+
module REST
|
11
|
+
class Messaging < Domain
|
12
|
+
class V1 < Version
|
13
|
+
class BrandRegistrationContext < InstanceContext
|
14
|
+
##
|
15
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
16
|
+
class BrandVettingList < ListResource
|
17
|
+
##
|
18
|
+
# Initialize the BrandVettingList
|
19
|
+
# @param [Version] version Version that contains the resource
|
20
|
+
# @param [String] brand_sid The unique string to identify Brand Registration.
|
21
|
+
# @return [BrandVettingList] BrandVettingList
|
22
|
+
def initialize(version, brand_sid: nil)
|
23
|
+
super(version)
|
24
|
+
|
25
|
+
# Path Solution
|
26
|
+
@solution = {brand_sid: brand_sid}
|
27
|
+
@uri = "/a2p/BrandRegistrations/#{@solution[:brand_sid]}/Vettings"
|
28
|
+
end
|
29
|
+
|
30
|
+
##
|
31
|
+
# Create the BrandVettingInstance
|
32
|
+
# @param [brand_vetting.VettingProvider] vetting_provider The third-party provider
|
33
|
+
# of the vettings to create .
|
34
|
+
# @param [String] vetting_id The unique ID of the vetting
|
35
|
+
# @return [BrandVettingInstance] Created BrandVettingInstance
|
36
|
+
def create(vetting_provider: nil, vetting_id: :unset)
|
37
|
+
data = Twilio::Values.of({'VettingProvider' => vetting_provider, 'VettingId' => vetting_id, })
|
38
|
+
|
39
|
+
payload = @version.create('POST', @uri, data: data)
|
40
|
+
|
41
|
+
BrandVettingInstance.new(@version, payload, brand_sid: @solution[:brand_sid], )
|
42
|
+
end
|
43
|
+
|
44
|
+
##
|
45
|
+
# Lists BrandVettingInstance records from the API as a list.
|
46
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
47
|
+
# memory before returning.
|
48
|
+
# @param [brand_vetting.VettingProvider] vetting_provider The third-party provider
|
49
|
+
# of the vettings to read
|
50
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
51
|
+
# guarantees to never return more than limit. Default is no limit
|
52
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
53
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
54
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
55
|
+
# efficient page size, i.e. min(limit, 1000)
|
56
|
+
# @return [Array] Array of up to limit results
|
57
|
+
def list(vetting_provider: :unset, limit: nil, page_size: nil)
|
58
|
+
self.stream(vetting_provider: vetting_provider, limit: limit, page_size: page_size).entries
|
59
|
+
end
|
60
|
+
|
61
|
+
##
|
62
|
+
# Streams BrandVettingInstance records from the API as an Enumerable.
|
63
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
64
|
+
# is reached.
|
65
|
+
# @param [brand_vetting.VettingProvider] vetting_provider The third-party provider
|
66
|
+
# of the vettings to read
|
67
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
68
|
+
# guarantees to never return more than limit. Default is no limit.
|
69
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
70
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
71
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
72
|
+
# efficient page size, i.e. min(limit, 1000)
|
73
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
74
|
+
def stream(vetting_provider: :unset, limit: nil, page_size: nil)
|
75
|
+
limits = @version.read_limits(limit, page_size)
|
76
|
+
|
77
|
+
page = self.page(vetting_provider: vetting_provider, page_size: limits[:page_size], )
|
78
|
+
|
79
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
80
|
+
end
|
81
|
+
|
82
|
+
##
|
83
|
+
# When passed a block, yields BrandVettingInstance records from the API.
|
84
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
85
|
+
# is reached.
|
86
|
+
def each
|
87
|
+
limits = @version.read_limits
|
88
|
+
|
89
|
+
page = self.page(page_size: limits[:page_size], )
|
90
|
+
|
91
|
+
@version.stream(page,
|
92
|
+
limit: limits[:limit],
|
93
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
94
|
+
end
|
95
|
+
|
96
|
+
##
|
97
|
+
# Retrieve a single page of BrandVettingInstance records from the API.
|
98
|
+
# Request is executed immediately.
|
99
|
+
# @param [brand_vetting.VettingProvider] vetting_provider The third-party provider
|
100
|
+
# of the vettings to read
|
101
|
+
# @param [String] page_token PageToken provided by the API
|
102
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
103
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
104
|
+
# @return [Page] Page of BrandVettingInstance
|
105
|
+
def page(vetting_provider: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
106
|
+
params = Twilio::Values.of({
|
107
|
+
'VettingProvider' => vetting_provider,
|
108
|
+
'PageToken' => page_token,
|
109
|
+
'Page' => page_number,
|
110
|
+
'PageSize' => page_size,
|
111
|
+
})
|
112
|
+
|
113
|
+
response = @version.page('GET', @uri, params: params)
|
114
|
+
|
115
|
+
BrandVettingPage.new(@version, response, @solution)
|
116
|
+
end
|
117
|
+
|
118
|
+
##
|
119
|
+
# Retrieve a single page of BrandVettingInstance records from the API.
|
120
|
+
# Request is executed immediately.
|
121
|
+
# @param [String] target_url API-generated URL for the requested results page
|
122
|
+
# @return [Page] Page of BrandVettingInstance
|
123
|
+
def get_page(target_url)
|
124
|
+
response = @version.domain.request(
|
125
|
+
'GET',
|
126
|
+
target_url
|
127
|
+
)
|
128
|
+
BrandVettingPage.new(@version, response, @solution)
|
129
|
+
end
|
130
|
+
|
131
|
+
##
|
132
|
+
# Provide a user friendly representation
|
133
|
+
def to_s
|
134
|
+
'#<Twilio.Messaging.V1.BrandVettingList>'
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
##
|
139
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
140
|
+
class BrandVettingPage < Page
|
141
|
+
##
|
142
|
+
# Initialize the BrandVettingPage
|
143
|
+
# @param [Version] version Version that contains the resource
|
144
|
+
# @param [Response] response Response from the API
|
145
|
+
# @param [Hash] solution Path solution for the resource
|
146
|
+
# @return [BrandVettingPage] BrandVettingPage
|
147
|
+
def initialize(version, response, solution)
|
148
|
+
super(version, response)
|
149
|
+
|
150
|
+
# Path Solution
|
151
|
+
@solution = solution
|
152
|
+
end
|
153
|
+
|
154
|
+
##
|
155
|
+
# Build an instance of BrandVettingInstance
|
156
|
+
# @param [Hash] payload Payload response from the API
|
157
|
+
# @return [BrandVettingInstance] BrandVettingInstance
|
158
|
+
def get_instance(payload)
|
159
|
+
BrandVettingInstance.new(@version, payload, brand_sid: @solution[:brand_sid], )
|
160
|
+
end
|
161
|
+
|
162
|
+
##
|
163
|
+
# Provide a user friendly representation
|
164
|
+
def to_s
|
165
|
+
'<Twilio.Messaging.V1.BrandVettingPage>'
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
##
|
170
|
+
# PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
|
171
|
+
class BrandVettingInstance < InstanceResource
|
172
|
+
##
|
173
|
+
# Initialize the BrandVettingInstance
|
174
|
+
# @param [Version] version Version that contains the resource
|
175
|
+
# @param [Hash] payload payload that contains response from Twilio
|
176
|
+
# @param [String] brand_sid The unique string to identify Brand Registration.
|
177
|
+
# @return [BrandVettingInstance] BrandVettingInstance
|
178
|
+
def initialize(version, payload, brand_sid: nil)
|
179
|
+
super(version)
|
180
|
+
|
181
|
+
# Marshaled Properties
|
182
|
+
@properties = {
|
183
|
+
'account_sid' => payload['account_sid'],
|
184
|
+
'brand_sid' => payload['brand_sid'],
|
185
|
+
'brand_vetting_sid' => payload['brand_vetting_sid'],
|
186
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
187
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
188
|
+
'vetting_id' => payload['vetting_id'],
|
189
|
+
'vetting_class' => payload['vetting_class'],
|
190
|
+
'vetting_status' => payload['vetting_status'],
|
191
|
+
'vetting_provider' => payload['vetting_provider'],
|
192
|
+
'url' => payload['url'],
|
193
|
+
}
|
194
|
+
end
|
195
|
+
|
196
|
+
##
|
197
|
+
# @return [String] The SID of the Account that created the vetting
|
198
|
+
def account_sid
|
199
|
+
@properties['account_sid']
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# @return [String] A2P BrandRegistration Sid
|
204
|
+
def brand_sid
|
205
|
+
@properties['brand_sid']
|
206
|
+
end
|
207
|
+
|
208
|
+
##
|
209
|
+
# @return [String] SID for third-party vetting record
|
210
|
+
def brand_vetting_sid
|
211
|
+
@properties['brand_vetting_sid']
|
212
|
+
end
|
213
|
+
|
214
|
+
##
|
215
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
216
|
+
def date_updated
|
217
|
+
@properties['date_updated']
|
218
|
+
end
|
219
|
+
|
220
|
+
##
|
221
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
222
|
+
def date_created
|
223
|
+
@properties['date_created']
|
224
|
+
end
|
225
|
+
|
226
|
+
##
|
227
|
+
# @return [String] The unique ID of the vetting
|
228
|
+
def vetting_id
|
229
|
+
@properties['vetting_id']
|
230
|
+
end
|
231
|
+
|
232
|
+
##
|
233
|
+
# @return [String] The type of vetting
|
234
|
+
def vetting_class
|
235
|
+
@properties['vetting_class']
|
236
|
+
end
|
237
|
+
|
238
|
+
##
|
239
|
+
# @return [String] Status of vetting attempt
|
240
|
+
def vetting_status
|
241
|
+
@properties['vetting_status']
|
242
|
+
end
|
243
|
+
|
244
|
+
##
|
245
|
+
# @return [brand_vetting.VettingProvider] Third-party provider that has conducted the vetting
|
246
|
+
def vetting_provider
|
247
|
+
@properties['vetting_provider']
|
248
|
+
end
|
249
|
+
|
250
|
+
##
|
251
|
+
# @return [String] The absolute URL of the Brand Vetting
|
252
|
+
def url
|
253
|
+
@properties['url']
|
254
|
+
end
|
255
|
+
|
256
|
+
##
|
257
|
+
# Provide a user friendly representation
|
258
|
+
def to_s
|
259
|
+
"<Twilio.Messaging.V1.BrandVettingInstance>"
|
260
|
+
end
|
261
|
+
|
262
|
+
##
|
263
|
+
# Provide a detailed, user friendly representation
|
264
|
+
def inspect
|
265
|
+
"<Twilio.Messaging.V1.BrandVettingInstance>"
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
end
|
@@ -184,6 +184,9 @@ module Twilio
|
|
184
184
|
# Path Solution
|
185
185
|
@solution = {sid: sid, }
|
186
186
|
@uri = "/a2p/BrandRegistrations/#{@solution[:sid]}"
|
187
|
+
|
188
|
+
# Dependents
|
189
|
+
@brand_vettings = nil
|
187
190
|
end
|
188
191
|
|
189
192
|
##
|
@@ -195,6 +198,18 @@ module Twilio
|
|
195
198
|
BrandRegistrationInstance.new(@version, payload, sid: @solution[:sid], )
|
196
199
|
end
|
197
200
|
|
201
|
+
##
|
202
|
+
# Access the brand_vettings
|
203
|
+
# @return [BrandVettingList]
|
204
|
+
# @return [BrandVettingContext]
|
205
|
+
def brand_vettings
|
206
|
+
unless @brand_vettings
|
207
|
+
@brand_vettings = BrandVettingList.new(@version, brand_sid: @solution[:sid], )
|
208
|
+
end
|
209
|
+
|
210
|
+
@brand_vettings
|
211
|
+
end
|
212
|
+
|
198
213
|
##
|
199
214
|
# Provide a user friendly representation
|
200
215
|
def to_s
|
@@ -236,11 +251,13 @@ module Twilio
|
|
236
251
|
'failure_reason' => payload['failure_reason'],
|
237
252
|
'url' => payload['url'],
|
238
253
|
'brand_score' => payload['brand_score'] == nil ? payload['brand_score'] : payload['brand_score'].to_i,
|
254
|
+
'brand_feedback' => payload['brand_feedback'],
|
239
255
|
'identity_status' => payload['identity_status'],
|
240
256
|
'russell_3000' => payload['russell_3000'],
|
241
257
|
'tax_exempt_status' => payload['tax_exempt_status'],
|
242
258
|
'skip_automatic_sec_vet' => payload['skip_automatic_sec_vet'],
|
243
259
|
'mock' => payload['mock'],
|
260
|
+
'links' => payload['links'],
|
244
261
|
}
|
245
262
|
|
246
263
|
# Context
|
@@ -331,6 +348,12 @@ module Twilio
|
|
331
348
|
@properties['brand_score']
|
332
349
|
end
|
333
350
|
|
351
|
+
##
|
352
|
+
# @return [Array[brand_registration.BrandFeedback]] Brand feedback
|
353
|
+
def brand_feedback
|
354
|
+
@properties['brand_feedback']
|
355
|
+
end
|
356
|
+
|
334
357
|
##
|
335
358
|
# @return [brand_registration.IdentityStatus] Identity Status
|
336
359
|
def identity_status
|
@@ -361,6 +384,12 @@ module Twilio
|
|
361
384
|
@properties['mock']
|
362
385
|
end
|
363
386
|
|
387
|
+
##
|
388
|
+
# @return [String] The links
|
389
|
+
def links
|
390
|
+
@properties['links']
|
391
|
+
end
|
392
|
+
|
364
393
|
##
|
365
394
|
# Fetch the BrandRegistrationInstance
|
366
395
|
# @return [BrandRegistrationInstance] Fetched BrandRegistrationInstance
|
@@ -368,6 +397,13 @@ module Twilio
|
|
368
397
|
context.fetch
|
369
398
|
end
|
370
399
|
|
400
|
+
##
|
401
|
+
# Access the brand_vettings
|
402
|
+
# @return [brand_vettings] brand_vettings
|
403
|
+
def brand_vettings
|
404
|
+
context.brand_vettings
|
405
|
+
end
|
406
|
+
|
371
407
|
##
|
372
408
|
# Provide a user friendly representation
|
373
409
|
def to_s
|
@@ -67,6 +67,9 @@ module Twilio
|
|
67
67
|
# @param [String] validity_period How long, in seconds, messages sent from the
|
68
68
|
# Service are valid. Can be an integer from `1` to `14,400`.
|
69
69
|
# @param [Boolean] synchronous_validation Reserved.
|
70
|
+
# @param [String] usecase A string that describes the scenario in which the
|
71
|
+
# Messaging Service will be used. Examples: [notification, marketing,
|
72
|
+
# verification, poll ..].
|
70
73
|
# @param [Boolean] use_inbound_webhook_on_number A boolean value that indicates
|
71
74
|
# either the webhook url configured on the phone number will be used or
|
72
75
|
# `inbound_request_url`/`fallback_url` url will be called when a message is
|
@@ -74,7 +77,7 @@ module Twilio
|
|
74
77
|
# defined on the phone number will override the
|
75
78
|
# `inbound_request_url`/`fallback_url` defined for the Messaging Service.
|
76
79
|
# @return [ServiceInstance] Created ServiceInstance
|
77
|
-
def create(friendly_name: nil, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, use_inbound_webhook_on_number: :unset)
|
80
|
+
def create(friendly_name: nil, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, usecase: :unset, use_inbound_webhook_on_number: :unset)
|
78
81
|
data = Twilio::Values.of({
|
79
82
|
'FriendlyName' => friendly_name,
|
80
83
|
'InboundRequestUrl' => inbound_request_url,
|
@@ -90,6 +93,7 @@ module Twilio
|
|
90
93
|
'AreaCodeGeomatch' => area_code_geomatch,
|
91
94
|
'ValidityPeriod' => validity_period,
|
92
95
|
'SynchronousValidation' => synchronous_validation,
|
96
|
+
'Usecase' => usecase,
|
93
97
|
'UseInboundWebhookOnNumber' => use_inbound_webhook_on_number,
|
94
98
|
})
|
95
99
|
|
@@ -281,6 +285,9 @@ module Twilio
|
|
281
285
|
# @param [String] validity_period How long, in seconds, messages sent from the
|
282
286
|
# Service are valid. Can be an integer from `1` to `14,400`.
|
283
287
|
# @param [Boolean] synchronous_validation Reserved.
|
288
|
+
# @param [String] usecase A string that describes the scenario in which the
|
289
|
+
# Messaging Service will be used. Examples: [notification, marketing,
|
290
|
+
# verification, poll ..]
|
284
291
|
# @param [Boolean] use_inbound_webhook_on_number A boolean value that indicates
|
285
292
|
# either the webhook url configured on the phone number will be used or
|
286
293
|
# `inbound_request_url`/`fallback_url` url will be called when a message is
|
@@ -288,7 +295,7 @@ module Twilio
|
|
288
295
|
# defined on the phone number will override the
|
289
296
|
# `inbound_request_url`/`fallback_url` defined for the Messaging Service.
|
290
297
|
# @return [ServiceInstance] Updated ServiceInstance
|
291
|
-
def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, use_inbound_webhook_on_number: :unset)
|
298
|
+
def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, usecase: :unset, use_inbound_webhook_on_number: :unset)
|
292
299
|
data = Twilio::Values.of({
|
293
300
|
'FriendlyName' => friendly_name,
|
294
301
|
'InboundRequestUrl' => inbound_request_url,
|
@@ -304,6 +311,7 @@ module Twilio
|
|
304
311
|
'AreaCodeGeomatch' => area_code_geomatch,
|
305
312
|
'ValidityPeriod' => validity_period,
|
306
313
|
'SynchronousValidation' => synchronous_validation,
|
314
|
+
'Usecase' => usecase,
|
307
315
|
'UseInboundWebhookOnNumber' => use_inbound_webhook_on_number,
|
308
316
|
})
|
309
317
|
|
@@ -464,6 +472,8 @@ module Twilio
|
|
464
472
|
'validity_period' => payload['validity_period'].to_i,
|
465
473
|
'url' => payload['url'],
|
466
474
|
'links' => payload['links'],
|
475
|
+
'usecase' => payload['usecase'],
|
476
|
+
'us_app_to_person_registered' => payload['us_app_to_person_registered'],
|
467
477
|
'use_inbound_webhook_on_number' => payload['use_inbound_webhook_on_number'],
|
468
478
|
}
|
469
479
|
|
@@ -603,6 +613,18 @@ module Twilio
|
|
603
613
|
@properties['links']
|
604
614
|
end
|
605
615
|
|
616
|
+
##
|
617
|
+
# @return [String] A string describing the scenario in which the Messaging Service will be used
|
618
|
+
def usecase
|
619
|
+
@properties['usecase']
|
620
|
+
end
|
621
|
+
|
622
|
+
##
|
623
|
+
# @return [Boolean] Whether US A2P campaign is registered for this Service.
|
624
|
+
def us_app_to_person_registered
|
625
|
+
@properties['us_app_to_person_registered']
|
626
|
+
end
|
627
|
+
|
606
628
|
##
|
607
629
|
# @return [Boolean] If enabled, the webhook url configured on the phone number will be used and will override the `inbound_request_url`/`fallback_url` url called when an inbound message is received.
|
608
630
|
def use_inbound_webhook_on_number
|
@@ -651,6 +673,9 @@ module Twilio
|
|
651
673
|
# @param [String] validity_period How long, in seconds, messages sent from the
|
652
674
|
# Service are valid. Can be an integer from `1` to `14,400`.
|
653
675
|
# @param [Boolean] synchronous_validation Reserved.
|
676
|
+
# @param [String] usecase A string that describes the scenario in which the
|
677
|
+
# Messaging Service will be used. Examples: [notification, marketing,
|
678
|
+
# verification, poll ..]
|
654
679
|
# @param [Boolean] use_inbound_webhook_on_number A boolean value that indicates
|
655
680
|
# either the webhook url configured on the phone number will be used or
|
656
681
|
# `inbound_request_url`/`fallback_url` url will be called when a message is
|
@@ -658,7 +683,7 @@ module Twilio
|
|
658
683
|
# defined on the phone number will override the
|
659
684
|
# `inbound_request_url`/`fallback_url` defined for the Messaging Service.
|
660
685
|
# @return [ServiceInstance] Updated ServiceInstance
|
661
|
-
def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, use_inbound_webhook_on_number: :unset)
|
686
|
+
def update(friendly_name: :unset, inbound_request_url: :unset, inbound_method: :unset, fallback_url: :unset, fallback_method: :unset, status_callback: :unset, sticky_sender: :unset, mms_converter: :unset, smart_encoding: :unset, scan_message_content: :unset, fallback_to_long_code: :unset, area_code_geomatch: :unset, validity_period: :unset, synchronous_validation: :unset, usecase: :unset, use_inbound_webhook_on_number: :unset)
|
662
687
|
context.update(
|
663
688
|
friendly_name: friendly_name,
|
664
689
|
inbound_request_url: inbound_request_url,
|
@@ -674,6 +699,7 @@ module Twilio
|
|
674
699
|
area_code_geomatch: area_code_geomatch,
|
675
700
|
validity_period: validity_period,
|
676
701
|
synchronous_validation: synchronous_validation,
|
702
|
+
usecase: usecase,
|
677
703
|
use_inbound_webhook_on_number: use_inbound_webhook_on_number,
|
678
704
|
)
|
679
705
|
end
|
@@ -57,8 +57,11 @@ module Twilio
|
|
57
57
|
# ***This feature is not available in `peer-to-peer` rooms.***
|
58
58
|
# @param [Hash] recording_rules A collection of Recording Rules that describe how
|
59
59
|
# to include or exclude matching tracks for recording
|
60
|
+
# @param [Boolean] audio_only When set to true, indicates that the participants in
|
61
|
+
# the room will only publish audio. No video tracks will be allowed. Group rooms
|
62
|
+
# only.
|
60
63
|
# @return [RoomInstance] Created RoomInstance
|
61
|
-
def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset)
|
64
|
+
def create(enable_turn: :unset, type: :unset, unique_name: :unset, status_callback: :unset, status_callback_method: :unset, max_participants: :unset, record_participants_on_connect: :unset, video_codecs: :unset, media_region: :unset, recording_rules: :unset, audio_only: :unset)
|
62
65
|
data = Twilio::Values.of({
|
63
66
|
'EnableTurn' => enable_turn,
|
64
67
|
'Type' => type,
|
@@ -70,6 +73,7 @@ module Twilio
|
|
70
73
|
'VideoCodecs' => Twilio.serialize_list(video_codecs) { |e| e },
|
71
74
|
'MediaRegion' => media_region,
|
72
75
|
'RecordingRules' => Twilio.serialize_object(recording_rules),
|
76
|
+
'AudioOnly' => audio_only,
|
73
77
|
})
|
74
78
|
|
75
79
|
payload = @version.create('POST', @uri, data: data)
|
@@ -364,6 +368,7 @@ module Twilio
|
|
364
368
|
'record_participants_on_connect' => payload['record_participants_on_connect'],
|
365
369
|
'video_codecs' => payload['video_codecs'],
|
366
370
|
'media_region' => payload['media_region'],
|
371
|
+
'audio_only' => payload['audio_only'],
|
367
372
|
'url' => payload['url'],
|
368
373
|
'links' => payload['links'],
|
369
374
|
}
|
@@ -486,6 +491,12 @@ module Twilio
|
|
486
491
|
@properties['media_region']
|
487
492
|
end
|
488
493
|
|
494
|
+
##
|
495
|
+
# @return [Boolean] Indicates whether the room will only contain audio track participants for group rooms.
|
496
|
+
def audio_only
|
497
|
+
@properties['audio_only']
|
498
|
+
end
|
499
|
+
|
489
500
|
##
|
490
501
|
# @return [String] The absolute URL of the resource
|
491
502
|
def url
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.60.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10-
|
11
|
+
date: 2021-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -475,9 +475,15 @@ files:
|
|
475
475
|
- lib/twilio-ruby/rest/lookups.rb
|
476
476
|
- lib/twilio-ruby/rest/lookups/v1.rb
|
477
477
|
- lib/twilio-ruby/rest/lookups/v1/phone_number.rb
|
478
|
+
- lib/twilio-ruby/rest/media.rb
|
479
|
+
- lib/twilio-ruby/rest/media/v1.rb
|
480
|
+
- lib/twilio-ruby/rest/media/v1/media_processor.rb
|
481
|
+
- lib/twilio-ruby/rest/media/v1/player_streamer.rb
|
482
|
+
- lib/twilio-ruby/rest/media/v1/player_streamer/playback_grant.rb
|
478
483
|
- lib/twilio-ruby/rest/messaging.rb
|
479
484
|
- lib/twilio-ruby/rest/messaging/v1.rb
|
480
485
|
- lib/twilio-ruby/rest/messaging/v1/brand_registration.rb
|
486
|
+
- lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb
|
481
487
|
- lib/twilio-ruby/rest/messaging/v1/deactivation.rb
|
482
488
|
- lib/twilio-ruby/rest/messaging/v1/external_campaign.rb
|
483
489
|
- lib/twilio-ruby/rest/messaging/v1/service.rb
|