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,275 +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
- class ExportContext < InstanceContext
14
- ##
15
- # 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.
16
- class ExportCustomJobList < ListResource
17
- ##
18
- # Initialize the ExportCustomJobList
19
- # @param [Version] version Version that contains the resource
20
- # @param [String] resource_type The type of communication – Messages, Calls,
21
- # Conferences, and Participants
22
- # @return [ExportCustomJobList] ExportCustomJobList
23
- def initialize(version, resource_type: nil)
24
- super(version)
25
-
26
- # Path Solution
27
- @solution = {resource_type: resource_type}
28
- @uri = "/Exports/#{@solution[:resource_type]}/Jobs"
29
- end
30
-
31
- ##
32
- # Lists ExportCustomJobInstance 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 ExportCustomJobInstance 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 ExportCustomJobInstance 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 ExportCustomJobInstance 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 ExportCustomJobInstance
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
- ExportCustomJobPage.new(@version, response, @solution)
96
- end
97
-
98
- ##
99
- # Retrieve a single page of ExportCustomJobInstance 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 ExportCustomJobInstance
103
- def get_page(target_url)
104
- response = @version.domain.request(
105
- 'GET',
106
- target_url
107
- )
108
- ExportCustomJobPage.new(@version, response, @solution)
109
- end
110
-
111
- ##
112
- # Create the ExportCustomJobInstance
113
- # @param [String] start_day The start day for the custom export specified as a
114
- # string in the format of yyyy-mm-dd
115
- # @param [String] end_day The end day for the custom export specified as a string
116
- # in the format of yyyy-mm-dd. End day is inclusive and must be 2 days earlier
117
- # than the current UTC day.
118
- # @param [String] friendly_name The friendly name specified when creating the job
119
- # @param [String] webhook_url The optional webhook url called on completion of the
120
- # job. If this is supplied, `WebhookMethod` must also be supplied.
121
- # @param [String] webhook_method This is the method used to call the webhook on
122
- # completion of the job. If this is supplied, `WebhookUrl` must also be supplied.
123
- # @param [String] email The optional email to send the completion notification to
124
- # @return [ExportCustomJobInstance] Created ExportCustomJobInstance
125
- def create(start_day: nil, end_day: nil, friendly_name: nil, webhook_url: :unset, webhook_method: :unset, email: :unset)
126
- data = Twilio::Values.of({
127
- 'StartDay' => start_day,
128
- 'EndDay' => end_day,
129
- 'FriendlyName' => friendly_name,
130
- 'WebhookUrl' => webhook_url,
131
- 'WebhookMethod' => webhook_method,
132
- 'Email' => email,
133
- })
134
-
135
- payload = @version.create('POST', @uri, data: data)
136
-
137
- ExportCustomJobInstance.new(@version, payload, resource_type: @solution[:resource_type], )
138
- end
139
-
140
- ##
141
- # Provide a user friendly representation
142
- def to_s
143
- '#<Twilio.Preview.BulkExports.ExportCustomJobList>'
144
- end
145
- end
146
-
147
- ##
148
- # 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.
149
- class ExportCustomJobPage < Page
150
- ##
151
- # Initialize the ExportCustomJobPage
152
- # @param [Version] version Version that contains the resource
153
- # @param [Response] response Response from the API
154
- # @param [Hash] solution Path solution for the resource
155
- # @return [ExportCustomJobPage] ExportCustomJobPage
156
- def initialize(version, response, solution)
157
- super(version, response)
158
-
159
- # Path Solution
160
- @solution = solution
161
- end
162
-
163
- ##
164
- # Build an instance of ExportCustomJobInstance
165
- # @param [Hash] payload Payload response from the API
166
- # @return [ExportCustomJobInstance] ExportCustomJobInstance
167
- def get_instance(payload)
168
- ExportCustomJobInstance.new(@version, payload, resource_type: @solution[:resource_type], )
169
- end
170
-
171
- ##
172
- # Provide a user friendly representation
173
- def to_s
174
- '<Twilio.Preview.BulkExports.ExportCustomJobPage>'
175
- end
176
- end
177
-
178
- ##
179
- # 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.
180
- class ExportCustomJobInstance < InstanceResource
181
- ##
182
- # Initialize the ExportCustomJobInstance
183
- # @param [Version] version Version that contains the resource
184
- # @param [Hash] payload payload that contains response from Twilio
185
- # @param [String] resource_type The type of communication – Messages, Calls,
186
- # Conferences, and Participants
187
- # @return [ExportCustomJobInstance] ExportCustomJobInstance
188
- def initialize(version, payload, resource_type: nil)
189
- super(version)
190
-
191
- # Marshaled Properties
192
- @properties = {
193
- 'friendly_name' => payload['friendly_name'],
194
- 'resource_type' => payload['resource_type'],
195
- 'start_day' => payload['start_day'],
196
- 'end_day' => payload['end_day'],
197
- 'webhook_url' => payload['webhook_url'],
198
- 'webhook_method' => payload['webhook_method'],
199
- 'email' => payload['email'],
200
- 'job_sid' => payload['job_sid'],
201
- 'details' => payload['details'],
202
- }
203
- end
204
-
205
- ##
206
- # @return [String] The friendly name specified when creating the job
207
- def friendly_name
208
- @properties['friendly_name']
209
- end
210
-
211
- ##
212
- # @return [String] The type of communication – Messages, Calls, Conferences, and Participants
213
- def resource_type
214
- @properties['resource_type']
215
- end
216
-
217
- ##
218
- # @return [String] The start day for the custom export specified as a string in the format of yyyy-MM-dd
219
- def start_day
220
- @properties['start_day']
221
- end
222
-
223
- ##
224
- # @return [String] The end day for the custom export specified as a string in the format of yyyy-MM-dd
225
- def end_day
226
- @properties['end_day']
227
- end
228
-
229
- ##
230
- # @return [String] The optional webhook url called on completion
231
- def webhook_url
232
- @properties['webhook_url']
233
- end
234
-
235
- ##
236
- # @return [String] This is the method used to call the webhook
237
- def webhook_method
238
- @properties['webhook_method']
239
- end
240
-
241
- ##
242
- # @return [String] The optional email to send the completion notification to
243
- def email
244
- @properties['email']
245
- end
246
-
247
- ##
248
- # @return [String] The unique job_sid returned when the custom export was created. This can be used to look up the status of the job.
249
- def job_sid
250
- @properties['job_sid']
251
- end
252
-
253
- ##
254
- # @return [Hash] The details
255
- def details
256
- @properties['details']
257
- end
258
-
259
- ##
260
- # Provide a user friendly representation
261
- def to_s
262
- "<Twilio.Preview.BulkExports.ExportCustomJobInstance>"
263
- end
264
-
265
- ##
266
- # Provide a detailed, user friendly representation
267
- def inspect
268
- "<Twilio.Preview.BulkExports.ExportCustomJobInstance>"
269
- end
270
- end
271
- end
272
- end
273
- end
274
- end
275
- end
@@ -1,249 +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
- class ExportList < ListResource
14
- ##
15
- # 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.
16
- class JobList < ListResource
17
- ##
18
- # Initialize the JobList
19
- # @param [Version] version Version that contains the resource
20
- # @return [JobList] JobList
21
- def initialize(version)
22
- super(version)
23
-
24
- # Path Solution
25
- @solution = {}
26
- end
27
-
28
- ##
29
- # Provide a user friendly representation
30
- def to_s
31
- '#<Twilio.Preview.BulkExports.JobList>'
32
- end
33
- end
34
-
35
- ##
36
- # 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.
37
- class JobPage < Page
38
- ##
39
- # Initialize the JobPage
40
- # @param [Version] version Version that contains the resource
41
- # @param [Response] response Response from the API
42
- # @param [Hash] solution Path solution for the resource
43
- # @return [JobPage] JobPage
44
- def initialize(version, response, solution)
45
- super(version, response)
46
-
47
- # Path Solution
48
- @solution = solution
49
- end
50
-
51
- ##
52
- # Build an instance of JobInstance
53
- # @param [Hash] payload Payload response from the API
54
- # @return [JobInstance] JobInstance
55
- def get_instance(payload)
56
- JobInstance.new(@version, payload, )
57
- end
58
-
59
- ##
60
- # Provide a user friendly representation
61
- def to_s
62
- '<Twilio.Preview.BulkExports.JobPage>'
63
- end
64
- end
65
-
66
- ##
67
- # 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.
68
- class JobContext < InstanceContext
69
- ##
70
- # Initialize the JobContext
71
- # @param [Version] version Version that contains the resource
72
- # @param [String] job_sid The unique string that that we created to identify the
73
- # Bulk Export job
74
- # @return [JobContext] JobContext
75
- def initialize(version, job_sid)
76
- super(version)
77
-
78
- # Path Solution
79
- @solution = {job_sid: job_sid, }
80
- @uri = "/Exports/Jobs/#{@solution[:job_sid]}"
81
- end
82
-
83
- ##
84
- # Fetch the JobInstance
85
- # @return [JobInstance] Fetched JobInstance
86
- def fetch
87
- payload = @version.fetch('GET', @uri)
88
-
89
- JobInstance.new(@version, payload, job_sid: @solution[:job_sid], )
90
- end
91
-
92
- ##
93
- # Delete the JobInstance
94
- # @return [Boolean] true if delete succeeds, false otherwise
95
- def delete
96
- @version.delete('DELETE', @uri)
97
- end
98
-
99
- ##
100
- # Provide a user friendly representation
101
- def to_s
102
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
103
- "#<Twilio.Preview.BulkExports.JobContext #{context}>"
104
- end
105
-
106
- ##
107
- # Provide a detailed, user friendly representation
108
- def inspect
109
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
110
- "#<Twilio.Preview.BulkExports.JobContext #{context}>"
111
- end
112
- end
113
-
114
- ##
115
- # 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.
116
- class JobInstance < InstanceResource
117
- ##
118
- # Initialize the JobInstance
119
- # @param [Version] version Version that contains the resource
120
- # @param [Hash] payload payload that contains response from Twilio
121
- # @param [String] job_sid The unique string that that we created to identify the
122
- # Bulk Export job
123
- # @return [JobInstance] JobInstance
124
- def initialize(version, payload, job_sid: nil)
125
- super(version)
126
-
127
- # Marshaled Properties
128
- @properties = {
129
- 'resource_type' => payload['resource_type'],
130
- 'friendly_name' => payload['friendly_name'],
131
- 'details' => payload['details'],
132
- 'start_day' => payload['start_day'],
133
- 'end_day' => payload['end_day'],
134
- 'job_sid' => payload['job_sid'],
135
- 'webhook_url' => payload['webhook_url'],
136
- 'webhook_method' => payload['webhook_method'],
137
- 'email' => payload['email'],
138
- 'url' => payload['url'],
139
- }
140
-
141
- # Context
142
- @instance_context = nil
143
- @params = {'job_sid' => job_sid || @properties['job_sid'], }
144
- end
145
-
146
- ##
147
- # Generate an instance context for the instance, the context is capable of
148
- # performing various actions. All instance actions are proxied to the context
149
- # @return [JobContext] JobContext for this JobInstance
150
- def context
151
- unless @instance_context
152
- @instance_context = JobContext.new(@version, @params['job_sid'], )
153
- end
154
- @instance_context
155
- end
156
-
157
- ##
158
- # @return [String] The type of communication – Messages, Calls, Conferences, and Participants
159
- def resource_type
160
- @properties['resource_type']
161
- end
162
-
163
- ##
164
- # @return [String] The friendly name specified when creating the job
165
- def friendly_name
166
- @properties['friendly_name']
167
- end
168
-
169
- ##
170
- # @return [Hash] This is a list of the completed, pending, or errored dates within the export time range, with one entry for each status with more than one day in that status
171
- def details
172
- @properties['details']
173
- end
174
-
175
- ##
176
- # @return [String] The start time for the export specified when creating the job
177
- def start_day
178
- @properties['start_day']
179
- end
180
-
181
- ##
182
- # @return [String] The end time for the export specified when creating the job
183
- def end_day
184
- @properties['end_day']
185
- end
186
-
187
- ##
188
- # @return [String] The job_sid returned when the export was created
189
- def job_sid
190
- @properties['job_sid']
191
- end
192
-
193
- ##
194
- # @return [String] The optional webhook url called on completion
195
- def webhook_url
196
- @properties['webhook_url']
197
- end
198
-
199
- ##
200
- # @return [String] This is the method used to call the webhook
201
- def webhook_method
202
- @properties['webhook_method']
203
- end
204
-
205
- ##
206
- # @return [String] The optional email to send the completion notification to
207
- def email
208
- @properties['email']
209
- end
210
-
211
- ##
212
- # @return [String] The url
213
- def url
214
- @properties['url']
215
- end
216
-
217
- ##
218
- # Fetch the JobInstance
219
- # @return [JobInstance] Fetched JobInstance
220
- def fetch
221
- context.fetch
222
- end
223
-
224
- ##
225
- # Delete the JobInstance
226
- # @return [Boolean] true if delete succeeds, false otherwise
227
- def delete
228
- context.delete
229
- end
230
-
231
- ##
232
- # Provide a user friendly representation
233
- def to_s
234
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
235
- "<Twilio.Preview.BulkExports.JobInstance #{values}>"
236
- end
237
-
238
- ##
239
- # Provide a detailed, user friendly representation
240
- def inspect
241
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
242
- "<Twilio.Preview.BulkExports.JobInstance #{values}>"
243
- end
244
- end
245
- end
246
- end
247
- end
248
- end
249
- end