twilio-ruby 7.10.3 → 7.10.5

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 (31) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +147 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +6 -0
  5. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +6 -0
  6. data/lib/twilio-ruby/rest/flex_api/v1.rb +0 -6
  7. data/lib/twilio-ruby/rest/iam/v1/role_permission.rb +319 -0
  8. data/lib/twilio-ruby/rest/iam/v1.rb +6 -0
  9. data/lib/twilio-ruby/rest/insights/v2/inbound.rb +570 -0
  10. data/lib/twilio-ruby/rest/insights/v2/outbound.rb +641 -0
  11. data/lib/twilio-ruby/rest/insights/v2/report.rb +940 -0
  12. data/lib/twilio-ruby/rest/insights/v2.rb +79 -0
  13. data/lib/twilio-ruby/rest/insights_base.rb +6 -1
  14. data/lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb +247 -0
  15. data/lib/twilio-ruby/rest/messaging/v3.rb +40 -0
  16. data/lib/twilio-ruby/rest/messaging_base.rb +5 -0
  17. data/lib/twilio-ruby/rest/numbers/v1/embedded_session.rb +251 -0
  18. data/lib/twilio-ruby/rest/numbers/v1/sender_id_registration.rb +333 -0
  19. data/lib/twilio-ruby/rest/numbers/v1.rb +12 -0
  20. data/lib/twilio-ruby/rest/numbers/v2/application.rb +153 -8
  21. data/lib/twilio-ruby/rest/preview_iam/versionless/organization/user.rb +197 -0
  22. data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +33 -4
  23. data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +7 -0
  24. data/lib/twilio-ruby/rest/studio/v2/flow.rb +7 -0
  25. data/lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb +7 -7
  26. data/lib/twilio-ruby/rest/verify/v2/service/new_challenge.rb +7 -7
  27. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +4 -4
  28. data/lib/twilio-ruby/twiml/voice_response.rb +8 -3
  29. data/lib/twilio-ruby/version.rb +1 -1
  30. metadata +11 -3
  31. data/lib/twilio-ruby/rest/flex_api/v1/create_flex_instance.rb +0 -382
@@ -1,382 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # Twilio - Flex
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 FlexApi < FlexApiBase
19
- class V1 < Version
20
- class CreateFlexInstanceList < ListResource
21
-
22
- class CreateInstanceRequestBody
23
- # @param [conversation]: [CreateFlexInstanceList.CreateInstanceRequestBodyConversation]
24
- attr_accessor :conversation
25
- def initialize(payload)
26
- @conversation = payload["conversation"]
27
- end
28
- def to_json(options = {})
29
- {
30
- "Conversation": @conversation,
31
- }.to_json(options)
32
- end
33
- end
34
-
35
- class CreateInstanceRequestBodyConversation
36
- # @param [default]: [Boolean] Set newly created conversation service as the default conversation service
37
- attr_accessor :default
38
- def initialize(payload)
39
- @default = payload["default"]
40
- end
41
- def to_json(options = {})
42
- {
43
- "Default": @default,
44
- }.to_json(options)
45
- end
46
- end
47
-
48
-
49
- ##
50
- # Initialize the CreateFlexInstanceList
51
- # @param [Version] version Version that contains the resource
52
- # @return [CreateFlexInstanceList] CreateFlexInstanceList
53
- def initialize(version)
54
- super(version)
55
-
56
- # Path Solution
57
- @solution = { }
58
-
59
-
60
- end
61
-
62
-
63
-
64
- # Provide a user friendly representation
65
- def to_s
66
- '#<Twilio.FlexApi.V1.CreateFlexInstanceList>'
67
- end
68
- end
69
-
70
-
71
- class CreateFlexInstanceContext < InstanceContext
72
- ##
73
- # Initialize the CreateFlexInstanceContext
74
- # @param [Version] version Version that contains the resource
75
- # @return [CreateFlexInstanceContext] CreateFlexInstanceContext
76
- def initialize(version)
77
- super(version)
78
-
79
-
80
- # Path Solution
81
- @solution = { }
82
- @uri = "/Instances"
83
-
84
-
85
- end
86
- ##
87
- # Create the CreateFlexInstanceInstance
88
- # @param [CreateInstanceRequestBody] create_instance_request_body
89
- # @return [CreateFlexInstanceInstance] Created CreateFlexInstanceInstance
90
- def create(create_instance_request_body: :unset
91
- )
92
-
93
- headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
94
- headers['Content-Type'] = 'application/json'
95
-
96
-
97
-
98
-
99
- payload = @version.create('POST', @uri, headers: headers, data: create_instance_request_body.to_json)
100
- CreateFlexInstanceInstance.new(
101
- @version,
102
- payload,
103
- )
104
- end
105
-
106
- ##
107
- # Create the CreateFlexInstanceInstanceMetadata
108
- # @param [CreateInstanceRequestBody] create_instance_request_body
109
- # @return [CreateFlexInstanceInstance] Created CreateFlexInstanceInstance
110
- def create_with_metadata(create_instance_request_body: :unset
111
- )
112
-
113
- headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
114
- headers['Content-Type'] = 'application/json'
115
-
116
-
117
-
118
-
119
- response = @version.create_with_metadata('POST', @uri, headers: headers, data: create_instance_request_body.to_json)
120
- create_flex_instance_instance = CreateFlexInstanceInstance.new(
121
- @version,
122
- response.body,
123
- )
124
- CreateFlexInstanceInstanceMetadata.new(
125
- @version,
126
- create_flex_instance_instance,
127
- response.headers,
128
- response.status_code
129
- )
130
- end
131
-
132
-
133
- ##
134
- # Provide a user friendly representation
135
- def to_s
136
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
137
- "#<Twilio.FlexApi.V1.CreateFlexInstanceContext #{context}>"
138
- end
139
-
140
- ##
141
- # Provide a detailed, user friendly representation
142
- def inspect
143
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
144
- "#<Twilio.FlexApi.V1.CreateFlexInstanceContext #{context}>"
145
- end
146
- end
147
-
148
- class CreateFlexInstanceInstanceMetadata < InstanceResourceMetadata
149
- ##
150
- # Initializes a new CreateFlexInstanceInstanceMetadata.
151
- # @param [Version] version Version that contains the resource
152
- # @param [}CreateFlexInstanceInstance] create_flex_instance_instance The instance associated with the metadata.
153
- # @param [Hash] headers Header object with response headers.
154
- # @param [Integer] status_code The HTTP status code of the response.
155
- # @return [CreateFlexInstanceInstanceMetadata] The initialized instance with metadata.
156
- def initialize(version, create_flex_instance_instance, headers, status_code)
157
- super(version, headers, status_code)
158
- @create_flex_instance_instance = create_flex_instance_instance
159
- end
160
-
161
- def create_flex_instance
162
- @create_flex_instance_instance
163
- end
164
-
165
- def headers
166
- @headers
167
- end
168
-
169
- def status_code
170
- @status_code
171
- end
172
-
173
- def to_s
174
- "<Twilio.Api.V2010.CreateFlexInstanceInstanceMetadata status=#{@status_code}>"
175
- end
176
- end
177
-
178
- class CreateFlexInstanceListResponse < InstanceListResource
179
- # @param [Array<CreateFlexInstanceInstance>] instance
180
- # @param [Hash{String => Object}] headers
181
- # @param [Integer] status_code
182
- def initialize(version, payload, key)
183
- @create_flex_instance_instance = payload.body[key].map do |data|
184
- CreateFlexInstanceInstance.new(version, data)
185
- end
186
- @headers = payload.headers
187
- @status_code = payload.status_code
188
- end
189
-
190
- def create_flex_instance_instance
191
- @instance
192
- end
193
- end
194
-
195
- class CreateFlexInstancePage < Page
196
- ##
197
- # Initialize the CreateFlexInstancePage
198
- # @param [Version] version Version that contains the resource
199
- # @param [Response] response Response from the API
200
- # @param [Hash] solution Path solution for the resource
201
- # @return [CreateFlexInstancePage] CreateFlexInstancePage
202
- def initialize(version, response, solution)
203
- super(version, response)
204
-
205
-
206
- # Path Solution
207
- @solution = solution
208
- end
209
-
210
- ##
211
- # Build an instance of CreateFlexInstanceInstance
212
- # @param [Hash] payload Payload response from the API
213
- # @return [CreateFlexInstanceInstance] CreateFlexInstanceInstance
214
- def get_instance(payload)
215
- CreateFlexInstanceInstance.new(@version, payload)
216
- end
217
-
218
- ##
219
- # Provide a user friendly representation
220
- def to_s
221
- '<Twilio.FlexApi.V1.CreateFlexInstancePage>'
222
- end
223
- end
224
-
225
- class CreateFlexInstancePageMetadata < PageMetadata
226
- attr_reader :create_flex_instance_page
227
-
228
- def initialize(version, response, solution, limit)
229
- super(version, response)
230
- @create_flex_instance_page = []
231
- @limit = limit
232
- key = get_key(response.body)
233
- records = 0
234
- while( limit != :unset && records < limit )
235
- @create_flex_instance_page << CreateFlexInstanceListResponse.new(version, @payload, key, limit - records)
236
- @payload = self.next_page
237
- break unless @payload
238
- records += @payload.body[key].size
239
- end
240
- # Path Solution
241
- @solution = solution
242
- end
243
-
244
- def each
245
- @create_flex_instance_page.each do |record|
246
- yield record
247
- end
248
- end
249
-
250
- def to_s
251
- '<Twilio::REST::FlexApi::V1PageMetadata>';
252
- end
253
- end
254
- class CreateFlexInstanceListResponse < InstanceListResource
255
-
256
- # @param [Array<CreateFlexInstanceInstance>] instance
257
- # @param [Hash{String => Object}] headers
258
- # @param [Integer] status_code
259
- def initialize(version, payload, key, limit = :unset)
260
- data_list = payload.body[key]
261
- if limit != :unset
262
- data_list = data_list[0, limit]
263
- end
264
- @create_flex_instance = data_list.map do |data|
265
- CreateFlexInstanceInstance.new(version, data)
266
- end
267
- @headers = payload.headers
268
- @status_code = payload.status_code
269
- end
270
-
271
- def create_flex_instance
272
- @create_flex_instance
273
- end
274
-
275
- def headers
276
- @headers
277
- end
278
-
279
- def status_code
280
- @status_code
281
- end
282
- end
283
-
284
- class CreateFlexInstanceInstance < InstanceResource
285
- ##
286
- # Initialize the CreateFlexInstanceInstance
287
- # @param [Version] version Version that contains the resource
288
- # @param [Hash] payload payload that contains response from Twilio
289
- # @param [String] account_sid The SID of the
290
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this CreateFlexInstance
291
- # resource.
292
- # @param [String] sid The SID of the Call resource to fetch.
293
- # @return [CreateFlexInstanceInstance] CreateFlexInstanceInstance
294
- def initialize(version, payload )
295
- super(version)
296
-
297
-
298
- # Marshaled Properties
299
- @properties = {
300
- 'flex_instance_sid' => payload['flex_instance_sid'],
301
- 'account_sid' => payload['account_sid'],
302
- 'status' => payload['status'],
303
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
304
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
305
- }
306
-
307
- # Context
308
- @instance_context = nil
309
- @params = { }
310
- end
311
-
312
- ##
313
- # Generate an instance context for the instance, the context is capable of
314
- # performing various actions. All instance actions are proxied to the context
315
- # @return [CreateFlexInstanceContext] CallContext for this CallInstance
316
- def context
317
- unless @instance_context
318
- @instance_context = CreateFlexInstanceContext.new(@version )
319
- end
320
- @instance_context
321
- end
322
-
323
- ##
324
- # @return [String]
325
- def flex_instance_sid
326
- @properties['flex_instance_sid']
327
- end
328
-
329
- ##
330
- # @return [String]
331
- def account_sid
332
- @properties['account_sid']
333
- end
334
-
335
- ##
336
- # @return [String]
337
- def status
338
- @properties['status']
339
- end
340
-
341
- ##
342
- # @return [Time]
343
- def date_created
344
- @properties['date_created']
345
- end
346
-
347
- ##
348
- # @return [Time]
349
- def date_updated
350
- @properties['date_updated']
351
- end
352
-
353
- ##
354
- # Create the CreateFlexInstanceInstance
355
- # @param [CreateInstanceRequestBody] create_instance_request_body
356
- # @return [CreateFlexInstanceInstance] Created CreateFlexInstanceInstance
357
- def create(create_instance_request_body: :unset
358
- )
359
-
360
- context.create(
361
- )
362
- end
363
-
364
- ##
365
- # Provide a user friendly representation
366
- def to_s
367
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
368
- "<Twilio.FlexApi.V1.CreateFlexInstanceInstance #{values}>"
369
- end
370
-
371
- ##
372
- # Provide a detailed, user friendly representation
373
- def inspect
374
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
375
- "<Twilio.FlexApi.V1.CreateFlexInstanceInstance #{values}>"
376
- end
377
- end
378
-
379
- end
380
- end
381
- end
382
- end