twilio-ruby 5.70.0 → 5.70.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +12 -0
  3. data/Makefile +1 -1
  4. data/README.md +2 -2
  5. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +4 -4
  6. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +3 -3
  7. data/lib/twilio-ruby/rest/client.rb +14 -0
  8. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +4 -5
  9. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +305 -0
  10. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +332 -0
  11. data/lib/twilio-ruby/rest/microvisor/v1.rb +60 -0
  12. data/lib/twilio-ruby/rest/microvisor.rb +54 -0
  13. data/lib/twilio-ruby/rest/preview.rb +0 -25
  14. data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +261 -0
  15. data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +253 -0
  16. data/lib/twilio-ruby/rest/routes/v2/trunk.rb +261 -0
  17. data/lib/twilio-ruby/rest/routes/v2.rb +76 -0
  18. data/lib/twilio-ruby/rest/routes.rb +62 -0
  19. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +16 -6
  20. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
  21. data/lib/twilio-ruby/security/request_validator.rb +1 -1
  22. data/lib/twilio-ruby/version.rb +1 -1
  23. metadata +11 -8
  24. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +0 -294
  25. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
  26. data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
  27. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
  28. data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
  29. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -62
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 101ceb0bd96cbd76a7c4344baba3327f1bd84e73
4
- data.tar.gz: 7370d333ed649d1f5dc98553b61fa2d90ae80913
3
+ metadata.gz: 31be56012661b361f67bad5424d468afd6c943f9
4
+ data.tar.gz: ff3daacb26a2f6a155f946148f390dac47f9faf0
5
5
  SHA512:
6
- metadata.gz: 29aac9973a3d76158c94254f81956be791055e6013b989c581f38429b4b187a3ef8b5264f62eabacc2297efdcda52275ce7eb0587b9e8631b36fcfb14f1bafb4
7
- data.tar.gz: 18dd0b51c26195e9377aa2d6698745296fd155f388a387de9d3734c6124891f0301b1f336e73db5ede774ec34dec79dbc862e3cb9ae0b5cf476edf95c5d29ae0
6
+ metadata.gz: a0d1bbbc8001ff14862d1e4920ae622afb79e0e0c5670892bf122f5b478a7e6107b9ace69f970d458d1fae59b30ce0d9d22e72a5379cd3490fdf4b40c395964a
7
+ data.tar.gz: e1190b1ad68da46e6bf96a86da1fa95105037048ee7a9398647aeff584c404fe8018ec2ebc131434e94c9c818d19762a7d45d4ebafb6867cacdcf42a81c818a0
data/CHANGES.md CHANGED
@@ -1,6 +1,18 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2022-08-10] Version 5.70.1
5
+ ---------------------------
6
+ **Library - Fix**
7
+ - [PR #614](https://github.com/twilio/twilio-ruby/pull/614): Make RequestValidator#validate fail if URL has no query params. Thanks to [@haffla](https://github.com/haffla)!
8
+
9
+ **Routes**
10
+ - Inbound Proccessing Region API - Public GA
11
+
12
+ **Supersim**
13
+ - Allow updating `DataLimit` on a Fleet
14
+
15
+
4
16
  [2022-07-21] Version 5.70.0
5
17
  ---------------------------
6
18
  **Flex**
data/Makefile CHANGED
@@ -17,7 +17,7 @@ authors:
17
17
  git log --raw | grep "^Author: " | cut -d ' ' -f2- | cut -d '<' -f1 | sed 's/^/- /' | sort | uniq >> AUTHORS.md
18
18
 
19
19
  API_DEFINITIONS_SHA=$(shell git log --oneline | grep Regenerated | head -n1 | cut -d ' ' -f 5)
20
- CURRENT_TAG=$(shell [[ "${GITHUB_TAG}" == *"-rc"* ]] && echo "rc" || echo "latest")
20
+ CURRENT_TAG=$(shell expr "${GITHUB_TAG}" : ".*-rc.*" >/dev/null && echo "rc" || echo "latest")
21
21
  docker-build:
22
22
  docker build -t twilio/twilio-ruby .
23
23
  docker tag twilio/twilio-ruby twilio/twilio-ruby:${GITHUB_TAG}
data/README.md CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
34
34
  To install using [Bundler][bundler] grab the latest stable version:
35
35
 
36
36
  ```ruby
37
- gem 'twilio-ruby', '~> 5.70.0'
37
+ gem 'twilio-ruby', '~> 5.70.1'
38
38
  ```
39
39
 
40
40
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
41
41
 
42
42
  ```bash
43
- gem install twilio-ruby -v 5.70.0
43
+ gem install twilio-ruby -v 5.70.1
44
44
  ```
45
45
 
46
46
  To build and install the development branch yourself from the latest source:
@@ -113,7 +113,7 @@ module Twilio
113
113
  ##
114
114
  # Create the IpAddressInstance
115
115
  # @param [String] friendly_name A human readable descriptive text for this
116
- # resource, up to 64 characters long.
116
+ # resource, up to 255 characters long.
117
117
  # @param [String] ip_address An IP address in dotted decimal notation from which
118
118
  # you want to accept traffic. Any SIP requests from this IP address will be
119
119
  # allowed by Twilio. IPv4 only supported today.
@@ -224,7 +224,7 @@ module Twilio
224
224
  # you want to accept traffic. Any SIP requests from this IP address will be
225
225
  # allowed by Twilio. IPv4 only supported today.
226
226
  # @param [String] friendly_name A human readable descriptive text for this
227
- # resource, up to 64 characters long.
227
+ # resource, up to 255 characters long.
228
228
  # @param [String] cidr_prefix_length An integer representing the length of the
229
229
  # CIDR prefix to use with this IP address when accepting traffic. By default the
230
230
  # entire IP address is used.
@@ -335,7 +335,7 @@ module Twilio
335
335
  end
336
336
 
337
337
  ##
338
- # @return [String] A human readable descriptive text for this resource, up to 64 characters long.
338
+ # @return [String] A human readable descriptive text for this resource, up to 255 characters long.
339
339
  def friendly_name
340
340
  @properties['friendly_name']
341
341
  end
@@ -389,7 +389,7 @@ module Twilio
389
389
  # you want to accept traffic. Any SIP requests from this IP address will be
390
390
  # allowed by Twilio. IPv4 only supported today.
391
391
  # @param [String] friendly_name A human readable descriptive text for this
392
- # resource, up to 64 characters long.
392
+ # resource, up to 255 characters long.
393
393
  # @param [String] cidr_prefix_length An integer representing the length of the
394
394
  # CIDR prefix to use with this IP address when accepting traffic. By default the
395
395
  # entire IP address is used.
@@ -110,7 +110,7 @@ module Twilio
110
110
  ##
111
111
  # Create the IpAccessControlListInstance
112
112
  # @param [String] friendly_name A human readable descriptive text that describes
113
- # the IpAccessControlList, up to 64 characters long.
113
+ # the IpAccessControlList, up to 255 characters long.
114
114
  # @return [IpAccessControlListInstance] Created IpAccessControlListInstance
115
115
  def create(friendly_name: nil)
116
116
  data = Twilio::Values.of({'FriendlyName' => friendly_name, })
@@ -193,7 +193,7 @@ module Twilio
193
193
 
194
194
  ##
195
195
  # Update the IpAccessControlListInstance
196
- # @param [String] friendly_name A human readable descriptive text, up to 64
196
+ # @param [String] friendly_name A human readable descriptive text, up to 255
197
197
  # characters long.
198
198
  # @return [IpAccessControlListInstance] Updated IpAccessControlListInstance
199
199
  def update(friendly_name: nil)
@@ -344,7 +344,7 @@ module Twilio
344
344
 
345
345
  ##
346
346
  # Update the IpAccessControlListInstance
347
- # @param [String] friendly_name A human readable descriptive text, up to 64
347
+ # @param [String] friendly_name A human readable descriptive text, up to 255
348
348
  # characters long.
349
349
  # @return [IpAccessControlListInstance] Updated IpAccessControlListInstance
350
350
  def update(friendly_name: nil)
@@ -49,6 +49,7 @@ module Twilio
49
49
  @preview = nil
50
50
  @pricing = nil
51
51
  @proxy = nil
52
+ @routes = nil
52
53
  @serverless = nil
53
54
  @studio = nil
54
55
  @sync = nil
@@ -61,6 +62,7 @@ module Twilio
61
62
  @wireless = nil
62
63
  @supersim = nil
63
64
  @bulkexports = nil
65
+ @microvisor = nil
64
66
  end
65
67
 
66
68
  ##
@@ -275,6 +277,12 @@ module Twilio
275
277
  @proxy ||= Proxy.new self
276
278
  end
277
279
 
280
+ ##
281
+ # Access the Routes Twilio Domain
282
+ def routes
283
+ @routes ||= Routes.new self
284
+ end
285
+
278
286
  ##
279
287
  # Access the Serverless Twilio Domain
280
288
  def serverless
@@ -347,6 +355,12 @@ module Twilio
347
355
  @bulkexports ||= Bulkexports.new self
348
356
  end
349
357
 
358
+ ##
359
+ # Access the Microvisor Twilio Domain
360
+ def microvisor
361
+ @microvisor ||= Microvisor.new self
362
+ end
363
+
350
364
  ##
351
365
  # @param [String] sid The unique string that that we created to identify the
352
366
  # Address resource.
@@ -33,11 +33,10 @@ module Twilio
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
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. **Note: this feature has not yet been enabled but customers are
40
- # advised to explicitly set it on all their new PlayerStreamer resources.**
36
+ # PlayerStreamer is active (`created` or `started`) before automatically ends. The
37
+ # default value is 300 seconds, and the maximum value is 90000 seconds. Once this
38
+ # maximum duration is reached, Twilio will end the PlayerStreamer, regardless of
39
+ # whether media is still streaming.
41
40
  # @return [PlayerStreamerInstance] Created PlayerStreamerInstance
42
41
  def create(video: :unset, status_callback: :unset, status_callback_method: :unset, max_duration: :unset)
43
42
  data = Twilio::Values.of({
@@ -0,0 +1,305 @@
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 Microvisor < 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 AppList < ListResource
16
+ ##
17
+ # Initialize the AppList
18
+ # @param [Version] version Version that contains the resource
19
+ # @return [AppList] AppList
20
+ def initialize(version)
21
+ super(version)
22
+
23
+ # Path Solution
24
+ @solution = {}
25
+ @uri = "/Apps"
26
+ end
27
+
28
+ ##
29
+ # Lists AppInstance 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 [Integer] limit Upper limit for the number of records to return. stream()
33
+ # guarantees to never return more than limit. Default is no limit
34
+ # @param [Integer] page_size Number of records to fetch per request, when
35
+ # not set will use the default value of 50 records. If no page_size is defined
36
+ # but a limit is defined, stream() will attempt to read the limit with the most
37
+ # efficient page size, i.e. min(limit, 1000)
38
+ # @return [Array] Array of up to limit results
39
+ def list(limit: nil, page_size: nil)
40
+ self.stream(limit: limit, page_size: page_size).entries
41
+ end
42
+
43
+ ##
44
+ # Streams AppInstance records from the API as an Enumerable.
45
+ # This operation lazily loads records as efficiently as possible until the limit
46
+ # is reached.
47
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
48
+ # guarantees to never return more than limit. Default is no limit.
49
+ # @param [Integer] page_size Number of records to fetch per request, when
50
+ # not set will use the default value of 50 records. If no page_size is defined
51
+ # but a limit is defined, stream() will attempt to read the limit with the most
52
+ # efficient page size, i.e. min(limit, 1000)
53
+ # @return [Enumerable] Enumerable that will yield up to limit results
54
+ def stream(limit: nil, page_size: nil)
55
+ limits = @version.read_limits(limit, page_size)
56
+
57
+ page = self.page(page_size: limits[:page_size], )
58
+
59
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
60
+ end
61
+
62
+ ##
63
+ # When passed a block, yields AppInstance records from the API.
64
+ # This operation lazily loads records as efficiently as possible until the limit
65
+ # is reached.
66
+ def each
67
+ limits = @version.read_limits
68
+
69
+ page = self.page(page_size: limits[:page_size], )
70
+
71
+ @version.stream(page,
72
+ limit: limits[:limit],
73
+ page_limit: limits[:page_limit]).each {|x| yield x}
74
+ end
75
+
76
+ ##
77
+ # Retrieve a single page of AppInstance records from the API.
78
+ # Request is executed immediately.
79
+ # @param [String] page_token PageToken provided by the API
80
+ # @param [Integer] page_number Page Number, this value is simply for client state
81
+ # @param [Integer] page_size Number of records to return, defaults to 50
82
+ # @return [Page] Page of AppInstance
83
+ def page(page_token: :unset, page_number: :unset, page_size: :unset)
84
+ params = Twilio::Values.of({
85
+ 'PageToken' => page_token,
86
+ 'Page' => page_number,
87
+ 'PageSize' => page_size,
88
+ })
89
+
90
+ response = @version.page('GET', @uri, params: params)
91
+
92
+ AppPage.new(@version, response, @solution)
93
+ end
94
+
95
+ ##
96
+ # Retrieve a single page of AppInstance records from the API.
97
+ # Request is executed immediately.
98
+ # @param [String] target_url API-generated URL for the requested results page
99
+ # @return [Page] Page of AppInstance
100
+ def get_page(target_url)
101
+ response = @version.domain.request(
102
+ 'GET',
103
+ target_url
104
+ )
105
+ AppPage.new(@version, response, @solution)
106
+ end
107
+
108
+ ##
109
+ # Provide a user friendly representation
110
+ def to_s
111
+ '#<Twilio.Microvisor.V1.AppList>'
112
+ end
113
+ end
114
+
115
+ ##
116
+ # 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.
117
+ class AppPage < Page
118
+ ##
119
+ # Initialize the AppPage
120
+ # @param [Version] version Version that contains the resource
121
+ # @param [Response] response Response from the API
122
+ # @param [Hash] solution Path solution for the resource
123
+ # @return [AppPage] AppPage
124
+ def initialize(version, response, solution)
125
+ super(version, response)
126
+
127
+ # Path Solution
128
+ @solution = solution
129
+ end
130
+
131
+ ##
132
+ # Build an instance of AppInstance
133
+ # @param [Hash] payload Payload response from the API
134
+ # @return [AppInstance] AppInstance
135
+ def get_instance(payload)
136
+ AppInstance.new(@version, payload, )
137
+ end
138
+
139
+ ##
140
+ # Provide a user friendly representation
141
+ def to_s
142
+ '<Twilio.Microvisor.V1.AppPage>'
143
+ end
144
+ end
145
+
146
+ ##
147
+ # 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.
148
+ class AppContext < InstanceContext
149
+ ##
150
+ # Initialize the AppContext
151
+ # @param [Version] version Version that contains the resource
152
+ # @param [String] sid A 34-character string that uniquely identifies this App.
153
+ # @return [AppContext] AppContext
154
+ def initialize(version, sid)
155
+ super(version)
156
+
157
+ # Path Solution
158
+ @solution = {sid: sid, }
159
+ @uri = "/Apps/#{@solution[:sid]}"
160
+ end
161
+
162
+ ##
163
+ # Fetch the AppInstance
164
+ # @return [AppInstance] Fetched AppInstance
165
+ def fetch
166
+ payload = @version.fetch('GET', @uri)
167
+
168
+ AppInstance.new(@version, payload, sid: @solution[:sid], )
169
+ end
170
+
171
+ ##
172
+ # Delete the AppInstance
173
+ # @return [Boolean] true if delete succeeds, false otherwise
174
+ def delete
175
+ @version.delete('DELETE', @uri)
176
+ end
177
+
178
+ ##
179
+ # Provide a user friendly representation
180
+ def to_s
181
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
182
+ "#<Twilio.Microvisor.V1.AppContext #{context}>"
183
+ end
184
+
185
+ ##
186
+ # Provide a detailed, user friendly representation
187
+ def inspect
188
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
189
+ "#<Twilio.Microvisor.V1.AppContext #{context}>"
190
+ end
191
+ end
192
+
193
+ ##
194
+ # 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.
195
+ class AppInstance < InstanceResource
196
+ ##
197
+ # Initialize the AppInstance
198
+ # @param [Version] version Version that contains the resource
199
+ # @param [Hash] payload payload that contains response from Twilio
200
+ # @param [String] sid A 34-character string that uniquely identifies this App.
201
+ # @return [AppInstance] AppInstance
202
+ def initialize(version, payload, sid: nil)
203
+ super(version)
204
+
205
+ # Marshaled Properties
206
+ @properties = {
207
+ 'sid' => payload['sid'],
208
+ 'account_sid' => payload['account_sid'],
209
+ 'hash' => payload['hash'],
210
+ 'unique_name' => payload['unique_name'],
211
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
212
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
213
+ 'url' => payload['url'],
214
+ }
215
+
216
+ # Context
217
+ @instance_context = nil
218
+ @params = {'sid' => sid || @properties['sid'], }
219
+ end
220
+
221
+ ##
222
+ # Generate an instance context for the instance, the context is capable of
223
+ # performing various actions. All instance actions are proxied to the context
224
+ # @return [AppContext] AppContext for this AppInstance
225
+ def context
226
+ unless @instance_context
227
+ @instance_context = AppContext.new(@version, @params['sid'], )
228
+ end
229
+ @instance_context
230
+ end
231
+
232
+ ##
233
+ # @return [String] A string that uniquely identifies this App.
234
+ def sid
235
+ @properties['sid']
236
+ end
237
+
238
+ ##
239
+ # @return [String] The Account SID.
240
+ def account_sid
241
+ @properties['account_sid']
242
+ end
243
+
244
+ ##
245
+ # @return [String] App manifest hash represented as hash_algorithm:hash_value.
246
+ def hash
247
+ @properties['hash']
248
+ end
249
+
250
+ ##
251
+ # @return [String] An developer-defined string that uniquely identifies the App.
252
+ def unique_name
253
+ @properties['unique_name']
254
+ end
255
+
256
+ ##
257
+ # @return [Time] The date that this App was created.
258
+ def date_created
259
+ @properties['date_created']
260
+ end
261
+
262
+ ##
263
+ # @return [Time] The date that this App was last updated.
264
+ def date_updated
265
+ @properties['date_updated']
266
+ end
267
+
268
+ ##
269
+ # @return [String] The URL of this resource.
270
+ def url
271
+ @properties['url']
272
+ end
273
+
274
+ ##
275
+ # Fetch the AppInstance
276
+ # @return [AppInstance] Fetched AppInstance
277
+ def fetch
278
+ context.fetch
279
+ end
280
+
281
+ ##
282
+ # Delete the AppInstance
283
+ # @return [Boolean] true if delete succeeds, false otherwise
284
+ def delete
285
+ context.delete
286
+ end
287
+
288
+ ##
289
+ # Provide a user friendly representation
290
+ def to_s
291
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
292
+ "<Twilio.Microvisor.V1.AppInstance #{values}>"
293
+ end
294
+
295
+ ##
296
+ # Provide a detailed, user friendly representation
297
+ def inspect
298
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
299
+ "<Twilio.Microvisor.V1.AppInstance #{values}>"
300
+ end
301
+ end
302
+ end
303
+ end
304
+ end
305
+ end