twilio-ruby 5.61.2 → 5.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +124 -0
  3. data/.rubocop.yml +1 -1
  4. data/.rubocop_todo.yml +84 -21
  5. data/CHANGES.md +99 -0
  6. data/Makefile +3 -6
  7. data/README.md +5 -4
  8. data/lib/rack/twilio_webhook_authentication.rb +25 -1
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +667 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -0
  11. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +19 -5
  12. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +435 -0
  13. data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +20 -20
  14. data/lib/twilio-ruby/rest/conversations/v1.rb +17 -0
  15. data/lib/twilio-ruby/rest/conversations.rb +9 -0
  16. data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -77
  17. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +33 -18
  18. data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +474 -0
  19. data/lib/twilio-ruby/rest/insights/v1/conference.rb +512 -0
  20. data/lib/twilio-ruby/rest/insights/v1/setting.rb +215 -0
  21. data/lib/twilio-ruby/rest/insights/v1.rb +23 -0
  22. data/lib/twilio-ruby/rest/insights.rb +14 -0
  23. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +14 -1
  24. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +23 -0
  25. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +80 -0
  26. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +75 -18
  27. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +372 -0
  28. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +71 -30
  29. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +1 -1
  30. data/lib/twilio-ruby/rest/supersim/v1.rb +16 -0
  31. data/lib/twilio-ruby/rest/supersim.rb +9 -0
  32. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +130 -8
  33. data/lib/twilio-ruby/rest/verify/v2/service.rb +8 -2
  34. data/lib/twilio-ruby/rest/verify/v2/template.rb +1 -1
  35. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +89 -21
  36. data/lib/twilio-ruby/rest/verify.rb +2 -2
  37. data/lib/twilio-ruby/rest/video/v1/composition.rb +7 -0
  38. data/lib/twilio-ruby/rest/video/v1/recording.rb +7 -0
  39. data/lib/twilio-ruby/rest/video/v1/room/recording.rb +7 -0
  40. data/lib/twilio-ruby/rest/video/v1/room.rb +30 -5
  41. data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +184 -0
  42. data/lib/twilio-ruby/rest/voice/v1.rb +21 -0
  43. data/lib/twilio-ruby/rest/voice.rb +8 -0
  44. data/lib/twilio-ruby/rest/wireless/v1/sim.rb +4 -4
  45. data/lib/twilio-ruby/version.rb +1 -1
  46. data/sonar-project.properties +1 -1
  47. data/twilio-ruby.gemspec +0 -1
  48. metadata +10 -18
  49. data/.github/workflows/deploy.yml +0 -65
  50. data/.github/workflows/test.yml +0 -52
@@ -17,8 +17,7 @@ module Twilio
17
17
  ##
18
18
  # Initialize the AccessTokenList
19
19
  # @param [Version] version Version that contains the resource
20
- # @param [String] service_sid The unique string that we created to identify the
21
- # Service resource.
20
+ # @param [String] service_sid The unique SID identifier of the Verify Service.
22
21
  # @return [AccessTokenList] AccessTokenList
23
22
  def initialize(version, service_sid: nil)
24
23
  super(version)
@@ -88,6 +87,53 @@ module Twilio
88
87
  end
89
88
  end
90
89
 
90
+ ##
91
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
92
+ class AccessTokenContext < InstanceContext
93
+ ##
94
+ # Initialize the AccessTokenContext
95
+ # @param [Version] version Version that contains the resource
96
+ # @param [String] service_sid The unique SID identifier of the Service.
97
+ # @param [String] sid A 34 character string that uniquely identifies this Access
98
+ # Token.
99
+ # @return [AccessTokenContext] AccessTokenContext
100
+ def initialize(version, service_sid, sid)
101
+ super(version)
102
+
103
+ # Path Solution
104
+ @solution = {service_sid: service_sid, sid: sid, }
105
+ @uri = "/Services/#{@solution[:service_sid]}/AccessTokens/#{@solution[:sid]}"
106
+ end
107
+
108
+ ##
109
+ # Fetch the AccessTokenInstance
110
+ # @return [AccessTokenInstance] Fetched AccessTokenInstance
111
+ def fetch
112
+ payload = @version.fetch('GET', @uri)
113
+
114
+ AccessTokenInstance.new(
115
+ @version,
116
+ payload,
117
+ service_sid: @solution[:service_sid],
118
+ sid: @solution[:sid],
119
+ )
120
+ end
121
+
122
+ ##
123
+ # Provide a user friendly representation
124
+ def to_s
125
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
126
+ "#<Twilio.Verify.V2.AccessTokenContext #{context}>"
127
+ end
128
+
129
+ ##
130
+ # Provide a detailed, user friendly representation
131
+ def inspect
132
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
133
+ "#<Twilio.Verify.V2.AccessTokenContext #{context}>"
134
+ end
135
+ end
136
+
91
137
  ##
92
138
  # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
93
139
  class AccessTokenInstance < InstanceResource
@@ -95,14 +141,75 @@ module Twilio
95
141
  # Initialize the AccessTokenInstance
96
142
  # @param [Version] version Version that contains the resource
97
143
  # @param [Hash] payload payload that contains response from Twilio
98
- # @param [String] service_sid The unique string that we created to identify the
99
- # Service resource.
144
+ # @param [String] service_sid The unique SID identifier of the Verify Service.
145
+ # @param [String] sid A 34 character string that uniquely identifies this Access
146
+ # Token.
100
147
  # @return [AccessTokenInstance] AccessTokenInstance
101
- def initialize(version, payload, service_sid: nil)
148
+ def initialize(version, payload, service_sid: nil, sid: nil)
102
149
  super(version)
103
150
 
104
151
  # Marshaled Properties
105
- @properties = {'token' => payload['token'], }
152
+ @properties = {
153
+ 'sid' => payload['sid'],
154
+ 'account_sid' => payload['account_sid'],
155
+ 'service_sid' => payload['service_sid'],
156
+ 'entity_identity' => payload['entity_identity'],
157
+ 'factor_type' => payload['factor_type'],
158
+ 'factor_friendly_name' => payload['factor_friendly_name'],
159
+ 'token' => payload['token'],
160
+ 'url' => payload['url'],
161
+ }
162
+
163
+ # Context
164
+ @instance_context = nil
165
+ @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'], }
166
+ end
167
+
168
+ ##
169
+ # Generate an instance context for the instance, the context is capable of
170
+ # performing various actions. All instance actions are proxied to the context
171
+ # @return [AccessTokenContext] AccessTokenContext for this AccessTokenInstance
172
+ def context
173
+ unless @instance_context
174
+ @instance_context = AccessTokenContext.new(@version, @params['service_sid'], @params['sid'], )
175
+ end
176
+ @instance_context
177
+ end
178
+
179
+ ##
180
+ # @return [String] A string that uniquely identifies this Access Token.
181
+ def sid
182
+ @properties['sid']
183
+ end
184
+
185
+ ##
186
+ # @return [String] Account Sid.
187
+ def account_sid
188
+ @properties['account_sid']
189
+ end
190
+
191
+ ##
192
+ # @return [String] Verify Service Sid.
193
+ def service_sid
194
+ @properties['service_sid']
195
+ end
196
+
197
+ ##
198
+ # @return [String] Unique external identifier of the Entity
199
+ def entity_identity
200
+ @properties['entity_identity']
201
+ end
202
+
203
+ ##
204
+ # @return [access_token.FactorTypes] The Type of the Factor
205
+ def factor_type
206
+ @properties['factor_type']
207
+ end
208
+
209
+ ##
210
+ # @return [String] A human readable description of this factor.
211
+ def factor_friendly_name
212
+ @properties['factor_friendly_name']
106
213
  end
107
214
 
108
215
  ##
@@ -111,16 +218,31 @@ module Twilio
111
218
  @properties['token']
112
219
  end
113
220
 
221
+ ##
222
+ # @return [String] The URL of this resource.
223
+ def url
224
+ @properties['url']
225
+ end
226
+
227
+ ##
228
+ # Fetch the AccessTokenInstance
229
+ # @return [AccessTokenInstance] Fetched AccessTokenInstance
230
+ def fetch
231
+ context.fetch
232
+ end
233
+
114
234
  ##
115
235
  # Provide a user friendly representation
116
236
  def to_s
117
- "<Twilio.Verify.V2.AccessTokenInstance>"
237
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
238
+ "<Twilio.Verify.V2.AccessTokenInstance #{values}>"
118
239
  end
119
240
 
120
241
  ##
121
242
  # Provide a detailed, user friendly representation
122
243
  def inspect
123
- "<Twilio.Verify.V2.AccessTokenInstance>"
244
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
245
+ "<Twilio.Verify.V2.AccessTokenInstance #{values}>"
124
246
  end
125
247
  end
126
248
  end
@@ -442,8 +442,14 @@ module Twilio
442
442
  ##
443
443
  # Access the access_tokens
444
444
  # @return [AccessTokenList]
445
- # @return [AccessTokenContext]
446
- def access_tokens
445
+ # @return [AccessTokenContext] if sid was passed.
446
+ def access_tokens(sid=:unset)
447
+ raise ArgumentError, 'sid cannot be nil' if sid.nil?
448
+
449
+ if sid != :unset
450
+ return AccessTokenContext.new(@version, @solution[:sid], sid, )
451
+ end
452
+
447
453
  unless @access_tokens
448
454
  @access_tokens = AccessTokenList.new(@version, service_sid: @solution[:sid], )
449
455
  end
@@ -183,7 +183,7 @@ module Twilio
183
183
  end
184
184
 
185
185
  ##
186
- # @return [Hash] Ojbect with the template translations.
186
+ # @return [Hash] Object with the template translations.
187
187
  def translations
188
188
  @properties['translations']
189
189
  end
@@ -28,11 +28,24 @@ module Twilio
28
28
  # Unlike stream(), this operation is eager and will load `limit` records into
29
29
  # memory before returning.
30
30
  # @param [Time] date_created_after Datetime filter used to query Verification
31
- # Attempts created after this datetime.
31
+ # Attempts created after this datetime. Given as GMT in RFC 2822 format.
32
32
  # @param [Time] date_created_before Datetime filter used to query Verification
33
- # Attempts created before this datetime.
34
- # @param [String] channel_data_to Destination of a verification. Depending on the
35
- # type of channel, it could be a phone number in E.164 format or an email address.
33
+ # Attempts created before this datetime. Given as GMT in RFC 2822 format.
34
+ # @param [String] channel_data_to Destination of a verification. It is phone
35
+ # number in E.164 format.
36
+ # @param [String] country Filter used to query Verification Attempts sent to the
37
+ # specified destination country.
38
+ # @param [verification_attempt.Channels] channel Filter used to query Verification
39
+ # Attempts by communication channel. Valid values are `SMS` and `CALL`
40
+ # @param [String] verify_service_sid Filter used to query Verification Attempts by
41
+ # verify service. Only attempts of the provided SID will be returned.
42
+ # @param [String] verification_sid Filter used to return all the Verification
43
+ # Attempts of a single verification. Only attempts of the provided verification
44
+ # SID will be returned.
45
+ # @param [verification_attempt.ConversionStatus] status Filter used to query
46
+ # Verification Attempts by conversion status. Valid values are `UNCONVERTED`, for
47
+ # attempts that were not converted, and `CONVERTED`, for attempts that were
48
+ # confirmed.
36
49
  # @param [Integer] limit Upper limit for the number of records to return. stream()
37
50
  # guarantees to never return more than limit. Default is no limit
38
51
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -40,11 +53,16 @@ module Twilio
40
53
  # but a limit is defined, stream() will attempt to read the limit with the most
41
54
  # efficient page size, i.e. min(limit, 1000)
42
55
  # @return [Array] Array of up to limit results
43
- def list(date_created_after: :unset, date_created_before: :unset, channel_data_to: :unset, limit: nil, page_size: nil)
56
+ def list(date_created_after: :unset, date_created_before: :unset, channel_data_to: :unset, country: :unset, channel: :unset, verify_service_sid: :unset, verification_sid: :unset, status: :unset, limit: nil, page_size: nil)
44
57
  self.stream(
45
58
  date_created_after: date_created_after,
46
59
  date_created_before: date_created_before,
47
60
  channel_data_to: channel_data_to,
61
+ country: country,
62
+ channel: channel,
63
+ verify_service_sid: verify_service_sid,
64
+ verification_sid: verification_sid,
65
+ status: status,
48
66
  limit: limit,
49
67
  page_size: page_size
50
68
  ).entries
@@ -55,11 +73,24 @@ module Twilio
55
73
  # This operation lazily loads records as efficiently as possible until the limit
56
74
  # is reached.
57
75
  # @param [Time] date_created_after Datetime filter used to query Verification
58
- # Attempts created after this datetime.
76
+ # Attempts created after this datetime. Given as GMT in RFC 2822 format.
59
77
  # @param [Time] date_created_before Datetime filter used to query Verification
60
- # Attempts created before this datetime.
61
- # @param [String] channel_data_to Destination of a verification. Depending on the
62
- # type of channel, it could be a phone number in E.164 format or an email address.
78
+ # Attempts created before this datetime. Given as GMT in RFC 2822 format.
79
+ # @param [String] channel_data_to Destination of a verification. It is phone
80
+ # number in E.164 format.
81
+ # @param [String] country Filter used to query Verification Attempts sent to the
82
+ # specified destination country.
83
+ # @param [verification_attempt.Channels] channel Filter used to query Verification
84
+ # Attempts by communication channel. Valid values are `SMS` and `CALL`
85
+ # @param [String] verify_service_sid Filter used to query Verification Attempts by
86
+ # verify service. Only attempts of the provided SID will be returned.
87
+ # @param [String] verification_sid Filter used to return all the Verification
88
+ # Attempts of a single verification. Only attempts of the provided verification
89
+ # SID will be returned.
90
+ # @param [verification_attempt.ConversionStatus] status Filter used to query
91
+ # Verification Attempts by conversion status. Valid values are `UNCONVERTED`, for
92
+ # attempts that were not converted, and `CONVERTED`, for attempts that were
93
+ # confirmed.
63
94
  # @param [Integer] limit Upper limit for the number of records to return. stream()
64
95
  # guarantees to never return more than limit. Default is no limit.
65
96
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -67,13 +98,18 @@ module Twilio
67
98
  # but a limit is defined, stream() will attempt to read the limit with the most
68
99
  # efficient page size, i.e. min(limit, 1000)
69
100
  # @return [Enumerable] Enumerable that will yield up to limit results
70
- def stream(date_created_after: :unset, date_created_before: :unset, channel_data_to: :unset, limit: nil, page_size: nil)
101
+ def stream(date_created_after: :unset, date_created_before: :unset, channel_data_to: :unset, country: :unset, channel: :unset, verify_service_sid: :unset, verification_sid: :unset, status: :unset, limit: nil, page_size: nil)
71
102
  limits = @version.read_limits(limit, page_size)
72
103
 
73
104
  page = self.page(
74
105
  date_created_after: date_created_after,
75
106
  date_created_before: date_created_before,
76
107
  channel_data_to: channel_data_to,
108
+ country: country,
109
+ channel: channel,
110
+ verify_service_sid: verify_service_sid,
111
+ verification_sid: verification_sid,
112
+ status: status,
77
113
  page_size: limits[:page_size],
78
114
  )
79
115
 
@@ -98,20 +134,38 @@ module Twilio
98
134
  # Retrieve a single page of VerificationAttemptInstance records from the API.
99
135
  # Request is executed immediately.
100
136
  # @param [Time] date_created_after Datetime filter used to query Verification
101
- # Attempts created after this datetime.
137
+ # Attempts created after this datetime. Given as GMT in RFC 2822 format.
102
138
  # @param [Time] date_created_before Datetime filter used to query Verification
103
- # Attempts created before this datetime.
104
- # @param [String] channel_data_to Destination of a verification. Depending on the
105
- # type of channel, it could be a phone number in E.164 format or an email address.
139
+ # Attempts created before this datetime. Given as GMT in RFC 2822 format.
140
+ # @param [String] channel_data_to Destination of a verification. It is phone
141
+ # number in E.164 format.
142
+ # @param [String] country Filter used to query Verification Attempts sent to the
143
+ # specified destination country.
144
+ # @param [verification_attempt.Channels] channel Filter used to query Verification
145
+ # Attempts by communication channel. Valid values are `SMS` and `CALL`
146
+ # @param [String] verify_service_sid Filter used to query Verification Attempts by
147
+ # verify service. Only attempts of the provided SID will be returned.
148
+ # @param [String] verification_sid Filter used to return all the Verification
149
+ # Attempts of a single verification. Only attempts of the provided verification
150
+ # SID will be returned.
151
+ # @param [verification_attempt.ConversionStatus] status Filter used to query
152
+ # Verification Attempts by conversion status. Valid values are `UNCONVERTED`, for
153
+ # attempts that were not converted, and `CONVERTED`, for attempts that were
154
+ # confirmed.
106
155
  # @param [String] page_token PageToken provided by the API
107
156
  # @param [Integer] page_number Page Number, this value is simply for client state
108
157
  # @param [Integer] page_size Number of records to return, defaults to 50
109
158
  # @return [Page] Page of VerificationAttemptInstance
110
- def page(date_created_after: :unset, date_created_before: :unset, channel_data_to: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
159
+ def page(date_created_after: :unset, date_created_before: :unset, channel_data_to: :unset, country: :unset, channel: :unset, verify_service_sid: :unset, verification_sid: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
111
160
  params = Twilio::Values.of({
112
161
  'DateCreatedAfter' => Twilio.serialize_iso8601_datetime(date_created_after),
113
162
  'DateCreatedBefore' => Twilio.serialize_iso8601_datetime(date_created_before),
114
163
  'ChannelData.To' => channel_data_to,
164
+ 'Country' => country,
165
+ 'Channel' => channel,
166
+ 'VerifyServiceSid' => verify_service_sid,
167
+ 'VerificationSid' => verification_sid,
168
+ 'Status' => status,
115
169
  'PageToken' => page_token,
116
170
  'Page' => page_number,
117
171
  'PageSize' => page_size,
@@ -224,10 +278,12 @@ module Twilio
224
278
  'sid' => payload['sid'],
225
279
  'account_sid' => payload['account_sid'],
226
280
  'service_sid' => payload['service_sid'],
281
+ 'verification_sid' => payload['verification_sid'],
227
282
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
228
283
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
229
284
  'conversion_status' => payload['conversion_status'],
230
285
  'channel' => payload['channel'],
286
+ 'price' => payload['price'],
231
287
  'channel_data' => payload['channel_data'],
232
288
  'url' => payload['url'],
233
289
  }
@@ -249,23 +305,29 @@ module Twilio
249
305
  end
250
306
 
251
307
  ##
252
- # @return [String] A string that uniquely identifies this Verification Attempt
308
+ # @return [String] The SID that uniquely identifies the verification attempt.
253
309
  def sid
254
310
  @properties['sid']
255
311
  end
256
312
 
257
313
  ##
258
- # @return [String] Account Sid
314
+ # @return [String] The SID of the Account that created the verification.
259
315
  def account_sid
260
316
  @properties['account_sid']
261
317
  end
262
318
 
263
319
  ##
264
- # @return [String] The service_sid
320
+ # @return [String] The SID of the verify service that generated this attempt.
265
321
  def service_sid
266
322
  @properties['service_sid']
267
323
  end
268
324
 
325
+ ##
326
+ # @return [String] The SID of the verification that generated this attempt.
327
+ def verification_sid
328
+ @properties['verification_sid']
329
+ end
330
+
269
331
  ##
270
332
  # @return [Time] The date this Attempt was created
271
333
  def date_created
@@ -279,19 +341,25 @@ module Twilio
279
341
  end
280
342
 
281
343
  ##
282
- # @return [verification_attempt.ConversionStatus] Status of a conversion
344
+ # @return [verification_attempt.ConversionStatus] Status of the conversion for the verification.
283
345
  def conversion_status
284
346
  @properties['conversion_status']
285
347
  end
286
348
 
287
349
  ##
288
- # @return [verification_attempt.Channels] Channel used for the attempt
350
+ # @return [verification_attempt.Channels] Communication channel used for the attempt.
289
351
  def channel
290
352
  @properties['channel']
291
353
  end
292
354
 
293
355
  ##
294
- # @return [Hash] Object with the channel information for an attempt
356
+ # @return [Hash] An object containing the charge for this verification attempt.
357
+ def price
358
+ @properties['price']
359
+ end
360
+
361
+ ##
362
+ # @return [Hash] An object containing the channel specific information for an attempt.
295
363
  def channel_data
296
364
  @properties['channel_data']
297
365
  end
@@ -47,8 +47,8 @@ module Twilio
47
47
  end
48
48
 
49
49
  ##
50
- # @param [String] sid A 34 character string that uniquely identifies this
51
- # Verification Attempt.
50
+ # @param [String] sid The SID that uniquely identifies the verification attempt
51
+ # resource.
52
52
  # @return [Twilio::REST::Verify::V2::VerificationAttemptInstance] if sid was passed.
53
53
  # @return [Twilio::REST::Verify::V2::VerificationAttemptList]
54
54
  def verification_attempts(sid=:unset)
@@ -334,6 +334,7 @@ module Twilio
334
334
  'bitrate' => payload['bitrate'].to_i,
335
335
  'size' => payload['size'].to_i,
336
336
  'duration' => payload['duration'].to_i,
337
+ 'media_external_location' => payload['media_external_location'],
337
338
  'url' => payload['url'],
338
339
  'links' => payload['links'],
339
340
  }
@@ -450,6 +451,12 @@ module Twilio
450
451
  @properties['duration']
451
452
  end
452
453
 
454
+ ##
455
+ # @return [String] The URL of the media file associated with the composition when stored externally
456
+ def media_external_location
457
+ @properties['media_external_location']
458
+ end
459
+
453
460
  ##
454
461
  # @return [String] The absolute URL of the resource
455
462
  def url
@@ -272,6 +272,7 @@ module Twilio
272
272
  'grouping_sids' => payload['grouping_sids'],
273
273
  'track_name' => payload['track_name'],
274
274
  'offset' => payload['offset'].to_i,
275
+ 'media_external_location' => payload['media_external_location'],
275
276
  'links' => payload['links'],
276
277
  }
277
278
 
@@ -375,6 +376,12 @@ module Twilio
375
376
  @properties['offset']
376
377
  end
377
378
 
379
+ ##
380
+ # @return [String] The URL of the media file associated with the recording when stored externally
381
+ def media_external_location
382
+ @properties['media_external_location']
383
+ end
384
+
378
385
  ##
379
386
  # @return [String] The URLs of related resources
380
387
  def links
@@ -255,6 +255,7 @@ module Twilio
255
255
  'grouping_sids' => payload['grouping_sids'],
256
256
  'track_name' => payload['track_name'],
257
257
  'offset' => payload['offset'].to_i,
258
+ 'media_external_location' => payload['media_external_location'],
258
259
  'room_sid' => payload['room_sid'],
259
260
  'links' => payload['links'],
260
261
  }
@@ -359,6 +360,12 @@ module Twilio
359
360
  @properties['offset']
360
361
  end
361
362
 
363
+ ##
364
+ # @return [String] The URL of the media file associated with the recording when stored externally
365
+ def media_external_location
366
+ @properties['media_external_location']
367
+ end
368
+
362
369
  ##
363
370
  # @return [String] The SID of the Room resource the recording is associated with
364
371
  def room_sid
@@ -30,10 +30,13 @@ module Twilio
30
30
  # `group-small`, or `group`. The default value is `group`.
31
31
  # @param [String] unique_name An application-defined string that uniquely
32
32
  # identifies the resource. It can be used as a `room_sid` in place of the
33
- # resource's `sid` in the URL to address the resource. This value is unique for
34
- # `in-progress` rooms. SDK clients can use this name to connect to the room. REST
35
- # API clients can use this name in place of the Room SID to interact with the room
36
- # as long as the room is `in-progress`.
33
+ # resource's `sid` in the URL to address the resource, assuming it does not
34
+ # contain any {reserved
35
+ # characters}[https://tools.ietf.org/html/rfc3986#section-2.2] that would need to
36
+ # be URL encoded. This value is unique for `in-progress` rooms. SDK clients can
37
+ # use this name to connect to the room. REST API clients can use this name in
38
+ # place of the Room SID to interact with the room as long as the room is
39
+ # `in-progress`.
37
40
  # @param [String] status_callback The URL we should call using the
38
41
  # `status_callback_method` to send status information to your application on every
39
42
  # room event. See {Status
@@ -63,8 +66,14 @@ module Twilio
63
66
  # @param [String] max_participant_duration The maximum number of seconds a
64
67
  # Participant can be connected to the room. The maximum possible value is 86400
65
68
  # seconds (24 hours). The default is 14400 seconds (4 hours).
69
+ # @param [String] empty_room_timeout Configures how long (in minutes) a room will
70
+ # remain active after last participant leaves. Valid values range from 1 to 60
71
+ # minutes (no fractions).
72
+ # @param [String] unused_room_timeout Configures how long (in minutes) a room will
73
+ # remain active if no one joins. Valid values range from 1 to 60 minutes (no
74
+ # fractions).
66
75
  # @return [RoomInstance] Created RoomInstance
67
- 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, max_participant_duration: :unset)
76
+ 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, max_participant_duration: :unset, empty_room_timeout: :unset, unused_room_timeout: :unset)
68
77
  data = Twilio::Values.of({
69
78
  'EnableTurn' => enable_turn,
70
79
  'Type' => type,
@@ -78,6 +87,8 @@ module Twilio
78
87
  'RecordingRules' => Twilio.serialize_object(recording_rules),
79
88
  'AudioOnly' => audio_only,
80
89
  'MaxParticipantDuration' => max_participant_duration,
90
+ 'EmptyRoomTimeout' => empty_room_timeout,
91
+ 'UnusedRoomTimeout' => unused_room_timeout,
81
92
  })
82
93
 
83
94
  payload = @version.create('POST', @uri, data: data)
@@ -374,6 +385,8 @@ module Twilio
374
385
  'video_codecs' => payload['video_codecs'],
375
386
  'media_region' => payload['media_region'],
376
387
  'audio_only' => payload['audio_only'],
388
+ 'empty_room_timeout' => payload['empty_room_timeout'].to_i,
389
+ 'unused_room_timeout' => payload['unused_room_timeout'].to_i,
377
390
  'url' => payload['url'],
378
391
  'links' => payload['links'],
379
392
  }
@@ -508,6 +521,18 @@ module Twilio
508
521
  @properties['audio_only']
509
522
  end
510
523
 
524
+ ##
525
+ # @return [String] The time a room will remain active after last participant leaves.
526
+ def empty_room_timeout
527
+ @properties['empty_room_timeout']
528
+ end
529
+
530
+ ##
531
+ # @return [String] The time a room will remain active when no one joins.
532
+ def unused_room_timeout
533
+ @properties['unused_room_timeout']
534
+ end
535
+
511
536
  ##
512
537
  # @return [String] The absolute URL of the resource
513
538
  def url