twilio-ruby 7.3.1 → 7.3.3
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.
- checksums.yaml +4 -4
- data/CHANGES.md +24 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +133 -0
- data/lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb +133 -0
- data/lib/twilio-ruby/rest/accounts/v1.rb +12 -0
- data/lib/twilio-ruby/rest/{preview/deployed_devices/fleet/key.rb → assistants/v1/assistant/assistants_knowledge.rb} +104 -170
- data/lib/twilio-ruby/rest/{preview/deployed_devices/fleet/deployment.rb → assistants/v1/assistant/assistants_tool.rb} +111 -157
- data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +1 -1
- data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +201 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +57 -15
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +209 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +21 -23
- data/lib/twilio-ruby/rest/assistants/v1/tool.rb +37 -0
- data/lib/twilio-ruby/rest/iam/v1/{new_api_key.rb → key.rb} +20 -20
- data/lib/twilio-ruby/rest/iam/v1.rb +4 -4
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +8 -2
- data/lib/twilio-ruby/rest/numbers/v1/{porting_webhook_configuration_fetch.rb → webhook.rb} +20 -20
- data/lib/twilio-ruby/rest/numbers/v1.rb +6 -6
- data/lib/twilio-ruby/rest/preview_base.rb +0 -5
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +4 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +10 -10
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -424
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -463
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -511
- data/lib/twilio-ruby/rest/preview/deployed_devices.rb +0 -49
@@ -4,7 +4,7 @@
|
|
4
4
|
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
5
|
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
6
|
#
|
7
|
-
# Twilio -
|
7
|
+
# Twilio - Assistants
|
8
8
|
# This is the public Twilio REST API.
|
9
9
|
#
|
10
10
|
# NOTE: This class is auto generated by OpenAPI Generator.
|
@@ -15,51 +15,26 @@
|
|
15
15
|
|
16
16
|
module Twilio
|
17
17
|
module REST
|
18
|
-
class
|
19
|
-
class
|
20
|
-
class
|
18
|
+
class Assistants < AssistantsBase
|
19
|
+
class V1 < Version
|
20
|
+
class AssistantContext < InstanceContext
|
21
21
|
|
22
|
-
class
|
22
|
+
class AssistantsToolList < ListResource
|
23
23
|
|
24
24
|
##
|
25
|
-
# Initialize the
|
25
|
+
# Initialize the AssistantsToolList
|
26
26
|
# @param [Version] version Version that contains the resource
|
27
|
-
# @return [
|
28
|
-
def initialize(version,
|
27
|
+
# @return [AssistantsToolList] AssistantsToolList
|
28
|
+
def initialize(version, assistant_id: nil)
|
29
29
|
super(version)
|
30
30
|
# Path Solution
|
31
|
-
@solution = {
|
32
|
-
@uri = "/
|
31
|
+
@solution = { assistant_id: assistant_id }
|
32
|
+
@uri = "/Assistants/#{@solution[:assistant_id]}/Tools"
|
33
33
|
|
34
34
|
end
|
35
|
-
##
|
36
|
-
# Create the DeploymentInstance
|
37
|
-
# @param [String] friendly_name Provides a human readable descriptive text for this Deployment, up to 256 characters long.
|
38
|
-
# @param [String] sync_service_sid Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment.
|
39
|
-
# @return [DeploymentInstance] Created DeploymentInstance
|
40
|
-
def create(
|
41
|
-
friendly_name: :unset,
|
42
|
-
sync_service_sid: :unset
|
43
|
-
)
|
44
|
-
|
45
|
-
data = Twilio::Values.of({
|
46
|
-
'FriendlyName' => friendly_name,
|
47
|
-
'SyncServiceSid' => sync_service_sid,
|
48
|
-
})
|
49
|
-
|
50
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
51
|
-
|
52
|
-
payload = @version.create('POST', @uri, data: data, headers: headers)
|
53
|
-
DeploymentInstance.new(
|
54
|
-
@version,
|
55
|
-
payload,
|
56
|
-
fleet_sid: @solution[:fleet_sid],
|
57
|
-
)
|
58
|
-
end
|
59
|
-
|
60
35
|
|
61
36
|
##
|
62
|
-
# Lists
|
37
|
+
# Lists AssistantsToolInstance records from the API as a list.
|
63
38
|
# Unlike stream(), this operation is eager and will load `limit` records into
|
64
39
|
# memory before returning.
|
65
40
|
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
@@ -97,7 +72,7 @@ module Twilio
|
|
97
72
|
end
|
98
73
|
|
99
74
|
##
|
100
|
-
# When passed a block, yields
|
75
|
+
# When passed a block, yields AssistantsToolInstance records from the API.
|
101
76
|
# This operation lazily loads records as efficiently as possible until the limit
|
102
77
|
# is reached.
|
103
78
|
def each
|
@@ -111,12 +86,12 @@ module Twilio
|
|
111
86
|
end
|
112
87
|
|
113
88
|
##
|
114
|
-
# Retrieve a single page of
|
89
|
+
# Retrieve a single page of AssistantsToolInstance records from the API.
|
115
90
|
# Request is executed immediately.
|
116
91
|
# @param [String] page_token PageToken provided by the API
|
117
92
|
# @param [Integer] page_number Page Number, this value is simply for client state
|
118
93
|
# @param [Integer] page_size Number of records to return, defaults to 50
|
119
|
-
# @return [Page] Page of
|
94
|
+
# @return [Page] Page of AssistantsToolInstance
|
120
95
|
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
121
96
|
params = Twilio::Values.of({
|
122
97
|
'PageToken' => page_token,
|
@@ -126,97 +101,71 @@ module Twilio
|
|
126
101
|
|
127
102
|
response = @version.page('GET', @uri, params: params)
|
128
103
|
|
129
|
-
|
104
|
+
AssistantsToolPage.new(@version, response, @solution)
|
130
105
|
end
|
131
106
|
|
132
107
|
##
|
133
|
-
# Retrieve a single page of
|
108
|
+
# Retrieve a single page of AssistantsToolInstance records from the API.
|
134
109
|
# Request is executed immediately.
|
135
110
|
# @param [String] target_url API-generated URL for the requested results page
|
136
|
-
# @return [Page] Page of
|
111
|
+
# @return [Page] Page of AssistantsToolInstance
|
137
112
|
def get_page(target_url)
|
138
113
|
response = @version.domain.request(
|
139
114
|
'GET',
|
140
115
|
target_url
|
141
116
|
)
|
142
|
-
|
117
|
+
AssistantsToolPage.new(@version, response, @solution)
|
143
118
|
end
|
144
119
|
|
145
120
|
|
146
121
|
|
147
122
|
# Provide a user friendly representation
|
148
123
|
def to_s
|
149
|
-
'#<Twilio.
|
124
|
+
'#<Twilio.Assistants.V1.AssistantsToolList>'
|
150
125
|
end
|
151
126
|
end
|
152
127
|
|
153
128
|
|
154
|
-
class
|
129
|
+
class AssistantsToolContext < InstanceContext
|
155
130
|
##
|
156
|
-
# Initialize the
|
131
|
+
# Initialize the AssistantsToolContext
|
157
132
|
# @param [Version] version Version that contains the resource
|
158
|
-
# @param [String]
|
159
|
-
# @param [String]
|
160
|
-
# @return [
|
161
|
-
def initialize(version,
|
133
|
+
# @param [String] assistant_id The assistant ID.
|
134
|
+
# @param [String] id The tool ID.
|
135
|
+
# @return [AssistantsToolContext] AssistantsToolContext
|
136
|
+
def initialize(version, assistant_id, id)
|
162
137
|
super(version)
|
163
138
|
|
164
139
|
# Path Solution
|
165
|
-
@solution = {
|
166
|
-
@uri = "/
|
167
|
-
|
168
|
-
|
169
|
-
end
|
170
|
-
##
|
171
|
-
# Delete the DeploymentInstance
|
172
|
-
# @return [Boolean] True if delete succeeds, false otherwise
|
173
|
-
def delete
|
140
|
+
@solution = { assistant_id: assistant_id, id: id, }
|
141
|
+
@uri = "/Assistants/#{@solution[:assistant_id]}/Tools/#{@solution[:id]}"
|
174
142
|
|
175
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
176
143
|
|
177
|
-
@version.delete('DELETE', @uri, headers: headers)
|
178
144
|
end
|
179
|
-
|
180
145
|
##
|
181
|
-
#
|
182
|
-
# @return [
|
183
|
-
def
|
146
|
+
# Create the AssistantsToolInstance
|
147
|
+
# @return [AssistantsToolInstance] Created AssistantsToolInstance
|
148
|
+
def create
|
184
149
|
|
185
150
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
186
151
|
|
187
|
-
payload = @version.
|
188
|
-
|
152
|
+
payload = @version.create('POST', @uri, headers: headers)
|
153
|
+
AssistantsToolInstance.new(
|
189
154
|
@version,
|
190
155
|
payload,
|
191
|
-
|
192
|
-
|
156
|
+
assistant_id: @solution[:assistant_id],
|
157
|
+
id: @solution[:id],
|
193
158
|
)
|
194
159
|
end
|
195
160
|
|
196
161
|
##
|
197
|
-
#
|
198
|
-
# @
|
199
|
-
|
200
|
-
# @return [DeploymentInstance] Updated DeploymentInstance
|
201
|
-
def update(
|
202
|
-
friendly_name: :unset,
|
203
|
-
sync_service_sid: :unset
|
204
|
-
)
|
205
|
-
|
206
|
-
data = Twilio::Values.of({
|
207
|
-
'FriendlyName' => friendly_name,
|
208
|
-
'SyncServiceSid' => sync_service_sid,
|
209
|
-
})
|
162
|
+
# Delete the AssistantsToolInstance
|
163
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
164
|
+
def delete
|
210
165
|
|
211
166
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
212
167
|
|
213
|
-
|
214
|
-
DeploymentInstance.new(
|
215
|
-
@version,
|
216
|
-
payload,
|
217
|
-
fleet_sid: @solution[:fleet_sid],
|
218
|
-
sid: @solution[:sid],
|
219
|
-
)
|
168
|
+
@version.delete('DELETE', @uri, headers: headers)
|
220
169
|
end
|
221
170
|
|
222
171
|
|
@@ -224,24 +173,24 @@ module Twilio
|
|
224
173
|
# Provide a user friendly representation
|
225
174
|
def to_s
|
226
175
|
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
227
|
-
"#<Twilio.
|
176
|
+
"#<Twilio.Assistants.V1.AssistantsToolContext #{context}>"
|
228
177
|
end
|
229
178
|
|
230
179
|
##
|
231
180
|
# Provide a detailed, user friendly representation
|
232
181
|
def inspect
|
233
182
|
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
234
|
-
"#<Twilio.
|
183
|
+
"#<Twilio.Assistants.V1.AssistantsToolContext #{context}>"
|
235
184
|
end
|
236
185
|
end
|
237
186
|
|
238
|
-
class
|
187
|
+
class AssistantsToolPage < Page
|
239
188
|
##
|
240
|
-
# Initialize the
|
189
|
+
# Initialize the AssistantsToolPage
|
241
190
|
# @param [Version] version Version that contains the resource
|
242
191
|
# @param [Response] response Response from the API
|
243
192
|
# @param [Hash] solution Path solution for the resource
|
244
|
-
# @return [
|
193
|
+
# @return [AssistantsToolPage] AssistantsToolPage
|
245
194
|
def initialize(version, response, solution)
|
246
195
|
super(version, response)
|
247
196
|
|
@@ -250,152 +199,157 @@ module Twilio
|
|
250
199
|
end
|
251
200
|
|
252
201
|
##
|
253
|
-
# Build an instance of
|
202
|
+
# Build an instance of AssistantsToolInstance
|
254
203
|
# @param [Hash] payload Payload response from the API
|
255
|
-
# @return [
|
204
|
+
# @return [AssistantsToolInstance] AssistantsToolInstance
|
256
205
|
def get_instance(payload)
|
257
|
-
|
206
|
+
AssistantsToolInstance.new(@version, payload, assistant_id: @solution[:assistant_id])
|
258
207
|
end
|
259
208
|
|
260
209
|
##
|
261
210
|
# Provide a user friendly representation
|
262
211
|
def to_s
|
263
|
-
'<Twilio.
|
212
|
+
'<Twilio.Assistants.V1.AssistantsToolPage>'
|
264
213
|
end
|
265
214
|
end
|
266
|
-
class
|
215
|
+
class AssistantsToolInstance < InstanceResource
|
267
216
|
##
|
268
|
-
# Initialize the
|
217
|
+
# Initialize the AssistantsToolInstance
|
269
218
|
# @param [Version] version Version that contains the resource
|
270
219
|
# @param [Hash] payload payload that contains response from Twilio
|
271
220
|
# @param [String] account_sid The SID of the
|
272
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this
|
221
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this AssistantsTool
|
273
222
|
# resource.
|
274
223
|
# @param [String] sid The SID of the Call resource to fetch.
|
275
|
-
# @return [
|
276
|
-
def initialize(version, payload ,
|
224
|
+
# @return [AssistantsToolInstance] AssistantsToolInstance
|
225
|
+
def initialize(version, payload , assistant_id: nil, id: nil)
|
277
226
|
super(version)
|
278
227
|
|
279
228
|
# Marshaled Properties
|
280
229
|
@properties = {
|
281
|
-
'sid' => payload['sid'],
|
282
|
-
'url' => payload['url'],
|
283
|
-
'friendly_name' => payload['friendly_name'],
|
284
|
-
'fleet_sid' => payload['fleet_sid'],
|
285
230
|
'account_sid' => payload['account_sid'],
|
286
|
-
'
|
231
|
+
'description' => payload['description'],
|
232
|
+
'enabled' => payload['enabled'],
|
233
|
+
'id' => payload['id'],
|
234
|
+
'meta' => payload['meta'],
|
235
|
+
'name' => payload['name'],
|
236
|
+
'requires_auth' => payload['requires_auth'],
|
237
|
+
'type' => payload['type'],
|
238
|
+
'url' => payload['url'],
|
287
239
|
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
288
240
|
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
289
241
|
}
|
290
242
|
|
291
243
|
# Context
|
292
244
|
@instance_context = nil
|
293
|
-
@params = { '
|
245
|
+
@params = { 'assistant_id' => assistant_id || @properties['assistant_id'] ,'id' => id || @properties['id'] , }
|
294
246
|
end
|
295
247
|
|
296
248
|
##
|
297
249
|
# Generate an instance context for the instance, the context is capable of
|
298
250
|
# performing various actions. All instance actions are proxied to the context
|
299
|
-
# @return [
|
251
|
+
# @return [AssistantsToolContext] CallContext for this CallInstance
|
300
252
|
def context
|
301
253
|
unless @instance_context
|
302
|
-
@instance_context =
|
254
|
+
@instance_context = AssistantsToolContext.new(@version , @params['assistant_id'], @params['id'])
|
303
255
|
end
|
304
256
|
@instance_context
|
305
257
|
end
|
306
258
|
|
307
259
|
##
|
308
|
-
# @return [String]
|
309
|
-
def
|
310
|
-
@properties['
|
260
|
+
# @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Tool resource.
|
261
|
+
def account_sid
|
262
|
+
@properties['account_sid']
|
311
263
|
end
|
312
264
|
|
313
265
|
##
|
314
|
-
# @return [String]
|
315
|
-
def
|
316
|
-
@properties['
|
266
|
+
# @return [String] The description of the tool.
|
267
|
+
def description
|
268
|
+
@properties['description']
|
317
269
|
end
|
318
270
|
|
319
271
|
##
|
320
|
-
# @return [
|
321
|
-
def
|
322
|
-
@properties['
|
272
|
+
# @return [Boolean] True if the tool is enabled.
|
273
|
+
def enabled
|
274
|
+
@properties['enabled']
|
323
275
|
end
|
324
276
|
|
325
277
|
##
|
326
|
-
# @return [String]
|
327
|
-
def
|
328
|
-
@properties['
|
278
|
+
# @return [String] The tool ID.
|
279
|
+
def id
|
280
|
+
@properties['id']
|
329
281
|
end
|
330
282
|
|
331
283
|
##
|
332
|
-
# @return [
|
333
|
-
def
|
334
|
-
@properties['
|
284
|
+
# @return [Hash] The metadata related to method, url, input_schema to used with the Tool.
|
285
|
+
def meta
|
286
|
+
@properties['meta']
|
287
|
+
end
|
288
|
+
|
289
|
+
##
|
290
|
+
# @return [String] The name of the tool.
|
291
|
+
def name
|
292
|
+
@properties['name']
|
335
293
|
end
|
336
294
|
|
337
295
|
##
|
338
|
-
# @return [
|
339
|
-
def
|
340
|
-
@properties['
|
296
|
+
# @return [Boolean] The authentication requirement for the tool.
|
297
|
+
def requires_auth
|
298
|
+
@properties['requires_auth']
|
341
299
|
end
|
342
300
|
|
343
301
|
##
|
344
|
-
# @return [
|
302
|
+
# @return [String] The type of the tool. ('WEBHOOK')
|
303
|
+
def type
|
304
|
+
@properties['type']
|
305
|
+
end
|
306
|
+
|
307
|
+
##
|
308
|
+
# @return [String] The url of the tool resource.
|
309
|
+
def url
|
310
|
+
@properties['url']
|
311
|
+
end
|
312
|
+
|
313
|
+
##
|
314
|
+
# @return [Time] The date and time in GMT when the Tool was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
345
315
|
def date_created
|
346
316
|
@properties['date_created']
|
347
317
|
end
|
348
318
|
|
349
319
|
##
|
350
|
-
# @return [Time]
|
320
|
+
# @return [Time] The date and time in GMT when the Tool was last updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
351
321
|
def date_updated
|
352
322
|
@properties['date_updated']
|
353
323
|
end
|
354
324
|
|
355
325
|
##
|
356
|
-
#
|
357
|
-
# @return [
|
358
|
-
def
|
326
|
+
# Create the AssistantsToolInstance
|
327
|
+
# @return [AssistantsToolInstance] Created AssistantsToolInstance
|
328
|
+
def create
|
359
329
|
|
360
|
-
context.
|
330
|
+
context.create
|
361
331
|
end
|
362
332
|
|
363
333
|
##
|
364
|
-
#
|
365
|
-
# @return [
|
366
|
-
def
|
367
|
-
|
368
|
-
context.fetch
|
369
|
-
end
|
334
|
+
# Delete the AssistantsToolInstance
|
335
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
336
|
+
def delete
|
370
337
|
|
371
|
-
|
372
|
-
# Update the DeploymentInstance
|
373
|
-
# @param [String] friendly_name Provides a human readable descriptive text for this Deployment, up to 64 characters long
|
374
|
-
# @param [String] sync_service_sid Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment.
|
375
|
-
# @return [DeploymentInstance] Updated DeploymentInstance
|
376
|
-
def update(
|
377
|
-
friendly_name: :unset,
|
378
|
-
sync_service_sid: :unset
|
379
|
-
)
|
380
|
-
|
381
|
-
context.update(
|
382
|
-
friendly_name: friendly_name,
|
383
|
-
sync_service_sid: sync_service_sid,
|
384
|
-
)
|
338
|
+
context.delete
|
385
339
|
end
|
386
340
|
|
387
341
|
##
|
388
342
|
# Provide a user friendly representation
|
389
343
|
def to_s
|
390
344
|
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
391
|
-
"<Twilio.
|
345
|
+
"<Twilio.Assistants.V1.AssistantsToolInstance #{values}>"
|
392
346
|
end
|
393
347
|
|
394
348
|
##
|
395
349
|
# Provide a detailed, user friendly representation
|
396
350
|
def inspect
|
397
351
|
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
398
|
-
"<Twilio.
|
352
|
+
"<Twilio.Assistants.V1.AssistantsToolInstance #{values}>"
|
399
353
|
end
|
400
354
|
end
|
401
355
|
|