twilio-ruby 5.64.0 → 5.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/test-and-deploy.yml +5 -0
- data/CHANGES.md +78 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +7 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +11 -4
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +27 -7
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +10 -4
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +275 -0
- data/lib/twilio-ruby/rest/chat/v3.rb +48 -0
- data/lib/twilio-ruby/rest/chat.rb +16 -0
- data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +22 -10
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +236 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +330 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +377 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +233 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +16 -0
- data/lib/twilio-ruby/rest/flex_api.rb +9 -0
- data/lib/twilio-ruby/rest/insights/v1/annotation.rb +271 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +16 -0
- data/lib/twilio-ruby/rest/insights.rb +8 -0
- data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
- data/lib/twilio-ruby/rest/media/v1/media_recording.rb +406 -0
- data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +14 -1
- data/lib/twilio-ruby/rest/media/v1.rb +16 -0
- data/lib/twilio-ruby/rest/media.rb +9 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +6 -6
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +3 -55
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +9 -9
- data/lib/twilio-ruby/rest/supersim/v1.rb +0 -16
- data/lib/twilio-ruby/rest/supersim.rb +0 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +6 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +4 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +4 -2
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +18 -1
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +22 -4
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +16 -6
- data/lib/twilio-ruby/rest/video/v1/composition.rb +14 -0
- data/lib/twilio-ruby/rest/video/v1/recording.rb +14 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/lib/twilio-ruby.rb +1 -1
- metadata +10 -3
- data/lib/twilio-ruby/rest/supersim/v1/command.rb +0 -368
@@ -0,0 +1,406 @@
|
|
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
|
+
class V1 < Version
|
13
|
+
##
|
14
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
15
|
+
class MediaRecordingList < ListResource
|
16
|
+
##
|
17
|
+
# Initialize the MediaRecordingList
|
18
|
+
# @param [Version] version Version that contains the resource
|
19
|
+
# @return [MediaRecordingList] MediaRecordingList
|
20
|
+
def initialize(version)
|
21
|
+
super(version)
|
22
|
+
|
23
|
+
# Path Solution
|
24
|
+
@solution = {}
|
25
|
+
@uri = "/MediaRecordings"
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Lists MediaRecordingInstance records from the API as a list.
|
30
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
31
|
+
# memory before returning.
|
32
|
+
# @param [media_recording.Order] order The sort order of the list by
|
33
|
+
# `date_created`. Can be: `asc` (ascending) or `desc` (descending) with `desc` as
|
34
|
+
# the default.
|
35
|
+
# @param [media_recording.Status] status Status to filter by, with possible values
|
36
|
+
# `processing`, `completed`, `deleted`, or `failed`.
|
37
|
+
# @param [String] processor_sid SID of a MediaProcessor to filter by.
|
38
|
+
# @param [String] source_sid SID of a MediaRecording source to filter by.
|
39
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
40
|
+
# guarantees to never return more than limit. Default is no limit
|
41
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
42
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
43
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
44
|
+
# efficient page size, i.e. min(limit, 1000)
|
45
|
+
# @return [Array] Array of up to limit results
|
46
|
+
def list(order: :unset, status: :unset, processor_sid: :unset, source_sid: :unset, limit: nil, page_size: nil)
|
47
|
+
self.stream(
|
48
|
+
order: order,
|
49
|
+
status: status,
|
50
|
+
processor_sid: processor_sid,
|
51
|
+
source_sid: source_sid,
|
52
|
+
limit: limit,
|
53
|
+
page_size: page_size
|
54
|
+
).entries
|
55
|
+
end
|
56
|
+
|
57
|
+
##
|
58
|
+
# Streams MediaRecordingInstance records from the API as an Enumerable.
|
59
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
60
|
+
# is reached.
|
61
|
+
# @param [media_recording.Order] order The sort order of the list by
|
62
|
+
# `date_created`. Can be: `asc` (ascending) or `desc` (descending) with `desc` as
|
63
|
+
# the default.
|
64
|
+
# @param [media_recording.Status] status Status to filter by, with possible values
|
65
|
+
# `processing`, `completed`, `deleted`, or `failed`.
|
66
|
+
# @param [String] processor_sid SID of a MediaProcessor to filter by.
|
67
|
+
# @param [String] source_sid SID of a MediaRecording source to filter by.
|
68
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
69
|
+
# guarantees to never return more than limit. Default is no limit.
|
70
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
71
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
72
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
73
|
+
# efficient page size, i.e. min(limit, 1000)
|
74
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
75
|
+
def stream(order: :unset, status: :unset, processor_sid: :unset, source_sid: :unset, limit: nil, page_size: nil)
|
76
|
+
limits = @version.read_limits(limit, page_size)
|
77
|
+
|
78
|
+
page = self.page(
|
79
|
+
order: order,
|
80
|
+
status: status,
|
81
|
+
processor_sid: processor_sid,
|
82
|
+
source_sid: source_sid,
|
83
|
+
page_size: limits[:page_size],
|
84
|
+
)
|
85
|
+
|
86
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
87
|
+
end
|
88
|
+
|
89
|
+
##
|
90
|
+
# When passed a block, yields MediaRecordingInstance records from the API.
|
91
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
92
|
+
# is reached.
|
93
|
+
def each
|
94
|
+
limits = @version.read_limits
|
95
|
+
|
96
|
+
page = self.page(page_size: limits[:page_size], )
|
97
|
+
|
98
|
+
@version.stream(page,
|
99
|
+
limit: limits[:limit],
|
100
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
101
|
+
end
|
102
|
+
|
103
|
+
##
|
104
|
+
# Retrieve a single page of MediaRecordingInstance records from the API.
|
105
|
+
# Request is executed immediately.
|
106
|
+
# @param [media_recording.Order] order The sort order of the list by
|
107
|
+
# `date_created`. Can be: `asc` (ascending) or `desc` (descending) with `desc` as
|
108
|
+
# the default.
|
109
|
+
# @param [media_recording.Status] status Status to filter by, with possible values
|
110
|
+
# `processing`, `completed`, `deleted`, or `failed`.
|
111
|
+
# @param [String] processor_sid SID of a MediaProcessor to filter by.
|
112
|
+
# @param [String] source_sid SID of a MediaRecording source to filter by.
|
113
|
+
# @param [String] page_token PageToken provided by the API
|
114
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
115
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
116
|
+
# @return [Page] Page of MediaRecordingInstance
|
117
|
+
def page(order: :unset, status: :unset, processor_sid: :unset, source_sid: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
118
|
+
params = Twilio::Values.of({
|
119
|
+
'Order' => order,
|
120
|
+
'Status' => status,
|
121
|
+
'ProcessorSid' => processor_sid,
|
122
|
+
'SourceSid' => source_sid,
|
123
|
+
'PageToken' => page_token,
|
124
|
+
'Page' => page_number,
|
125
|
+
'PageSize' => page_size,
|
126
|
+
})
|
127
|
+
|
128
|
+
response = @version.page('GET', @uri, params: params)
|
129
|
+
|
130
|
+
MediaRecordingPage.new(@version, response, @solution)
|
131
|
+
end
|
132
|
+
|
133
|
+
##
|
134
|
+
# Retrieve a single page of MediaRecordingInstance records from the API.
|
135
|
+
# Request is executed immediately.
|
136
|
+
# @param [String] target_url API-generated URL for the requested results page
|
137
|
+
# @return [Page] Page of MediaRecordingInstance
|
138
|
+
def get_page(target_url)
|
139
|
+
response = @version.domain.request(
|
140
|
+
'GET',
|
141
|
+
target_url
|
142
|
+
)
|
143
|
+
MediaRecordingPage.new(@version, response, @solution)
|
144
|
+
end
|
145
|
+
|
146
|
+
##
|
147
|
+
# Provide a user friendly representation
|
148
|
+
def to_s
|
149
|
+
'#<Twilio.Media.V1.MediaRecordingList>'
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
##
|
154
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
155
|
+
class MediaRecordingPage < Page
|
156
|
+
##
|
157
|
+
# Initialize the MediaRecordingPage
|
158
|
+
# @param [Version] version Version that contains the resource
|
159
|
+
# @param [Response] response Response from the API
|
160
|
+
# @param [Hash] solution Path solution for the resource
|
161
|
+
# @return [MediaRecordingPage] MediaRecordingPage
|
162
|
+
def initialize(version, response, solution)
|
163
|
+
super(version, response)
|
164
|
+
|
165
|
+
# Path Solution
|
166
|
+
@solution = solution
|
167
|
+
end
|
168
|
+
|
169
|
+
##
|
170
|
+
# Build an instance of MediaRecordingInstance
|
171
|
+
# @param [Hash] payload Payload response from the API
|
172
|
+
# @return [MediaRecordingInstance] MediaRecordingInstance
|
173
|
+
def get_instance(payload)
|
174
|
+
MediaRecordingInstance.new(@version, payload, )
|
175
|
+
end
|
176
|
+
|
177
|
+
##
|
178
|
+
# Provide a user friendly representation
|
179
|
+
def to_s
|
180
|
+
'<Twilio.Media.V1.MediaRecordingPage>'
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
##
|
185
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
186
|
+
class MediaRecordingContext < InstanceContext
|
187
|
+
##
|
188
|
+
# Initialize the MediaRecordingContext
|
189
|
+
# @param [Version] version Version that contains the resource
|
190
|
+
# @param [String] sid The SID of the MediaRecording resource to fetch.
|
191
|
+
# @return [MediaRecordingContext] MediaRecordingContext
|
192
|
+
def initialize(version, sid)
|
193
|
+
super(version)
|
194
|
+
|
195
|
+
# Path Solution
|
196
|
+
@solution = {sid: sid, }
|
197
|
+
@uri = "/MediaRecordings/#{@solution[:sid]}"
|
198
|
+
end
|
199
|
+
|
200
|
+
##
|
201
|
+
# Delete the MediaRecordingInstance
|
202
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
203
|
+
def delete
|
204
|
+
@version.delete('DELETE', @uri)
|
205
|
+
end
|
206
|
+
|
207
|
+
##
|
208
|
+
# Fetch the MediaRecordingInstance
|
209
|
+
# @return [MediaRecordingInstance] Fetched MediaRecordingInstance
|
210
|
+
def fetch
|
211
|
+
payload = @version.fetch('GET', @uri)
|
212
|
+
|
213
|
+
MediaRecordingInstance.new(@version, payload, sid: @solution[:sid], )
|
214
|
+
end
|
215
|
+
|
216
|
+
##
|
217
|
+
# Provide a user friendly representation
|
218
|
+
def to_s
|
219
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
220
|
+
"#<Twilio.Media.V1.MediaRecordingContext #{context}>"
|
221
|
+
end
|
222
|
+
|
223
|
+
##
|
224
|
+
# Provide a detailed, user friendly representation
|
225
|
+
def inspect
|
226
|
+
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
227
|
+
"#<Twilio.Media.V1.MediaRecordingContext #{context}>"
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
##
|
232
|
+
# PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
|
233
|
+
class MediaRecordingInstance < InstanceResource
|
234
|
+
##
|
235
|
+
# Initialize the MediaRecordingInstance
|
236
|
+
# @param [Version] version Version that contains the resource
|
237
|
+
# @param [Hash] payload payload that contains response from Twilio
|
238
|
+
# @param [String] sid The SID of the MediaRecording resource to fetch.
|
239
|
+
# @return [MediaRecordingInstance] MediaRecordingInstance
|
240
|
+
def initialize(version, payload, sid: nil)
|
241
|
+
super(version)
|
242
|
+
|
243
|
+
# Marshaled Properties
|
244
|
+
@properties = {
|
245
|
+
'account_sid' => payload['account_sid'],
|
246
|
+
'bitrate' => payload['bitrate'].to_i,
|
247
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
248
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
249
|
+
'duration' => payload['duration'].to_i,
|
250
|
+
'format' => payload['format'],
|
251
|
+
'links' => payload['links'],
|
252
|
+
'processor_sid' => payload['processor_sid'],
|
253
|
+
'resolution' => payload['resolution'],
|
254
|
+
'source_sid' => payload['source_sid'],
|
255
|
+
'sid' => payload['sid'],
|
256
|
+
'size' => payload['size'].to_i,
|
257
|
+
'status' => payload['status'],
|
258
|
+
'status_callback' => payload['status_callback'],
|
259
|
+
'status_callback_method' => payload['status_callback_method'],
|
260
|
+
'url' => payload['url'],
|
261
|
+
}
|
262
|
+
|
263
|
+
# Context
|
264
|
+
@instance_context = nil
|
265
|
+
@params = {'sid' => sid || @properties['sid'], }
|
266
|
+
end
|
267
|
+
|
268
|
+
##
|
269
|
+
# Generate an instance context for the instance, the context is capable of
|
270
|
+
# performing various actions. All instance actions are proxied to the context
|
271
|
+
# @return [MediaRecordingContext] MediaRecordingContext for this MediaRecordingInstance
|
272
|
+
def context
|
273
|
+
unless @instance_context
|
274
|
+
@instance_context = MediaRecordingContext.new(@version, @params['sid'], )
|
275
|
+
end
|
276
|
+
@instance_context
|
277
|
+
end
|
278
|
+
|
279
|
+
##
|
280
|
+
# @return [String] The SID of the Account that created the resource
|
281
|
+
def account_sid
|
282
|
+
@properties['account_sid']
|
283
|
+
end
|
284
|
+
|
285
|
+
##
|
286
|
+
# @return [String] The bitrate of the media
|
287
|
+
def bitrate
|
288
|
+
@properties['bitrate']
|
289
|
+
end
|
290
|
+
|
291
|
+
##
|
292
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was created
|
293
|
+
def date_created
|
294
|
+
@properties['date_created']
|
295
|
+
end
|
296
|
+
|
297
|
+
##
|
298
|
+
# @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
|
299
|
+
def date_updated
|
300
|
+
@properties['date_updated']
|
301
|
+
end
|
302
|
+
|
303
|
+
##
|
304
|
+
# @return [String] The duration of the MediaRecording
|
305
|
+
def duration
|
306
|
+
@properties['duration']
|
307
|
+
end
|
308
|
+
|
309
|
+
##
|
310
|
+
# @return [media_recording.Format] The format of the MediaRecording
|
311
|
+
def format
|
312
|
+
@properties['format']
|
313
|
+
end
|
314
|
+
|
315
|
+
##
|
316
|
+
# @return [String] The URLs of related resources
|
317
|
+
def links
|
318
|
+
@properties['links']
|
319
|
+
end
|
320
|
+
|
321
|
+
##
|
322
|
+
# @return [String] The SID of the MediaProcessor
|
323
|
+
def processor_sid
|
324
|
+
@properties['processor_sid']
|
325
|
+
end
|
326
|
+
|
327
|
+
##
|
328
|
+
# @return [String] The dimensions of the video image in pixels
|
329
|
+
def resolution
|
330
|
+
@properties['resolution']
|
331
|
+
end
|
332
|
+
|
333
|
+
##
|
334
|
+
# @return [String] The SID of the resource that generated the original media
|
335
|
+
def source_sid
|
336
|
+
@properties['source_sid']
|
337
|
+
end
|
338
|
+
|
339
|
+
##
|
340
|
+
# @return [String] The unique string that identifies the resource
|
341
|
+
def sid
|
342
|
+
@properties['sid']
|
343
|
+
end
|
344
|
+
|
345
|
+
##
|
346
|
+
# @return [String] The size of the recording
|
347
|
+
def size
|
348
|
+
@properties['size']
|
349
|
+
end
|
350
|
+
|
351
|
+
##
|
352
|
+
# @return [media_recording.Status] The status of the MediaRecording
|
353
|
+
def status
|
354
|
+
@properties['status']
|
355
|
+
end
|
356
|
+
|
357
|
+
##
|
358
|
+
# @return [String] The URL to which Twilio will send MediaRecording event updates
|
359
|
+
def status_callback
|
360
|
+
@properties['status_callback']
|
361
|
+
end
|
362
|
+
|
363
|
+
##
|
364
|
+
# @return [String] The HTTP method Twilio should use to call the `status_callback` URL
|
365
|
+
def status_callback_method
|
366
|
+
@properties['status_callback_method']
|
367
|
+
end
|
368
|
+
|
369
|
+
##
|
370
|
+
# @return [String] The absolute URL of the resource
|
371
|
+
def url
|
372
|
+
@properties['url']
|
373
|
+
end
|
374
|
+
|
375
|
+
##
|
376
|
+
# Delete the MediaRecordingInstance
|
377
|
+
# @return [Boolean] true if delete succeeds, false otherwise
|
378
|
+
def delete
|
379
|
+
context.delete
|
380
|
+
end
|
381
|
+
|
382
|
+
##
|
383
|
+
# Fetch the MediaRecordingInstance
|
384
|
+
# @return [MediaRecordingInstance] Fetched MediaRecordingInstance
|
385
|
+
def fetch
|
386
|
+
context.fetch
|
387
|
+
end
|
388
|
+
|
389
|
+
##
|
390
|
+
# Provide a user friendly representation
|
391
|
+
def to_s
|
392
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
393
|
+
"<Twilio.Media.V1.MediaRecordingInstance #{values}>"
|
394
|
+
end
|
395
|
+
|
396
|
+
##
|
397
|
+
# Provide a detailed, user friendly representation
|
398
|
+
def inspect
|
399
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
400
|
+
"<Twilio.Media.V1.MediaRecordingInstance #{values}>"
|
401
|
+
end
|
402
|
+
end
|
403
|
+
end
|
404
|
+
end
|
405
|
+
end
|
406
|
+
end
|
@@ -32,12 +32,18 @@ module Twilio
|
|
32
32
|
# Callbacks}[/docs/live/status-callbacks] for more details.
|
33
33
|
# @param [String] status_callback_method The HTTP method Twilio should use to call
|
34
34
|
# the `status_callback` URL. Can be `POST` or `GET` and the default is `POST`.
|
35
|
+
# @param [String] max_duration The maximum time, in seconds, that the
|
36
|
+
# PlayerStreamer can run before automatically ends. The default value is 300
|
37
|
+
# seconds, and the maximum value is 90000 seconds. Once this maximum duration is
|
38
|
+
# reached, Twilio will end the PlayerStreamer, regardless of whether media is
|
39
|
+
# still streaming.
|
35
40
|
# @return [PlayerStreamerInstance] Created PlayerStreamerInstance
|
36
|
-
def create(video: :unset, status_callback: :unset, status_callback_method: :unset)
|
41
|
+
def create(video: :unset, status_callback: :unset, status_callback_method: :unset, max_duration: :unset)
|
37
42
|
data = Twilio::Values.of({
|
38
43
|
'Video' => video,
|
39
44
|
'StatusCallback' => status_callback,
|
40
45
|
'StatusCallbackMethod' => status_callback_method,
|
46
|
+
'MaxDuration' => max_duration,
|
41
47
|
})
|
42
48
|
|
43
49
|
payload = @version.create('POST', @uri, data: data)
|
@@ -263,6 +269,7 @@ module Twilio
|
|
263
269
|
'status_callback' => payload['status_callback'],
|
264
270
|
'status_callback_method' => payload['status_callback_method'],
|
265
271
|
'ended_reason' => payload['ended_reason'],
|
272
|
+
'max_duration' => payload['max_duration'].to_i,
|
266
273
|
}
|
267
274
|
|
268
275
|
# Context
|
@@ -347,6 +354,12 @@ module Twilio
|
|
347
354
|
@properties['ended_reason']
|
348
355
|
end
|
349
356
|
|
357
|
+
##
|
358
|
+
# @return [String] Maximum PlayerStreamer duration in seconds
|
359
|
+
def max_duration
|
360
|
+
@properties['max_duration']
|
361
|
+
end
|
362
|
+
|
350
363
|
##
|
351
364
|
# Fetch the PlayerStreamerInstance
|
352
365
|
# @return [PlayerStreamerInstance] Fetched PlayerStreamerInstance
|
@@ -16,6 +16,7 @@ module Twilio
|
|
16
16
|
super
|
17
17
|
@version = 'v1'
|
18
18
|
@media_processor = nil
|
19
|
+
@media_recording = nil
|
19
20
|
@player_streamer = nil
|
20
21
|
end
|
21
22
|
|
@@ -34,6 +35,21 @@ module Twilio
|
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
38
|
+
##
|
39
|
+
# @param [String] sid The SID of the MediaRecording resource to fetch.
|
40
|
+
# @return [Twilio::REST::Media::V1::MediaRecordingContext] if sid was passed.
|
41
|
+
# @return [Twilio::REST::Media::V1::MediaRecordingList]
|
42
|
+
def media_recording(sid=:unset)
|
43
|
+
if sid.nil?
|
44
|
+
raise ArgumentError, 'sid cannot be nil'
|
45
|
+
end
|
46
|
+
if sid == :unset
|
47
|
+
@media_recording ||= MediaRecordingList.new self
|
48
|
+
else
|
49
|
+
MediaRecordingContext.new(self, sid)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
37
53
|
##
|
38
54
|
# @param [String] sid The SID of the PlayerStreamer resource to fetch.
|
39
55
|
# @return [Twilio::REST::Media::V1::PlayerStreamerContext] if sid was passed.
|
@@ -37,6 +37,15 @@ module Twilio
|
|
37
37
|
self.v1.media_processor(sid)
|
38
38
|
end
|
39
39
|
|
40
|
+
##
|
41
|
+
# @param [String] sid The unique string generated to identify the MediaRecording
|
42
|
+
# resource.
|
43
|
+
# @return [Twilio::REST::Media::V1::MediaRecordingInstance] if sid was passed.
|
44
|
+
# @return [Twilio::REST::Media::V1::MediaRecordingList]
|
45
|
+
def media_recording(sid=:unset)
|
46
|
+
self.v1.media_recording(sid)
|
47
|
+
end
|
48
|
+
|
40
49
|
##
|
41
50
|
# @param [String] sid The unique string generated to identify the PlayerStreamer
|
42
51
|
# resource.
|
@@ -79,8 +79,8 @@ module Twilio
|
|
79
79
|
# request. Can be `local`, `mobile`, `national`, or `tollfree`.
|
80
80
|
# @param [Boolean] has_valid_until_date Indicates that the Bundle is a valid
|
81
81
|
# Bundle until a specified expiration date.
|
82
|
-
# @param [bundle.SortBy] sort_by Can be `
|
83
|
-
#
|
82
|
+
# @param [bundle.SortBy] sort_by Can be `valid-until` or `date-updated`. Defaults
|
83
|
+
# to `date-created`.
|
84
84
|
# @param [bundle.SortDirection] sort_direction Default is `DESC`. Can be `ASC` or
|
85
85
|
# `DESC`.
|
86
86
|
# @param [Time] valid_until_date_before Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.
|
@@ -131,8 +131,8 @@ module Twilio
|
|
131
131
|
# request. Can be `local`, `mobile`, `national`, or `tollfree`.
|
132
132
|
# @param [Boolean] has_valid_until_date Indicates that the Bundle is a valid
|
133
133
|
# Bundle until a specified expiration date.
|
134
|
-
# @param [bundle.SortBy] sort_by Can be `
|
135
|
-
#
|
134
|
+
# @param [bundle.SortBy] sort_by Can be `valid-until` or `date-updated`. Defaults
|
135
|
+
# to `date-created`.
|
136
136
|
# @param [bundle.SortDirection] sort_direction Default is `DESC`. Can be `ASC` or
|
137
137
|
# `DESC`.
|
138
138
|
# @param [Time] valid_until_date_before Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.
|
@@ -199,8 +199,8 @@ module Twilio
|
|
199
199
|
# request. Can be `local`, `mobile`, `national`, or `tollfree`.
|
200
200
|
# @param [Boolean] has_valid_until_date Indicates that the Bundle is a valid
|
201
201
|
# Bundle until a specified expiration date.
|
202
|
-
# @param [bundle.SortBy] sort_by Can be `
|
203
|
-
#
|
202
|
+
# @param [bundle.SortBy] sort_by Can be `valid-until` or `date-updated`. Defaults
|
203
|
+
# to `date-created`.
|
204
204
|
# @param [bundle.SortDirection] sort_direction Default is `DESC`. Can be `ASC` or
|
205
205
|
# `DESC`.
|
206
206
|
# @param [Time] valid_until_date_before Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well.
|
@@ -242,6 +242,7 @@ module Twilio
|
|
242
242
|
'friendly_name' => payload['friendly_name'],
|
243
243
|
'mime_type' => payload['mime_type'],
|
244
244
|
'status' => payload['status'],
|
245
|
+
'failure_reason' => payload['failure_reason'],
|
245
246
|
'type' => payload['type'],
|
246
247
|
'attributes' => payload['attributes'],
|
247
248
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
@@ -295,6 +296,12 @@ module Twilio
|
|
295
296
|
@properties['status']
|
296
297
|
end
|
297
298
|
|
299
|
+
##
|
300
|
+
# @return [String] The failure reason of the Supporting Document Resource.
|
301
|
+
def failure_reason
|
302
|
+
@properties['failure_reason']
|
303
|
+
end
|
304
|
+
|
298
305
|
##
|
299
306
|
# @return [String] The type of the Supporting Document
|
300
307
|
def type
|
@@ -39,16 +39,6 @@ module Twilio
|
|
39
39
|
# in Megabytes that each Sim resource assigned to the Fleet resource can consume
|
40
40
|
# during a billing period (normally one month). Value must be between 1MB (1) and
|
41
41
|
# 2TB (2,000,000). Defaults to 1GB (1,000).
|
42
|
-
# @param [Boolean] commands_enabled Deprecated. Use `sms_commands_enabled`
|
43
|
-
# instead. Defines whether SIMs in the Fleet are capable of sending and receiving
|
44
|
-
# machine-to-machine SMS via Commands. Defaults to `true`.
|
45
|
-
# @param [String] commands_url Deprecated. Use `sms_commands_url` instead. The URL
|
46
|
-
# that will receive a webhook when a Super SIM in the Fleet is used to send an SMS
|
47
|
-
# from your device to the Commands number. Your server should respond with an HTTP
|
48
|
-
# status code in the 200 range; any response body will be ignored.
|
49
|
-
# @param [String] commands_method Deprecated. Use `sms_commands_method` instead. A
|
50
|
-
# string representing the HTTP method to use when making a request to
|
51
|
-
# `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`.
|
52
42
|
# @param [String] ip_commands_url The URL that will receive a webhook when a Super
|
53
43
|
# SIM in the Fleet is used to send an IP Command from your device to a special IP
|
54
44
|
# address. Your server should respond with an HTTP status code in the 200 range;
|
@@ -67,15 +57,12 @@ module Twilio
|
|
67
57
|
# when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
|
68
58
|
# Defaults to `POST`.
|
69
59
|
# @return [FleetInstance] Created FleetInstance
|
70
|
-
def create(network_access_profile: nil, unique_name: :unset, data_enabled: :unset, data_limit: :unset,
|
60
|
+
def create(network_access_profile: nil, unique_name: :unset, data_enabled: :unset, data_limit: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_enabled: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
|
71
61
|
data = Twilio::Values.of({
|
72
62
|
'NetworkAccessProfile' => network_access_profile,
|
73
63
|
'UniqueName' => unique_name,
|
74
64
|
'DataEnabled' => data_enabled,
|
75
65
|
'DataLimit' => data_limit,
|
76
|
-
'CommandsEnabled' => commands_enabled,
|
77
|
-
'CommandsUrl' => commands_url,
|
78
|
-
'CommandsMethod' => commands_method,
|
79
66
|
'IpCommandsUrl' => ip_commands_url,
|
80
67
|
'IpCommandsMethod' => ip_commands_method,
|
81
68
|
'SmsCommandsEnabled' => sms_commands_enabled,
|
@@ -253,13 +240,6 @@ module Twilio
|
|
253
240
|
# @param [String] network_access_profile The SID or unique name of the Network
|
254
241
|
# Access Profile that will control which cellular networks the Fleet's SIMs can
|
255
242
|
# connect to.
|
256
|
-
# @param [String] commands_url Deprecated. Use `sms_commands_url` instead. The URL
|
257
|
-
# that will receive a webhook when a Super SIM in the Fleet is used to send an SMS
|
258
|
-
# from your device to the Commands number. Your server should respond with an HTTP
|
259
|
-
# status code in the 200 range; any response body will be ignored.
|
260
|
-
# @param [String] commands_method Deprecated. Use `sms_commands_method` instead. A
|
261
|
-
# string representing the HTTP method to use when making a request to
|
262
|
-
# `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`.
|
263
243
|
# @param [String] ip_commands_url The URL that will receive a webhook when a Super
|
264
244
|
# SIM in the Fleet is used to send an IP Command from your device to a special IP
|
265
245
|
# address. Your server should respond with an HTTP status code in the 200 range;
|
@@ -275,12 +255,10 @@ module Twilio
|
|
275
255
|
# when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
|
276
256
|
# Defaults to `POST`.
|
277
257
|
# @return [FleetInstance] Updated FleetInstance
|
278
|
-
def update(unique_name: :unset, network_access_profile: :unset,
|
258
|
+
def update(unique_name: :unset, network_access_profile: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
|
279
259
|
data = Twilio::Values.of({
|
280
260
|
'UniqueName' => unique_name,
|
281
261
|
'NetworkAccessProfile' => network_access_profile,
|
282
|
-
'CommandsUrl' => commands_url,
|
283
|
-
'CommandsMethod' => commands_method,
|
284
262
|
'IpCommandsUrl' => ip_commands_url,
|
285
263
|
'IpCommandsMethod' => ip_commands_method,
|
286
264
|
'SmsCommandsUrl' => sms_commands_url,
|
@@ -330,9 +308,6 @@ module Twilio
|
|
330
308
|
'data_enabled' => payload['data_enabled'],
|
331
309
|
'data_limit' => payload['data_limit'].to_i,
|
332
310
|
'data_metering' => payload['data_metering'],
|
333
|
-
'commands_enabled' => payload['commands_enabled'],
|
334
|
-
'commands_url' => payload['commands_url'],
|
335
|
-
'commands_method' => payload['commands_method'],
|
336
311
|
'sms_commands_enabled' => payload['sms_commands_enabled'],
|
337
312
|
'sms_commands_url' => payload['sms_commands_url'],
|
338
313
|
'sms_commands_method' => payload['sms_commands_method'],
|
@@ -411,24 +386,6 @@ module Twilio
|
|
411
386
|
@properties['data_metering']
|
412
387
|
end
|
413
388
|
|
414
|
-
##
|
415
|
-
# @return [Boolean] Deprecated
|
416
|
-
def commands_enabled
|
417
|
-
@properties['commands_enabled']
|
418
|
-
end
|
419
|
-
|
420
|
-
##
|
421
|
-
# @return [String] Deprecated
|
422
|
-
def commands_url
|
423
|
-
@properties['commands_url']
|
424
|
-
end
|
425
|
-
|
426
|
-
##
|
427
|
-
# @return [String] Deprecated
|
428
|
-
def commands_method
|
429
|
-
@properties['commands_method']
|
430
|
-
end
|
431
|
-
|
432
389
|
##
|
433
390
|
# @return [Boolean] Defines whether SIMs in the Fleet are capable of sending and receiving machine-to-machine SMS via Commands
|
434
391
|
def sms_commands_enabled
|
@@ -480,13 +437,6 @@ module Twilio
|
|
480
437
|
# @param [String] network_access_profile The SID or unique name of the Network
|
481
438
|
# Access Profile that will control which cellular networks the Fleet's SIMs can
|
482
439
|
# connect to.
|
483
|
-
# @param [String] commands_url Deprecated. Use `sms_commands_url` instead. The URL
|
484
|
-
# that will receive a webhook when a Super SIM in the Fleet is used to send an SMS
|
485
|
-
# from your device to the Commands number. Your server should respond with an HTTP
|
486
|
-
# status code in the 200 range; any response body will be ignored.
|
487
|
-
# @param [String] commands_method Deprecated. Use `sms_commands_method` instead. A
|
488
|
-
# string representing the HTTP method to use when making a request to
|
489
|
-
# `commands_url`. Can be one of `POST` or `GET`. Defaults to `POST`.
|
490
440
|
# @param [String] ip_commands_url The URL that will receive a webhook when a Super
|
491
441
|
# SIM in the Fleet is used to send an IP Command from your device to a special IP
|
492
442
|
# address. Your server should respond with an HTTP status code in the 200 range;
|
@@ -502,12 +452,10 @@ module Twilio
|
|
502
452
|
# when making a request to `sms_commands_url`. Can be one of `POST` or `GET`.
|
503
453
|
# Defaults to `POST`.
|
504
454
|
# @return [FleetInstance] Updated FleetInstance
|
505
|
-
def update(unique_name: :unset, network_access_profile: :unset,
|
455
|
+
def update(unique_name: :unset, network_access_profile: :unset, ip_commands_url: :unset, ip_commands_method: :unset, sms_commands_url: :unset, sms_commands_method: :unset)
|
506
456
|
context.update(
|
507
457
|
unique_name: unique_name,
|
508
458
|
network_access_profile: network_access_profile,
|
509
|
-
commands_url: commands_url,
|
510
|
-
commands_method: commands_method,
|
511
459
|
ip_commands_url: ip_commands_url,
|
512
460
|
ip_commands_method: ip_commands_method,
|
513
461
|
sms_commands_url: sms_commands_url,
|