twilio-ruby 6.9.0 → 6.9.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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +12 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/http/http_client.rb +3 -2
  5. data/lib/twilio-ruby/rest/client.rb +0 -5
  6. data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +27 -27
  7. data/lib/twilio-ruby/rest/preview/sync/service.rb +27 -27
  8. data/lib/twilio-ruby/rest/preview.rb +1 -11
  9. data/lib/twilio-ruby/rest/preview_base.rb +0 -5
  10. data/lib/twilio-ruby/version.rb +1 -1
  11. metadata +2 -35
  12. data/lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb +0 -241
  13. data/lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb +0 -217
  14. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +0 -389
  15. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +0 -435
  16. data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +0 -409
  17. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +0 -473
  18. data/lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb +0 -241
  19. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +0 -373
  20. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +0 -436
  21. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb +0 -253
  22. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +0 -226
  23. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +0 -525
  24. data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +0 -433
  25. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -683
  26. data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +0 -207
  27. data/lib/twilio-ruby/rest/autopilot/v1.rb +0 -55
  28. data/lib/twilio-ruby/rest/autopilot.rb +0 -22
  29. data/lib/twilio-ruby/rest/autopilot_base.rb +0 -38
  30. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_fallback_actions.rb +0 -241
  31. data/lib/twilio-ruby/rest/preview/understand/assistant/assistant_initiation_actions.rb +0 -241
  32. data/lib/twilio-ruby/rest/preview/understand/assistant/dialogue.rb +0 -217
  33. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +0 -389
  34. data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +0 -435
  35. data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +0 -409
  36. data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +0 -463
  37. data/lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb +0 -241
  38. data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +0 -373
  39. data/lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb +0 -436
  40. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_actions.rb +0 -253
  41. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +0 -226
  42. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +0 -525
  43. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +0 -663
  44. data/lib/twilio-ruby/rest/preview/understand.rb +0 -49
@@ -1,435 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # Twilio - Preview
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 Preview < PreviewBase
19
- class Understand < Version
20
- class AssistantContext < InstanceContext
21
-
22
- class FieldTypeList < ListResource
23
- ##
24
- # Initialize the FieldTypeList
25
- # @param [Version] version Version that contains the resource
26
- # @return [FieldTypeList] FieldTypeList
27
- def initialize(version, assistant_sid: nil)
28
- super(version)
29
- # Path Solution
30
- @solution = { assistant_sid: assistant_sid }
31
- @uri = "/Assistants/#{@solution[:assistant_sid]}/FieldTypes"
32
-
33
- end
34
- ##
35
- # Create the FieldTypeInstance
36
- # @param [String] unique_name A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
37
- # @param [String] friendly_name A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
38
- # @return [FieldTypeInstance] Created FieldTypeInstance
39
- def create(
40
- unique_name: nil,
41
- friendly_name: :unset
42
- )
43
-
44
- data = Twilio::Values.of({
45
- 'UniqueName' => unique_name,
46
- 'FriendlyName' => friendly_name,
47
- })
48
-
49
- payload = @version.create('POST', @uri, data: data)
50
- FieldTypeInstance.new(
51
- @version,
52
- payload,
53
- assistant_sid: @solution[:assistant_sid],
54
- )
55
- end
56
-
57
-
58
- ##
59
- # Lists FieldTypeInstance records from the API as a list.
60
- # Unlike stream(), this operation is eager and will load `limit` records into
61
- # memory before returning.
62
- # @param [Integer] limit Upper limit for the number of records to return. stream()
63
- # guarantees to never return more than limit. Default is no limit
64
- # @param [Integer] page_size Number of records to fetch per request, when
65
- # not set will use the default value of 50 records. If no page_size is defined
66
- # but a limit is defined, stream() will attempt to read the limit with the most
67
- # efficient page size, i.e. min(limit, 1000)
68
- # @return [Array] Array of up to limit results
69
- def list(limit: nil, page_size: nil)
70
- self.stream(
71
- limit: limit,
72
- page_size: page_size
73
- ).entries
74
- end
75
-
76
- ##
77
- # Streams Instance records from the API as an Enumerable.
78
- # This operation lazily loads records as efficiently as possible until the limit
79
- # is reached.
80
- # @param [Integer] limit Upper limit for the number of records to return. stream()
81
- # guarantees to never return more than limit. Default is no limit
82
- # @param [Integer] page_size Number of records to fetch per request, when
83
- # not set will use the default value of 50 records. If no page_size is defined
84
- # but a limit is defined, stream() will attempt to read the limit with the most
85
- # efficient page size, i.e. min(limit, 1000)
86
- # @return [Enumerable] Enumerable that will yield up to limit results
87
- def stream(limit: nil, page_size: nil)
88
- limits = @version.read_limits(limit, page_size)
89
-
90
- page = self.page(
91
- page_size: limits[:page_size], )
92
-
93
- @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
94
- end
95
-
96
- ##
97
- # When passed a block, yields FieldTypeInstance records from the API.
98
- # This operation lazily loads records as efficiently as possible until the limit
99
- # is reached.
100
- def each
101
- limits = @version.read_limits
102
-
103
- page = self.page(page_size: limits[:page_size], )
104
-
105
- @version.stream(page,
106
- limit: limits[:limit],
107
- page_limit: limits[:page_limit]).each {|x| yield x}
108
- end
109
-
110
- ##
111
- # Retrieve a single page of FieldTypeInstance records from the API.
112
- # Request is executed immediately.
113
- # @param [String] page_token PageToken provided by the API
114
- # @param [Integer] page_number Page Number, this value is simply for client state
115
- # @param [Integer] page_size Number of records to return, defaults to 50
116
- # @return [Page] Page of FieldTypeInstance
117
- def page(page_token: :unset, page_number: :unset, page_size: :unset)
118
- params = Twilio::Values.of({
119
- 'PageToken' => page_token,
120
- 'Page' => page_number,
121
- 'PageSize' => page_size,
122
- })
123
-
124
- response = @version.page('GET', @uri, params: params)
125
-
126
- FieldTypePage.new(@version, response, @solution)
127
- end
128
-
129
- ##
130
- # Retrieve a single page of FieldTypeInstance records from the API.
131
- # Request is executed immediately.
132
- # @param [String] target_url API-generated URL for the requested results page
133
- # @return [Page] Page of FieldTypeInstance
134
- def get_page(target_url)
135
- response = @version.domain.request(
136
- 'GET',
137
- target_url
138
- )
139
- FieldTypePage.new(@version, response, @solution)
140
- end
141
-
142
-
143
-
144
- # Provide a user friendly representation
145
- def to_s
146
- '#<Twilio.Preview.Understand.FieldTypeList>'
147
- end
148
- end
149
-
150
-
151
- ##
152
- #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.
153
- class FieldTypeContext < InstanceContext
154
- ##
155
- # Initialize the FieldTypeContext
156
- # @param [Version] version Version that contains the resource
157
- # @param [String] assistant_sid
158
- # @param [String] sid
159
- # @return [FieldTypeContext] FieldTypeContext
160
- def initialize(version, assistant_sid, sid)
161
- super(version)
162
-
163
- # Path Solution
164
- @solution = { assistant_sid: assistant_sid, sid: sid, }
165
- @uri = "/Assistants/#{@solution[:assistant_sid]}/FieldTypes/#{@solution[:sid]}"
166
-
167
- # Dependents
168
- @field_values = nil
169
- end
170
- ##
171
- # Delete the FieldTypeInstance
172
- # @return [Boolean] True if delete succeeds, false otherwise
173
- def delete
174
-
175
- @version.delete('DELETE', @uri)
176
- end
177
-
178
- ##
179
- # Fetch the FieldTypeInstance
180
- # @return [FieldTypeInstance] Fetched FieldTypeInstance
181
- def fetch
182
-
183
- payload = @version.fetch('GET', @uri)
184
- FieldTypeInstance.new(
185
- @version,
186
- payload,
187
- assistant_sid: @solution[:assistant_sid],
188
- sid: @solution[:sid],
189
- )
190
- end
191
-
192
- ##
193
- # Update the FieldTypeInstance
194
- # @param [String] friendly_name A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
195
- # @param [String] unique_name A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
196
- # @return [FieldTypeInstance] Updated FieldTypeInstance
197
- def update(
198
- friendly_name: :unset,
199
- unique_name: :unset
200
- )
201
-
202
- data = Twilio::Values.of({
203
- 'FriendlyName' => friendly_name,
204
- 'UniqueName' => unique_name,
205
- })
206
-
207
- payload = @version.update('POST', @uri, data: data)
208
- FieldTypeInstance.new(
209
- @version,
210
- payload,
211
- assistant_sid: @solution[:assistant_sid],
212
- sid: @solution[:sid],
213
- )
214
- end
215
-
216
- ##
217
- # Access the field_values
218
- # @return [FieldValueList]
219
- # @return [FieldValueContext] if sid was passed.
220
- def field_values(sid=:unset)
221
-
222
- raise ArgumentError, 'sid cannot be nil' if sid.nil?
223
-
224
- if sid != :unset
225
- return FieldValueContext.new(@version, @solution[:assistant_sid], @solution[:sid],sid )
226
- end
227
-
228
- unless @field_values
229
- @field_values = FieldValueList.new(
230
- @version, assistant_sid: @solution[:assistant_sid], field_type_sid: @solution[:sid], )
231
- end
232
-
233
- @field_values
234
- end
235
-
236
- ##
237
- # Provide a user friendly representation
238
- def to_s
239
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
240
- "#<Twilio.Preview.Understand.FieldTypeContext #{context}>"
241
- end
242
-
243
- ##
244
- # Provide a detailed, user friendly representation
245
- def inspect
246
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
247
- "#<Twilio.Preview.Understand.FieldTypeContext #{context}>"
248
- end
249
- end
250
-
251
- class FieldTypePage < Page
252
- ##
253
- # Initialize the FieldTypePage
254
- # @param [Version] version Version that contains the resource
255
- # @param [Response] response Response from the API
256
- # @param [Hash] solution Path solution for the resource
257
- # @return [FieldTypePage] FieldTypePage
258
- def initialize(version, response, solution)
259
- super(version, response)
260
-
261
- # Path Solution
262
- @solution = solution
263
- end
264
-
265
- ##
266
- # Build an instance of FieldTypeInstance
267
- # @param [Hash] payload Payload response from the API
268
- # @return [FieldTypeInstance] FieldTypeInstance
269
- def get_instance(payload)
270
- FieldTypeInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid])
271
- end
272
-
273
- ##
274
- # Provide a user friendly representation
275
- def to_s
276
- '<Twilio.Preview.Understand.FieldTypePage>'
277
- end
278
- end
279
- class FieldTypeInstance < InstanceResource
280
- ##
281
- # Initialize the FieldTypeInstance
282
- # @param [Version] version Version that contains the resource
283
- # @param [Hash] payload payload that contains response from Twilio
284
- # @param [String] account_sid The SID of the
285
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this FieldType
286
- # resource.
287
- # @param [String] sid The SID of the Call resource to fetch.
288
- # @return [FieldTypeInstance] FieldTypeInstance
289
- def initialize(version, payload , assistant_sid: nil, sid: nil)
290
- super(version)
291
-
292
- # Marshaled Properties
293
- @properties = {
294
- 'account_sid' => payload['account_sid'],
295
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
296
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
297
- 'friendly_name' => payload['friendly_name'],
298
- 'links' => payload['links'],
299
- 'assistant_sid' => payload['assistant_sid'],
300
- 'sid' => payload['sid'],
301
- 'unique_name' => payload['unique_name'],
302
- 'url' => payload['url'],
303
- }
304
-
305
- # Context
306
- @instance_context = nil
307
- @params = { 'assistant_sid' => assistant_sid || @properties['assistant_sid'] ,'sid' => sid || @properties['sid'] , }
308
- end
309
-
310
- ##
311
- # Generate an instance context for the instance, the context is capable of
312
- # performing various actions. All instance actions are proxied to the context
313
- # @return [FieldTypeContext] CallContext for this CallInstance
314
- def context
315
- unless @instance_context
316
- @instance_context = FieldTypeContext.new(@version , @params['assistant_sid'], @params['sid'])
317
- end
318
- @instance_context
319
- end
320
-
321
- ##
322
- # @return [String] The unique ID of the Account that created this Field Type.
323
- def account_sid
324
- @properties['account_sid']
325
- end
326
-
327
- ##
328
- # @return [Time] The date that this resource was created
329
- def date_created
330
- @properties['date_created']
331
- end
332
-
333
- ##
334
- # @return [Time] The date that this resource was last updated
335
- def date_updated
336
- @properties['date_updated']
337
- end
338
-
339
- ##
340
- # @return [String] A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
341
- def friendly_name
342
- @properties['friendly_name']
343
- end
344
-
345
- ##
346
- # @return [Hash]
347
- def links
348
- @properties['links']
349
- end
350
-
351
- ##
352
- # @return [String] The unique ID of the Assistant.
353
- def assistant_sid
354
- @properties['assistant_sid']
355
- end
356
-
357
- ##
358
- # @return [String] A 34 character string that uniquely identifies this resource.
359
- def sid
360
- @properties['sid']
361
- end
362
-
363
- ##
364
- # @return [String] A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
365
- def unique_name
366
- @properties['unique_name']
367
- end
368
-
369
- ##
370
- # @return [String]
371
- def url
372
- @properties['url']
373
- end
374
-
375
- ##
376
- # Delete the FieldTypeInstance
377
- # @return [Boolean] True if delete succeeds, false otherwise
378
- def delete
379
-
380
- context.delete
381
- end
382
-
383
- ##
384
- # Fetch the FieldTypeInstance
385
- # @return [FieldTypeInstance] Fetched FieldTypeInstance
386
- def fetch
387
-
388
- context.fetch
389
- end
390
-
391
- ##
392
- # Update the FieldTypeInstance
393
- # @param [String] friendly_name A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
394
- # @param [String] unique_name A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
395
- # @return [FieldTypeInstance] Updated FieldTypeInstance
396
- def update(
397
- friendly_name: :unset,
398
- unique_name: :unset
399
- )
400
-
401
- context.update(
402
- friendly_name: friendly_name,
403
- unique_name: unique_name,
404
- )
405
- end
406
-
407
- ##
408
- # Access the field_values
409
- # @return [field_values] field_values
410
- def field_values
411
- context.field_values
412
- end
413
-
414
- ##
415
- # Provide a user friendly representation
416
- def to_s
417
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
418
- "<Twilio.Preview.Understand.FieldTypeInstance #{values}>"
419
- end
420
-
421
- ##
422
- # Provide a detailed, user friendly representation
423
- def inspect
424
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
425
- "<Twilio.Preview.Understand.FieldTypeInstance #{values}>"
426
- end
427
- end
428
-
429
- end
430
- end
431
- end
432
- end
433
- end
434
-
435
-