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
@@ -8,43 +8,42 @@
8
8
 
9
9
  module Twilio
10
10
  module REST
11
- class Preview < Domain
12
- class Understand < Version
11
+ class Autopilot < Domain
12
+ class V1 < 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 IntentStatisticsList < ListResource
17
+ class TaskStatisticsList < ListResource
18
18
  ##
19
- # Initialize the IntentStatisticsList
19
+ # Initialize the TaskStatisticsList
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.
24
- # @return [IntentStatisticsList] IntentStatisticsList
25
- def initialize(version, assistant_sid: nil, intent_sid: nil)
22
+ # @param [String] task_sid The unique ID of the Task associated with this Field.
23
+ # @return [TaskStatisticsList] TaskStatisticsList
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}
28
+ @solution = {assistant_sid: assistant_sid, task_sid: task_sid}
30
29
  end
31
30
 
32
31
  ##
33
32
  # Provide a user friendly representation
34
33
  def to_s
35
- '#<Twilio.Preview.Understand.IntentStatisticsList>'
34
+ '#<Twilio.Autopilot.V1.TaskStatisticsList>'
36
35
  end
37
36
  end
38
37
 
39
38
  ##
40
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.
41
- class IntentStatisticsPage < Page
40
+ class TaskStatisticsPage < Page
42
41
  ##
43
- # Initialize the IntentStatisticsPage
42
+ # Initialize the TaskStatisticsPage
44
43
  # @param [Version] version Version that contains the resource
45
44
  # @param [Response] response Response from the API
46
45
  # @param [Hash] solution Path solution for the resource
47
- # @return [IntentStatisticsPage] IntentStatisticsPage
46
+ # @return [TaskStatisticsPage] TaskStatisticsPage
48
47
  def initialize(version, response, solution)
49
48
  super(version, response)
50
49
 
@@ -53,45 +52,45 @@ module Twilio
53
52
  end
54
53
 
55
54
  ##
56
- # Build an instance of IntentStatisticsInstance
55
+ # Build an instance of TaskStatisticsInstance
57
56
  # @param [Hash] payload Payload response from the API
58
- # @return [IntentStatisticsInstance] IntentStatisticsInstance
57
+ # @return [TaskStatisticsInstance] TaskStatisticsInstance
59
58
  def get_instance(payload)
60
- IntentStatisticsInstance.new(
59
+ TaskStatisticsInstance.new(
61
60
  @version,
62
61
  payload,
63
62
  assistant_sid: @solution[:assistant_sid],
64
- intent_sid: @solution[:intent_sid],
63
+ task_sid: @solution[:task_sid],
65
64
  )
66
65
  end
67
66
 
68
67
  ##
69
68
  # Provide a user friendly representation
70
69
  def to_s
71
- '<Twilio.Preview.Understand.IntentStatisticsPage>'
70
+ '<Twilio.Autopilot.V1.TaskStatisticsPage>'
72
71
  end
73
72
  end
74
73
 
75
74
  ##
76
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.
77
- class IntentStatisticsContext < InstanceContext
76
+ class TaskStatisticsContext < InstanceContext
78
77
  ##
79
- # Initialize the IntentStatisticsContext
78
+ # Initialize the TaskStatisticsContext
80
79
  # @param [Version] version Version that contains the resource
81
80
  # @param [String] assistant_sid The assistant_sid
82
- # @param [String] intent_sid The intent_sid
83
- # @return [IntentStatisticsContext] IntentStatisticsContext
84
- def initialize(version, assistant_sid, intent_sid)
81
+ # @param [String] task_sid The task_sid
82
+ # @return [TaskStatisticsContext] TaskStatisticsContext
83
+ def initialize(version, assistant_sid, task_sid)
85
84
  super(version)
86
85
 
87
86
  # Path Solution
88
- @solution = {assistant_sid: assistant_sid, intent_sid: intent_sid, }
89
- @uri = "/Assistants/#{@solution[:assistant_sid]}/Intents/#{@solution[:intent_sid]}/Statistics"
87
+ @solution = {assistant_sid: assistant_sid, task_sid: task_sid, }
88
+ @uri = "/Assistants/#{@solution[:assistant_sid]}/Tasks/#{@solution[:task_sid]}/Statistics"
90
89
  end
91
90
 
92
91
  ##
93
- # Fetch a IntentStatisticsInstance
94
- # @return [IntentStatisticsInstance] Fetched IntentStatisticsInstance
92
+ # Fetch a TaskStatisticsInstance
93
+ # @return [TaskStatisticsInstance] Fetched TaskStatisticsInstance
95
94
  def fetch
96
95
  params = Twilio::Values.of({})
97
96
 
@@ -101,11 +100,11 @@ module Twilio
101
100
  params,
102
101
  )
103
102
 
104
- IntentStatisticsInstance.new(
103
+ TaskStatisticsInstance.new(
105
104
  @version,
106
105
  payload,
107
106
  assistant_sid: @solution[:assistant_sid],
108
- intent_sid: @solution[:intent_sid],
107
+ task_sid: @solution[:task_sid],
109
108
  )
110
109
  end
111
110
 
@@ -113,29 +112,28 @@ module Twilio
113
112
  # Provide a user friendly representation
114
113
  def to_s
115
114
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
116
- "#<Twilio.Preview.Understand.IntentStatisticsContext #{context}>"
115
+ "#<Twilio.Autopilot.V1.TaskStatisticsContext #{context}>"
117
116
  end
118
117
  end
119
118
 
120
119
  ##
121
120
  # 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.
122
- class IntentStatisticsInstance < InstanceResource
121
+ class TaskStatisticsInstance < InstanceResource
123
122
  ##
124
- # Initialize the IntentStatisticsInstance
123
+ # Initialize the TaskStatisticsInstance
125
124
  # @param [Version] version Version that contains the resource
126
125
  # @param [Hash] payload payload that contains response from Twilio
127
126
  # @param [String] assistant_sid The unique ID of the parent Assistant.
128
- # @param [String] intent_sid The unique ID of the Intent associated with this
129
- # Field.
130
- # @return [IntentStatisticsInstance] IntentStatisticsInstance
131
- def initialize(version, payload, assistant_sid: nil, intent_sid: nil)
127
+ # @param [String] task_sid The unique ID of the Task associated with this Field.
128
+ # @return [TaskStatisticsInstance] TaskStatisticsInstance
129
+ def initialize(version, payload, assistant_sid: nil, task_sid: nil)
132
130
  super(version)
133
131
 
134
132
  # Marshaled Properties
135
133
  @properties = {
136
134
  'account_sid' => payload['account_sid'],
137
135
  'assistant_sid' => payload['assistant_sid'],
138
- 'intent_sid' => payload['intent_sid'],
136
+ 'task_sid' => payload['task_sid'],
139
137
  'samples_count' => payload['samples_count'].to_i,
140
138
  'fields_count' => payload['fields_count'].to_i,
141
139
  'url' => payload['url'],
@@ -143,19 +141,19 @@ module Twilio
143
141
 
144
142
  # Context
145
143
  @instance_context = nil
146
- @params = {'assistant_sid' => assistant_sid, 'intent_sid' => intent_sid, }
144
+ @params = {'assistant_sid' => assistant_sid, 'task_sid' => task_sid, }
147
145
  end
148
146
 
149
147
  ##
150
148
  # Generate an instance context for the instance, the context is capable of
151
149
  # performing various actions. All instance actions are proxied to the context
152
- # @return [IntentStatisticsContext] IntentStatisticsContext for this IntentStatisticsInstance
150
+ # @return [TaskStatisticsContext] TaskStatisticsContext for this TaskStatisticsInstance
153
151
  def context
154
152
  unless @instance_context
155
- @instance_context = IntentStatisticsContext.new(
153
+ @instance_context = TaskStatisticsContext.new(
156
154
  @version,
157
155
  @params['assistant_sid'],
158
- @params['intent_sid'],
156
+ @params['task_sid'],
159
157
  )
160
158
  end
161
159
  @instance_context
@@ -174,19 +172,19 @@ module Twilio
174
172
  end
175
173
 
176
174
  ##
177
- # @return [String] The unique ID of the Intent associated with this Field.
178
- def intent_sid
179
- @properties['intent_sid']
175
+ # @return [String] The unique ID of the Task associated with this Field.
176
+ def task_sid
177
+ @properties['task_sid']
180
178
  end
181
179
 
182
180
  ##
183
- # @return [String] The total number of Samples associated with this Intent.
181
+ # @return [String] The total number of Samples associated with this Task.
184
182
  def samples_count
185
183
  @properties['samples_count']
186
184
  end
187
185
 
188
186
  ##
189
- # @return [String] The total number of Fields associated with this Intent.
187
+ # @return [String] The total number of Fields associated with this Task.
190
188
  def fields_count
191
189
  @properties['fields_count']
192
190
  end
@@ -198,8 +196,8 @@ module Twilio
198
196
  end
199
197
 
200
198
  ##
201
- # Fetch a IntentStatisticsInstance
202
- # @return [IntentStatisticsInstance] Fetched IntentStatisticsInstance
199
+ # Fetch a TaskStatisticsInstance
200
+ # @return [TaskStatisticsInstance] Fetched TaskStatisticsInstance
203
201
  def fetch
204
202
  context.fetch
205
203
  end
@@ -208,14 +206,14 @@ module Twilio
208
206
  # Provide a user friendly representation
209
207
  def to_s
210
208
  values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
211
- "<Twilio.Preview.Understand.IntentStatisticsInstance #{values}>"
209
+ "<Twilio.Autopilot.V1.TaskStatisticsInstance #{values}>"
212
210
  end
213
211
 
214
212
  ##
215
213
  # Provide a detailed, user friendly representation
216
214
  def inspect
217
215
  values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
218
- "<Twilio.Preview.Understand.IntentStatisticsInstance #{values}>"
216
+ "<Twilio.Autopilot.V1.TaskStatisticsInstance #{values}>"
219
217
  end
220
218
  end
221
219
  end
@@ -580,7 +580,7 @@ module Twilio
580
580
  end
581
581
 
582
582
  ##
583
- # @return [Boolean] Enable the Message Constumption Horizon feature.
583
+ # @return [Boolean] Enable the Message Consumption Horizon feature.
584
584
  def read_status_enabled
585
585
  @properties['read_status_enabled']
586
586
  end
@@ -33,8 +33,10 @@ module Twilio
33
33
  # @param [String] friendly_name A human-readable name for the Channel. Optional.
34
34
  # @param [String] unique_name A unique, addressable name for the Channel.
35
35
  # Optional.
36
- # @param [String] attributes An optional metadata field you can use to store any
37
- # data you wish. No processing or validation is done on this field.
36
+ # @param [String] attributes An optional string metadata field you can use to
37
+ # store any data you wish. The string value must contain structurally valid JSON
38
+ # if specified. **Note** that if the attributes are not set "{}" will be
39
+ # returned.
38
40
  # @param [channel.ChannelType] type The visibility of the channel - `public` or
39
41
  # `private`. Defaults to `public`.
40
42
  # @param [Time] date_created The optional ISO8601 time specifying the datetime the
@@ -245,8 +247,10 @@ module Twilio
245
247
  # @param [String] friendly_name A human-readable name for the Channel. Optional.
246
248
  # @param [String] unique_name A unique, addressable name for the Channel.
247
249
  # Optional.
248
- # @param [String] attributes An optional metadata field you can use to store any
249
- # data you wish. No processing or validation is done on this field.
250
+ # @param [String] attributes An optional string metadata field you can use to
251
+ # store any data you wish. The string value must contain structurally valid JSON
252
+ # if specified. **Note** that if the attributes are not set "{}" will be
253
+ # returned.
250
254
  # @param [Time] date_created The optional ISO8601 time specifying the datetime the
251
255
  # Channel should be set as being created.
252
256
  # @param [Time] date_updated The optional ISO8601 time specifying the datetime the
@@ -520,8 +524,10 @@ module Twilio
520
524
  # @param [String] friendly_name A human-readable name for the Channel. Optional.
521
525
  # @param [String] unique_name A unique, addressable name for the Channel.
522
526
  # Optional.
523
- # @param [String] attributes An optional metadata field you can use to store any
524
- # data you wish. No processing or validation is done on this field.
527
+ # @param [String] attributes An optional string metadata field you can use to
528
+ # store any data you wish. The string value must contain structurally valid JSON
529
+ # if specified. **Note** that if the attributes are not set "{}" will be
530
+ # returned.
525
531
  # @param [Time] date_created The optional ISO8601 time specifying the datetime the
526
532
  # Channel should be set as being created.
527
533
  # @param [Time] date_updated The optional ISO8601 time specifying the datetime the
@@ -27,6 +27,8 @@ module Twilio
27
27
  # Domains
28
28
  @accounts = nil
29
29
  @api = nil
30
+ @authy = nil
31
+ @autopilot = nil
30
32
  @chat = nil
31
33
  @fax = nil
32
34
  @ip_messaging = nil
@@ -107,6 +109,18 @@ module Twilio
107
109
  @api ||= Api.new self
108
110
  end
109
111
 
112
+ ##
113
+ # Access the Authy Twilio Domain
114
+ def authy
115
+ @authy ||= Authy.new self
116
+ end
117
+
118
+ ##
119
+ # Access the Autopilot Twilio Domain
120
+ def autopilot
121
+ @autopilot ||= Autopilot.new self
122
+ end
123
+
110
124
  ##
111
125
  # Access the Chat Twilio Domain
112
126
  def chat
@@ -580,7 +580,7 @@ module Twilio
580
580
  end
581
581
 
582
582
  ##
583
- # @return [Boolean] Enable the Message Constumption Horizon feature.
583
+ # @return [Boolean] Enable the Message Consumption Horizon feature.
584
584
  def read_status_enabled
585
585
  @properties['read_status_enabled']
586
586
  end
@@ -33,8 +33,10 @@ module Twilio
33
33
  # @param [String] friendly_name A human-readable name for the Channel. Optional.
34
34
  # @param [String] unique_name A unique, addressable name for the Channel.
35
35
  # Optional.
36
- # @param [String] attributes An optional metadata field you can use to store any
37
- # data you wish. No processing or validation is done on this field.
36
+ # @param [String] attributes An optional string metadata field you can use to
37
+ # store any data you wish. The string value must contain structurally valid JSON
38
+ # if specified. **Note** that if the attributes are not set "{}" will be
39
+ # returned.
38
40
  # @param [channel.ChannelType] type The visibility of the channel - `public` or
39
41
  # `private`. Defaults to `public`.
40
42
  # @param [Time] date_created The optional ISO8601 time specifying the datetime the
@@ -245,8 +247,10 @@ module Twilio
245
247
  # @param [String] friendly_name A human-readable name for the Channel. Optional.
246
248
  # @param [String] unique_name A unique, addressable name for the Channel.
247
249
  # Optional.
248
- # @param [String] attributes An optional metadata field you can use to store any
249
- # data you wish. No processing or validation is done on this field.
250
+ # @param [String] attributes An optional string metadata field you can use to
251
+ # store any data you wish. The string value must contain structurally valid JSON
252
+ # if specified. **Note** that if the attributes are not set "{}" will be
253
+ # returned.
250
254
  # @param [Time] date_created The optional ISO8601 time specifying the datetime the
251
255
  # Channel should be set as being created.
252
256
  # @param [Time] date_updated The optional ISO8601 time specifying the datetime the
@@ -520,8 +524,10 @@ module Twilio
520
524
  # @param [String] friendly_name A human-readable name for the Channel. Optional.
521
525
  # @param [String] unique_name A unique, addressable name for the Channel.
522
526
  # Optional.
523
- # @param [String] attributes An optional metadata field you can use to store any
524
- # data you wish. No processing or validation is done on this field.
527
+ # @param [String] attributes An optional string metadata field you can use to
528
+ # store any data you wish. The string value must contain structurally valid JSON
529
+ # if specified. **Note** that if the attributes are not set "{}" will be
530
+ # returned.
525
531
  # @param [Time] date_created The optional ISO8601 time specifying the datetime the
526
532
  # Channel should be set as being created.
527
533
  # @param [Time] date_updated The optional ISO8601 time specifying the datetime the
@@ -19,7 +19,8 @@ module Twilio
19
19
  end
20
20
 
21
21
  ##
22
- # @param [String] sid The sid
22
+ # @param [String] sid A 34 character string that uniquely identifies this
23
+ # resource.
23
24
  # @return [Twilio::REST::Preview::Understand::AssistantContext] if sid was passed.
24
25
  # @return [Twilio::REST::Preview::Understand::AssistantList]
25
26
  def assistants(sid=:unset)
@@ -118,14 +118,17 @@ module Twilio
118
118
  # true if no value is provided.
119
119
  # @param [String] unique_name A user-provided string that uniquely identifies this
120
120
  # resource as an alternative to the sid. Unique up to 64 characters long.
121
- # @param [String] callback_url The callback_url
122
- # @param [String] callback_events The callback_events
121
+ # @param [String] callback_url A user-provided URL to send event callbacks to.
122
+ # @param [String] callback_events Space-separated list of callback events that
123
+ # will trigger callbacks.
123
124
  # @param [Hash] fallback_actions The JSON actions to be executed when the user's
124
- # input is not recognized as matching any Intent.
125
+ # input is not recognized as matching any Task.
125
126
  # @param [Hash] initiation_actions The JSON actions to be executed on inbound
126
127
  # phone calls when the Assistant has to say something first.
128
+ # @param [Hash] style_sheet The JSON object that holds the style sheet for the
129
+ # assistant
127
130
  # @return [AssistantInstance] Newly created AssistantInstance
128
- def create(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, fallback_actions: :unset, initiation_actions: :unset)
131
+ def create(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, fallback_actions: :unset, initiation_actions: :unset, style_sheet: :unset)
129
132
  data = Twilio::Values.of({
130
133
  'FriendlyName' => friendly_name,
131
134
  'LogQueries' => log_queries,
@@ -134,6 +137,7 @@ module Twilio
134
137
  'CallbackEvents' => callback_events,
135
138
  'FallbackActions' => Twilio.serialize_object(fallback_actions),
136
139
  'InitiationActions' => Twilio.serialize_object(initiation_actions),
140
+ 'StyleSheet' => Twilio.serialize_object(style_sheet),
137
141
  })
138
142
 
139
143
  payload = @version.create(
@@ -189,7 +193,8 @@ module Twilio
189
193
  ##
190
194
  # Initialize the AssistantContext
191
195
  # @param [Version] version Version that contains the resource
192
- # @param [String] sid The sid
196
+ # @param [String] sid A 34 character string that uniquely identifies this
197
+ # resource.
193
198
  # @return [AssistantContext] AssistantContext
194
199
  def initialize(version, sid)
195
200
  super(version)
@@ -200,12 +205,13 @@ module Twilio
200
205
 
201
206
  # Dependents
202
207
  @field_types = nil
203
- @intents = nil
208
+ @tasks = nil
204
209
  @model_builds = nil
205
210
  @queries = nil
206
211
  @assistant_fallback_actions = nil
207
212
  @assistant_initiation_actions = nil
208
213
  @dialogues = nil
214
+ @style_sheet = nil
209
215
  end
210
216
 
211
217
  ##
@@ -233,14 +239,17 @@ module Twilio
233
239
  # true if no value is provided.
234
240
  # @param [String] unique_name A user-provided string that uniquely identifies this
235
241
  # resource as an alternative to the sid. Unique up to 64 characters long.
236
- # @param [String] callback_url The callback_url
237
- # @param [String] callback_events The callback_events
242
+ # @param [String] callback_url A user-provided URL to send event callbacks to.
243
+ # @param [String] callback_events Space-separated list of callback events that
244
+ # will trigger callbacks.
238
245
  # @param [Hash] fallback_actions The JSON actions to be executed when the user's
239
- # input is not recognized as matching any Intent.
246
+ # input is not recognized as matching any Task.
240
247
  # @param [Hash] initiation_actions The JSON actions to be executed on inbound
241
248
  # phone calls when the Assistant has to say something first.
249
+ # @param [Hash] style_sheet The JSON object that holds the style sheet for the
250
+ # assistant
242
251
  # @return [AssistantInstance] Updated AssistantInstance
243
- def update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, fallback_actions: :unset, initiation_actions: :unset)
252
+ def update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, fallback_actions: :unset, initiation_actions: :unset, style_sheet: :unset)
244
253
  data = Twilio::Values.of({
245
254
  'FriendlyName' => friendly_name,
246
255
  'LogQueries' => log_queries,
@@ -249,6 +258,7 @@ module Twilio
249
258
  'CallbackEvents' => callback_events,
250
259
  'FallbackActions' => Twilio.serialize_object(fallback_actions),
251
260
  'InitiationActions' => Twilio.serialize_object(initiation_actions),
261
+ 'StyleSheet' => Twilio.serialize_object(style_sheet),
252
262
  })
253
263
 
254
264
  payload = @version.update(
@@ -286,21 +296,21 @@ module Twilio
286
296
  end
287
297
 
288
298
  ##
289
- # Access the intents
290
- # @return [IntentList]
291
- # @return [IntentContext] if sid was passed.
292
- def intents(sid=:unset)
299
+ # Access the tasks
300
+ # @return [TaskList]
301
+ # @return [TaskContext] if sid was passed.
302
+ def tasks(sid=:unset)
293
303
  raise ArgumentError, 'sid cannot be nil' if sid.nil?
294
304
 
295
305
  if sid != :unset
296
- return IntentContext.new(@version, @solution[:sid], sid, )
306
+ return TaskContext.new(@version, @solution[:sid], sid, )
297
307
  end
298
308
 
299
- unless @intents
300
- @intents = IntentList.new(@version, assistant_sid: @solution[:sid], )
309
+ unless @tasks
310
+ @tasks = TaskList.new(@version, assistant_sid: @solution[:sid], )
301
311
  end
302
312
 
303
- @intents
313
+ @tasks
304
314
  end
305
315
 
306
316
  ##
@@ -373,6 +383,14 @@ module Twilio
373
383
  @dialogues
374
384
  end
375
385
 
386
+ ##
387
+ # Access the style_sheet
388
+ # @return [StyleSheetList]
389
+ # @return [StyleSheetContext]
390
+ def style_sheet
391
+ StyleSheetContext.new(@version, @solution[:sid], )
392
+ end
393
+
376
394
  ##
377
395
  # Provide a user friendly representation
378
396
  def to_s
@@ -388,7 +406,8 @@ module Twilio
388
406
  # Initialize the AssistantInstance
389
407
  # @param [Version] version Version that contains the resource
390
408
  # @param [Hash] payload payload that contains response from Twilio
391
- # @param [String] sid The sid
409
+ # @param [String] sid A 34 character string that uniquely identifies this
410
+ # resource.
392
411
  # @return [AssistantInstance] AssistantInstance
393
412
  def initialize(version, payload, sid: nil)
394
413
  super(version)
@@ -486,13 +505,13 @@ module Twilio
486
505
  end
487
506
 
488
507
  ##
489
- # @return [String] The callback_url
508
+ # @return [String] A user-provided URL to send event callbacks to.
490
509
  def callback_url
491
510
  @properties['callback_url']
492
511
  end
493
512
 
494
513
  ##
495
- # @return [String] The callback_events
514
+ # @return [String] Space-separated list of callback events that will trigger callbacks.
496
515
  def callback_events
497
516
  @properties['callback_events']
498
517
  end
@@ -514,14 +533,17 @@ module Twilio
514
533
  # true if no value is provided.
515
534
  # @param [String] unique_name A user-provided string that uniquely identifies this
516
535
  # resource as an alternative to the sid. Unique up to 64 characters long.
517
- # @param [String] callback_url The callback_url
518
- # @param [String] callback_events The callback_events
536
+ # @param [String] callback_url A user-provided URL to send event callbacks to.
537
+ # @param [String] callback_events Space-separated list of callback events that
538
+ # will trigger callbacks.
519
539
  # @param [Hash] fallback_actions The JSON actions to be executed when the user's
520
- # input is not recognized as matching any Intent.
540
+ # input is not recognized as matching any Task.
521
541
  # @param [Hash] initiation_actions The JSON actions to be executed on inbound
522
542
  # phone calls when the Assistant has to say something first.
543
+ # @param [Hash] style_sheet The JSON object that holds the style sheet for the
544
+ # assistant
523
545
  # @return [AssistantInstance] Updated AssistantInstance
524
- def update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, fallback_actions: :unset, initiation_actions: :unset)
546
+ def update(friendly_name: :unset, log_queries: :unset, unique_name: :unset, callback_url: :unset, callback_events: :unset, fallback_actions: :unset, initiation_actions: :unset, style_sheet: :unset)
525
547
  context.update(
526
548
  friendly_name: friendly_name,
527
549
  log_queries: log_queries,
@@ -530,6 +552,7 @@ module Twilio
530
552
  callback_events: callback_events,
531
553
  fallback_actions: fallback_actions,
532
554
  initiation_actions: initiation_actions,
555
+ style_sheet: style_sheet,
533
556
  )
534
557
  end
535
558
 
@@ -548,10 +571,10 @@ module Twilio
548
571
  end
549
572
 
550
573
  ##
551
- # Access the intents
552
- # @return [intents] intents
553
- def intents
554
- context.intents
574
+ # Access the tasks
575
+ # @return [tasks] tasks
576
+ def tasks
577
+ context.tasks
555
578
  end
556
579
 
557
580
  ##
@@ -589,6 +612,13 @@ module Twilio
589
612
  context.dialogues
590
613
  end
591
614
 
615
+ ##
616
+ # Access the style_sheet
617
+ # @return [style_sheet] style_sheet
618
+ def style_sheet
619
+ context.style_sheet
620
+ end
621
+
592
622
  ##
593
623
  # Provide a user friendly representation
594
624
  def to_s