twilio-ruby 5.67.0 → 5.67.3

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.
@@ -27,7 +27,7 @@ module Twilio
27
27
  # Create the MediaProcessorInstance
28
28
  # @param [String] extension The {Media
29
29
  # Extension}[/docs/live/api/media-extensions-overview] name or URL. Ex:
30
- # `video-composer-v1`
30
+ # `video-composer-v2`
31
31
  # @param [String] extension_context The context of the Media Extension,
32
32
  # represented as a JSON dictionary. See the documentation for the specific {Media
33
33
  # Extension}[/docs/live/api/media-extensions-overview] you are using for more
@@ -253,7 +253,7 @@ module Twilio
253
253
  'resolution' => payload['resolution'],
254
254
  'source_sid' => payload['source_sid'],
255
255
  'sid' => payload['sid'],
256
- 'size' => payload['size'].to_i,
256
+ 'media_size' => payload['media_size'].to_i,
257
257
  'status' => payload['status'],
258
258
  'status_callback' => payload['status_callback'],
259
259
  'status_callback_method' => payload['status_callback_method'],
@@ -343,9 +343,9 @@ module Twilio
343
343
  end
344
344
 
345
345
  ##
346
- # @return [String] The size of the recording
347
- def size
348
- @properties['size']
346
+ # @return [String] The size of the recording media
347
+ def media_size
348
+ @properties['media_size']
349
349
  end
350
350
 
351
351
  ##
@@ -227,6 +227,7 @@ module Twilio
227
227
  'send_code_attempts' => payload['send_code_attempts'],
228
228
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
229
229
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
230
+ 'sna' => payload['sna'],
230
231
  'url' => payload['url'],
231
232
  }
232
233
 
@@ -324,6 +325,12 @@ module Twilio
324
325
  @properties['date_updated']
325
326
  end
326
327
 
328
+ ##
329
+ # @return [Hash] The set of fields used for a silent network auth (`sna`) verification
330
+ def sna
331
+ @properties['sna']
332
+ end
333
+
327
334
  ##
328
335
  # @return [String] The absolute URL of the Verification resource
329
336
  def url
@@ -194,7 +194,7 @@ module Twilio
194
194
  # message:: Message to say
195
195
  # voice:: Voice to use
196
196
  # loop:: Times to loop message
197
- # language:: Message langauge
197
+ # language:: Message language
198
198
  # keyword_args:: additional attributes
199
199
  def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
200
200
  say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
@@ -469,7 +469,7 @@ module Twilio
469
469
  # message:: Message to say
470
470
  # voice:: Voice to use
471
471
  # loop:: Times to loop message
472
- # language:: Message langauge
472
+ # language:: Message language
473
473
  # keyword_args:: additional attributes
474
474
  def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
475
475
  say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
@@ -1435,7 +1435,7 @@ module Twilio
1435
1435
  # message:: Message to say
1436
1436
  # voice:: Voice to use
1437
1437
  # loop:: Times to loop message
1438
- # language:: Message langauge
1438
+ # language:: Message language
1439
1439
  # keyword_args:: additional attributes
1440
1440
  def say(message: nil, voice: nil, loop: nil, language: nil, **keyword_args)
1441
1441
  say = Say.new(message: message, voice: voice, loop: loop, language: language, **keyword_args)
@@ -1743,9 +1743,43 @@ module Twilio
1743
1743
  # language:: Language to be used by Dialogflow to transcribe speech
1744
1744
  # sentiment_analysis:: Whether sentiment analysis needs to be enabled or not
1745
1745
  # status_callback:: URL to post status callbacks from Twilio
1746
+ # status_callback_method:: HTTP method to use when requesting the status callback URL
1746
1747
  # keyword_args:: additional attributes
1747
- def virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, **keyword_args)
1748
- append(VirtualAgent.new(connector_name: connector_name, language: language, sentiment_analysis: sentiment_analysis, status_callback: status_callback, **keyword_args))
1748
+ def virtual_agent(connector_name: nil, language: nil, sentiment_analysis: nil, status_callback: nil, status_callback_method: nil, **keyword_args)
1749
+ virtual_agent = VirtualAgent.new(connector_name: connector_name, language: language, sentiment_analysis: sentiment_analysis, status_callback: status_callback, status_callback_method: status_callback_method, **keyword_args)
1750
+
1751
+ yield(virtual_agent) if block_given?
1752
+ append(virtual_agent)
1753
+ end
1754
+
1755
+ ##
1756
+ # Create a new <Conversation> element
1757
+ # service_instance_sid:: Service instance Sid
1758
+ # inbound_autocreation:: Inbound autocreation
1759
+ # routing_assignment_timeout:: Routing assignment timeout
1760
+ # inbound_timeout:: Inbound timeout
1761
+ # record:: Record
1762
+ # trim:: Trim
1763
+ # recording_status_callback:: Recording status callback URL
1764
+ # recording_status_callback_method:: Recording status callback URL method
1765
+ # recording_status_callback_event:: Recording status callback events
1766
+ # status_callback:: Status callback URL
1767
+ # status_callback_method:: Status callback URL method
1768
+ # status_callback_event:: Events to call status callback URL
1769
+ # keyword_args:: additional attributes
1770
+ def conversation(service_instance_sid: nil, inbound_autocreation: nil, routing_assignment_timeout: nil, inbound_timeout: nil, record: nil, trim: nil, recording_status_callback: nil, recording_status_callback_method: nil, recording_status_callback_event: nil, status_callback: nil, status_callback_method: nil, status_callback_event: nil, **keyword_args)
1771
+ append(Conversation.new(service_instance_sid: service_instance_sid, inbound_autocreation: inbound_autocreation, routing_assignment_timeout: routing_assignment_timeout, inbound_timeout: inbound_timeout, record: record, trim: trim, recording_status_callback: recording_status_callback, recording_status_callback_method: recording_status_callback_method, recording_status_callback_event: recording_status_callback_event, status_callback: status_callback, status_callback_method: status_callback_method, status_callback_event: status_callback_event, **keyword_args))
1772
+ end
1773
+ end
1774
+
1775
+ ##
1776
+ # <Conversation> TwiML Noun
1777
+ class Conversation < TwiML
1778
+ def initialize(**keyword_args)
1779
+ super(**keyword_args)
1780
+ @name = 'Conversation'
1781
+
1782
+ yield(self) if block_given?
1749
1783
  end
1750
1784
  end
1751
1785
 
@@ -1758,6 +1792,35 @@ module Twilio
1758
1792
 
1759
1793
  yield(self) if block_given?
1760
1794
  end
1795
+
1796
+ ##
1797
+ # Create a new <Config> element
1798
+ # name:: The name of the custom config
1799
+ # value:: The value of the custom config
1800
+ # keyword_args:: additional attributes
1801
+ def config(name: nil, value: nil, **keyword_args)
1802
+ append(Config.new(name: name, value: value, **keyword_args))
1803
+ end
1804
+
1805
+ ##
1806
+ # Create a new <Parameter> element
1807
+ # name:: The name of the custom parameter
1808
+ # value:: The value of the custom parameter
1809
+ # keyword_args:: additional attributes
1810
+ def parameter(name: nil, value: nil, **keyword_args)
1811
+ append(Parameter.new(name: name, value: value, **keyword_args))
1812
+ end
1813
+ end
1814
+
1815
+ ##
1816
+ # <Config> TwiML Noun
1817
+ class Config < TwiML
1818
+ def initialize(**keyword_args)
1819
+ super(**keyword_args)
1820
+ @name = 'Config'
1821
+
1822
+ yield(self) if block_given?
1823
+ end
1761
1824
  end
1762
1825
 
1763
1826
  ##
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.67.0'
2
+ VERSION = '5.67.3'
3
3
  end
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.67.0
4
+ version: 5.67.3
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: 2022-05-04 00:00:00.000000000 Z
11
+ date: 2022-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -418,10 +418,6 @@ files:
418
418
  - lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb
419
419
  - lib/twilio-ruby/rest/events/v1/subscription.rb
420
420
  - lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb
421
- - lib/twilio-ruby/rest/fax.rb
422
- - lib/twilio-ruby/rest/fax/v1.rb
423
- - lib/twilio-ruby/rest/fax/v1/fax.rb
424
- - lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb
425
421
  - lib/twilio-ruby/rest/flex_api.rb
426
422
  - lib/twilio-ruby/rest/flex_api/v1.rb
427
423
  - lib/twilio-ruby/rest/flex_api/v1/channel.rb
@@ -475,6 +471,8 @@ files:
475
471
  - lib/twilio-ruby/rest/lookups.rb
476
472
  - lib/twilio-ruby/rest/lookups/v1.rb
477
473
  - lib/twilio-ruby/rest/lookups/v1/phone_number.rb
474
+ - lib/twilio-ruby/rest/lookups/v2.rb
475
+ - lib/twilio-ruby/rest/lookups/v2/phone_number.rb
478
476
  - lib/twilio-ruby/rest/media.rb
479
477
  - lib/twilio-ruby/rest/media/v1.rb
480
478
  - lib/twilio-ruby/rest/media/v1/media_processor.rb
@@ -1,314 +0,0 @@
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 Fax < Domain
12
- class V1 < Version
13
- class FaxContext < InstanceContext
14
- ##
15
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
- class FaxMediaList < ListResource
17
- ##
18
- # Initialize the FaxMediaList
19
- # @param [Version] version Version that contains the resource
20
- # @param [String] fax_sid The SID of the fax the FaxMedia resource is associated
21
- # with.
22
- # @return [FaxMediaList] FaxMediaList
23
- def initialize(version, fax_sid: nil)
24
- super(version)
25
-
26
- # Path Solution
27
- @solution = {fax_sid: fax_sid}
28
- @uri = "/Faxes/#{@solution[:fax_sid]}/Media"
29
- end
30
-
31
- ##
32
- # Lists FaxMediaInstance records from the API as a list.
33
- # Unlike stream(), this operation is eager and will load `limit` records into
34
- # memory before returning.
35
- # @param [Integer] limit Upper limit for the number of records to return. stream()
36
- # guarantees to never return more than limit. Default is no limit
37
- # @param [Integer] page_size Number of records to fetch per request, when
38
- # not set will use the default value of 50 records. If no page_size is defined
39
- # but a limit is defined, stream() will attempt to read the limit with the most
40
- # efficient page size, i.e. min(limit, 1000)
41
- # @return [Array] Array of up to limit results
42
- def list(limit: nil, page_size: nil)
43
- self.stream(limit: limit, page_size: page_size).entries
44
- end
45
-
46
- ##
47
- # Streams FaxMediaInstance records from the API as an Enumerable.
48
- # This operation lazily loads records as efficiently as possible until the limit
49
- # is reached.
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 [Enumerable] Enumerable that will yield up to limit results
57
- def stream(limit: nil, page_size: nil)
58
- limits = @version.read_limits(limit, page_size)
59
-
60
- page = self.page(page_size: limits[:page_size], )
61
-
62
- @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
63
- end
64
-
65
- ##
66
- # When passed a block, yields FaxMediaInstance records from the API.
67
- # This operation lazily loads records as efficiently as possible until the limit
68
- # is reached.
69
- def each
70
- limits = @version.read_limits
71
-
72
- page = self.page(page_size: limits[:page_size], )
73
-
74
- @version.stream(page,
75
- limit: limits[:limit],
76
- page_limit: limits[:page_limit]).each {|x| yield x}
77
- end
78
-
79
- ##
80
- # Retrieve a single page of FaxMediaInstance records from the API.
81
- # Request is executed immediately.
82
- # @param [String] page_token PageToken provided by the API
83
- # @param [Integer] page_number Page Number, this value is simply for client state
84
- # @param [Integer] page_size Number of records to return, defaults to 50
85
- # @return [Page] Page of FaxMediaInstance
86
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
87
- params = Twilio::Values.of({
88
- 'PageToken' => page_token,
89
- 'Page' => page_number,
90
- 'PageSize' => page_size,
91
- })
92
-
93
- response = @version.page('GET', @uri, params: params)
94
-
95
- FaxMediaPage.new(@version, response, @solution)
96
- end
97
-
98
- ##
99
- # Retrieve a single page of FaxMediaInstance records from the API.
100
- # Request is executed immediately.
101
- # @param [String] target_url API-generated URL for the requested results page
102
- # @return [Page] Page of FaxMediaInstance
103
- def get_page(target_url)
104
- response = @version.domain.request(
105
- 'GET',
106
- target_url
107
- )
108
- FaxMediaPage.new(@version, response, @solution)
109
- end
110
-
111
- ##
112
- # Provide a user friendly representation
113
- def to_s
114
- '#<Twilio.Fax.V1.FaxMediaList>'
115
- end
116
- end
117
-
118
- ##
119
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
120
- class FaxMediaPage < Page
121
- ##
122
- # Initialize the FaxMediaPage
123
- # @param [Version] version Version that contains the resource
124
- # @param [Response] response Response from the API
125
- # @param [Hash] solution Path solution for the resource
126
- # @return [FaxMediaPage] FaxMediaPage
127
- def initialize(version, response, solution)
128
- super(version, response)
129
-
130
- # Path Solution
131
- @solution = solution
132
- end
133
-
134
- ##
135
- # Build an instance of FaxMediaInstance
136
- # @param [Hash] payload Payload response from the API
137
- # @return [FaxMediaInstance] FaxMediaInstance
138
- def get_instance(payload)
139
- FaxMediaInstance.new(@version, payload, fax_sid: @solution[:fax_sid], )
140
- end
141
-
142
- ##
143
- # Provide a user friendly representation
144
- def to_s
145
- '<Twilio.Fax.V1.FaxMediaPage>'
146
- end
147
- end
148
-
149
- ##
150
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
151
- class FaxMediaContext < InstanceContext
152
- ##
153
- # Initialize the FaxMediaContext
154
- # @param [Version] version Version that contains the resource
155
- # @param [String] fax_sid The SID of the fax with the FaxMedia resource to fetch.
156
- # @param [String] sid The Twilio-provided string that uniquely identifies the
157
- # FaxMedia resource to fetch.
158
- # @return [FaxMediaContext] FaxMediaContext
159
- def initialize(version, fax_sid, sid)
160
- super(version)
161
-
162
- # Path Solution
163
- @solution = {fax_sid: fax_sid, sid: sid, }
164
- @uri = "/Faxes/#{@solution[:fax_sid]}/Media/#{@solution[:sid]}"
165
- end
166
-
167
- ##
168
- # Fetch the FaxMediaInstance
169
- # @return [FaxMediaInstance] Fetched FaxMediaInstance
170
- def fetch
171
- payload = @version.fetch('GET', @uri)
172
-
173
- FaxMediaInstance.new(@version, payload, fax_sid: @solution[:fax_sid], sid: @solution[:sid], )
174
- end
175
-
176
- ##
177
- # Delete the FaxMediaInstance
178
- # @return [Boolean] true if delete succeeds, false otherwise
179
- def delete
180
- @version.delete('DELETE', @uri)
181
- end
182
-
183
- ##
184
- # Provide a user friendly representation
185
- def to_s
186
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
187
- "#<Twilio.Fax.V1.FaxMediaContext #{context}>"
188
- end
189
-
190
- ##
191
- # Provide a detailed, user friendly representation
192
- def inspect
193
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
194
- "#<Twilio.Fax.V1.FaxMediaContext #{context}>"
195
- end
196
- end
197
-
198
- ##
199
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
200
- class FaxMediaInstance < InstanceResource
201
- ##
202
- # Initialize the FaxMediaInstance
203
- # @param [Version] version Version that contains the resource
204
- # @param [Hash] payload payload that contains response from Twilio
205
- # @param [String] fax_sid The SID of the fax the FaxMedia resource is associated
206
- # with.
207
- # @param [String] sid The Twilio-provided string that uniquely identifies the
208
- # FaxMedia resource to fetch.
209
- # @return [FaxMediaInstance] FaxMediaInstance
210
- def initialize(version, payload, fax_sid: nil, sid: nil)
211
- super(version)
212
-
213
- # Marshaled Properties
214
- @properties = {
215
- 'sid' => payload['sid'],
216
- 'account_sid' => payload['account_sid'],
217
- 'fax_sid' => payload['fax_sid'],
218
- 'content_type' => payload['content_type'],
219
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
220
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
221
- 'url' => payload['url'],
222
- }
223
-
224
- # Context
225
- @instance_context = nil
226
- @params = {'fax_sid' => fax_sid, 'sid' => sid || @properties['sid'], }
227
- end
228
-
229
- ##
230
- # Generate an instance context for the instance, the context is capable of
231
- # performing various actions. All instance actions are proxied to the context
232
- # @return [FaxMediaContext] FaxMediaContext for this FaxMediaInstance
233
- def context
234
- unless @instance_context
235
- @instance_context = FaxMediaContext.new(@version, @params['fax_sid'], @params['sid'], )
236
- end
237
- @instance_context
238
- end
239
-
240
- ##
241
- # @return [String] The unique string that identifies the resource
242
- def sid
243
- @properties['sid']
244
- end
245
-
246
- ##
247
- # @return [String] The SID of the Account that created the resource
248
- def account_sid
249
- @properties['account_sid']
250
- end
251
-
252
- ##
253
- # @return [String] The SID of the fax the FaxMedia resource is associated with
254
- def fax_sid
255
- @properties['fax_sid']
256
- end
257
-
258
- ##
259
- # @return [String] The content type of the stored fax media
260
- def content_type
261
- @properties['content_type']
262
- end
263
-
264
- ##
265
- # @return [Time] The ISO 8601 date and time in GMT when the resource was created
266
- def date_created
267
- @properties['date_created']
268
- end
269
-
270
- ##
271
- # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
272
- def date_updated
273
- @properties['date_updated']
274
- end
275
-
276
- ##
277
- # @return [String] The absolute URL of the FaxMedia resource
278
- def url
279
- @properties['url']
280
- end
281
-
282
- ##
283
- # Fetch the FaxMediaInstance
284
- # @return [FaxMediaInstance] Fetched FaxMediaInstance
285
- def fetch
286
- context.fetch
287
- end
288
-
289
- ##
290
- # Delete the FaxMediaInstance
291
- # @return [Boolean] true if delete succeeds, false otherwise
292
- def delete
293
- context.delete
294
- end
295
-
296
- ##
297
- # Provide a user friendly representation
298
- def to_s
299
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
300
- "<Twilio.Fax.V1.FaxMediaInstance #{values}>"
301
- end
302
-
303
- ##
304
- # Provide a detailed, user friendly representation
305
- def inspect
306
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
307
- "<Twilio.Fax.V1.FaxMediaInstance #{values}>"
308
- end
309
- end
310
- end
311
- end
312
- end
313
- end
314
- end