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