twilio-ruby 5.22.1 → 5.22.2
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/rest/api/v2010/account/address.rb +7 -0
- data/lib/twilio-ruby/rest/autopilot.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1.rb +2 -2
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +55 -61
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/defaults.rb +17 -9
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/dialogue.rb +18 -10
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +37 -28
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +39 -32
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +37 -27
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +58 -53
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/style_sheet.rb +15 -9
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +53 -43
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +38 -25
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +56 -50
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb +27 -15
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb +24 -18
- data/lib/twilio-ruby/rest/client.rb +39 -39
- data/lib/twilio-ruby/rest/notify.rb +4 -2
- data/lib/twilio-ruby/rest/notify/v1.rb +4 -2
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +47 -42
- data/lib/twilio-ruby/rest/notify/v1/service.rb +118 -103
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +74 -63
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +108 -111
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +7 -0
- data/lib/twilio-ruby/rest/trunking.rb +2 -2
- data/lib/twilio-ruby/rest/trunking/v1.rb +2 -2
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +82 -82
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +19 -14
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +16 -15
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +51 -50
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +41 -32
- data/lib/twilio-ruby/rest/trunking/v1/trunk/terminating_sip_domain.rb +30 -31
- data/lib/twilio-ruby/twiml/voice_response.rb +3 -2
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/address_spec.rb +4 -0
- data/spec/integration/proxy/v1/service/phone_number_spec.rb +8 -4
- metadata +2 -2
@@ -17,7 +17,9 @@ module Twilio
|
|
17
17
|
##
|
18
18
|
# Initialize the QueryList
|
19
19
|
# @param [Version] version Version that contains the resource
|
20
|
-
# @param [String] assistant_sid The
|
20
|
+
# @param [String] assistant_sid The SID of the
|
21
|
+
# [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the
|
22
|
+
# parent of the resource.
|
21
23
|
# @return [QueryList] QueryList
|
22
24
|
def initialize(version, assistant_sid: nil)
|
23
25
|
super(version)
|
@@ -31,13 +33,12 @@ module Twilio
|
|
31
33
|
# Lists QueryInstance records from the API as a list.
|
32
34
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
33
35
|
# memory before returning.
|
34
|
-
# @param [String] language
|
35
|
-
#
|
36
|
-
#
|
37
|
-
# @param [String] model_build The Sid or unique name of the [Model
|
36
|
+
# @param [String] language The [ISO
|
37
|
+
# language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used by the Query resources to read. For example: `en-US`.
|
38
|
+
# @param [String] model_build The SID or unique name of the [Model
|
38
39
|
# Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
|
39
|
-
# @param [String] status
|
40
|
-
#
|
40
|
+
# @param [String] status The status of the resources to read. Can be:
|
41
|
+
# `pending_review`, `reviewed`, or `discarded`
|
41
42
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
42
43
|
# guarantees to never return more than limit. Default is no limit
|
43
44
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -59,13 +60,12 @@ module Twilio
|
|
59
60
|
# Streams QueryInstance records from the API as an Enumerable.
|
60
61
|
# This operation lazily loads records as efficiently as possible until the limit
|
61
62
|
# is reached.
|
62
|
-
# @param [String] language
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# @param [String] model_build The Sid or unique name of the [Model
|
63
|
+
# @param [String] language The [ISO
|
64
|
+
# language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used by the Query resources to read. For example: `en-US`.
|
65
|
+
# @param [String] model_build The SID or unique name of the [Model
|
66
66
|
# Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
|
67
|
-
# @param [String] status
|
68
|
-
#
|
67
|
+
# @param [String] status The status of the resources to read. Can be:
|
68
|
+
# `pending_review`, `reviewed`, or `discarded`
|
69
69
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
70
70
|
# guarantees to never return more than limit. Default is no limit.
|
71
71
|
# @param [Integer] page_size Number of records to fetch per request, when
|
@@ -103,13 +103,12 @@ module Twilio
|
|
103
103
|
##
|
104
104
|
# Retrieve a single page of QueryInstance records from the API.
|
105
105
|
# Request is executed immediately.
|
106
|
-
# @param [String] language
|
107
|
-
#
|
108
|
-
#
|
109
|
-
# @param [String] model_build The Sid or unique name of the [Model
|
106
|
+
# @param [String] language The [ISO
|
107
|
+
# language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used by the Query resources to read. For example: `en-US`.
|
108
|
+
# @param [String] model_build The SID or unique name of the [Model
|
110
109
|
# Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
|
111
|
-
# @param [String] status
|
112
|
-
#
|
110
|
+
# @param [String] status The status of the resources to read. Can be:
|
111
|
+
# `pending_review`, `reviewed`, or `discarded`
|
113
112
|
# @param [String] page_token PageToken provided by the API
|
114
113
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
115
114
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
@@ -147,15 +146,15 @@ module Twilio
|
|
147
146
|
##
|
148
147
|
# Retrieve a single page of QueryInstance records from the API.
|
149
148
|
# Request is executed immediately.
|
150
|
-
# @param [String] language
|
151
|
-
#
|
152
|
-
#
|
153
|
-
#
|
154
|
-
#
|
155
|
-
#
|
156
|
-
#
|
157
|
-
#
|
158
|
-
# @param [String] model_build The
|
149
|
+
# @param [String] language The [ISO
|
150
|
+
# language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the new query. For example: `en-US`.
|
151
|
+
# @param [String] query The end-user's natural language input. It can be up to
|
152
|
+
# 2048 characters long.
|
153
|
+
# @param [String] tasks The list of tasks to limit the new query to. Tasks are
|
154
|
+
# expressed as a comma-separated list of task `unique_name` values. For example,
|
155
|
+
# `task-unique_name-1, task-unique_name-2`. Listing specific tasks is useful to
|
156
|
+
# constrain the paths that a user can take.
|
157
|
+
# @param [String] model_build The SID or unique name of the [Model
|
159
158
|
# Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
|
160
159
|
# @return [QueryInstance] Newly created QueryInstance
|
161
160
|
def create(language: nil, query: nil, tasks: :unset, model_build: :unset)
|
@@ -219,9 +218,11 @@ module Twilio
|
|
219
218
|
##
|
220
219
|
# Initialize the QueryContext
|
221
220
|
# @param [Version] version Version that contains the resource
|
222
|
-
# @param [String] assistant_sid The
|
223
|
-
#
|
224
|
-
# resource.
|
221
|
+
# @param [String] assistant_sid The SID of the
|
222
|
+
# [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the
|
223
|
+
# parent of the resource to fetch.
|
224
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
225
|
+
# Query resource to fetch.
|
225
226
|
# @return [QueryContext] QueryContext
|
226
227
|
def initialize(version, assistant_sid, sid)
|
227
228
|
super(version)
|
@@ -248,10 +249,11 @@ module Twilio
|
|
248
249
|
|
249
250
|
##
|
250
251
|
# Update the QueryInstance
|
251
|
-
# @param [String] sample_sid
|
252
|
+
# @param [String] sample_sid The SID of an optional reference to the
|
253
|
+
# [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the
|
252
254
|
# query.
|
253
|
-
# @param [String] status
|
254
|
-
#
|
255
|
+
# @param [String] status The new status of the resource. Can be: `pending_review`,
|
256
|
+
# `reviewed`, or `discarded`
|
255
257
|
# @return [QueryInstance] Updated QueryInstance
|
256
258
|
def update(sample_sid: :unset, status: :unset)
|
257
259
|
data = Twilio::Values.of({'SampleSid' => sample_sid, 'Status' => status, })
|
@@ -294,9 +296,11 @@ module Twilio
|
|
294
296
|
# Initialize the QueryInstance
|
295
297
|
# @param [Version] version Version that contains the resource
|
296
298
|
# @param [Hash] payload payload that contains response from Twilio
|
297
|
-
# @param [String] assistant_sid The
|
298
|
-
#
|
299
|
-
# resource.
|
299
|
+
# @param [String] assistant_sid The SID of the
|
300
|
+
# [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the
|
301
|
+
# parent of the resource.
|
302
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the
|
303
|
+
# Query resource to fetch.
|
300
304
|
# @return [QueryInstance] QueryInstance
|
301
305
|
def initialize(version, payload, assistant_sid: nil, sid: nil)
|
302
306
|
super(version)
|
@@ -335,79 +339,79 @@ module Twilio
|
|
335
339
|
end
|
336
340
|
|
337
341
|
##
|
338
|
-
# @return [String] The
|
342
|
+
# @return [String] The SID of the Account that created the resource
|
339
343
|
def account_sid
|
340
344
|
@properties['account_sid']
|
341
345
|
end
|
342
346
|
|
343
347
|
##
|
344
|
-
# @return [Time] The date
|
348
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
345
349
|
def date_created
|
346
350
|
@properties['date_created']
|
347
351
|
end
|
348
352
|
|
349
353
|
##
|
350
|
-
# @return [Time] The date
|
354
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
|
351
355
|
def date_updated
|
352
356
|
@properties['date_updated']
|
353
357
|
end
|
354
358
|
|
355
359
|
##
|
356
|
-
# @return [Hash] The natural language analysis results
|
360
|
+
# @return [Hash] The natural language analysis results that include the Task recognized, the confidence score, and a list of identified Fields
|
357
361
|
def results
|
358
362
|
@properties['results']
|
359
363
|
end
|
360
364
|
|
361
365
|
##
|
362
|
-
# @return [String]
|
366
|
+
# @return [String] The ISO language-country string that specifies the language used by the Query
|
363
367
|
def language
|
364
368
|
@properties['language']
|
365
369
|
end
|
366
370
|
|
367
371
|
##
|
368
|
-
# @return [String] The
|
372
|
+
# @return [String] The SID of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) queried
|
369
373
|
def model_build_sid
|
370
374
|
@properties['model_build_sid']
|
371
375
|
end
|
372
376
|
|
373
377
|
##
|
374
|
-
# @return [String] The end-user's natural language input
|
378
|
+
# @return [String] The end-user's natural language input
|
375
379
|
def query
|
376
380
|
@properties['query']
|
377
381
|
end
|
378
382
|
|
379
383
|
##
|
380
|
-
# @return [String]
|
384
|
+
# @return [String] The SID of an optional reference to the Sample created from the query
|
381
385
|
def sample_sid
|
382
386
|
@properties['sample_sid']
|
383
387
|
end
|
384
388
|
|
385
389
|
##
|
386
|
-
# @return [String] The
|
390
|
+
# @return [String] The SID of the Assistant that is the parent of the resource
|
387
391
|
def assistant_sid
|
388
392
|
@properties['assistant_sid']
|
389
393
|
end
|
390
394
|
|
391
395
|
##
|
392
|
-
# @return [String]
|
396
|
+
# @return [String] The unique string that identifies the resource
|
393
397
|
def sid
|
394
398
|
@properties['sid']
|
395
399
|
end
|
396
400
|
|
397
401
|
##
|
398
|
-
# @return [String]
|
402
|
+
# @return [String] The status of the Query
|
399
403
|
def status
|
400
404
|
@properties['status']
|
401
405
|
end
|
402
406
|
|
403
407
|
##
|
404
|
-
# @return [String] The
|
408
|
+
# @return [String] The absolute URL of the Query resource
|
405
409
|
def url
|
406
410
|
@properties['url']
|
407
411
|
end
|
408
412
|
|
409
413
|
##
|
410
|
-
# @return [String] The communication channel where
|
414
|
+
# @return [String] The communication channel from where the end-user input came
|
411
415
|
def source_channel
|
412
416
|
@properties['source_channel']
|
413
417
|
end
|
@@ -421,10 +425,11 @@ module Twilio
|
|
421
425
|
|
422
426
|
##
|
423
427
|
# Update the QueryInstance
|
424
|
-
# @param [String] sample_sid
|
428
|
+
# @param [String] sample_sid The SID of an optional reference to the
|
429
|
+
# [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the
|
425
430
|
# query.
|
426
|
-
# @param [String] status
|
427
|
-
#
|
431
|
+
# @param [String] status The new status of the resource. Can be: `pending_review`,
|
432
|
+
# `reviewed`, or `discarded`
|
428
433
|
# @return [QueryInstance] Updated QueryInstance
|
429
434
|
def update(sample_sid: :unset, status: :unset)
|
430
435
|
context.update(sample_sid: sample_sid, status: status, )
|
@@ -17,7 +17,9 @@ module Twilio
|
|
17
17
|
##
|
18
18
|
# Initialize the StyleSheetList
|
19
19
|
# @param [Version] version Version that contains the resource
|
20
|
-
# @param [String] assistant_sid The
|
20
|
+
# @param [String] assistant_sid The SID of the
|
21
|
+
# [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the
|
22
|
+
# parent of the resource.
|
21
23
|
# @return [StyleSheetList] StyleSheetList
|
22
24
|
def initialize(version, assistant_sid: nil)
|
23
25
|
super(version)
|
@@ -70,7 +72,9 @@ module Twilio
|
|
70
72
|
##
|
71
73
|
# Initialize the StyleSheetContext
|
72
74
|
# @param [Version] version Version that contains the resource
|
73
|
-
# @param [String] assistant_sid The
|
75
|
+
# @param [String] assistant_sid The SID of the
|
76
|
+
# [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the
|
77
|
+
# parent of the resource to fetch.
|
74
78
|
# @return [StyleSheetContext] StyleSheetContext
|
75
79
|
def initialize(version, assistant_sid)
|
76
80
|
super(version)
|
@@ -97,7 +101,7 @@ module Twilio
|
|
97
101
|
|
98
102
|
##
|
99
103
|
# Update the StyleSheetInstance
|
100
|
-
# @param [Hash] style_sheet The JSON
|
104
|
+
# @param [Hash] style_sheet The JSON string that describes the style sheet object.
|
101
105
|
# @return [StyleSheetInstance] Updated StyleSheetInstance
|
102
106
|
def update(style_sheet: :unset)
|
103
107
|
data = Twilio::Values.of({'StyleSheet' => Twilio.serialize_object(style_sheet), })
|
@@ -133,7 +137,9 @@ module Twilio
|
|
133
137
|
# Initialize the StyleSheetInstance
|
134
138
|
# @param [Version] version Version that contains the resource
|
135
139
|
# @param [Hash] payload payload that contains response from Twilio
|
136
|
-
# @param [String] assistant_sid The
|
140
|
+
# @param [String] assistant_sid The SID of the
|
141
|
+
# [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the
|
142
|
+
# parent of the resource.
|
137
143
|
# @return [StyleSheetInstance] StyleSheetInstance
|
138
144
|
def initialize(version, payload, assistant_sid: nil)
|
139
145
|
super(version)
|
@@ -163,25 +169,25 @@ module Twilio
|
|
163
169
|
end
|
164
170
|
|
165
171
|
##
|
166
|
-
# @return [String] The
|
172
|
+
# @return [String] The SID of the Account that created the resource
|
167
173
|
def account_sid
|
168
174
|
@properties['account_sid']
|
169
175
|
end
|
170
176
|
|
171
177
|
##
|
172
|
-
# @return [String] The
|
178
|
+
# @return [String] The SID of the Assistant that is the parent of the resource
|
173
179
|
def assistant_sid
|
174
180
|
@properties['assistant_sid']
|
175
181
|
end
|
176
182
|
|
177
183
|
##
|
178
|
-
# @return [String] The
|
184
|
+
# @return [String] The absolute URL of the StyleSheet resource
|
179
185
|
def url
|
180
186
|
@properties['url']
|
181
187
|
end
|
182
188
|
|
183
189
|
##
|
184
|
-
# @return [Hash] The JSON style sheet object
|
190
|
+
# @return [Hash] The JSON string that describes the style sheet object
|
185
191
|
def data
|
186
192
|
@properties['data']
|
187
193
|
end
|
@@ -195,7 +201,7 @@ module Twilio
|
|
195
201
|
|
196
202
|
##
|
197
203
|
# Update the StyleSheetInstance
|
198
|
-
# @param [Hash] style_sheet The JSON
|
204
|
+
# @param [Hash] style_sheet The JSON string that describes the style sheet object.
|
199
205
|
# @return [StyleSheetInstance] Updated StyleSheetInstance
|
200
206
|
def update(style_sheet: :unset)
|
201
207
|
context.update(style_sheet: style_sheet, )
|
@@ -17,7 +17,9 @@ module Twilio
|
|
17
17
|
##
|
18
18
|
# Initialize the TaskList
|
19
19
|
# @param [Version] version Version that contains the resource
|
20
|
-
# @param [String] assistant_sid The
|
20
|
+
# @param [String] assistant_sid The SID of the
|
21
|
+
# [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the
|
22
|
+
# parent of the resource.
|
21
23
|
# @return [TaskList] TaskList
|
22
24
|
def initialize(version, assistant_sid: nil)
|
23
25
|
super(version)
|
@@ -112,14 +114,16 @@ module Twilio
|
|
112
114
|
##
|
113
115
|
# Retrieve a single page of TaskInstance records from the API.
|
114
116
|
# Request is executed immediately.
|
115
|
-
# @param [String] unique_name
|
116
|
-
# resource as an alternative to the sid
|
117
|
-
#
|
118
|
-
#
|
119
|
-
# @param [
|
120
|
-
# the
|
121
|
-
# @param [
|
122
|
-
#
|
117
|
+
# @param [String] unique_name An application-defined string that uniquely
|
118
|
+
# identifies the new resource. It can be used as an alternative to the `sid` in
|
119
|
+
# the URL path to address the resource. This value must be unique and 64
|
120
|
+
# characters or less in length.
|
121
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
122
|
+
# the new resource. It is not unique and can be up to 255 characters long.
|
123
|
+
# @param [Hash] actions The JSON string that specifies the
|
124
|
+
# [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the
|
125
|
+
# Assistant on how to perform the task. It is optional and not unique.
|
126
|
+
# @param [String] actions_url The URL from which the Assistant can fetch actions.
|
123
127
|
# @return [TaskInstance] Newly created TaskInstance
|
124
128
|
def create(unique_name: nil, friendly_name: :unset, actions: :unset, actions_url: :unset)
|
125
129
|
data = Twilio::Values.of({
|
@@ -182,9 +186,11 @@ module Twilio
|
|
182
186
|
##
|
183
187
|
# Initialize the TaskContext
|
184
188
|
# @param [Version] version Version that contains the resource
|
185
|
-
# @param [String] assistant_sid The
|
186
|
-
#
|
187
|
-
# resource.
|
189
|
+
# @param [String] assistant_sid The SID of the
|
190
|
+
# [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the
|
191
|
+
# parent of the resource to fetch.
|
192
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the Task
|
193
|
+
# resource to fetch.
|
188
194
|
# @return [TaskContext] TaskContext
|
189
195
|
def initialize(version, assistant_sid, sid)
|
190
196
|
super(version)
|
@@ -217,15 +223,16 @@ module Twilio
|
|
217
223
|
|
218
224
|
##
|
219
225
|
# Update the TaskInstance
|
220
|
-
# @param [String] friendly_name A
|
221
|
-
# resource. It is
|
222
|
-
# @param [String] unique_name
|
223
|
-
#
|
224
|
-
#
|
225
|
-
#
|
226
|
-
#
|
227
|
-
#
|
228
|
-
#
|
226
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
227
|
+
# the resource. It is not unique and can be up to 255 characters long.
|
228
|
+
# @param [String] unique_name An application-defined string that uniquely
|
229
|
+
# identifies the resource. This value must be 64 characters or less in length and
|
230
|
+
# be unique. It can be used as an alternative to the `sid` in the URL path to
|
231
|
+
# address the resource.
|
232
|
+
# @param [Hash] actions The JSON string that specifies the
|
233
|
+
# [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the
|
234
|
+
# Assistant on how to perform the task.
|
235
|
+
# @param [String] actions_url The URL from which the Assistant can fetch actions.
|
229
236
|
# @return [TaskInstance] Updated TaskInstance
|
230
237
|
def update(friendly_name: :unset, unique_name: :unset, actions: :unset, actions_url: :unset)
|
231
238
|
data = Twilio::Values.of({
|
@@ -333,9 +340,11 @@ module Twilio
|
|
333
340
|
# Initialize the TaskInstance
|
334
341
|
# @param [Version] version Version that contains the resource
|
335
342
|
# @param [Hash] payload payload that contains response from Twilio
|
336
|
-
# @param [String] assistant_sid The
|
337
|
-
#
|
338
|
-
# resource.
|
343
|
+
# @param [String] assistant_sid The SID of the
|
344
|
+
# [Assistant](https://www.twilio.com/docs/autopilot/api/assistant) that is the
|
345
|
+
# parent of the resource.
|
346
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the Task
|
347
|
+
# resource to fetch.
|
339
348
|
# @return [TaskInstance] TaskInstance
|
340
349
|
def initialize(version, payload, assistant_sid: nil, sid: nil)
|
341
350
|
super(version)
|
@@ -371,61 +380,61 @@ module Twilio
|
|
371
380
|
end
|
372
381
|
|
373
382
|
##
|
374
|
-
# @return [String] The
|
383
|
+
# @return [String] The SID of the Account that created the resource
|
375
384
|
def account_sid
|
376
385
|
@properties['account_sid']
|
377
386
|
end
|
378
387
|
|
379
388
|
##
|
380
|
-
# @return [Time] The date
|
389
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was created
|
381
390
|
def date_created
|
382
391
|
@properties['date_created']
|
383
392
|
end
|
384
393
|
|
385
394
|
##
|
386
|
-
# @return [Time] The date
|
395
|
+
# @return [Time] The RFC 2822 date and time in GMT when the resource was last updated
|
387
396
|
def date_updated
|
388
397
|
@properties['date_updated']
|
389
398
|
end
|
390
399
|
|
391
400
|
##
|
392
|
-
# @return [String]
|
401
|
+
# @return [String] The string that you assigned to describe the resource
|
393
402
|
def friendly_name
|
394
403
|
@properties['friendly_name']
|
395
404
|
end
|
396
405
|
|
397
406
|
##
|
398
|
-
# @return [String]
|
407
|
+
# @return [String] A list of the URLs of related resources
|
399
408
|
def links
|
400
409
|
@properties['links']
|
401
410
|
end
|
402
411
|
|
403
412
|
##
|
404
|
-
# @return [String] The
|
413
|
+
# @return [String] The SID of the Assistant that is the parent of the resource
|
405
414
|
def assistant_sid
|
406
415
|
@properties['assistant_sid']
|
407
416
|
end
|
408
417
|
|
409
418
|
##
|
410
|
-
# @return [String]
|
419
|
+
# @return [String] The unique string that identifies the resource
|
411
420
|
def sid
|
412
421
|
@properties['sid']
|
413
422
|
end
|
414
423
|
|
415
424
|
##
|
416
|
-
# @return [String]
|
425
|
+
# @return [String] An application-defined string that uniquely identifies the resource
|
417
426
|
def unique_name
|
418
427
|
@properties['unique_name']
|
419
428
|
end
|
420
429
|
|
421
430
|
##
|
422
|
-
# @return [String]
|
431
|
+
# @return [String] The URL from which the Assistant can fetch actions
|
423
432
|
def actions_url
|
424
433
|
@properties['actions_url']
|
425
434
|
end
|
426
435
|
|
427
436
|
##
|
428
|
-
# @return [String] The
|
437
|
+
# @return [String] The absolute URL of the Task resource
|
429
438
|
def url
|
430
439
|
@properties['url']
|
431
440
|
end
|
@@ -439,15 +448,16 @@ module Twilio
|
|
439
448
|
|
440
449
|
##
|
441
450
|
# Update the TaskInstance
|
442
|
-
# @param [String] friendly_name A
|
443
|
-
# resource. It is
|
444
|
-
# @param [String] unique_name
|
445
|
-
#
|
446
|
-
#
|
447
|
-
#
|
448
|
-
#
|
449
|
-
#
|
450
|
-
#
|
451
|
+
# @param [String] friendly_name A descriptive string that you create to describe
|
452
|
+
# the resource. It is not unique and can be up to 255 characters long.
|
453
|
+
# @param [String] unique_name An application-defined string that uniquely
|
454
|
+
# identifies the resource. This value must be 64 characters or less in length and
|
455
|
+
# be unique. It can be used as an alternative to the `sid` in the URL path to
|
456
|
+
# address the resource.
|
457
|
+
# @param [Hash] actions The JSON string that specifies the
|
458
|
+
# [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the
|
459
|
+
# Assistant on how to perform the task.
|
460
|
+
# @param [String] actions_url The URL from which the Assistant can fetch actions.
|
451
461
|
# @return [TaskInstance] Updated TaskInstance
|
452
462
|
def update(friendly_name: :unset, unique_name: :unset, actions: :unset, actions_url: :unset)
|
453
463
|
context.update(
|