twilio-ruby 6.9.0 → 6.9.1

Sign up to get free protection for your applications and to get access to all the features.
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,409 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4
- # | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5
- # | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6
- #
7
- # Twilio - Autopilot
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 Autopilot < AutopilotBase
19
- class V1 < Version
20
- class AssistantContext < InstanceContext
21
-
22
- class ModelBuildList < ListResource
23
- ##
24
- # Initialize the ModelBuildList
25
- # @param [Version] version Version that contains the resource
26
- # @return [ModelBuildList] ModelBuildList
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]}/ModelBuilds"
32
-
33
- end
34
- ##
35
- # Create the ModelBuildInstance
36
- # @param [String] status_callback The URL we should call using a POST method to send status information to your application.
37
- # @param [String] unique_name An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
38
- # @return [ModelBuildInstance] Created ModelBuildInstance
39
- def create(
40
- status_callback: :unset,
41
- unique_name: :unset
42
- )
43
-
44
- data = Twilio::Values.of({
45
- 'StatusCallback' => status_callback,
46
- 'UniqueName' => unique_name,
47
- })
48
-
49
- payload = @version.create('POST', @uri, data: data)
50
- ModelBuildInstance.new(
51
- @version,
52
- payload,
53
- assistant_sid: @solution[:assistant_sid],
54
- )
55
- end
56
-
57
-
58
- ##
59
- # Lists ModelBuildInstance 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 ModelBuildInstance 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 ModelBuildInstance 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 ModelBuildInstance
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
- ModelBuildPage.new(@version, response, @solution)
127
- end
128
-
129
- ##
130
- # Retrieve a single page of ModelBuildInstance 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 ModelBuildInstance
134
- def get_page(target_url)
135
- response = @version.domain.request(
136
- 'GET',
137
- target_url
138
- )
139
- ModelBuildPage.new(@version, response, @solution)
140
- end
141
-
142
-
143
-
144
- # Provide a user friendly representation
145
- def to_s
146
- '#<Twilio.Autopilot.V1.ModelBuildList>'
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 ModelBuildContext < InstanceContext
154
- ##
155
- # Initialize the ModelBuildContext
156
- # @param [Version] version Version that contains the resource
157
- # @param [String] assistant_sid The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource to update.
158
- # @param [String] sid The Twilio-provided string that uniquely identifies the ModelBuild resource to update.
159
- # @return [ModelBuildContext] ModelBuildContext
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]}/ModelBuilds/#{@solution[:sid]}"
166
-
167
-
168
- end
169
- ##
170
- # Delete the ModelBuildInstance
171
- # @return [Boolean] True if delete succeeds, false otherwise
172
- def delete
173
-
174
- @version.delete('DELETE', @uri)
175
- end
176
-
177
- ##
178
- # Fetch the ModelBuildInstance
179
- # @return [ModelBuildInstance] Fetched ModelBuildInstance
180
- def fetch
181
-
182
- payload = @version.fetch('GET', @uri)
183
- ModelBuildInstance.new(
184
- @version,
185
- payload,
186
- assistant_sid: @solution[:assistant_sid],
187
- sid: @solution[:sid],
188
- )
189
- end
190
-
191
- ##
192
- # Update the ModelBuildInstance
193
- # @param [String] unique_name An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
194
- # @return [ModelBuildInstance] Updated ModelBuildInstance
195
- def update(
196
- unique_name: :unset
197
- )
198
-
199
- data = Twilio::Values.of({
200
- 'UniqueName' => unique_name,
201
- })
202
-
203
- payload = @version.update('POST', @uri, data: data)
204
- ModelBuildInstance.new(
205
- @version,
206
- payload,
207
- assistant_sid: @solution[:assistant_sid],
208
- sid: @solution[:sid],
209
- )
210
- end
211
-
212
-
213
- ##
214
- # Provide a user friendly representation
215
- def to_s
216
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
217
- "#<Twilio.Autopilot.V1.ModelBuildContext #{context}>"
218
- end
219
-
220
- ##
221
- # Provide a detailed, user friendly representation
222
- def inspect
223
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
224
- "#<Twilio.Autopilot.V1.ModelBuildContext #{context}>"
225
- end
226
- end
227
-
228
- class ModelBuildPage < Page
229
- ##
230
- # Initialize the ModelBuildPage
231
- # @param [Version] version Version that contains the resource
232
- # @param [Response] response Response from the API
233
- # @param [Hash] solution Path solution for the resource
234
- # @return [ModelBuildPage] ModelBuildPage
235
- def initialize(version, response, solution)
236
- super(version, response)
237
-
238
- # Path Solution
239
- @solution = solution
240
- end
241
-
242
- ##
243
- # Build an instance of ModelBuildInstance
244
- # @param [Hash] payload Payload response from the API
245
- # @return [ModelBuildInstance] ModelBuildInstance
246
- def get_instance(payload)
247
- ModelBuildInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid])
248
- end
249
-
250
- ##
251
- # Provide a user friendly representation
252
- def to_s
253
- '<Twilio.Autopilot.V1.ModelBuildPage>'
254
- end
255
- end
256
- class ModelBuildInstance < InstanceResource
257
- ##
258
- # Initialize the ModelBuildInstance
259
- # @param [Version] version Version that contains the resource
260
- # @param [Hash] payload payload that contains response from Twilio
261
- # @param [String] account_sid The SID of the
262
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this ModelBuild
263
- # resource.
264
- # @param [String] sid The SID of the Call resource to fetch.
265
- # @return [ModelBuildInstance] ModelBuildInstance
266
- def initialize(version, payload , assistant_sid: nil, sid: nil)
267
- super(version)
268
-
269
- # Marshaled Properties
270
- @properties = {
271
- 'account_sid' => payload['account_sid'],
272
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
273
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
274
- 'assistant_sid' => payload['assistant_sid'],
275
- 'sid' => payload['sid'],
276
- 'status' => payload['status'],
277
- 'unique_name' => payload['unique_name'],
278
- 'url' => payload['url'],
279
- 'build_duration' => payload['build_duration'] == nil ? payload['build_duration'] : payload['build_duration'].to_i,
280
- 'error_code' => payload['error_code'] == nil ? payload['error_code'] : payload['error_code'].to_i,
281
- }
282
-
283
- # Context
284
- @instance_context = nil
285
- @params = { 'assistant_sid' => assistant_sid || @properties['assistant_sid'] ,'sid' => sid || @properties['sid'] , }
286
- end
287
-
288
- ##
289
- # Generate an instance context for the instance, the context is capable of
290
- # performing various actions. All instance actions are proxied to the context
291
- # @return [ModelBuildContext] CallContext for this CallInstance
292
- def context
293
- unless @instance_context
294
- @instance_context = ModelBuildContext.new(@version , @params['assistant_sid'], @params['sid'])
295
- end
296
- @instance_context
297
- end
298
-
299
- ##
300
- # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ModelBuild resource.
301
- def account_sid
302
- @properties['account_sid']
303
- end
304
-
305
- ##
306
- # @return [Time] The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
307
- def date_created
308
- @properties['date_created']
309
- end
310
-
311
- ##
312
- # @return [Time] The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
313
- def date_updated
314
- @properties['date_updated']
315
- end
316
-
317
- ##
318
- # @return [String] The SID of the [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the parent of the resource.
319
- def assistant_sid
320
- @properties['assistant_sid']
321
- end
322
-
323
- ##
324
- # @return [String] The unique string that we created to identify the ModelBuild resource.
325
- def sid
326
- @properties['sid']
327
- end
328
-
329
- ##
330
- # @return [Status]
331
- def status
332
- @properties['status']
333
- end
334
-
335
- ##
336
- # @return [String] An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource.
337
- def unique_name
338
- @properties['unique_name']
339
- end
340
-
341
- ##
342
- # @return [String] The absolute URL of the ModelBuild resource.
343
- def url
344
- @properties['url']
345
- end
346
-
347
- ##
348
- # @return [String] The time in seconds it took to build the model.
349
- def build_duration
350
- @properties['build_duration']
351
- end
352
-
353
- ##
354
- # @return [String] If the `status` for the model build is `failed`, this value is a code to more information about the failure. This value will be null for all other statuses. See [error code dictionary](https://www.twilio.com/docs/api/errors) for a description of the error.
355
- def error_code
356
- @properties['error_code']
357
- end
358
-
359
- ##
360
- # Delete the ModelBuildInstance
361
- # @return [Boolean] True if delete succeeds, false otherwise
362
- def delete
363
-
364
- context.delete
365
- end
366
-
367
- ##
368
- # Fetch the ModelBuildInstance
369
- # @return [ModelBuildInstance] Fetched ModelBuildInstance
370
- def fetch
371
-
372
- context.fetch
373
- end
374
-
375
- ##
376
- # Update the ModelBuildInstance
377
- # @param [String] unique_name An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
378
- # @return [ModelBuildInstance] Updated ModelBuildInstance
379
- def update(
380
- unique_name: :unset
381
- )
382
-
383
- context.update(
384
- unique_name: unique_name,
385
- )
386
- end
387
-
388
- ##
389
- # Provide a user friendly representation
390
- def to_s
391
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
392
- "<Twilio.Autopilot.V1.ModelBuildInstance #{values}>"
393
- end
394
-
395
- ##
396
- # Provide a detailed, user friendly representation
397
- def inspect
398
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
399
- "<Twilio.Autopilot.V1.ModelBuildInstance #{values}>"
400
- end
401
- end
402
-
403
- end
404
- end
405
- end
406
- end
407
- end
408
-
409
-