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
@@ -1,294 +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 DayList < ListResource
17
- ##
18
- # Initialize the DayList
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 [DayList] DayList
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]}/Days"
29
- end
30
-
31
- ##
32
- # Lists DayInstance 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 DayInstance 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 DayInstance 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 DayInstance 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 DayInstance
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
- DayPage.new(@version, response, @solution)
96
- end
97
-
98
- ##
99
- # Retrieve a single page of DayInstance 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 DayInstance
103
- def get_page(target_url)
104
- response = @version.domain.request(
105
- 'GET',
106
- target_url
107
- )
108
- DayPage.new(@version, response, @solution)
109
- end
110
-
111
- ##
112
- # Provide a user friendly representation
113
- def to_s
114
- '#<Twilio.Preview.BulkExports.DayList>'
115
- end
116
- end
117
-
118
- ##
119
- # 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.
120
- class DayPage < Page
121
- ##
122
- # Initialize the DayPage
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 [DayPage] DayPage
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 DayInstance
136
- # @param [Hash] payload Payload response from the API
137
- # @return [DayInstance] DayInstance
138
- def get_instance(payload)
139
- DayInstance.new(@version, payload, resource_type: @solution[:resource_type], )
140
- end
141
-
142
- ##
143
- # Provide a user friendly representation
144
- def to_s
145
- '<Twilio.Preview.BulkExports.DayPage>'
146
- end
147
- end
148
-
149
- ##
150
- # 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.
151
- class DayContext < InstanceContext
152
- ##
153
- # Initialize the DayContext
154
- # @param [Version] version Version that contains the resource
155
- # @param [String] resource_type The type of communication – Messages, Calls,
156
- # Conferences, and Participants
157
- # @param [String] day The ISO 8601 format date of the resources in the file, for a
158
- # UTC day
159
- # @return [DayContext] DayContext
160
- def initialize(version, resource_type, day)
161
- super(version)
162
-
163
- # Path Solution
164
- @solution = {resource_type: resource_type, day: day, }
165
- @uri = "/Exports/#{@solution[:resource_type]}/Days/#{@solution[:day]}"
166
- end
167
-
168
- ##
169
- # Fetch the DayInstance
170
- # @return [DayInstance] Fetched DayInstance
171
- def fetch
172
- payload = @version.fetch('GET', @uri)
173
-
174
- DayInstance.new(@version, payload, resource_type: @solution[:resource_type], day: @solution[:day], )
175
- end
176
-
177
- ##
178
- # Provide a user friendly representation
179
- def to_s
180
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
181
- "#<Twilio.Preview.BulkExports.DayContext #{context}>"
182
- end
183
-
184
- ##
185
- # Provide a detailed, user friendly representation
186
- def inspect
187
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
188
- "#<Twilio.Preview.BulkExports.DayContext #{context}>"
189
- end
190
- end
191
-
192
- ##
193
- # 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.
194
- class DayInstance < InstanceResource
195
- ##
196
- # Initialize the DayInstance
197
- # @param [Version] version Version that contains the resource
198
- # @param [Hash] payload payload that contains response from Twilio
199
- # @param [String] resource_type The type of communication – Messages, Calls,
200
- # Conferences, and Participants
201
- # @param [String] day The ISO 8601 format date of the resources in the file, for a
202
- # UTC day
203
- # @return [DayInstance] DayInstance
204
- def initialize(version, payload, resource_type: nil, day: nil)
205
- super(version)
206
-
207
- # Marshaled Properties
208
- @properties = {
209
- 'redirect_to' => payload['redirect_to'],
210
- 'day' => payload['day'],
211
- 'size' => payload['size'].to_i,
212
- 'create_date' => payload['create_date'],
213
- 'friendly_name' => payload['friendly_name'],
214
- 'resource_type' => payload['resource_type'],
215
- }
216
-
217
- # Context
218
- @instance_context = nil
219
- @params = {'resource_type' => resource_type, 'day' => day || @properties['day'], }
220
- end
221
-
222
- ##
223
- # Generate an instance context for the instance, the context is capable of
224
- # performing various actions. All instance actions are proxied to the context
225
- # @return [DayContext] DayContext for this DayInstance
226
- def context
227
- unless @instance_context
228
- @instance_context = DayContext.new(@version, @params['resource_type'], @params['day'], )
229
- end
230
- @instance_context
231
- end
232
-
233
- ##
234
- # @return [String] The redirect_to
235
- def redirect_to
236
- @properties['redirect_to']
237
- end
238
-
239
- ##
240
- # @return [String] The date of the data in the file
241
- def day
242
- @properties['day']
243
- end
244
-
245
- ##
246
- # @return [String] Size of the file in bytes
247
- def size
248
- @properties['size']
249
- end
250
-
251
- ##
252
- # @return [String] The date when resource is created
253
- def create_date
254
- @properties['create_date']
255
- end
256
-
257
- ##
258
- # @return [String] The friendly name specified when creating the job
259
- def friendly_name
260
- @properties['friendly_name']
261
- end
262
-
263
- ##
264
- # @return [String] The type of communication – Messages, Calls, Conferences, and Participants
265
- def resource_type
266
- @properties['resource_type']
267
- end
268
-
269
- ##
270
- # Fetch the DayInstance
271
- # @return [DayInstance] Fetched DayInstance
272
- def fetch
273
- context.fetch
274
- end
275
-
276
- ##
277
- # Provide a user friendly representation
278
- def to_s
279
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
280
- "<Twilio.Preview.BulkExports.DayInstance #{values}>"
281
- end
282
-
283
- ##
284
- # Provide a detailed, user friendly representation
285
- def inspect
286
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
287
- "<Twilio.Preview.BulkExports.DayInstance #{values}>"
288
- end
289
- end
290
- end
291
- end
292
- end
293
- end
294
- end
@@ -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