twilio-ruby 5.65.0 → 5.66.1

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/pr-lint.yml +15 -0
  3. data/.github/workflows/test-and-deploy.yml +5 -0
  4. data/CHANGES.md +64 -0
  5. data/README.md +2 -4
  6. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +2 -2
  7. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +4 -4
  8. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +0 -7
  9. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +27 -7
  10. data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +10 -4
  11. data/lib/twilio-ruby/rest/chat/v3/channel.rb +275 -0
  12. data/lib/twilio-ruby/rest/chat/v3.rb +48 -0
  13. data/lib/twilio-ruby/rest/chat.rb +16 -0
  14. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  15. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +236 -0
  16. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +330 -0
  17. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +377 -0
  18. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +233 -0
  19. data/lib/twilio-ruby/rest/flex_api/v1.rb +16 -0
  20. data/lib/twilio-ruby/rest/flex_api.rb +9 -0
  21. data/lib/twilio-ruby/rest/insights/v1/annotation.rb +271 -0
  22. data/lib/twilio-ruby/rest/insights/v1.rb +16 -0
  23. data/lib/twilio-ruby/rest/insights.rb +8 -0
  24. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
  25. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +406 -0
  26. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +14 -1
  27. data/lib/twilio-ruby/rest/media/v1.rb +16 -0
  28. data/lib/twilio-ruby/rest/media.rb +9 -0
  29. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
  30. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +3 -55
  31. data/lib/twilio-ruby/rest/supersim/v1.rb +0 -16
  32. data/lib/twilio-ruby/rest/supersim.rb +0 -9
  33. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +6 -2
  34. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +4 -2
  35. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +4 -2
  36. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +18 -1
  37. data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +22 -4
  38. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +2 -1
  39. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +234 -0
  40. data/lib/twilio-ruby/rest/verify/v2.rb +7 -0
  41. data/lib/twilio-ruby/rest/verify.rb +6 -0
  42. data/lib/twilio-ruby/rest/video/v1/composition.rb +14 -0
  43. data/lib/twilio-ruby/rest/video/v1/recording.rb +14 -0
  44. data/lib/twilio-ruby/version.rb +1 -1
  45. data/lib/twilio-ruby.rb +1 -1
  46. metadata +12 -3
  47. data/lib/twilio-ruby/rest/supersim/v1/command.rb +0 -368
@@ -1,368 +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 Supersim < Domain
12
- class V1 < Version
13
- ##
14
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
15
- class CommandList < ListResource
16
- ##
17
- # Initialize the CommandList
18
- # @param [Version] version Version that contains the resource
19
- # @return [CommandList] CommandList
20
- def initialize(version)
21
- super(version)
22
-
23
- # Path Solution
24
- @solution = {}
25
- @uri = "/Commands"
26
- end
27
-
28
- ##
29
- # Create the CommandInstance
30
- # @param [String] sim The `sid` or `unique_name` of the
31
- # {SIM}[https://www.twilio.com/docs/wireless/api/sim-resource] to send the Command
32
- # to.
33
- # @param [String] command The message body of the command.
34
- # @param [String] callback_method The HTTP method we should use to call
35
- # `callback_url`. Can be: `GET` or `POST` and the default is POST.
36
- # @param [String] callback_url The URL we should call using the `callback_method`
37
- # after we have sent the command.
38
- # @return [CommandInstance] Created CommandInstance
39
- def create(sim: nil, command: nil, callback_method: :unset, callback_url: :unset)
40
- data = Twilio::Values.of({
41
- 'Sim' => sim,
42
- 'Command' => command,
43
- 'CallbackMethod' => callback_method,
44
- 'CallbackUrl' => callback_url,
45
- })
46
-
47
- payload = @version.create('POST', @uri, data: data)
48
-
49
- CommandInstance.new(@version, payload, )
50
- end
51
-
52
- ##
53
- # Lists CommandInstance records from the API as a list.
54
- # Unlike stream(), this operation is eager and will load `limit` records into
55
- # memory before returning.
56
- # @param [String] sim The SID or unique name of the Sim that Command was sent to
57
- # or from.
58
- # @param [command.Status] status The status of the Command. Can be: `queued`,
59
- # `sent`, `delivered`, `received` or `failed`. See the {Command Status
60
- # Values}[https://www.twilio.com/docs/wireless/api/command-resource#status-values]
61
- # for a description of each.
62
- # @param [command.Direction] direction The direction of the Command. Can be
63
- # `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
64
- # `mobile terminated`, and `from_sim` is synonymous with the term `mobile
65
- # originated`.
66
- # @param [Integer] limit Upper limit for the number of records to return. stream()
67
- # guarantees to never return more than limit. Default is no limit
68
- # @param [Integer] page_size Number of records to fetch per request, when
69
- # not set will use the default value of 50 records. If no page_size is defined
70
- # but a limit is defined, stream() will attempt to read the limit with the most
71
- # efficient page size, i.e. min(limit, 1000)
72
- # @return [Array] Array of up to limit results
73
- def list(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
74
- self.stream(
75
- sim: sim,
76
- status: status,
77
- direction: direction,
78
- limit: limit,
79
- page_size: page_size
80
- ).entries
81
- end
82
-
83
- ##
84
- # Streams CommandInstance records from the API as an Enumerable.
85
- # This operation lazily loads records as efficiently as possible until the limit
86
- # is reached.
87
- # @param [String] sim The SID or unique name of the Sim that Command was sent to
88
- # or from.
89
- # @param [command.Status] status The status of the Command. Can be: `queued`,
90
- # `sent`, `delivered`, `received` or `failed`. See the {Command Status
91
- # Values}[https://www.twilio.com/docs/wireless/api/command-resource#status-values]
92
- # for a description of each.
93
- # @param [command.Direction] direction The direction of the Command. Can be
94
- # `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
95
- # `mobile terminated`, and `from_sim` is synonymous with the term `mobile
96
- # originated`.
97
- # @param [Integer] limit Upper limit for the number of records to return. stream()
98
- # guarantees to never return more than limit. Default is no limit.
99
- # @param [Integer] page_size Number of records to fetch per request, when
100
- # not set will use the default value of 50 records. If no page_size is defined
101
- # but a limit is defined, stream() will attempt to read the limit with the most
102
- # efficient page size, i.e. min(limit, 1000)
103
- # @return [Enumerable] Enumerable that will yield up to limit results
104
- def stream(sim: :unset, status: :unset, direction: :unset, limit: nil, page_size: nil)
105
- limits = @version.read_limits(limit, page_size)
106
-
107
- page = self.page(sim: sim, status: status, direction: direction, page_size: limits[:page_size], )
108
-
109
- @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
110
- end
111
-
112
- ##
113
- # When passed a block, yields CommandInstance records from the API.
114
- # This operation lazily loads records as efficiently as possible until the limit
115
- # is reached.
116
- def each
117
- limits = @version.read_limits
118
-
119
- page = self.page(page_size: limits[:page_size], )
120
-
121
- @version.stream(page,
122
- limit: limits[:limit],
123
- page_limit: limits[:page_limit]).each {|x| yield x}
124
- end
125
-
126
- ##
127
- # Retrieve a single page of CommandInstance records from the API.
128
- # Request is executed immediately.
129
- # @param [String] sim The SID or unique name of the Sim that Command was sent to
130
- # or from.
131
- # @param [command.Status] status The status of the Command. Can be: `queued`,
132
- # `sent`, `delivered`, `received` or `failed`. See the {Command Status
133
- # Values}[https://www.twilio.com/docs/wireless/api/command-resource#status-values]
134
- # for a description of each.
135
- # @param [command.Direction] direction The direction of the Command. Can be
136
- # `to_sim` or `from_sim`. The value of `to_sim` is synonymous with the term
137
- # `mobile terminated`, and `from_sim` is synonymous with the term `mobile
138
- # originated`.
139
- # @param [String] page_token PageToken provided by the API
140
- # @param [Integer] page_number Page Number, this value is simply for client state
141
- # @param [Integer] page_size Number of records to return, defaults to 50
142
- # @return [Page] Page of CommandInstance
143
- def page(sim: :unset, status: :unset, direction: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
144
- params = Twilio::Values.of({
145
- 'Sim' => sim,
146
- 'Status' => status,
147
- 'Direction' => direction,
148
- 'PageToken' => page_token,
149
- 'Page' => page_number,
150
- 'PageSize' => page_size,
151
- })
152
-
153
- response = @version.page('GET', @uri, params: params)
154
-
155
- CommandPage.new(@version, response, @solution)
156
- end
157
-
158
- ##
159
- # Retrieve a single page of CommandInstance records from the API.
160
- # Request is executed immediately.
161
- # @param [String] target_url API-generated URL for the requested results page
162
- # @return [Page] Page of CommandInstance
163
- def get_page(target_url)
164
- response = @version.domain.request(
165
- 'GET',
166
- target_url
167
- )
168
- CommandPage.new(@version, response, @solution)
169
- end
170
-
171
- ##
172
- # Provide a user friendly representation
173
- def to_s
174
- '#<Twilio.Supersim.V1.CommandList>'
175
- end
176
- end
177
-
178
- ##
179
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
180
- class CommandPage < Page
181
- ##
182
- # Initialize the CommandPage
183
- # @param [Version] version Version that contains the resource
184
- # @param [Response] response Response from the API
185
- # @param [Hash] solution Path solution for the resource
186
- # @return [CommandPage] CommandPage
187
- def initialize(version, response, solution)
188
- super(version, response)
189
-
190
- # Path Solution
191
- @solution = solution
192
- end
193
-
194
- ##
195
- # Build an instance of CommandInstance
196
- # @param [Hash] payload Payload response from the API
197
- # @return [CommandInstance] CommandInstance
198
- def get_instance(payload)
199
- CommandInstance.new(@version, payload, )
200
- end
201
-
202
- ##
203
- # Provide a user friendly representation
204
- def to_s
205
- '<Twilio.Supersim.V1.CommandPage>'
206
- end
207
- end
208
-
209
- ##
210
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
211
- class CommandContext < InstanceContext
212
- ##
213
- # Initialize the CommandContext
214
- # @param [Version] version Version that contains the resource
215
- # @param [String] sid The SID of the Command resource to fetch.
216
- # @return [CommandContext] CommandContext
217
- def initialize(version, sid)
218
- super(version)
219
-
220
- # Path Solution
221
- @solution = {sid: sid, }
222
- @uri = "/Commands/#{@solution[:sid]}"
223
- end
224
-
225
- ##
226
- # Fetch the CommandInstance
227
- # @return [CommandInstance] Fetched CommandInstance
228
- def fetch
229
- payload = @version.fetch('GET', @uri)
230
-
231
- CommandInstance.new(@version, payload, sid: @solution[:sid], )
232
- end
233
-
234
- ##
235
- # Provide a user friendly representation
236
- def to_s
237
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
238
- "#<Twilio.Supersim.V1.CommandContext #{context}>"
239
- end
240
-
241
- ##
242
- # Provide a detailed, user friendly representation
243
- def inspect
244
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
245
- "#<Twilio.Supersim.V1.CommandContext #{context}>"
246
- end
247
- end
248
-
249
- ##
250
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
251
- class CommandInstance < InstanceResource
252
- ##
253
- # Initialize the CommandInstance
254
- # @param [Version] version Version that contains the resource
255
- # @param [Hash] payload payload that contains response from Twilio
256
- # @param [String] sid The SID of the Command resource to fetch.
257
- # @return [CommandInstance] CommandInstance
258
- def initialize(version, payload, sid: nil)
259
- super(version)
260
-
261
- # Marshaled Properties
262
- @properties = {
263
- 'sid' => payload['sid'],
264
- 'account_sid' => payload['account_sid'],
265
- 'sim_sid' => payload['sim_sid'],
266
- 'command' => payload['command'],
267
- 'status' => payload['status'],
268
- 'direction' => payload['direction'],
269
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
270
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
271
- 'url' => payload['url'],
272
- }
273
-
274
- # Context
275
- @instance_context = nil
276
- @params = {'sid' => sid || @properties['sid'], }
277
- end
278
-
279
- ##
280
- # Generate an instance context for the instance, the context is capable of
281
- # performing various actions. All instance actions are proxied to the context
282
- # @return [CommandContext] CommandContext for this CommandInstance
283
- def context
284
- unless @instance_context
285
- @instance_context = CommandContext.new(@version, @params['sid'], )
286
- end
287
- @instance_context
288
- end
289
-
290
- ##
291
- # @return [String] The unique string that identifies the resource
292
- def sid
293
- @properties['sid']
294
- end
295
-
296
- ##
297
- # @return [String] The SID of the Account that created the resource
298
- def account_sid
299
- @properties['account_sid']
300
- end
301
-
302
- ##
303
- # @return [String] The SID of the SIM that this Command was sent to or from
304
- def sim_sid
305
- @properties['sim_sid']
306
- end
307
-
308
- ##
309
- # @return [String] The message body of the command sent to or from the SIM
310
- def command
311
- @properties['command']
312
- end
313
-
314
- ##
315
- # @return [command.Status] The status of the Command
316
- def status
317
- @properties['status']
318
- end
319
-
320
- ##
321
- # @return [command.Direction] The direction of the Command
322
- def direction
323
- @properties['direction']
324
- end
325
-
326
- ##
327
- # @return [Time] The ISO 8601 date and time in GMT when the resource was created
328
- def date_created
329
- @properties['date_created']
330
- end
331
-
332
- ##
333
- # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
334
- def date_updated
335
- @properties['date_updated']
336
- end
337
-
338
- ##
339
- # @return [String] The absolute URL of the Command resource
340
- def url
341
- @properties['url']
342
- end
343
-
344
- ##
345
- # Fetch the CommandInstance
346
- # @return [CommandInstance] Fetched CommandInstance
347
- def fetch
348
- context.fetch
349
- end
350
-
351
- ##
352
- # Provide a user friendly representation
353
- def to_s
354
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
355
- "<Twilio.Supersim.V1.CommandInstance #{values}>"
356
- end
357
-
358
- ##
359
- # Provide a detailed, user friendly representation
360
- def inspect
361
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
362
- "<Twilio.Supersim.V1.CommandInstance #{values}>"
363
- end
364
- end
365
- end
366
- end
367
- end
368
- end