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,389 +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
- class FieldTypeContext < InstanceContext
22
-
23
- class FieldValueList < ListResource
24
- ##
25
- # Initialize the FieldValueList
26
- # @param [Version] version Version that contains the resource
27
- # @return [FieldValueList] FieldValueList
28
- def initialize(version, assistant_sid: nil, field_type_sid: nil)
29
- super(version)
30
- # Path Solution
31
- @solution = { assistant_sid: assistant_sid, field_type_sid: field_type_sid }
32
- @uri = "/Assistants/#{@solution[:assistant_sid]}/FieldTypes/#{@solution[:field_type_sid]}/FieldValues"
33
-
34
- end
35
- ##
36
- # Create the FieldValueInstance
37
- # @param [String] language An ISO language-country string of the value.
38
- # @param [String] value A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
39
- # @param [String] synonym_of A value that indicates this field value is a synonym of. Empty if the value is not a synonym.
40
- # @return [FieldValueInstance] Created FieldValueInstance
41
- def create(
42
- language: nil,
43
- value: nil,
44
- synonym_of: :unset
45
- )
46
-
47
- data = Twilio::Values.of({
48
- 'Language' => language,
49
- 'Value' => value,
50
- 'SynonymOf' => synonym_of,
51
- })
52
-
53
- payload = @version.create('POST', @uri, data: data)
54
- FieldValueInstance.new(
55
- @version,
56
- payload,
57
- assistant_sid: @solution[:assistant_sid],
58
- field_type_sid: @solution[:field_type_sid],
59
- )
60
- end
61
-
62
-
63
- ##
64
- # Lists FieldValueInstance records from the API as a list.
65
- # Unlike stream(), this operation is eager and will load `limit` records into
66
- # memory before returning.
67
- # @param [String] language An ISO language-country string of the value. For example: *en-US*
68
- # @param [Integer] limit Upper limit for the number of records to return. stream()
69
- # guarantees to never return more than limit. Default is no limit
70
- # @param [Integer] page_size Number of records to fetch per request, when
71
- # not set will use the default value of 50 records. If no page_size is defined
72
- # but a limit is defined, stream() will attempt to read the limit with the most
73
- # efficient page size, i.e. min(limit, 1000)
74
- # @return [Array] Array of up to limit results
75
- def list(language: :unset, limit: nil, page_size: nil)
76
- self.stream(
77
- language: language,
78
- limit: limit,
79
- page_size: page_size
80
- ).entries
81
- end
82
-
83
- ##
84
- # Streams Instance 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] language An ISO language-country string of the value. For example: *en-US*
88
- # @param [Integer] limit Upper limit for the number of records to return. stream()
89
- # guarantees to never return more than limit. Default is no limit
90
- # @param [Integer] page_size Number of records to fetch per request, when
91
- # not set will use the default value of 50 records. If no page_size is defined
92
- # but a limit is defined, stream() will attempt to read the limit with the most
93
- # efficient page size, i.e. min(limit, 1000)
94
- # @return [Enumerable] Enumerable that will yield up to limit results
95
- def stream(language: :unset, limit: nil, page_size: nil)
96
- limits = @version.read_limits(limit, page_size)
97
-
98
- page = self.page(
99
- language: language,
100
- page_size: limits[:page_size], )
101
-
102
- @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
103
- end
104
-
105
- ##
106
- # When passed a block, yields FieldValueInstance records from the API.
107
- # This operation lazily loads records as efficiently as possible until the limit
108
- # is reached.
109
- def each
110
- limits = @version.read_limits
111
-
112
- page = self.page(page_size: limits[:page_size], )
113
-
114
- @version.stream(page,
115
- limit: limits[:limit],
116
- page_limit: limits[:page_limit]).each {|x| yield x}
117
- end
118
-
119
- ##
120
- # Retrieve a single page of FieldValueInstance records from the API.
121
- # Request is executed immediately.
122
- # @param [String] language An ISO language-country string of the value. For example: *en-US*
123
- # @param [String] page_token PageToken provided by the API
124
- # @param [Integer] page_number Page Number, this value is simply for client state
125
- # @param [Integer] page_size Number of records to return, defaults to 50
126
- # @return [Page] Page of FieldValueInstance
127
- def page(language: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
128
- params = Twilio::Values.of({
129
- 'Language' => language,
130
- 'PageToken' => page_token,
131
- 'Page' => page_number,
132
- 'PageSize' => page_size,
133
- })
134
-
135
- response = @version.page('GET', @uri, params: params)
136
-
137
- FieldValuePage.new(@version, response, @solution)
138
- end
139
-
140
- ##
141
- # Retrieve a single page of FieldValueInstance records from the API.
142
- # Request is executed immediately.
143
- # @param [String] target_url API-generated URL for the requested results page
144
- # @return [Page] Page of FieldValueInstance
145
- def get_page(target_url)
146
- response = @version.domain.request(
147
- 'GET',
148
- target_url
149
- )
150
- FieldValuePage.new(@version, response, @solution)
151
- end
152
-
153
-
154
-
155
- # Provide a user friendly representation
156
- def to_s
157
- '#<Twilio.Preview.Understand.FieldValueList>'
158
- end
159
- end
160
-
161
-
162
- ##
163
- #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.
164
- class FieldValueContext < InstanceContext
165
- ##
166
- # Initialize the FieldValueContext
167
- # @param [Version] version Version that contains the resource
168
- # @param [String] assistant_sid
169
- # @param [String] field_type_sid
170
- # @param [String] sid
171
- # @return [FieldValueContext] FieldValueContext
172
- def initialize(version, assistant_sid, field_type_sid, sid)
173
- super(version)
174
-
175
- # Path Solution
176
- @solution = { assistant_sid: assistant_sid, field_type_sid: field_type_sid, sid: sid, }
177
- @uri = "/Assistants/#{@solution[:assistant_sid]}/FieldTypes/#{@solution[:field_type_sid]}/FieldValues/#{@solution[:sid]}"
178
-
179
-
180
- end
181
- ##
182
- # Delete the FieldValueInstance
183
- # @return [Boolean] True if delete succeeds, false otherwise
184
- def delete
185
-
186
- @version.delete('DELETE', @uri)
187
- end
188
-
189
- ##
190
- # Fetch the FieldValueInstance
191
- # @return [FieldValueInstance] Fetched FieldValueInstance
192
- def fetch
193
-
194
- payload = @version.fetch('GET', @uri)
195
- FieldValueInstance.new(
196
- @version,
197
- payload,
198
- assistant_sid: @solution[:assistant_sid],
199
- field_type_sid: @solution[:field_type_sid],
200
- sid: @solution[:sid],
201
- )
202
- end
203
-
204
-
205
- ##
206
- # Provide a user friendly representation
207
- def to_s
208
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
209
- "#<Twilio.Preview.Understand.FieldValueContext #{context}>"
210
- end
211
-
212
- ##
213
- # Provide a detailed, user friendly representation
214
- def inspect
215
- context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
216
- "#<Twilio.Preview.Understand.FieldValueContext #{context}>"
217
- end
218
- end
219
-
220
- class FieldValuePage < Page
221
- ##
222
- # Initialize the FieldValuePage
223
- # @param [Version] version Version that contains the resource
224
- # @param [Response] response Response from the API
225
- # @param [Hash] solution Path solution for the resource
226
- # @return [FieldValuePage] FieldValuePage
227
- def initialize(version, response, solution)
228
- super(version, response)
229
-
230
- # Path Solution
231
- @solution = solution
232
- end
233
-
234
- ##
235
- # Build an instance of FieldValueInstance
236
- # @param [Hash] payload Payload response from the API
237
- # @return [FieldValueInstance] FieldValueInstance
238
- def get_instance(payload)
239
- FieldValueInstance.new(@version, payload, assistant_sid: @solution[:assistant_sid], field_type_sid: @solution[:field_type_sid])
240
- end
241
-
242
- ##
243
- # Provide a user friendly representation
244
- def to_s
245
- '<Twilio.Preview.Understand.FieldValuePage>'
246
- end
247
- end
248
- class FieldValueInstance < InstanceResource
249
- ##
250
- # Initialize the FieldValueInstance
251
- # @param [Version] version Version that contains the resource
252
- # @param [Hash] payload payload that contains response from Twilio
253
- # @param [String] account_sid The SID of the
254
- # {Account}[https://www.twilio.com/docs/iam/api/account] that created this FieldValue
255
- # resource.
256
- # @param [String] sid The SID of the Call resource to fetch.
257
- # @return [FieldValueInstance] FieldValueInstance
258
- def initialize(version, payload , assistant_sid: nil, field_type_sid: nil, sid: nil)
259
- super(version)
260
-
261
- # Marshaled Properties
262
- @properties = {
263
- 'account_sid' => payload['account_sid'],
264
- 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
265
- 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
266
- 'field_type_sid' => payload['field_type_sid'],
267
- 'language' => payload['language'],
268
- 'assistant_sid' => payload['assistant_sid'],
269
- 'sid' => payload['sid'],
270
- 'value' => payload['value'],
271
- 'url' => payload['url'],
272
- 'synonym_of' => payload['synonym_of'],
273
- }
274
-
275
- # Context
276
- @instance_context = nil
277
- @params = { 'assistant_sid' => assistant_sid || @properties['assistant_sid'] ,'field_type_sid' => field_type_sid || @properties['field_type_sid'] ,'sid' => sid || @properties['sid'] , }
278
- end
279
-
280
- ##
281
- # Generate an instance context for the instance, the context is capable of
282
- # performing various actions. All instance actions are proxied to the context
283
- # @return [FieldValueContext] CallContext for this CallInstance
284
- def context
285
- unless @instance_context
286
- @instance_context = FieldValueContext.new(@version , @params['assistant_sid'], @params['field_type_sid'], @params['sid'])
287
- end
288
- @instance_context
289
- end
290
-
291
- ##
292
- # @return [String] The unique ID of the Account that created this Field Value.
293
- def account_sid
294
- @properties['account_sid']
295
- end
296
-
297
- ##
298
- # @return [Time] The date that this resource was created
299
- def date_created
300
- @properties['date_created']
301
- end
302
-
303
- ##
304
- # @return [Time] The date that this resource was last updated
305
- def date_updated
306
- @properties['date_updated']
307
- end
308
-
309
- ##
310
- # @return [String] The unique ID of the Field Type associated with this Field Value.
311
- def field_type_sid
312
- @properties['field_type_sid']
313
- end
314
-
315
- ##
316
- # @return [String] An ISO language-country string of the value.
317
- def language
318
- @properties['language']
319
- end
320
-
321
- ##
322
- # @return [String] The unique ID of the Assistant.
323
- def assistant_sid
324
- @properties['assistant_sid']
325
- end
326
-
327
- ##
328
- # @return [String] A 34 character string that uniquely identifies this resource.
329
- def sid
330
- @properties['sid']
331
- end
332
-
333
- ##
334
- # @return [String] The Field Value itself.
335
- def value
336
- @properties['value']
337
- end
338
-
339
- ##
340
- # @return [String]
341
- def url
342
- @properties['url']
343
- end
344
-
345
- ##
346
- # @return [String] A value that indicates this field value is a synonym of. Empty if the value is not a synonym.
347
- def synonym_of
348
- @properties['synonym_of']
349
- end
350
-
351
- ##
352
- # Delete the FieldValueInstance
353
- # @return [Boolean] True if delete succeeds, false otherwise
354
- def delete
355
-
356
- context.delete
357
- end
358
-
359
- ##
360
- # Fetch the FieldValueInstance
361
- # @return [FieldValueInstance] Fetched FieldValueInstance
362
- def fetch
363
-
364
- context.fetch
365
- end
366
-
367
- ##
368
- # Provide a user friendly representation
369
- def to_s
370
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
371
- "<Twilio.Preview.Understand.FieldValueInstance #{values}>"
372
- end
373
-
374
- ##
375
- # Provide a detailed, user friendly representation
376
- def inspect
377
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
378
- "<Twilio.Preview.Understand.FieldValueInstance #{values}>"
379
- end
380
- end
381
-
382
- end
383
- end
384
- end
385
- end
386
- end
387
- end
388
-
389
-