twilio-ruby 7.6.3 → 7.6.4

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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +28 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +1 -1
  5. data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +1 -1
  6. data/lib/twilio-ruby/rest/client.rb +0 -10
  7. data/lib/twilio-ruby/rest/lookups/v2/bucket.rb +315 -0
  8. data/lib/twilio-ruby/rest/lookups/v2/lookup_override.rb +390 -0
  9. data/lib/twilio-ruby/rest/lookups/v2/query.rb +456 -0
  10. data/lib/twilio-ruby/rest/lookups/v2/rate_limit.rb +136 -0
  11. data/lib/twilio-ruby/rest/lookups/v2.rb +86 -0
  12. data/lib/twilio-ruby/rest/messaging/v1/service.rb +4 -4
  13. data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +133 -1
  14. data/lib/twilio-ruby/rest/numbers/v1/{porting_webhook_configuration_fetch.rb → webhook.rb} +20 -20
  15. data/lib/twilio-ruby/rest/numbers/v1.rb +6 -6
  16. data/lib/twilio-ruby/rest/proxy/v1/service.rb +0 -27
  17. data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +1 -1
  18. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +1 -1
  19. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +7 -0
  20. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +3 -3
  21. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +2 -2
  22. data/lib/twilio-ruby/rest/{proxy/v1/service/short_code.rb → video/v1/room/transcriptions.rb} +110 -123
  23. data/lib/twilio-ruby/rest/video/v1/room.rb +27 -0
  24. data/lib/twilio-ruby/twiml/voice_response.rb +24 -0
  25. data/lib/twilio-ruby/version.rb +1 -1
  26. metadata +8 -20
  27. data/lib/twilio-ruby/rest/knowledge/v1/knowledge/chunk.rb +0 -232
  28. data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +0 -213
  29. data/lib/twilio-ruby/rest/knowledge/v1/knowledge.rb +0 -623
  30. data/lib/twilio-ruby/rest/knowledge/v1.rb +0 -49
  31. data/lib/twilio-ruby/rest/knowledge.rb +0 -6
  32. data/lib/twilio-ruby/rest/knowledge_base.rb +0 -38
  33. data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +0 -382
  34. data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +0 -375
  35. data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +0 -213
  36. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +0 -361
  37. data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +0 -398
  38. data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +0 -391
  39. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +0 -441
  40. data/lib/twilio-ruby/rest/microvisor/v1.rb +0 -94
  41. data/lib/twilio-ruby/rest/microvisor.rb +0 -24
  42. data/lib/twilio-ruby/rest/microvisor_base.rb +0 -38
@@ -1,441 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # Twilio - Microvisor
8
- # This is the public Twilio REST API.
9
- #
10
- # NOTE: This class is auto generated by OpenAPI Generator.
11
- # https://openapi-generator.tech
12
- # Do not edit the class manually.
13
- #
14
-
15
-
16
- module Twilio
17
- module REST
18
- class Microvisor < MicrovisorBase
19
- class V1 < Version
20
- class DeviceList < ListResource
21
-
22
- ##
23
- # Initialize the DeviceList
24
- # @param [Version] version Version that contains the resource
25
- # @return [DeviceList] DeviceList
26
- def initialize(version)
27
- super(version)
28
- # Path Solution
29
- @solution = { }
30
- @uri = "/Devices"
31
-
32
- end
33
-
34
- ##
35
- # Lists DeviceInstance records from the API as a list.
36
- # Unlike stream(), this operation is eager and will load `limit` records into
37
- # memory before returning.
38
- # @param [Integer] limit Upper limit for the number of records to return. stream()
39
- # guarantees to never return more than limit. Default is no limit
40
- # @param [Integer] page_size Number of records to fetch per request, when
41
- # not set will use the default value of 50 records. If no page_size is defined
42
- # but a limit is defined, stream() will attempt to read the limit with the most
43
- # efficient page size, i.e. min(limit, 1000)
44
- # @return [Array] Array of up to limit results
45
- def list(limit: nil, page_size: nil)
46
- self.stream(
47
- limit: limit,
48
- page_size: page_size
49
- ).entries
50
- end
51
-
52
- ##
53
- # Streams Instance records from the API as an Enumerable.
54
- # This operation lazily loads records as efficiently as possible until the limit
55
- # is reached.
56
- # @param [Integer] limit Upper limit for the number of records to return. stream()
57
- # guarantees to never return more than limit. Default is no limit
58
- # @param [Integer] page_size Number of records to fetch per request, when
59
- # not set will use the default value of 50 records. If no page_size is defined
60
- # but a limit is defined, stream() will attempt to read the limit with the most
61
- # efficient page size, i.e. min(limit, 1000)
62
- # @return [Enumerable] Enumerable that will yield up to limit results
63
- def stream(limit: nil, page_size: nil)
64
- limits = @version.read_limits(limit, page_size)
65
-
66
- page = self.page(
67
- page_size: limits[:page_size], )
68
-
69
- @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
70
- end
71
-
72
- ##
73
- # When passed a block, yields DeviceInstance records from the API.
74
- # This operation lazily loads records as efficiently as possible until the limit
75
- # is reached.
76
- def each
77
- limits = @version.read_limits
78
-
79
- page = self.page(page_size: limits[:page_size], )
80
-
81
- @version.stream(page,
82
- limit: limits[:limit],
83
- page_limit: limits[:page_limit]).each {|x| yield x}
84
- end
85
-
86
- ##
87
- # Retrieve a single page of DeviceInstance records from the API.
88
- # Request is executed immediately.
89
- # @param [String] page_token PageToken provided by the API
90
- # @param [Integer] page_number Page Number, this value is simply for client state
91
- # @param [Integer] page_size Number of records to return, defaults to 50
92
- # @return [Page] Page of DeviceInstance
93
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
94
- params = Twilio::Values.of({
95
- 'PageToken' => page_token,
96
- 'Page' => page_number,
97
- 'PageSize' => page_size,
98
- })
99
- headers = Twilio::Values.of({})
100
-
101
-
102
-
103
- response = @version.page('GET', @uri, params: params, headers: headers)
104
-
105
- DevicePage.new(@version, response, @solution)
106
- end
107
-
108
- ##
109
- # Retrieve a single page of DeviceInstance records from the API.
110
- # Request is executed immediately.
111
- # @param [String] target_url API-generated URL for the requested results page
112
- # @return [Page] Page of DeviceInstance
113
- def get_page(target_url)
114
- response = @version.domain.request(
115
- 'GET',
116
- target_url
117
- )
118
- DevicePage.new(@version, response, @solution)
119
- end
120
-
121
-
122
-
123
- # Provide a user friendly representation
124
- def to_s
125
- '#<Twilio.Microvisor.V1.DeviceList>'
126
- end
127
- end
128
-
129
-
130
- class DeviceContext < InstanceContext
131
- ##
132
- # Initialize the DeviceContext
133
- # @param [Version] version Version that contains the resource
134
- # @param [String] sid A 34-character string that uniquely identifies this Device.
135
- # @return [DeviceContext] DeviceContext
136
- def initialize(version, sid)
137
- super(version)
138
-
139
- # Path Solution
140
- @solution = { sid: sid, }
141
- @uri = "/Devices/#{@solution[:sid]}"
142
-
143
- # Dependents
144
- @device_secrets = nil
145
- @device_configs = nil
146
- end
147
- ##
148
- # Fetch the DeviceInstance
149
- # @return [DeviceInstance] Fetched DeviceInstance
150
- def fetch
151
-
152
- headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
153
-
154
-
155
-
156
-
157
-
158
- payload = @version.fetch('GET', @uri, headers: headers)
159
- DeviceInstance.new(
160
- @version,
161
- payload,
162
- sid: @solution[:sid],
163
- )
164
- end
165
-
166
- ##
167
- # Update the DeviceInstance
168
- # @param [String] unique_name A unique and addressable name to be assigned to this Device by the developer. It may be used in place of the Device SID.
169
- # @param [String] target_app The SID or unique name of the App to be targeted to the Device.
170
- # @param [Boolean] logging_enabled A Boolean flag specifying whether to enable application logging. Logs will be enabled or extended for 24 hours.
171
- # @param [Boolean] restart_app Set to true to restart the App running on the Device.
172
- # @return [DeviceInstance] Updated DeviceInstance
173
- def update(
174
- unique_name: :unset,
175
- target_app: :unset,
176
- logging_enabled: :unset,
177
- restart_app: :unset
178
- )
179
-
180
- data = Twilio::Values.of({
181
- 'UniqueName' => unique_name,
182
- 'TargetApp' => target_app,
183
- 'LoggingEnabled' => logging_enabled,
184
- 'RestartApp' => restart_app,
185
- })
186
-
187
- headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
188
-
189
-
190
-
191
-
192
-
193
- payload = @version.update('POST', @uri, data: data, headers: headers)
194
- DeviceInstance.new(
195
- @version,
196
- payload,
197
- sid: @solution[:sid],
198
- )
199
- end
200
-
201
- ##
202
- # Access the device_secrets
203
- # @return [DeviceSecretList]
204
- # @return [DeviceSecretContext] if sid was passed.
205
- def device_secrets(key=:unset)
206
-
207
- raise ArgumentError, 'key cannot be nil' if key.nil?
208
-
209
- if key != :unset
210
- return DeviceSecretContext.new(@version, @solution[:sid],key )
211
- end
212
-
213
- unless @device_secrets
214
- @device_secrets = DeviceSecretList.new(
215
- @version, device_sid: @solution[:sid], )
216
- end
217
-
218
- @device_secrets
219
- end
220
- ##
221
- # Access the device_configs
222
- # @return [DeviceConfigList]
223
- # @return [DeviceConfigContext] if sid was passed.
224
- def device_configs(key=:unset)
225
-
226
- raise ArgumentError, 'key cannot be nil' if key.nil?
227
-
228
- if key != :unset
229
- return DeviceConfigContext.new(@version, @solution[:sid],key )
230
- end
231
-
232
- unless @device_configs
233
- @device_configs = DeviceConfigList.new(
234
- @version, device_sid: @solution[:sid], )
235
- end
236
-
237
- @device_configs
238
- end
239
-
240
- ##
241
- # Provide a user friendly representation
242
- def to_s
243
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
244
- "#<Twilio.Microvisor.V1.DeviceContext #{context}>"
245
- end
246
-
247
- ##
248
- # Provide a detailed, user friendly representation
249
- def inspect
250
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
251
- "#<Twilio.Microvisor.V1.DeviceContext #{context}>"
252
- end
253
- end
254
-
255
- class DevicePage < Page
256
- ##
257
- # Initialize the DevicePage
258
- # @param [Version] version Version that contains the resource
259
- # @param [Response] response Response from the API
260
- # @param [Hash] solution Path solution for the resource
261
- # @return [DevicePage] DevicePage
262
- def initialize(version, response, solution)
263
- super(version, response)
264
-
265
- # Path Solution
266
- @solution = solution
267
- end
268
-
269
- ##
270
- # Build an instance of DeviceInstance
271
- # @param [Hash] payload Payload response from the API
272
- # @return [DeviceInstance] DeviceInstance
273
- def get_instance(payload)
274
- DeviceInstance.new(@version, payload)
275
- end
276
-
277
- ##
278
- # Provide a user friendly representation
279
- def to_s
280
- '<Twilio.Microvisor.V1.DevicePage>'
281
- end
282
- end
283
- class DeviceInstance < InstanceResource
284
- ##
285
- # Initialize the DeviceInstance
286
- # @param [Version] version Version that contains the resource
287
- # @param [Hash] payload payload that contains response from Twilio
288
- # @param [String] account_sid The SID of the
289
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Device
290
- # resource.
291
- # @param [String] sid The SID of the Call resource to fetch.
292
- # @return [DeviceInstance] DeviceInstance
293
- def initialize(version, payload , sid: nil)
294
- super(version)
295
-
296
- # Marshaled Properties
297
- @properties = {
298
- 'sid' => payload['sid'],
299
- 'unique_name' => payload['unique_name'],
300
- 'account_sid' => payload['account_sid'],
301
- 'app' => payload['app'],
302
- 'logging' => payload['logging'],
303
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
304
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
305
- 'url' => payload['url'],
306
- 'links' => payload['links'],
307
- }
308
-
309
- # Context
310
- @instance_context = nil
311
- @params = { 'sid' => sid || @properties['sid'] , }
312
- end
313
-
314
- ##
315
- # Generate an instance context for the instance, the context is capable of
316
- # performing various actions. All instance actions are proxied to the context
317
- # @return [DeviceContext] CallContext for this CallInstance
318
- def context
319
- unless @instance_context
320
- @instance_context = DeviceContext.new(@version , @params['sid'])
321
- end
322
- @instance_context
323
- end
324
-
325
- ##
326
- # @return [String] A 34-character string that uniquely identifies this Device.
327
- def sid
328
- @properties['sid']
329
- end
330
-
331
- ##
332
- # @return [String] A developer-defined string that uniquely identifies the Device. This value must be unique for all Devices on this Account. The `unique_name` value may be used as an alternative to the `sid` in the URL path to address the resource.
333
- def unique_name
334
- @properties['unique_name']
335
- end
336
-
337
- ##
338
- # @return [String] The unique SID identifier of the Account.
339
- def account_sid
340
- @properties['account_sid']
341
- end
342
-
343
- ##
344
- # @return [Hash] Information about the target App and the App reported by this Device. Contains the properties `target_sid`, `date_targeted`, `update_status` (one of `up-to-date`, `pending` and `error`), `update_error_code`, `reported_sid` and `date_reported`.
345
- def app
346
- @properties['app']
347
- end
348
-
349
- ##
350
- # @return [Hash] Object specifying whether application logging is enabled for this Device. Contains the properties `enabled` and `date_expires`.
351
- def logging
352
- @properties['logging']
353
- end
354
-
355
- ##
356
- # @return [Time] The date that this Device was created, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
357
- def date_created
358
- @properties['date_created']
359
- end
360
-
361
- ##
362
- # @return [Time] The date that this Device was last updated, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
363
- def date_updated
364
- @properties['date_updated']
365
- end
366
-
367
- ##
368
- # @return [String] The URL of this resource.
369
- def url
370
- @properties['url']
371
- end
372
-
373
- ##
374
- # @return [Hash] The absolute URLs of related resources.
375
- def links
376
- @properties['links']
377
- end
378
-
379
- ##
380
- # Fetch the DeviceInstance
381
- # @return [DeviceInstance] Fetched DeviceInstance
382
- def fetch
383
-
384
- context.fetch
385
- end
386
-
387
- ##
388
- # Update the DeviceInstance
389
- # @param [String] unique_name A unique and addressable name to be assigned to this Device by the developer. It may be used in place of the Device SID.
390
- # @param [String] target_app The SID or unique name of the App to be targeted to the Device.
391
- # @param [Boolean] logging_enabled A Boolean flag specifying whether to enable application logging. Logs will be enabled or extended for 24 hours.
392
- # @param [Boolean] restart_app Set to true to restart the App running on the Device.
393
- # @return [DeviceInstance] Updated DeviceInstance
394
- def update(
395
- unique_name: :unset,
396
- target_app: :unset,
397
- logging_enabled: :unset,
398
- restart_app: :unset
399
- )
400
-
401
- context.update(
402
- unique_name: unique_name,
403
- target_app: target_app,
404
- logging_enabled: logging_enabled,
405
- restart_app: restart_app,
406
- )
407
- end
408
-
409
- ##
410
- # Access the device_secrets
411
- # @return [device_secrets] device_secrets
412
- def device_secrets
413
- context.device_secrets
414
- end
415
-
416
- ##
417
- # Access the device_configs
418
- # @return [device_configs] device_configs
419
- def device_configs
420
- context.device_configs
421
- end
422
-
423
- ##
424
- # Provide a user friendly representation
425
- def to_s
426
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
427
- "<Twilio.Microvisor.V1.DeviceInstance #{values}>"
428
- end
429
-
430
- ##
431
- # Provide a detailed, user friendly representation
432
- def inspect
433
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
434
- "<Twilio.Microvisor.V1.DeviceInstance #{values}>"
435
- end
436
- end
437
-
438
- end
439
- end
440
- end
441
- end
@@ -1,94 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # Twilio - Microvisor
8
- # This is the public Twilio REST API.
9
- #
10
- # NOTE: This class is auto generated by OpenAPI Generator.
11
- # https://openapi-generator.tech
12
- # Do not edit the class manually.
13
- #
14
-
15
- module Twilio
16
- module REST
17
- class Microvisor
18
- class V1 < Version
19
- ##
20
- # Initialize the V1 version of Microvisor
21
- def initialize(domain)
22
- super
23
- @version = 'v1'
24
- @account_configs = nil
25
- @account_secrets = nil
26
- @apps = nil
27
- @devices = nil
28
- end
29
-
30
- ##
31
- # @param [String] key The config key; up to 100 characters.
32
- # @return [Twilio::REST::Microvisor::V1::AccountConfigContext] if key was passed.
33
- # @return [Twilio::REST::Microvisor::V1::AccountConfigList]
34
- def account_configs(key=:unset)
35
- if key.nil?
36
- raise ArgumentError, 'key cannot be nil'
37
- end
38
- if key == :unset
39
- @account_configs ||= AccountConfigList.new self
40
- else
41
- AccountConfigContext.new(self, key)
42
- end
43
- end
44
- ##
45
- # @param [String] key The secret key; up to 100 characters.
46
- # @return [Twilio::REST::Microvisor::V1::AccountSecretContext] if key was passed.
47
- # @return [Twilio::REST::Microvisor::V1::AccountSecretList]
48
- def account_secrets(key=:unset)
49
- if key.nil?
50
- raise ArgumentError, 'key cannot be nil'
51
- end
52
- if key == :unset
53
- @account_secrets ||= AccountSecretList.new self
54
- else
55
- AccountSecretContext.new(self, key)
56
- end
57
- end
58
- ##
59
- # @param [String] sid A 34-character string that uniquely identifies this App.
60
- # @return [Twilio::REST::Microvisor::V1::AppContext] if sid was passed.
61
- # @return [Twilio::REST::Microvisor::V1::AppList]
62
- def apps(sid=:unset)
63
- if sid.nil?
64
- raise ArgumentError, 'sid cannot be nil'
65
- end
66
- if sid == :unset
67
- @apps ||= AppList.new self
68
- else
69
- AppContext.new(self, sid)
70
- end
71
- end
72
- ##
73
- # @param [String] sid A 34-character string that uniquely identifies this Device.
74
- # @return [Twilio::REST::Microvisor::V1::DeviceContext] if sid was passed.
75
- # @return [Twilio::REST::Microvisor::V1::DeviceList]
76
- def devices(sid=:unset)
77
- if sid.nil?
78
- raise ArgumentError, 'sid cannot be nil'
79
- end
80
- if sid == :unset
81
- @devices ||= DeviceList.new self
82
- else
83
- DeviceContext.new(self, sid)
84
- end
85
- end
86
- ##
87
- # Provide a user friendly representation
88
- def to_s
89
- '<Twilio::REST::Microvisor::V1>';
90
- end
91
- end
92
- end
93
- end
94
- end
@@ -1,24 +0,0 @@
1
- module Twilio
2
- module REST
3
- class Microvisor < MicrovisorBase
4
-
5
- ##
6
- # @param [String] sid A 34-character string that uniquely identifies this App.
7
- # @return [Twilio::REST::Microvisor::V1::AppInstance] if sid was passed.
8
- # @return [Twilio::REST::Microvisor::V1::AppList]
9
- def apps(sid=:unset)
10
- warn "apps is deprecated. Use v1.apps instead."
11
- self.v1.apps(sid)
12
- end
13
-
14
- ##
15
- # @param [String] sid A 34-character string that uniquely identifies this Device.
16
- # @return [Twilio::REST::Microvisor::V1::DeviceInstance] if sid was passed.
17
- # @return [Twilio::REST::Microvisor::V1::DeviceList]
18
- def devices(sid=:unset)
19
- warn "devices is deprecated. Use v1.devices instead."
20
- self.v1.devices(sid)
21
- end
22
- end
23
- end
24
- end
@@ -1,38 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # NOTE: This class is auto generated by OpenAPI Generator.
8
- # https://openapi-generator.tech
9
- # Do not edit the class manually.
10
- # frozen_string_literal: true
11
- module Twilio
12
- module REST
13
- class MicrovisorBase < Domain
14
- ##
15
- # Initialize microvisor domain
16
- #
17
- # @param twilio - The twilio client
18
- #
19
- def initialize(twilio)
20
- super(twilio)
21
- @base_url = "https://microvisor.twilio.com"
22
- @host = "microvisor.twilio.com"
23
- @port = 443
24
- @v1 = nil
25
- end
26
-
27
- def v1
28
- @v1 ||= Microvisor::V1.new self
29
- end
30
-
31
- ##
32
- # Provide a user friendly representation
33
- def to_s
34
- '<Twilio::REST::Microvisor::V1>';
35
- end
36
- end
37
- end
38
- end