twilio-ruby 5.14.1 → 5.15.0

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 (80) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +33 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +2 -1
  5. data/lib/twilio-ruby/rest/authy.rb +55 -0
  6. data/lib/twilio-ruby/rest/authy/v1.rb +59 -0
  7. data/lib/twilio-ruby/rest/authy/v1/form.rb +190 -0
  8. data/lib/twilio-ruby/rest/authy/v1/service.rb +378 -0
  9. data/lib/twilio-ruby/rest/authy/v1/service/entity.rb +372 -0
  10. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb +474 -0
  11. data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +405 -0
  12. data/lib/twilio-ruby/rest/autopilot.rb +47 -0
  13. data/lib/twilio-ruby/rest/autopilot/v1.rb +43 -0
  14. data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +606 -0
  15. data/lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb +215 -0
  16. data/lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb +205 -0
  17. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +417 -0
  18. data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +393 -0
  19. data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +390 -0
  20. data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +443 -0
  21. data/lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb +215 -0
  22. data/lib/twilio-ruby/rest/{preview/understand/assistant/intent.rb → autopilot/v1/assistant/task.rb} +91 -84
  23. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +377 -0
  24. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +442 -0
  25. data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb +244 -0
  26. data/lib/twilio-ruby/rest/{preview/understand/assistant/intent/intent_statistics.rb → autopilot/v1/assistant/task/task_statistics.rb} +49 -51
  27. data/lib/twilio-ruby/rest/chat/v1/service.rb +1 -1
  28. data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +12 -6
  29. data/lib/twilio-ruby/rest/client.rb +14 -0
  30. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +1 -1
  31. data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +12 -6
  32. data/lib/twilio-ruby/rest/preview/understand.rb +2 -1
  33. data/lib/twilio-ruby/rest/preview/understand/assistant.rb +59 -29
  34. data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +17 -13
  35. data/lib/twilio-ruby/rest/preview/understand/assistant/style_sheet.rb +215 -0
  36. data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +505 -0
  37. data/lib/twilio-ruby/rest/preview/understand/assistant/{intent → task}/field.rb +25 -25
  38. data/lib/twilio-ruby/rest/preview/understand/assistant/{intent → task}/sample.rb +30 -30
  39. data/lib/twilio-ruby/rest/preview/understand/assistant/{intent/intent_actions.rb → task/task_actions.rb} +50 -54
  40. data/lib/twilio-ruby/rest/preview/understand/assistant/task/task_statistics.rb +224 -0
  41. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +7 -7
  42. data/lib/twilio-ruby/rest/verify/v1/service.rb +45 -6
  43. data/lib/twilio-ruby/rest/verify/v1/service/verification.rb +9 -2
  44. data/lib/twilio-ruby/rest/wireless/v1/command.rb +32 -5
  45. data/lib/twilio-ruby/twiml/voice_response.rb +66 -5
  46. data/lib/twilio-ruby/version.rb +1 -1
  47. data/spec/integration/api/v2010/account/call/recording_spec.rb +3 -3
  48. data/spec/integration/api/v2010/account/conference/participant_spec.rb +42 -1
  49. data/spec/integration/api/v2010/account/conference/recording_spec.rb +2 -2
  50. data/spec/integration/authy/v1/form_spec.rb +48 -0
  51. data/spec/integration/authy/v1/service/entity/factor/challenge_spec.rb +267 -0
  52. data/spec/integration/authy/v1/service/entity/factor_spec.rb +269 -0
  53. data/spec/integration/authy/v1/service/entity_spec.rb +201 -0
  54. data/spec/integration/authy/v1/service_spec.rb +227 -0
  55. data/spec/integration/autopilot/v1/assistant/defaults_spec.rb +81 -0
  56. data/spec/integration/autopilot/v1/assistant/dialogue_spec.rb +47 -0
  57. data/spec/integration/autopilot/v1/assistant/field_type/field_value_spec.rb +210 -0
  58. data/spec/integration/autopilot/v1/assistant/field_type_spec.rb +246 -0
  59. data/spec/integration/autopilot/v1/assistant/model_build_spec.rb +241 -0
  60. data/spec/integration/autopilot/v1/assistant/query_spec.rb +306 -0
  61. data/spec/integration/autopilot/v1/assistant/style_sheet_spec.rb +81 -0
  62. data/spec/integration/autopilot/v1/assistant/task/field_spec.rb +207 -0
  63. data/spec/integration/autopilot/v1/assistant/task/sample_spec.rb +253 -0
  64. data/spec/integration/autopilot/v1/assistant/task/task_actions_spec.rb +87 -0
  65. data/spec/integration/autopilot/v1/assistant/task/task_statistics_spec.rb +50 -0
  66. data/spec/integration/autopilot/v1/assistant/task_spec.rb +262 -0
  67. data/spec/integration/autopilot/v1/assistant_spec.rb +270 -0
  68. data/spec/integration/preview/understand/assistant/query_spec.rb +8 -8
  69. data/spec/integration/preview/understand/assistant/style_sheet_spec.rb +81 -0
  70. data/spec/integration/preview/understand/assistant/{intent → task}/field_spec.rb +23 -23
  71. data/spec/integration/preview/understand/assistant/{intent → task}/sample_spec.rb +28 -28
  72. data/spec/integration/preview/understand/assistant/{intent/intent_actions_spec.rb → task/task_actions_spec.rb} +15 -15
  73. data/spec/integration/preview/understand/assistant/{intent/intent_statistics_spec.rb → task/task_statistics_spec.rb} +6 -6
  74. data/spec/integration/preview/understand/assistant/{intent_spec.rb → task_spec.rb} +53 -49
  75. data/spec/integration/preview/understand/assistant_spec.rb +12 -8
  76. data/spec/integration/taskrouter/v1/workspace/task_queue_spec.rb +3 -7
  77. data/spec/integration/verify/v1/service_spec.rb +30 -0
  78. data/spec/integration/wireless/v1/command_spec.rb +99 -2
  79. data/spec/twiml/voice_response_spec.rb +25 -2
  80. metadata +78 -17
@@ -11,7 +11,7 @@ module Twilio
11
11
  class Preview < Domain
12
12
  class Understand < Version
13
13
  class AssistantContext < InstanceContext
14
- class IntentContext < InstanceContext
14
+ class TaskContext < InstanceContext
15
15
  ##
16
16
  # 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.
17
17
  class FieldList < ListResource
@@ -19,15 +19,14 @@ module Twilio
19
19
  # Initialize the FieldList
20
20
  # @param [Version] version Version that contains the resource
21
21
  # @param [String] assistant_sid The unique ID of the parent Assistant.
22
- # @param [String] intent_sid The unique ID of the Intent associated with this
23
- # Field.
22
+ # @param [String] task_sid The unique ID of the Task associated with this Field.
24
23
  # @return [FieldList] FieldList
25
- def initialize(version, assistant_sid: nil, intent_sid: nil)
24
+ def initialize(version, assistant_sid: nil, task_sid: nil)
26
25
  super(version)
27
26
 
28
27
  # Path Solution
29
- @solution = {assistant_sid: assistant_sid, intent_sid: intent_sid}
30
- @uri = "/Assistants/#{@solution[:assistant_sid]}/Intents/#{@solution[:intent_sid]}/Fields"
28
+ @solution = {assistant_sid: assistant_sid, task_sid: task_sid}
29
+ @uri = "/Assistants/#{@solution[:assistant_sid]}/Tasks/#{@solution[:task_sid]}/Fields"
31
30
  end
32
31
 
33
32
  ##
@@ -135,7 +134,7 @@ module Twilio
135
134
  @version,
136
135
  payload,
137
136
  assistant_sid: @solution[:assistant_sid],
138
- intent_sid: @solution[:intent_sid],
137
+ task_sid: @solution[:task_sid],
139
138
  )
140
139
  end
141
140
 
@@ -171,7 +170,7 @@ module Twilio
171
170
  @version,
172
171
  payload,
173
172
  assistant_sid: @solution[:assistant_sid],
174
- intent_sid: @solution[:intent_sid],
173
+ task_sid: @solution[:task_sid],
175
174
  )
176
175
  end
177
176
 
@@ -188,16 +187,17 @@ module Twilio
188
187
  ##
189
188
  # Initialize the FieldContext
190
189
  # @param [Version] version Version that contains the resource
191
- # @param [String] assistant_sid The assistant_sid
192
- # @param [String] intent_sid The intent_sid
193
- # @param [String] sid The sid
190
+ # @param [String] assistant_sid The unique ID of the Assistant.
191
+ # @param [String] task_sid The unique ID of the Task associated with this Field.
192
+ # @param [String] sid A 34 character string that uniquely identifies this
193
+ # resource.
194
194
  # @return [FieldContext] FieldContext
195
- def initialize(version, assistant_sid, intent_sid, sid)
195
+ def initialize(version, assistant_sid, task_sid, sid)
196
196
  super(version)
197
197
 
198
198
  # Path Solution
199
- @solution = {assistant_sid: assistant_sid, intent_sid: intent_sid, sid: sid, }
200
- @uri = "/Assistants/#{@solution[:assistant_sid]}/Intents/#{@solution[:intent_sid]}/Fields/#{@solution[:sid]}"
199
+ @solution = {assistant_sid: assistant_sid, task_sid: task_sid, sid: sid, }
200
+ @uri = "/Assistants/#{@solution[:assistant_sid]}/Tasks/#{@solution[:task_sid]}/Fields/#{@solution[:sid]}"
201
201
  end
202
202
 
203
203
  ##
@@ -216,7 +216,7 @@ module Twilio
216
216
  @version,
217
217
  payload,
218
218
  assistant_sid: @solution[:assistant_sid],
219
- intent_sid: @solution[:intent_sid],
219
+ task_sid: @solution[:task_sid],
220
220
  sid: @solution[:sid],
221
221
  )
222
222
  end
@@ -244,11 +244,11 @@ module Twilio
244
244
  # @param [Version] version Version that contains the resource
245
245
  # @param [Hash] payload payload that contains response from Twilio
246
246
  # @param [String] assistant_sid The unique ID of the parent Assistant.
247
- # @param [String] intent_sid The unique ID of the Intent associated with this
248
- # Field.
249
- # @param [String] sid The sid
247
+ # @param [String] task_sid The unique ID of the Task associated with this Field.
248
+ # @param [String] sid A 34 character string that uniquely identifies this
249
+ # resource.
250
250
  # @return [FieldInstance] FieldInstance
251
- def initialize(version, payload, assistant_sid: nil, intent_sid: nil, sid: nil)
251
+ def initialize(version, payload, assistant_sid: nil, task_sid: nil, sid: nil)
252
252
  super(version)
253
253
 
254
254
  # Marshaled Properties
@@ -257,7 +257,7 @@ module Twilio
257
257
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
258
258
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
259
259
  'field_type' => payload['field_type'],
260
- 'intent_sid' => payload['intent_sid'],
260
+ 'task_sid' => payload['task_sid'],
261
261
  'assistant_sid' => payload['assistant_sid'],
262
262
  'sid' => payload['sid'],
263
263
  'unique_name' => payload['unique_name'],
@@ -268,7 +268,7 @@ module Twilio
268
268
  @instance_context = nil
269
269
  @params = {
270
270
  'assistant_sid' => assistant_sid,
271
- 'intent_sid' => intent_sid,
271
+ 'task_sid' => task_sid,
272
272
  'sid' => sid || @properties['sid'],
273
273
  }
274
274
  end
@@ -282,7 +282,7 @@ module Twilio
282
282
  @instance_context = FieldContext.new(
283
283
  @version,
284
284
  @params['assistant_sid'],
285
- @params['intent_sid'],
285
+ @params['task_sid'],
286
286
  @params['sid'],
287
287
  )
288
288
  end
@@ -314,9 +314,9 @@ module Twilio
314
314
  end
315
315
 
316
316
  ##
317
- # @return [String] The unique ID of the Intent associated with this Field.
318
- def intent_sid
319
- @properties['intent_sid']
317
+ # @return [String] The unique ID of the Task associated with this Field.
318
+ def task_sid
319
+ @properties['task_sid']
320
320
  end
321
321
 
322
322
  ##
@@ -11,7 +11,7 @@ module Twilio
11
11
  class Preview < Domain
12
12
  class Understand < Version
13
13
  class AssistantContext < InstanceContext
14
- class IntentContext < InstanceContext
14
+ class TaskContext < InstanceContext
15
15
  ##
16
16
  # 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.
17
17
  class SampleList < ListResource
@@ -19,15 +19,14 @@ module Twilio
19
19
  # Initialize the SampleList
20
20
  # @param [Version] version Version that contains the resource
21
21
  # @param [String] assistant_sid The unique ID of the Assistant.
22
- # @param [String] intent_sid The unique ID of the Intent associated with this
23
- # Sample.
22
+ # @param [String] task_sid The unique ID of the Task associated with this Sample.
24
23
  # @return [SampleList] SampleList
25
- def initialize(version, assistant_sid: nil, intent_sid: nil)
24
+ def initialize(version, assistant_sid: nil, task_sid: nil)
26
25
  super(version)
27
26
 
28
27
  # Path Solution
29
- @solution = {assistant_sid: assistant_sid, intent_sid: intent_sid}
30
- @uri = "/Assistants/#{@solution[:assistant_sid]}/Intents/#{@solution[:intent_sid]}/Samples"
28
+ @solution = {assistant_sid: assistant_sid, task_sid: task_sid}
29
+ @uri = "/Assistants/#{@solution[:assistant_sid]}/Tasks/#{@solution[:task_sid]}/Samples"
31
30
  end
32
31
 
33
32
  ##
@@ -121,7 +120,7 @@ module Twilio
121
120
  # Request is executed immediately.
122
121
  # @param [String] language An ISO language-country string of the sample.
123
122
  # @param [String] tagged_text The text example of how end-users may express this
124
- # intent. The sample may contain Field tag blocks.
123
+ # task. The sample may contain Field tag blocks.
125
124
  # @param [String] source_channel The communication channel the sample was
126
125
  # captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or
127
126
  # *slack*. If not included the value will be null
@@ -143,7 +142,7 @@ module Twilio
143
142
  @version,
144
143
  payload,
145
144
  assistant_sid: @solution[:assistant_sid],
146
- intent_sid: @solution[:intent_sid],
145
+ task_sid: @solution[:task_sid],
147
146
  )
148
147
  end
149
148
 
@@ -179,7 +178,7 @@ module Twilio
179
178
  @version,
180
179
  payload,
181
180
  assistant_sid: @solution[:assistant_sid],
182
- intent_sid: @solution[:intent_sid],
181
+ task_sid: @solution[:task_sid],
183
182
  )
184
183
  end
185
184
 
@@ -196,16 +195,17 @@ module Twilio
196
195
  ##
197
196
  # Initialize the SampleContext
198
197
  # @param [Version] version Version that contains the resource
199
- # @param [String] assistant_sid The assistant_sid
200
- # @param [String] intent_sid The intent_sid
201
- # @param [String] sid The sid
198
+ # @param [String] assistant_sid The unique ID of the Assistant.
199
+ # @param [String] task_sid The unique ID of the Task associated with this Sample.
200
+ # @param [String] sid A 34 character string that uniquely identifies this
201
+ # resource.
202
202
  # @return [SampleContext] SampleContext
203
- def initialize(version, assistant_sid, intent_sid, sid)
203
+ def initialize(version, assistant_sid, task_sid, sid)
204
204
  super(version)
205
205
 
206
206
  # Path Solution
207
- @solution = {assistant_sid: assistant_sid, intent_sid: intent_sid, sid: sid, }
208
- @uri = "/Assistants/#{@solution[:assistant_sid]}/Intents/#{@solution[:intent_sid]}/Samples/#{@solution[:sid]}"
207
+ @solution = {assistant_sid: assistant_sid, task_sid: task_sid, sid: sid, }
208
+ @uri = "/Assistants/#{@solution[:assistant_sid]}/Tasks/#{@solution[:task_sid]}/Samples/#{@solution[:sid]}"
209
209
  end
210
210
 
211
211
  ##
@@ -224,7 +224,7 @@ module Twilio
224
224
  @version,
225
225
  payload,
226
226
  assistant_sid: @solution[:assistant_sid],
227
- intent_sid: @solution[:intent_sid],
227
+ task_sid: @solution[:task_sid],
228
228
  sid: @solution[:sid],
229
229
  )
230
230
  end
@@ -233,7 +233,7 @@ module Twilio
233
233
  # Update the SampleInstance
234
234
  # @param [String] language An ISO language-country string of the sample.
235
235
  # @param [String] tagged_text The text example of how end-users may express this
236
- # intent. The sample may contain Field tag blocks.
236
+ # task. The sample may contain Field tag blocks.
237
237
  # @param [String] source_channel The communication channel the sample was
238
238
  # captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or
239
239
  # *slack*. If not included the value will be null
@@ -255,7 +255,7 @@ module Twilio
255
255
  @version,
256
256
  payload,
257
257
  assistant_sid: @solution[:assistant_sid],
258
- intent_sid: @solution[:intent_sid],
258
+ task_sid: @solution[:task_sid],
259
259
  sid: @solution[:sid],
260
260
  )
261
261
  end
@@ -283,11 +283,11 @@ module Twilio
283
283
  # @param [Version] version Version that contains the resource
284
284
  # @param [Hash] payload payload that contains response from Twilio
285
285
  # @param [String] assistant_sid The unique ID of the Assistant.
286
- # @param [String] intent_sid The unique ID of the Intent associated with this
287
- # Sample.
288
- # @param [String] sid The sid
286
+ # @param [String] task_sid The unique ID of the Task associated with this Sample.
287
+ # @param [String] sid A 34 character string that uniquely identifies this
288
+ # resource.
289
289
  # @return [SampleInstance] SampleInstance
290
- def initialize(version, payload, assistant_sid: nil, intent_sid: nil, sid: nil)
290
+ def initialize(version, payload, assistant_sid: nil, task_sid: nil, sid: nil)
291
291
  super(version)
292
292
 
293
293
  # Marshaled Properties
@@ -295,7 +295,7 @@ module Twilio
295
295
  'account_sid' => payload['account_sid'],
296
296
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
297
297
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
298
- 'intent_sid' => payload['intent_sid'],
298
+ 'task_sid' => payload['task_sid'],
299
299
  'language' => payload['language'],
300
300
  'assistant_sid' => payload['assistant_sid'],
301
301
  'sid' => payload['sid'],
@@ -308,7 +308,7 @@ module Twilio
308
308
  @instance_context = nil
309
309
  @params = {
310
310
  'assistant_sid' => assistant_sid,
311
- 'intent_sid' => intent_sid,
311
+ 'task_sid' => task_sid,
312
312
  'sid' => sid || @properties['sid'],
313
313
  }
314
314
  end
@@ -322,7 +322,7 @@ module Twilio
322
322
  @instance_context = SampleContext.new(
323
323
  @version,
324
324
  @params['assistant_sid'],
325
- @params['intent_sid'],
325
+ @params['task_sid'],
326
326
  @params['sid'],
327
327
  )
328
328
  end
@@ -348,9 +348,9 @@ module Twilio
348
348
  end
349
349
 
350
350
  ##
351
- # @return [String] The unique ID of the Intent associated with this Sample.
352
- def intent_sid
353
- @properties['intent_sid']
351
+ # @return [String] The unique ID of the Task associated with this Sample.
352
+ def task_sid
353
+ @properties['task_sid']
354
354
  end
355
355
 
356
356
  ##
@@ -372,7 +372,7 @@ module Twilio
372
372
  end
373
373
 
374
374
  ##
375
- # @return [String] The text example of how end-users may express this intent. The sample may contain Field tag blocks.
375
+ # @return [String] The text example of how end-users may express this task. The sample may contain Field tag blocks.
376
376
  def tagged_text
377
377
  @properties['tagged_text']
378
378
  end
@@ -400,7 +400,7 @@ module Twilio
400
400
  # Update the SampleInstance
401
401
  # @param [String] language An ISO language-country string of the sample.
402
402
  # @param [String] tagged_text The text example of how end-users may express this
403
- # intent. The sample may contain Field tag blocks.
403
+ # task. The sample may contain Field tag blocks.
404
404
  # @param [String] source_channel The communication channel the sample was
405
405
  # captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or
406
406
  # *slack*. If not included the value will be null
@@ -11,39 +11,39 @@ module Twilio
11
11
  class Preview < Domain
12
12
  class Understand < Version
13
13
  class AssistantContext < InstanceContext
14
- class IntentContext < InstanceContext
14
+ class TaskContext < InstanceContext
15
15
  ##
16
16
  # 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.
17
- class IntentActionsList < ListResource
17
+ class TaskActionsList < ListResource
18
18
  ##
19
- # Initialize the IntentActionsList
19
+ # Initialize the TaskActionsList
20
20
  # @param [Version] version Version that contains the resource
21
21
  # @param [String] assistant_sid The unique ID of the parent Assistant.
22
- # @param [String] intent_sid The unique ID of the Intent.
23
- # @return [IntentActionsList] IntentActionsList
24
- def initialize(version, assistant_sid: nil, intent_sid: nil)
22
+ # @param [String] task_sid The unique ID of the Task.
23
+ # @return [TaskActionsList] TaskActionsList
24
+ def initialize(version, assistant_sid: nil, task_sid: nil)
25
25
  super(version)
26
26
 
27
27
  # Path Solution
28
- @solution = {assistant_sid: assistant_sid, intent_sid: intent_sid}
28
+ @solution = {assistant_sid: assistant_sid, task_sid: task_sid}
29
29
  end
30
30
 
31
31
  ##
32
32
  # Provide a user friendly representation
33
33
  def to_s
34
- '#<Twilio.Preview.Understand.IntentActionsList>'
34
+ '#<Twilio.Preview.Understand.TaskActionsList>'
35
35
  end
36
36
  end
37
37
 
38
38
  ##
39
39
  # 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.
40
- class IntentActionsPage < Page
40
+ class TaskActionsPage < Page
41
41
  ##
42
- # Initialize the IntentActionsPage
42
+ # Initialize the TaskActionsPage
43
43
  # @param [Version] version Version that contains the resource
44
44
  # @param [Response] response Response from the API
45
45
  # @param [Hash] solution Path solution for the resource
46
- # @return [IntentActionsPage] IntentActionsPage
46
+ # @return [TaskActionsPage] TaskActionsPage
47
47
  def initialize(version, response, solution)
48
48
  super(version, response)
49
49
 
@@ -52,45 +52,45 @@ module Twilio
52
52
  end
53
53
 
54
54
  ##
55
- # Build an instance of IntentActionsInstance
55
+ # Build an instance of TaskActionsInstance
56
56
  # @param [Hash] payload Payload response from the API
57
- # @return [IntentActionsInstance] IntentActionsInstance
57
+ # @return [TaskActionsInstance] TaskActionsInstance
58
58
  def get_instance(payload)
59
- IntentActionsInstance.new(
59
+ TaskActionsInstance.new(
60
60
  @version,
61
61
  payload,
62
62
  assistant_sid: @solution[:assistant_sid],
63
- intent_sid: @solution[:intent_sid],
63
+ task_sid: @solution[:task_sid],
64
64
  )
65
65
  end
66
66
 
67
67
  ##
68
68
  # Provide a user friendly representation
69
69
  def to_s
70
- '<Twilio.Preview.Understand.IntentActionsPage>'
70
+ '<Twilio.Preview.Understand.TaskActionsPage>'
71
71
  end
72
72
  end
73
73
 
74
74
  ##
75
75
  # 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.
76
- class IntentActionsContext < InstanceContext
76
+ class TaskActionsContext < InstanceContext
77
77
  ##
78
- # Initialize the IntentActionsContext
78
+ # Initialize the TaskActionsContext
79
79
  # @param [Version] version Version that contains the resource
80
80
  # @param [String] assistant_sid The unique ID of the parent Assistant.
81
- # @param [String] intent_sid The unique ID of the Intent.
82
- # @return [IntentActionsContext] IntentActionsContext
83
- def initialize(version, assistant_sid, intent_sid)
81
+ # @param [String] task_sid The unique ID of the Task.
82
+ # @return [TaskActionsContext] TaskActionsContext
83
+ def initialize(version, assistant_sid, task_sid)
84
84
  super(version)
85
85
 
86
86
  # Path Solution
87
- @solution = {assistant_sid: assistant_sid, intent_sid: intent_sid, }
88
- @uri = "/Assistants/#{@solution[:assistant_sid]}/Intents/#{@solution[:intent_sid]}/Actions"
87
+ @solution = {assistant_sid: assistant_sid, task_sid: task_sid, }
88
+ @uri = "/Assistants/#{@solution[:assistant_sid]}/Tasks/#{@solution[:task_sid]}/Actions"
89
89
  end
90
90
 
91
91
  ##
92
- # Fetch a IntentActionsInstance
93
- # @return [IntentActionsInstance] Fetched IntentActionsInstance
92
+ # Fetch a TaskActionsInstance
93
+ # @return [TaskActionsInstance] Fetched TaskActionsInstance
94
94
  def fetch
95
95
  params = Twilio::Values.of({})
96
96
 
@@ -100,19 +100,19 @@ module Twilio
100
100
  params,
101
101
  )
102
102
 
103
- IntentActionsInstance.new(
103
+ TaskActionsInstance.new(
104
104
  @version,
105
105
  payload,
106
106
  assistant_sid: @solution[:assistant_sid],
107
- intent_sid: @solution[:intent_sid],
107
+ task_sid: @solution[:task_sid],
108
108
  )
109
109
  end
110
110
 
111
111
  ##
112
- # Update the IntentActionsInstance
112
+ # Update the TaskActionsInstance
113
113
  # @param [Hash] actions The JSON actions that instruct the Assistant how to
114
114
  # perform this task.
115
- # @return [IntentActionsInstance] Updated IntentActionsInstance
115
+ # @return [TaskActionsInstance] Updated TaskActionsInstance
116
116
  def update(actions: :unset)
117
117
  data = Twilio::Values.of({'Actions' => Twilio.serialize_object(actions), })
118
118
 
@@ -122,11 +122,11 @@ module Twilio
122
122
  data: data,
123
123
  )
124
124
 
125
- IntentActionsInstance.new(
125
+ TaskActionsInstance.new(
126
126
  @version,
127
127
  payload,
128
128
  assistant_sid: @solution[:assistant_sid],
129
- intent_sid: @solution[:intent_sid],
129
+ task_sid: @solution[:task_sid],
130
130
  )
131
131
  end
132
132
 
@@ -134,48 +134,44 @@ module Twilio
134
134
  # Provide a user friendly representation
135
135
  def to_s
136
136
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
137
- "#<Twilio.Preview.Understand.IntentActionsContext #{context}>"
137
+ "#<Twilio.Preview.Understand.TaskActionsContext #{context}>"
138
138
  end
139
139
  end
140
140
 
141
141
  ##
142
142
  # 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.
143
- class IntentActionsInstance < InstanceResource
143
+ class TaskActionsInstance < InstanceResource
144
144
  ##
145
- # Initialize the IntentActionsInstance
145
+ # Initialize the TaskActionsInstance
146
146
  # @param [Version] version Version that contains the resource
147
147
  # @param [Hash] payload payload that contains response from Twilio
148
148
  # @param [String] assistant_sid The unique ID of the parent Assistant.
149
- # @param [String] intent_sid The unique ID of the Intent.
150
- # @return [IntentActionsInstance] IntentActionsInstance
151
- def initialize(version, payload, assistant_sid: nil, intent_sid: nil)
149
+ # @param [String] task_sid The unique ID of the Task.
150
+ # @return [TaskActionsInstance] TaskActionsInstance
151
+ def initialize(version, payload, assistant_sid: nil, task_sid: nil)
152
152
  super(version)
153
153
 
154
154
  # Marshaled Properties
155
155
  @properties = {
156
156
  'account_sid' => payload['account_sid'],
157
157
  'assistant_sid' => payload['assistant_sid'],
158
- 'intent_sid' => payload['intent_sid'],
158
+ 'task_sid' => payload['task_sid'],
159
159
  'url' => payload['url'],
160
160
  'data' => payload['data'],
161
161
  }
162
162
 
163
163
  # Context
164
164
  @instance_context = nil
165
- @params = {'assistant_sid' => assistant_sid, 'intent_sid' => intent_sid, }
165
+ @params = {'assistant_sid' => assistant_sid, 'task_sid' => task_sid, }
166
166
  end
167
167
 
168
168
  ##
169
169
  # Generate an instance context for the instance, the context is capable of
170
170
  # performing various actions. All instance actions are proxied to the context
171
- # @return [IntentActionsContext] IntentActionsContext for this IntentActionsInstance
171
+ # @return [TaskActionsContext] TaskActionsContext for this TaskActionsInstance
172
172
  def context
173
173
  unless @instance_context
174
- @instance_context = IntentActionsContext.new(
175
- @version,
176
- @params['assistant_sid'],
177
- @params['intent_sid'],
178
- )
174
+ @instance_context = TaskActionsContext.new(@version, @params['assistant_sid'], @params['task_sid'], )
179
175
  end
180
176
  @instance_context
181
177
  end
@@ -193,9 +189,9 @@ module Twilio
193
189
  end
194
190
 
195
191
  ##
196
- # @return [String] The unique ID of the Intent.
197
- def intent_sid
198
- @properties['intent_sid']
192
+ # @return [String] The unique ID of the Task.
193
+ def task_sid
194
+ @properties['task_sid']
199
195
  end
200
196
 
201
197
  ##
@@ -211,17 +207,17 @@ module Twilio
211
207
  end
212
208
 
213
209
  ##
214
- # Fetch a IntentActionsInstance
215
- # @return [IntentActionsInstance] Fetched IntentActionsInstance
210
+ # Fetch a TaskActionsInstance
211
+ # @return [TaskActionsInstance] Fetched TaskActionsInstance
216
212
  def fetch
217
213
  context.fetch
218
214
  end
219
215
 
220
216
  ##
221
- # Update the IntentActionsInstance
217
+ # Update the TaskActionsInstance
222
218
  # @param [Hash] actions The JSON actions that instruct the Assistant how to
223
219
  # perform this task.
224
- # @return [IntentActionsInstance] Updated IntentActionsInstance
220
+ # @return [TaskActionsInstance] Updated TaskActionsInstance
225
221
  def update(actions: :unset)
226
222
  context.update(actions: actions, )
227
223
  end
@@ -230,14 +226,14 @@ module Twilio
230
226
  # Provide a user friendly representation
231
227
  def to_s
232
228
  values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
233
- "<Twilio.Preview.Understand.IntentActionsInstance #{values}>"
229
+ "<Twilio.Preview.Understand.TaskActionsInstance #{values}>"
234
230
  end
235
231
 
236
232
  ##
237
233
  # Provide a detailed, user friendly representation
238
234
  def inspect
239
235
  values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
240
- "<Twilio.Preview.Understand.IntentActionsInstance #{values}>"
236
+ "<Twilio.Preview.Understand.TaskActionsInstance #{values}>"
241
237
  end
242
238
  end
243
239
  end