twilio-ruby 5.69.0 → 5.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +43 -1
  3. data/Makefile +6 -2
  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/flex_api/v1/interaction/interaction_channel.rb +22 -1
  9. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +4 -4
  10. data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +2 -2
  11. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +305 -0
  12. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +332 -0
  13. data/lib/twilio-ruby/rest/microvisor/v1.rb +60 -0
  14. data/lib/twilio-ruby/rest/microvisor.rb +54 -0
  15. data/lib/twilio-ruby/rest/preview.rb +0 -25
  16. data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +235 -0
  17. data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +231 -0
  18. data/lib/twilio-ruby/rest/routes/v2/trunk.rb +235 -0
  19. data/lib/twilio-ruby/rest/routes/v2.rb +76 -0
  20. data/lib/twilio-ruby/rest/routes.rb +62 -0
  21. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +16 -6
  22. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +7 -8
  23. data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +10 -3
  24. data/lib/twilio-ruby/security/request_validator.rb +1 -1
  25. data/lib/twilio-ruby/version.rb +1 -1
  26. metadata +11 -8
  27. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +0 -294
  28. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
  29. data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
  30. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
  31. data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
  32. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -62
@@ -1,251 +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 Preview < Domain
12
- class BulkExports < 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 ExportList < ListResource
16
- ##
17
- # Initialize the ExportList
18
- # @param [Version] version Version that contains the resource
19
- # @return [ExportList] ExportList
20
- def initialize(version)
21
- super(version)
22
-
23
- # Path Solution
24
- @solution = {}
25
-
26
- # Components
27
- @jobs = nil
28
- end
29
-
30
- ##
31
- # Access the jobs
32
- # @param [String] job_sid The unique string that that we created to identify the
33
- # Bulk Export job
34
- # @return [JobList]
35
- # @return [JobContext] if job_sid was passed.
36
- def jobs(job_sid=:unset)
37
- raise ArgumentError, 'job_sid cannot be nil' if job_sid.nil?
38
-
39
- if job_sid != :unset
40
- return JobContext.new(@version, job_sid, )
41
- end
42
-
43
- @jobs ||= JobList.new(@version, )
44
- end
45
-
46
- ##
47
- # Provide a user friendly representation
48
- def to_s
49
- '#<Twilio.Preview.BulkExports.ExportList>'
50
- end
51
- end
52
-
53
- ##
54
- # 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.
55
- class ExportPage < Page
56
- ##
57
- # Initialize the ExportPage
58
- # @param [Version] version Version that contains the resource
59
- # @param [Response] response Response from the API
60
- # @param [Hash] solution Path solution for the resource
61
- # @return [ExportPage] ExportPage
62
- def initialize(version, response, solution)
63
- super(version, response)
64
-
65
- # Path Solution
66
- @solution = solution
67
- end
68
-
69
- ##
70
- # Build an instance of ExportInstance
71
- # @param [Hash] payload Payload response from the API
72
- # @return [ExportInstance] ExportInstance
73
- def get_instance(payload)
74
- ExportInstance.new(@version, payload, )
75
- end
76
-
77
- ##
78
- # Provide a user friendly representation
79
- def to_s
80
- '<Twilio.Preview.BulkExports.ExportPage>'
81
- end
82
- end
83
-
84
- ##
85
- # 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.
86
- class ExportContext < InstanceContext
87
- ##
88
- # Initialize the ExportContext
89
- # @param [Version] version Version that contains the resource
90
- # @param [String] resource_type The type of communication – Messages, Calls,
91
- # Conferences, and Participants
92
- # @return [ExportContext] ExportContext
93
- def initialize(version, resource_type)
94
- super(version)
95
-
96
- # Path Solution
97
- @solution = {resource_type: resource_type, }
98
- @uri = "/Exports/#{@solution[:resource_type]}"
99
-
100
- # Dependents
101
- @days = nil
102
- @export_custom_jobs = nil
103
- end
104
-
105
- ##
106
- # Fetch the ExportInstance
107
- # @return [ExportInstance] Fetched ExportInstance
108
- def fetch
109
- payload = @version.fetch('GET', @uri)
110
-
111
- ExportInstance.new(@version, payload, resource_type: @solution[:resource_type], )
112
- end
113
-
114
- ##
115
- # Access the days
116
- # @return [DayList]
117
- # @return [DayContext] if day was passed.
118
- def days(day=:unset)
119
- raise ArgumentError, 'day cannot be nil' if day.nil?
120
-
121
- if day != :unset
122
- return DayContext.new(@version, @solution[:resource_type], day, )
123
- end
124
-
125
- unless @days
126
- @days = DayList.new(@version, resource_type: @solution[:resource_type], )
127
- end
128
-
129
- @days
130
- end
131
-
132
- ##
133
- # Access the export_custom_jobs
134
- # @return [ExportCustomJobList]
135
- # @return [ExportCustomJobContext]
136
- def export_custom_jobs
137
- unless @export_custom_jobs
138
- @export_custom_jobs = ExportCustomJobList.new(@version, resource_type: @solution[:resource_type], )
139
- end
140
-
141
- @export_custom_jobs
142
- end
143
-
144
- ##
145
- # Provide a user friendly representation
146
- def to_s
147
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
148
- "#<Twilio.Preview.BulkExports.ExportContext #{context}>"
149
- end
150
-
151
- ##
152
- # Provide a detailed, user friendly representation
153
- def inspect
154
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
155
- "#<Twilio.Preview.BulkExports.ExportContext #{context}>"
156
- end
157
- end
158
-
159
- ##
160
- # 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.
161
- class ExportInstance < InstanceResource
162
- ##
163
- # Initialize the ExportInstance
164
- # @param [Version] version Version that contains the resource
165
- # @param [Hash] payload payload that contains response from Twilio
166
- # @param [String] resource_type The type of communication – Messages, Calls,
167
- # Conferences, and Participants
168
- # @return [ExportInstance] ExportInstance
169
- def initialize(version, payload, resource_type: nil)
170
- super(version)
171
-
172
- # Marshaled Properties
173
- @properties = {
174
- 'resource_type' => payload['resource_type'],
175
- 'url' => payload['url'],
176
- 'links' => payload['links'],
177
- }
178
-
179
- # Context
180
- @instance_context = nil
181
- @params = {'resource_type' => resource_type || @properties['resource_type'], }
182
- end
183
-
184
- ##
185
- # Generate an instance context for the instance, the context is capable of
186
- # performing various actions. All instance actions are proxied to the context
187
- # @return [ExportContext] ExportContext for this ExportInstance
188
- def context
189
- unless @instance_context
190
- @instance_context = ExportContext.new(@version, @params['resource_type'], )
191
- end
192
- @instance_context
193
- end
194
-
195
- ##
196
- # @return [String] The type of communication – Messages, Calls, Conferences, and Participants
197
- def resource_type
198
- @properties['resource_type']
199
- end
200
-
201
- ##
202
- # @return [String] The URL of this resource.
203
- def url
204
- @properties['url']
205
- end
206
-
207
- ##
208
- # @return [String] Nested resource URLs.
209
- def links
210
- @properties['links']
211
- end
212
-
213
- ##
214
- # Fetch the ExportInstance
215
- # @return [ExportInstance] Fetched ExportInstance
216
- def fetch
217
- context.fetch
218
- end
219
-
220
- ##
221
- # Access the days
222
- # @return [days] days
223
- def days
224
- context.days
225
- end
226
-
227
- ##
228
- # Access the export_custom_jobs
229
- # @return [export_custom_jobs] export_custom_jobs
230
- def export_custom_jobs
231
- context.export_custom_jobs
232
- end
233
-
234
- ##
235
- # Provide a user friendly representation
236
- def to_s
237
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
238
- "<Twilio.Preview.BulkExports.ExportInstance #{values}>"
239
- end
240
-
241
- ##
242
- # Provide a detailed, user friendly representation
243
- def inspect
244
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
245
- "<Twilio.Preview.BulkExports.ExportInstance #{values}>"
246
- end
247
- end
248
- end
249
- end
250
- end
251
- end
@@ -1,234 +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 Preview < Domain
12
- class BulkExports < 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 ExportConfigurationList < ListResource
16
- ##
17
- # Initialize the ExportConfigurationList
18
- # @param [Version] version Version that contains the resource
19
- # @return [ExportConfigurationList] ExportConfigurationList
20
- def initialize(version)
21
- super(version)
22
-
23
- # Path Solution
24
- @solution = {}
25
- end
26
-
27
- ##
28
- # Provide a user friendly representation
29
- def to_s
30
- '#<Twilio.Preview.BulkExports.ExportConfigurationList>'
31
- end
32
- end
33
-
34
- ##
35
- # 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.
36
- class ExportConfigurationPage < Page
37
- ##
38
- # Initialize the ExportConfigurationPage
39
- # @param [Version] version Version that contains the resource
40
- # @param [Response] response Response from the API
41
- # @param [Hash] solution Path solution for the resource
42
- # @return [ExportConfigurationPage] ExportConfigurationPage
43
- def initialize(version, response, solution)
44
- super(version, response)
45
-
46
- # Path Solution
47
- @solution = solution
48
- end
49
-
50
- ##
51
- # Build an instance of ExportConfigurationInstance
52
- # @param [Hash] payload Payload response from the API
53
- # @return [ExportConfigurationInstance] ExportConfigurationInstance
54
- def get_instance(payload)
55
- ExportConfigurationInstance.new(@version, payload, )
56
- end
57
-
58
- ##
59
- # Provide a user friendly representation
60
- def to_s
61
- '<Twilio.Preview.BulkExports.ExportConfigurationPage>'
62
- end
63
- end
64
-
65
- ##
66
- # 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.
67
- class ExportConfigurationContext < InstanceContext
68
- ##
69
- # Initialize the ExportConfigurationContext
70
- # @param [Version] version Version that contains the resource
71
- # @param [String] resource_type The type of communication – Messages, Calls,
72
- # Conferences, and Participants
73
- # @return [ExportConfigurationContext] ExportConfigurationContext
74
- def initialize(version, resource_type)
75
- super(version)
76
-
77
- # Path Solution
78
- @solution = {resource_type: resource_type, }
79
- @uri = "/Exports/#{@solution[:resource_type]}/Configuration"
80
- end
81
-
82
- ##
83
- # Fetch the ExportConfigurationInstance
84
- # @return [ExportConfigurationInstance] Fetched ExportConfigurationInstance
85
- def fetch
86
- payload = @version.fetch('GET', @uri)
87
-
88
- ExportConfigurationInstance.new(@version, payload, resource_type: @solution[:resource_type], )
89
- end
90
-
91
- ##
92
- # Update the ExportConfigurationInstance
93
- # @param [Boolean] enabled If true, Twilio will automatically generate every day's
94
- # file when the day is over.
95
- # @param [String] webhook_url Stores the URL destination for the method specified
96
- # in webhook_method.
97
- # @param [String] webhook_method Sets whether Twilio should call a webhook URL
98
- # when the automatic generation is complete, using GET or POST. The actual
99
- # destination is set in the webhook_url
100
- # @return [ExportConfigurationInstance] Updated ExportConfigurationInstance
101
- def update(enabled: :unset, webhook_url: :unset, webhook_method: :unset)
102
- data = Twilio::Values.of({
103
- 'Enabled' => enabled,
104
- 'WebhookUrl' => webhook_url,
105
- 'WebhookMethod' => webhook_method,
106
- })
107
-
108
- payload = @version.update('POST', @uri, data: data)
109
-
110
- ExportConfigurationInstance.new(@version, payload, resource_type: @solution[:resource_type], )
111
- end
112
-
113
- ##
114
- # Provide a user friendly representation
115
- def to_s
116
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
117
- "#<Twilio.Preview.BulkExports.ExportConfigurationContext #{context}>"
118
- end
119
-
120
- ##
121
- # Provide a detailed, user friendly representation
122
- def inspect
123
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
124
- "#<Twilio.Preview.BulkExports.ExportConfigurationContext #{context}>"
125
- end
126
- end
127
-
128
- ##
129
- # 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.
130
- class ExportConfigurationInstance < InstanceResource
131
- ##
132
- # Initialize the ExportConfigurationInstance
133
- # @param [Version] version Version that contains the resource
134
- # @param [Hash] payload payload that contains response from Twilio
135
- # @param [String] resource_type The type of communication – Messages, Calls,
136
- # Conferences, and Participants
137
- # @return [ExportConfigurationInstance] ExportConfigurationInstance
138
- def initialize(version, payload, resource_type: nil)
139
- super(version)
140
-
141
- # Marshaled Properties
142
- @properties = {
143
- 'enabled' => payload['enabled'],
144
- 'webhook_url' => payload['webhook_url'],
145
- 'webhook_method' => payload['webhook_method'],
146
- 'resource_type' => payload['resource_type'],
147
- 'url' => payload['url'],
148
- }
149
-
150
- # Context
151
- @instance_context = nil
152
- @params = {'resource_type' => resource_type || @properties['resource_type'], }
153
- end
154
-
155
- ##
156
- # Generate an instance context for the instance, the context is capable of
157
- # performing various actions. All instance actions are proxied to the context
158
- # @return [ExportConfigurationContext] ExportConfigurationContext for this ExportConfigurationInstance
159
- def context
160
- unless @instance_context
161
- @instance_context = ExportConfigurationContext.new(@version, @params['resource_type'], )
162
- end
163
- @instance_context
164
- end
165
-
166
- ##
167
- # @return [Boolean] Whether files are automatically generated
168
- def enabled
169
- @properties['enabled']
170
- end
171
-
172
- ##
173
- # @return [String] URL targeted at export
174
- def webhook_url
175
- @properties['webhook_url']
176
- end
177
-
178
- ##
179
- # @return [String] Whether to GET or POST to the webhook url
180
- def webhook_method
181
- @properties['webhook_method']
182
- end
183
-
184
- ##
185
- # @return [String] The type of communication – Messages, Calls, Conferences, and Participants
186
- def resource_type
187
- @properties['resource_type']
188
- end
189
-
190
- ##
191
- # @return [String] The URL of this resource.
192
- def url
193
- @properties['url']
194
- end
195
-
196
- ##
197
- # Fetch the ExportConfigurationInstance
198
- # @return [ExportConfigurationInstance] Fetched ExportConfigurationInstance
199
- def fetch
200
- context.fetch
201
- end
202
-
203
- ##
204
- # Update the ExportConfigurationInstance
205
- # @param [Boolean] enabled If true, Twilio will automatically generate every day's
206
- # file when the day is over.
207
- # @param [String] webhook_url Stores the URL destination for the method specified
208
- # in webhook_method.
209
- # @param [String] webhook_method Sets whether Twilio should call a webhook URL
210
- # when the automatic generation is complete, using GET or POST. The actual
211
- # destination is set in the webhook_url
212
- # @return [ExportConfigurationInstance] Updated ExportConfigurationInstance
213
- def update(enabled: :unset, webhook_url: :unset, webhook_method: :unset)
214
- context.update(enabled: enabled, webhook_url: webhook_url, webhook_method: webhook_method, )
215
- end
216
-
217
- ##
218
- # Provide a user friendly representation
219
- def to_s
220
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
221
- "<Twilio.Preview.BulkExports.ExportConfigurationInstance #{values}>"
222
- end
223
-
224
- ##
225
- # Provide a detailed, user friendly representation
226
- def inspect
227
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
228
- "<Twilio.Preview.BulkExports.ExportConfigurationInstance #{values}>"
229
- end
230
- end
231
- end
232
- end
233
- end
234
- end
@@ -1,62 +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 Preview
12
- class BulkExports < Version
13
- ##
14
- # Initialize the BulkExports version of Preview
15
- def initialize(domain)
16
- super
17
- @version = 'BulkExports'
18
- @exports = nil
19
- @export_configuration = nil
20
- end
21
-
22
- ##
23
- # @param [String] resource_type The type of communication – Messages, Calls,
24
- # Conferences, and Participants
25
- # @return [Twilio::REST::Preview::BulkExports::ExportContext] if resource_type was passed.
26
- # @return [Twilio::REST::Preview::BulkExports::ExportList]
27
- def exports(resource_type=:unset)
28
- if resource_type.nil?
29
- raise ArgumentError, 'resource_type cannot be nil'
30
- end
31
- if resource_type == :unset
32
- @exports ||= ExportList.new self
33
- else
34
- ExportContext.new(self, resource_type)
35
- end
36
- end
37
-
38
- ##
39
- # @param [String] resource_type The type of communication – Messages, Calls,
40
- # Conferences, and Participants
41
- # @return [Twilio::REST::Preview::BulkExports::ExportConfigurationContext] if resource_type was passed.
42
- # @return [Twilio::REST::Preview::BulkExports::ExportConfigurationList]
43
- def export_configuration(resource_type=:unset)
44
- if resource_type.nil?
45
- raise ArgumentError, 'resource_type cannot be nil'
46
- end
47
- if resource_type == :unset
48
- @export_configuration ||= ExportConfigurationList.new self
49
- else
50
- ExportConfigurationContext.new(self, resource_type)
51
- end
52
- end
53
-
54
- ##
55
- # Provide a user friendly representation
56
- def to_s
57
- '<Twilio::REST::Preview::BulkExports>'
58
- end
59
- end
60
- end
61
- end
62
- end