twilio-ruby 7.10.7 → 7.11.1
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/.github/workflows/test-and-deploy.yml +43 -67
- data/.gitignore +0 -1
- data/CHANGES.md +46 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +154 -0
- data/README.md +3 -3
- data/Rakefile +1 -1
- data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +25 -6
- data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +48 -12
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +6 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -2
- data/lib/twilio-ruby/rest/client.rb +0 -5
- data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +11 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +10 -10
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +10 -10
- data/lib/twilio-ruby/rest/conversations/v2/action.rb +2 -2
- data/lib/twilio-ruby/rest/conversations/v2/communication.rb +43 -21
- data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +59 -21
- data/lib/twilio-ruby/rest/conversations/v2/conversation.rb +28 -28
- data/lib/twilio-ruby/rest/conversations/v2/operation.rb +10 -10
- data/lib/twilio-ruby/rest/conversations/v2/participant.rb +58 -58
- data/lib/twilio-ruby/rest/conversations/v2.rb +45 -45
- data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +2 -2
- data/lib/twilio-ruby/rest/iam/v1/o_auth_app.rb +15 -2
- data/lib/twilio-ruby/rest/iam_base.rb +6 -1
- data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call/event.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v3/metadata.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v3/query.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v3.rb +1 -1
- data/lib/twilio-ruby/rest/intelligence/v3/conversation.rb +8 -8
- data/lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb +502 -0
- data/lib/twilio-ruby/rest/intelligence/v3.rb +6 -0
- data/lib/twilio-ruby/rest/knowledge/v2/chunk.rb +28 -0
- data/lib/twilio-ruby/rest/knowledge/v2/knowledge.rb +38 -0
- data/lib/twilio-ruby/rest/knowledge/v2/search.rb +8 -117
- data/lib/twilio-ruby/rest/knowledge/v2.rb +1 -2
- data/lib/twilio-ruby/rest/memory/v1/bulk.rb +9 -118
- data/lib/twilio-ruby/rest/memory/v1/conversation_summary.rb +13 -5
- data/lib/twilio-ruby/rest/memory/v1/data_mapping.rb +6 -12
- data/lib/twilio-ruby/rest/memory/v1/identifier.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb +11 -132
- data/lib/twilio-ruby/rest/memory/v1/import.rb +28 -5
- data/lib/twilio-ruby/rest/memory/v1/lookup.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/observation.rb +70 -18
- data/lib/twilio-ruby/rest/memory/v1/operation.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/profile.rb +2 -2
- data/lib/twilio-ruby/rest/memory/v1/recall.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/revision.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/store.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/trait.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/trait_group.rb +56 -6
- data/lib/twilio-ruby/rest/memory/v1.rb +3 -46
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +0 -18
- data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +23 -4
- data/lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb +4 -4
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification.rb +231 -0
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification_check.rb +238 -0
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification.rb +245 -0
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification_check.rb +224 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +24 -0
- data/lib/twilio-ruby/rest/{assistants/v1/session.rb → numbers/v2/caller_id.rb} +141 -127
- data/lib/twilio-ruby/rest/numbers/v2.rb +16 -0
- data/lib/twilio-ruby/rest/oauth/v2/authorize.rb +14 -2
- data/lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb +259 -0
- data/lib/twilio-ruby/rest/oauth/v2/token.rb +8 -2
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization.rb +0 -19
- data/lib/twilio-ruby/rest/routes/v3/phone_number.rb +465 -0
- data/lib/twilio-ruby/rest/routes/v3.rb +50 -0
- data/lib/twilio-ruby/rest/routes_base.rb +6 -1
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration.rb +330 -0
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration_embedded_session.rb +233 -0
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration.rb +321 -0
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration_embedded_session.rb +233 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb +445 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb +445 -0
- data/lib/twilio-ruby/rest/trusthub/v1.rb +74 -0
- data/lib/twilio-ruby/rest/voice/v2/account_default_configuration.rb +556 -0
- data/lib/twilio-ruby/rest/voice/v2/configuration/default.rb +356 -0
- data/lib/twilio-ruby/rest/voice/v2/configuration.rb +412 -0
- data/lib/twilio-ruby/rest/voice/v2/recording.rb +616 -0
- data/lib/twilio-ruby/rest/voice/v2/transcription.rb +591 -0
- data/lib/twilio-ruby/rest/voice/v2/type.rb +518 -0
- data/lib/twilio-ruby/rest/voice/v2.rb +141 -0
- data/lib/twilio-ruby/rest/voice_base.rb +5 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +6 -68
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +33 -21
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_knowledge.rb +0 -558
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_tool.rb +0 -558
- data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +0 -431
- data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +0 -296
- data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +0 -927
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +0 -325
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +0 -349
- data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +0 -871
- data/lib/twilio-ruby/rest/assistants/v1/policy.rb +0 -364
- data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +0 -360
- data/lib/twilio-ruby/rest/assistants/v1/tool.rb +0 -847
- data/lib/twilio-ruby/rest/assistants/v1.rb +0 -104
- data/lib/twilio-ruby/rest/assistants.rb +0 -6
- data/lib/twilio-ruby/rest/assistants_base.rb +0 -38
|
@@ -1,847 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# This code was generated by
|
|
3
|
-
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
4
|
-
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
5
|
-
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
6
|
-
#
|
|
7
|
-
# Twilio - Assistants
|
|
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 Assistants < AssistantsBase
|
|
19
|
-
class V1 < Version
|
|
20
|
-
class ToolList < ListResource
|
|
21
|
-
|
|
22
|
-
class AssistantsV1ServiceCreatePolicyRequest
|
|
23
|
-
# @param [description]: [String] The description of the policy.
|
|
24
|
-
# @param [id]: [String] The Policy ID.
|
|
25
|
-
# @param [name]: [String] The name of the policy.
|
|
26
|
-
# @param [policy_details]: [Hash]
|
|
27
|
-
# @param [type]: [String] The description of the policy.
|
|
28
|
-
attr_accessor :description, :id, :name, :policy_details, :type
|
|
29
|
-
def initialize(payload)
|
|
30
|
-
@description = payload["description"]
|
|
31
|
-
@id = payload["id"]
|
|
32
|
-
@name = payload["name"]
|
|
33
|
-
@policy_details = payload["policy_details"]
|
|
34
|
-
@type = payload["type"]
|
|
35
|
-
end
|
|
36
|
-
def to_json(options = {})
|
|
37
|
-
{
|
|
38
|
-
"description": @description,
|
|
39
|
-
"id": @id,
|
|
40
|
-
"name": @name,
|
|
41
|
-
"policy_details": @policy_details,
|
|
42
|
-
"type": @type,
|
|
43
|
-
}.to_json(options)
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
class AssistantsV1ServiceCreateToolRequest
|
|
48
|
-
# @param [assistant_id]: [String] The Assistant ID.
|
|
49
|
-
# @param [description]: [String] The description of the tool.
|
|
50
|
-
# @param [enabled]: [Boolean] True if the tool is enabled.
|
|
51
|
-
# @param [meta]: [Hash] The metadata related to method, url, input_schema to used with the Tool.
|
|
52
|
-
# @param [name]: [String] The name of the tool.
|
|
53
|
-
# @param [policy]: [ToolList.AssistantsV1ServiceCreatePolicyRequest]
|
|
54
|
-
# @param [type]: [String] The description of the tool.
|
|
55
|
-
attr_accessor :assistant_id, :description, :enabled, :meta, :name, :policy, :type
|
|
56
|
-
def initialize(payload)
|
|
57
|
-
@assistant_id = payload["assistant_id"]
|
|
58
|
-
@description = payload["description"]
|
|
59
|
-
@enabled = payload["enabled"]
|
|
60
|
-
@meta = payload["meta"]
|
|
61
|
-
@name = payload["name"]
|
|
62
|
-
@policy = payload["policy"]
|
|
63
|
-
@type = payload["type"]
|
|
64
|
-
end
|
|
65
|
-
def to_json(options = {})
|
|
66
|
-
{
|
|
67
|
-
"assistant_id": @assistant_id,
|
|
68
|
-
"description": @description,
|
|
69
|
-
"enabled": @enabled,
|
|
70
|
-
"meta": @meta,
|
|
71
|
-
"name": @name,
|
|
72
|
-
"policy": @policy,
|
|
73
|
-
"type": @type,
|
|
74
|
-
}.to_json(options)
|
|
75
|
-
end
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
class AssistantsV1ServiceUpdateToolRequest
|
|
79
|
-
# @param [assistant_id]: [String] The Assistant ID.
|
|
80
|
-
# @param [description]: [String] The description of the tool.
|
|
81
|
-
# @param [enabled]: [Boolean] True if the tool is enabled.
|
|
82
|
-
# @param [meta]: [Hash] The metadata related to method, url, input_schema to used with the Tool.
|
|
83
|
-
# @param [name]: [String] The name of the tool.
|
|
84
|
-
# @param [policy]: [ToolList.AssistantsV1ServiceCreatePolicyRequest]
|
|
85
|
-
# @param [type]: [String] The type of the tool.
|
|
86
|
-
attr_accessor :assistant_id, :description, :enabled, :meta, :name, :policy, :type
|
|
87
|
-
def initialize(payload)
|
|
88
|
-
@assistant_id = payload["assistant_id"]
|
|
89
|
-
@description = payload["description"]
|
|
90
|
-
@enabled = payload["enabled"]
|
|
91
|
-
@meta = payload["meta"]
|
|
92
|
-
@name = payload["name"]
|
|
93
|
-
@policy = payload["policy"]
|
|
94
|
-
@type = payload["type"]
|
|
95
|
-
end
|
|
96
|
-
def to_json(options = {})
|
|
97
|
-
{
|
|
98
|
-
"assistant_id": @assistant_id,
|
|
99
|
-
"description": @description,
|
|
100
|
-
"enabled": @enabled,
|
|
101
|
-
"meta": @meta,
|
|
102
|
-
"name": @name,
|
|
103
|
-
"policy": @policy,
|
|
104
|
-
"type": @type,
|
|
105
|
-
}.to_json(options)
|
|
106
|
-
end
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
class AssistantsV1ServiceCreatePolicyRequest
|
|
111
|
-
# @param [description]: [String] The description of the policy.
|
|
112
|
-
# @param [id]: [String] The Policy ID.
|
|
113
|
-
# @param [name]: [String] The name of the policy.
|
|
114
|
-
# @param [policy_details]: [Hash]
|
|
115
|
-
# @param [type]: [String] The description of the policy.
|
|
116
|
-
attr_accessor :description, :id, :name, :policy_details, :type
|
|
117
|
-
def initialize(payload)
|
|
118
|
-
@description = payload["description"]
|
|
119
|
-
@id = payload["id"]
|
|
120
|
-
@name = payload["name"]
|
|
121
|
-
@policy_details = payload["policy_details"]
|
|
122
|
-
@type = payload["type"]
|
|
123
|
-
end
|
|
124
|
-
def to_json(options = {})
|
|
125
|
-
{
|
|
126
|
-
"description": @description,
|
|
127
|
-
"id": @id,
|
|
128
|
-
"name": @name,
|
|
129
|
-
"policy_details": @policy_details,
|
|
130
|
-
"type": @type,
|
|
131
|
-
}.to_json(options)
|
|
132
|
-
end
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
class AssistantsV1ServiceCreateToolRequest
|
|
136
|
-
# @param [assistant_id]: [String] The Assistant ID.
|
|
137
|
-
# @param [description]: [String] The description of the tool.
|
|
138
|
-
# @param [enabled]: [Boolean] True if the tool is enabled.
|
|
139
|
-
# @param [meta]: [Hash] The metadata related to method, url, input_schema to used with the Tool.
|
|
140
|
-
# @param [name]: [String] The name of the tool.
|
|
141
|
-
# @param [policy]: [ToolList.AssistantsV1ServiceCreatePolicyRequest]
|
|
142
|
-
# @param [type]: [String] The description of the tool.
|
|
143
|
-
attr_accessor :assistant_id, :description, :enabled, :meta, :name, :policy, :type
|
|
144
|
-
def initialize(payload)
|
|
145
|
-
@assistant_id = payload["assistant_id"]
|
|
146
|
-
@description = payload["description"]
|
|
147
|
-
@enabled = payload["enabled"]
|
|
148
|
-
@meta = payload["meta"]
|
|
149
|
-
@name = payload["name"]
|
|
150
|
-
@policy = payload["policy"]
|
|
151
|
-
@type = payload["type"]
|
|
152
|
-
end
|
|
153
|
-
def to_json(options = {})
|
|
154
|
-
{
|
|
155
|
-
"assistant_id": @assistant_id,
|
|
156
|
-
"description": @description,
|
|
157
|
-
"enabled": @enabled,
|
|
158
|
-
"meta": @meta,
|
|
159
|
-
"name": @name,
|
|
160
|
-
"policy": @policy,
|
|
161
|
-
"type": @type,
|
|
162
|
-
}.to_json(options)
|
|
163
|
-
end
|
|
164
|
-
end
|
|
165
|
-
|
|
166
|
-
class AssistantsV1ServiceUpdateToolRequest
|
|
167
|
-
# @param [assistant_id]: [String] The Assistant ID.
|
|
168
|
-
# @param [description]: [String] The description of the tool.
|
|
169
|
-
# @param [enabled]: [Boolean] True if the tool is enabled.
|
|
170
|
-
# @param [meta]: [Hash] The metadata related to method, url, input_schema to used with the Tool.
|
|
171
|
-
# @param [name]: [String] The name of the tool.
|
|
172
|
-
# @param [policy]: [ToolList.AssistantsV1ServiceCreatePolicyRequest]
|
|
173
|
-
# @param [type]: [String] The type of the tool.
|
|
174
|
-
attr_accessor :assistant_id, :description, :enabled, :meta, :name, :policy, :type
|
|
175
|
-
def initialize(payload)
|
|
176
|
-
@assistant_id = payload["assistant_id"]
|
|
177
|
-
@description = payload["description"]
|
|
178
|
-
@enabled = payload["enabled"]
|
|
179
|
-
@meta = payload["meta"]
|
|
180
|
-
@name = payload["name"]
|
|
181
|
-
@policy = payload["policy"]
|
|
182
|
-
@type = payload["type"]
|
|
183
|
-
end
|
|
184
|
-
def to_json(options = {})
|
|
185
|
-
{
|
|
186
|
-
"assistant_id": @assistant_id,
|
|
187
|
-
"description": @description,
|
|
188
|
-
"enabled": @enabled,
|
|
189
|
-
"meta": @meta,
|
|
190
|
-
"name": @name,
|
|
191
|
-
"policy": @policy,
|
|
192
|
-
"type": @type,
|
|
193
|
-
}.to_json(options)
|
|
194
|
-
end
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
##
|
|
199
|
-
# Initialize the ToolList
|
|
200
|
-
# @param [Version] version Version that contains the resource
|
|
201
|
-
# @return [ToolList] ToolList
|
|
202
|
-
def initialize(version)
|
|
203
|
-
super(version)
|
|
204
|
-
|
|
205
|
-
# Path Solution
|
|
206
|
-
@solution = { }
|
|
207
|
-
@uri = "/Tools"
|
|
208
|
-
|
|
209
|
-
end
|
|
210
|
-
##
|
|
211
|
-
# Create the ToolInstance
|
|
212
|
-
# @param [AssistantsV1ServiceCreateToolRequest] assistants_v1_service_create_tool_request
|
|
213
|
-
# @return [ToolInstance] Created ToolInstance
|
|
214
|
-
def create(assistants_v1_service_create_tool_request: nil
|
|
215
|
-
)
|
|
216
|
-
|
|
217
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
218
|
-
headers['Content-Type'] = 'application/json'
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
payload = @version.create('POST', @uri, headers: headers, data: assistants_v1_service_create_tool_request.to_json)
|
|
224
|
-
ToolInstance.new(
|
|
225
|
-
@version,
|
|
226
|
-
payload,
|
|
227
|
-
)
|
|
228
|
-
end
|
|
229
|
-
|
|
230
|
-
##
|
|
231
|
-
# Create the ToolInstanceMetadata
|
|
232
|
-
# @param [AssistantsV1ServiceCreateToolRequest] assistants_v1_service_create_tool_request
|
|
233
|
-
# @return [ToolInstance] Created ToolInstance
|
|
234
|
-
def create_with_metadata(assistants_v1_service_create_tool_request: nil
|
|
235
|
-
)
|
|
236
|
-
|
|
237
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
238
|
-
headers['Content-Type'] = 'application/json'
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
response = @version.create_with_metadata('POST', @uri, headers: headers, data: assistants_v1_service_create_tool_request.to_json)
|
|
244
|
-
tool_instance = ToolInstance.new(
|
|
245
|
-
@version,
|
|
246
|
-
response.body,
|
|
247
|
-
)
|
|
248
|
-
ToolInstanceMetadata.new(
|
|
249
|
-
@version,
|
|
250
|
-
tool_instance,
|
|
251
|
-
response.headers,
|
|
252
|
-
response.status_code
|
|
253
|
-
)
|
|
254
|
-
end
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
##
|
|
258
|
-
# Lists ToolInstance records from the API as a list.
|
|
259
|
-
# Unlike stream(), this operation is eager and will load `limit` records into
|
|
260
|
-
# memory before returning.
|
|
261
|
-
# @param [String] assistant_id
|
|
262
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
263
|
-
# guarantees to never return more than limit. Default is no limit
|
|
264
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
|
265
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
|
266
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
267
|
-
# efficient page size, i.e. min(limit, 1000)
|
|
268
|
-
# @return [Array] Array of up to limit results
|
|
269
|
-
def list(assistant_id: :unset, limit: nil, page_size: nil)
|
|
270
|
-
self.stream(
|
|
271
|
-
assistant_id: assistant_id,
|
|
272
|
-
limit: limit,
|
|
273
|
-
page_size: page_size
|
|
274
|
-
).entries
|
|
275
|
-
end
|
|
276
|
-
|
|
277
|
-
##
|
|
278
|
-
# Streams Instance records from the API as an Enumerable.
|
|
279
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
|
280
|
-
# is reached.
|
|
281
|
-
# @param [String] assistant_id
|
|
282
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
283
|
-
# guarantees to never return more than limit. Default is no limit
|
|
284
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
|
285
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
|
286
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
287
|
-
# efficient page size, i.e. min(limit, 1000)
|
|
288
|
-
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
289
|
-
def stream(assistant_id: :unset, limit: nil, page_size: nil)
|
|
290
|
-
limits = @version.read_limits(limit, page_size)
|
|
291
|
-
|
|
292
|
-
page = self.page(
|
|
293
|
-
assistant_id: assistant_id,
|
|
294
|
-
page_size: limits[:page_size], )
|
|
295
|
-
|
|
296
|
-
return [].each if page.nil?
|
|
297
|
-
|
|
298
|
-
result = @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
|
299
|
-
return [].each if result.nil?
|
|
300
|
-
result
|
|
301
|
-
end
|
|
302
|
-
|
|
303
|
-
##
|
|
304
|
-
# Lists ToolPageMetadata records from the API as a list.
|
|
305
|
-
# @param [String] assistant_id
|
|
306
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
307
|
-
# guarantees to never return more than limit. Default is no limit
|
|
308
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
|
309
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
|
310
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
311
|
-
# efficient page size, i.e. min(limit, 1000)
|
|
312
|
-
# @return [Array] Array of up to limit results
|
|
313
|
-
def list_with_metadata(assistant_id: :unset, limit: nil, page_size: nil)
|
|
314
|
-
limits = @version.read_limits(limit, page_size)
|
|
315
|
-
params = Twilio::Values.of({
|
|
316
|
-
'AssistantId' => assistant_id,
|
|
317
|
-
|
|
318
|
-
'PageSize' => limits[:page_size],
|
|
319
|
-
});
|
|
320
|
-
headers = Twilio::Values.of({})
|
|
321
|
-
|
|
322
|
-
response = @version.page('GET', @uri, params: params, headers: headers)
|
|
323
|
-
|
|
324
|
-
ToolPageMetadata.new(@version, response, @solution, limits[:limit])
|
|
325
|
-
end
|
|
326
|
-
|
|
327
|
-
##
|
|
328
|
-
# When passed a block, yields ToolInstance records from the API.
|
|
329
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
|
330
|
-
# is reached.
|
|
331
|
-
def each
|
|
332
|
-
limits = @version.read_limits
|
|
333
|
-
|
|
334
|
-
page = self.page(page_size: limits[:page_size], )
|
|
335
|
-
|
|
336
|
-
return [].each if page.nil?
|
|
337
|
-
|
|
338
|
-
result = @version.stream(page,
|
|
339
|
-
limit: limits[:limit],
|
|
340
|
-
page_limit: limits[:page_limit])
|
|
341
|
-
return [].each if result.nil?
|
|
342
|
-
result.each {|x| yield x}
|
|
343
|
-
end
|
|
344
|
-
|
|
345
|
-
##
|
|
346
|
-
# Retrieve a single page of ToolInstance records from the API.
|
|
347
|
-
# Request is executed immediately.
|
|
348
|
-
# @param [String] assistant_id
|
|
349
|
-
# @param [String] page_token PageToken provided by the API
|
|
350
|
-
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
351
|
-
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
352
|
-
# @return [Page] Page of ToolInstance
|
|
353
|
-
def page(assistant_id: :unset, page_token: :unset, page_number: :unset,page_size: :unset)
|
|
354
|
-
params = Twilio::Values.of({
|
|
355
|
-
'AssistantId' => assistant_id,
|
|
356
|
-
'PageToken' => page_token,
|
|
357
|
-
'Page' => page_number,
|
|
358
|
-
'PageSize' => page_size,
|
|
359
|
-
})
|
|
360
|
-
headers = Twilio::Values.of({})
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
response = @version.page('GET', @uri, params: params, headers: headers)
|
|
365
|
-
|
|
366
|
-
ToolPage.new(@version, response, @solution)
|
|
367
|
-
end
|
|
368
|
-
|
|
369
|
-
##
|
|
370
|
-
# Retrieve a single page of ToolInstance records from the API.
|
|
371
|
-
# Request is executed immediately.
|
|
372
|
-
# @param [String] target_url API-generated URL for the requested results page
|
|
373
|
-
# @return [Page] Page of ToolInstance
|
|
374
|
-
def get_page(target_url)
|
|
375
|
-
response = @version.domain.request(
|
|
376
|
-
'GET',
|
|
377
|
-
target_url
|
|
378
|
-
)
|
|
379
|
-
ToolPage.new(@version, response, @solution)
|
|
380
|
-
end
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
# Provide a user friendly representation
|
|
385
|
-
def to_s
|
|
386
|
-
'#<Twilio.Assistants.V1.ToolList>'
|
|
387
|
-
end
|
|
388
|
-
end
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
class ToolContext < InstanceContext
|
|
392
|
-
##
|
|
393
|
-
# Initialize the ToolContext
|
|
394
|
-
# @param [Version] version Version that contains the resource
|
|
395
|
-
# @param [String] id
|
|
396
|
-
# @return [ToolContext] ToolContext
|
|
397
|
-
def initialize(version, id)
|
|
398
|
-
super(version)
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
# Path Solution
|
|
402
|
-
@solution = { id: id, }
|
|
403
|
-
@uri = "/Tools/#{@solution[:id]}"
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
end
|
|
407
|
-
##
|
|
408
|
-
# Delete the ToolInstance
|
|
409
|
-
# @return [Boolean] True if delete succeeds, false otherwise
|
|
410
|
-
def delete
|
|
411
|
-
|
|
412
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
@version.delete('DELETE', @uri, headers: headers)
|
|
418
|
-
end
|
|
419
|
-
|
|
420
|
-
##
|
|
421
|
-
# Delete the ToolInstanceMetadata
|
|
422
|
-
# @return [Boolean] True if delete succeeds, false otherwise
|
|
423
|
-
def delete_with_metadata
|
|
424
|
-
|
|
425
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
response = @version.delete_with_metadata('DELETE', @uri, headers: headers)
|
|
430
|
-
tool_instance = ToolInstance.new(
|
|
431
|
-
@version,
|
|
432
|
-
response.body,
|
|
433
|
-
account_sid: @solution[:account_sid],
|
|
434
|
-
sid: @solution[:sid],
|
|
435
|
-
)
|
|
436
|
-
ToolInstanceMetadata.new(@version, tool_instance, response.headers, response.status_code)
|
|
437
|
-
end
|
|
438
|
-
|
|
439
|
-
##
|
|
440
|
-
# Fetch the ToolInstance
|
|
441
|
-
# @return [ToolInstance] Fetched ToolInstance
|
|
442
|
-
def fetch
|
|
443
|
-
|
|
444
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
payload = @version.fetch('GET', @uri, headers: headers)
|
|
451
|
-
ToolInstance.new(
|
|
452
|
-
@version,
|
|
453
|
-
payload,
|
|
454
|
-
id: @solution[:id],
|
|
455
|
-
)
|
|
456
|
-
end
|
|
457
|
-
|
|
458
|
-
##
|
|
459
|
-
# Fetch the ToolInstanceMetadata
|
|
460
|
-
# @return [ToolInstance] Fetched ToolInstance
|
|
461
|
-
def fetch_with_metadata
|
|
462
|
-
|
|
463
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
response = @version.fetch_with_metadata('GET', @uri, headers: headers)
|
|
470
|
-
tool_instance = ToolInstance.new(
|
|
471
|
-
@version,
|
|
472
|
-
response.body,
|
|
473
|
-
id: @solution[:id],
|
|
474
|
-
)
|
|
475
|
-
ToolInstanceMetadata.new(
|
|
476
|
-
@version,
|
|
477
|
-
tool_instance,
|
|
478
|
-
response.headers,
|
|
479
|
-
response.status_code
|
|
480
|
-
)
|
|
481
|
-
end
|
|
482
|
-
|
|
483
|
-
##
|
|
484
|
-
# Update the ToolInstance
|
|
485
|
-
# @param [AssistantsV1ServiceUpdateToolRequest] assistants_v1_service_update_tool_request
|
|
486
|
-
# @return [ToolInstance] Updated ToolInstance
|
|
487
|
-
def update(assistants_v1_service_update_tool_request: :unset
|
|
488
|
-
)
|
|
489
|
-
|
|
490
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
491
|
-
headers['Content-Type'] = 'application/json'
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
payload = @version.update('PUT', @uri, headers: headers, data: assistants_v1_service_update_tool_request.to_json)
|
|
497
|
-
ToolInstance.new(
|
|
498
|
-
@version,
|
|
499
|
-
payload,
|
|
500
|
-
id: @solution[:id],
|
|
501
|
-
)
|
|
502
|
-
end
|
|
503
|
-
|
|
504
|
-
##
|
|
505
|
-
# Update the ToolInstanceMetadata
|
|
506
|
-
# @param [AssistantsV1ServiceUpdateToolRequest] assistants_v1_service_update_tool_request
|
|
507
|
-
# @return [ToolInstance] Updated ToolInstance
|
|
508
|
-
def update_with_metadata(assistants_v1_service_update_tool_request: :unset
|
|
509
|
-
)
|
|
510
|
-
|
|
511
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
512
|
-
headers['Content-Type'] = 'application/json'
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
response = @version.update_with_metadata('PUT', @uri, headers: headers, data: assistants_v1_service_update_tool_request.to_json)
|
|
518
|
-
tool_instance = ToolInstance.new(
|
|
519
|
-
@version,
|
|
520
|
-
response.body,
|
|
521
|
-
id: @solution[:id],
|
|
522
|
-
)
|
|
523
|
-
ToolInstanceMetadata.new(
|
|
524
|
-
@version,
|
|
525
|
-
tool_instance,
|
|
526
|
-
response.headers,
|
|
527
|
-
response.status_code
|
|
528
|
-
)
|
|
529
|
-
end
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
##
|
|
533
|
-
# Provide a user friendly representation
|
|
534
|
-
def to_s
|
|
535
|
-
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
|
536
|
-
"#<Twilio.Assistants.V1.ToolContext #{context}>"
|
|
537
|
-
end
|
|
538
|
-
|
|
539
|
-
##
|
|
540
|
-
# Provide a detailed, user friendly representation
|
|
541
|
-
def inspect
|
|
542
|
-
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
|
543
|
-
"#<Twilio.Assistants.V1.ToolContext #{context}>"
|
|
544
|
-
end
|
|
545
|
-
end
|
|
546
|
-
|
|
547
|
-
class ToolInstanceMetadata < InstanceResourceMetadata
|
|
548
|
-
##
|
|
549
|
-
# Initializes a new ToolInstanceMetadata.
|
|
550
|
-
# @param [Version] version Version that contains the resource
|
|
551
|
-
# @param [}ToolInstance] tool_instance The instance associated with the metadata.
|
|
552
|
-
# @param [Hash] headers Header object with response headers.
|
|
553
|
-
# @param [Integer] status_code The HTTP status code of the response.
|
|
554
|
-
# @return [ToolInstanceMetadata] The initialized instance with metadata.
|
|
555
|
-
def initialize(version, tool_instance, headers, status_code)
|
|
556
|
-
super(version, headers, status_code)
|
|
557
|
-
@tool_instance = tool_instance
|
|
558
|
-
end
|
|
559
|
-
|
|
560
|
-
def tool
|
|
561
|
-
@tool_instance
|
|
562
|
-
end
|
|
563
|
-
|
|
564
|
-
def headers
|
|
565
|
-
@headers
|
|
566
|
-
end
|
|
567
|
-
|
|
568
|
-
def status_code
|
|
569
|
-
@status_code
|
|
570
|
-
end
|
|
571
|
-
|
|
572
|
-
def to_s
|
|
573
|
-
"<Twilio.Api.V2010.ToolInstanceMetadata status=#{@status_code}>"
|
|
574
|
-
end
|
|
575
|
-
end
|
|
576
|
-
|
|
577
|
-
class ToolListResponse < InstanceListResource
|
|
578
|
-
# @param [Array<ToolInstance>] instance
|
|
579
|
-
# @param [Hash{String => Object}] headers
|
|
580
|
-
# @param [Integer] status_code
|
|
581
|
-
def initialize(version, payload, key)
|
|
582
|
-
@tool_instance = payload.body[key].map do |data|
|
|
583
|
-
ToolInstance.new(version, data)
|
|
584
|
-
end
|
|
585
|
-
@headers = payload.headers
|
|
586
|
-
@status_code = payload.status_code
|
|
587
|
-
end
|
|
588
|
-
|
|
589
|
-
def tool_instance
|
|
590
|
-
@instance
|
|
591
|
-
end
|
|
592
|
-
end
|
|
593
|
-
|
|
594
|
-
class ToolPage < Page
|
|
595
|
-
##
|
|
596
|
-
# Initialize the ToolPage
|
|
597
|
-
# @param [Version] version Version that contains the resource
|
|
598
|
-
# @param [Response] response Response from the API
|
|
599
|
-
# @param [Hash] solution Path solution for the resource
|
|
600
|
-
# @return [ToolPage] ToolPage
|
|
601
|
-
def initialize(version, response, solution)
|
|
602
|
-
super(version, response)
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
# Path Solution
|
|
606
|
-
@solution = solution
|
|
607
|
-
end
|
|
608
|
-
|
|
609
|
-
##
|
|
610
|
-
# Build an instance of ToolInstance
|
|
611
|
-
# @param [Hash] payload Payload response from the API
|
|
612
|
-
# @return [ToolInstance] ToolInstance
|
|
613
|
-
def get_instance(payload)
|
|
614
|
-
ToolInstance.new(@version, payload)
|
|
615
|
-
end
|
|
616
|
-
|
|
617
|
-
##
|
|
618
|
-
# Provide a user friendly representation
|
|
619
|
-
def to_s
|
|
620
|
-
'<Twilio.Assistants.V1.ToolPage>'
|
|
621
|
-
end
|
|
622
|
-
end
|
|
623
|
-
|
|
624
|
-
class ToolPageMetadata < PageMetadata
|
|
625
|
-
attr_reader :tool_page
|
|
626
|
-
|
|
627
|
-
def initialize(version, response, solution, limit)
|
|
628
|
-
super(version, response)
|
|
629
|
-
@tool_page = []
|
|
630
|
-
@limit = limit
|
|
631
|
-
key = get_key(response.body)
|
|
632
|
-
records = 0
|
|
633
|
-
while( limit != :unset && records < limit )
|
|
634
|
-
@tool_page << ToolListResponse.new(version, @payload, key, limit - records)
|
|
635
|
-
@payload = self.next_page
|
|
636
|
-
break unless @payload
|
|
637
|
-
records += (@payload.body[key] || []).size
|
|
638
|
-
end
|
|
639
|
-
# Path Solution
|
|
640
|
-
@solution = solution
|
|
641
|
-
end
|
|
642
|
-
|
|
643
|
-
def each
|
|
644
|
-
@tool_page.each do |record|
|
|
645
|
-
yield record
|
|
646
|
-
end
|
|
647
|
-
end
|
|
648
|
-
|
|
649
|
-
def to_s
|
|
650
|
-
'<Twilio::REST::Assistants::V1PageMetadata>';
|
|
651
|
-
end
|
|
652
|
-
end
|
|
653
|
-
class ToolListResponse < InstanceListResource
|
|
654
|
-
|
|
655
|
-
# @param [Array<ToolInstance>] instance
|
|
656
|
-
# @param [Hash{String => Object}] headers
|
|
657
|
-
# @param [Integer] status_code
|
|
658
|
-
def initialize(version, payload, key, limit = :unset)
|
|
659
|
-
data_list = payload.body[key] || []
|
|
660
|
-
if limit != :unset
|
|
661
|
-
data_list = data_list[0, limit]
|
|
662
|
-
end
|
|
663
|
-
@tool = data_list.map do |data|
|
|
664
|
-
ToolInstance.new(version, data)
|
|
665
|
-
end
|
|
666
|
-
@headers = payload.headers
|
|
667
|
-
@status_code = payload.status_code
|
|
668
|
-
end
|
|
669
|
-
|
|
670
|
-
def tool
|
|
671
|
-
@tool
|
|
672
|
-
end
|
|
673
|
-
|
|
674
|
-
def headers
|
|
675
|
-
@headers
|
|
676
|
-
end
|
|
677
|
-
|
|
678
|
-
def status_code
|
|
679
|
-
@status_code
|
|
680
|
-
end
|
|
681
|
-
end
|
|
682
|
-
|
|
683
|
-
class ToolInstance < InstanceResource
|
|
684
|
-
##
|
|
685
|
-
# Initialize the ToolInstance
|
|
686
|
-
# @param [Version] version Version that contains the resource
|
|
687
|
-
# @param [Hash] payload payload that contains response from Twilio
|
|
688
|
-
# @param [String] account_sid The SID of the
|
|
689
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Tool
|
|
690
|
-
# resource.
|
|
691
|
-
# @param [String] sid The SID of the Call resource to fetch.
|
|
692
|
-
# @return [ToolInstance] ToolInstance
|
|
693
|
-
def initialize(version, payload , id: nil)
|
|
694
|
-
super(version)
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
# Marshaled Properties
|
|
698
|
-
@properties = {
|
|
699
|
-
'account_sid' => payload['account_sid'],
|
|
700
|
-
'description' => payload['description'],
|
|
701
|
-
'enabled' => payload['enabled'],
|
|
702
|
-
'id' => payload['id'],
|
|
703
|
-
'meta' => payload['meta'],
|
|
704
|
-
'name' => payload['name'],
|
|
705
|
-
'requires_auth' => payload['requires_auth'],
|
|
706
|
-
'type' => payload['type'],
|
|
707
|
-
'url' => payload['url'],
|
|
708
|
-
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
709
|
-
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
710
|
-
'policies' => payload['policies'],
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
# Context
|
|
714
|
-
@instance_context = nil
|
|
715
|
-
@params = { 'id' => id || @properties['id'] , }
|
|
716
|
-
end
|
|
717
|
-
|
|
718
|
-
##
|
|
719
|
-
# Generate an instance context for the instance, the context is capable of
|
|
720
|
-
# performing various actions. All instance actions are proxied to the context
|
|
721
|
-
# @return [ToolContext] CallContext for this CallInstance
|
|
722
|
-
def context
|
|
723
|
-
unless @instance_context
|
|
724
|
-
@instance_context = ToolContext.new(@version , @params['id'])
|
|
725
|
-
end
|
|
726
|
-
@instance_context
|
|
727
|
-
end
|
|
728
|
-
|
|
729
|
-
##
|
|
730
|
-
# @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Tool resource.
|
|
731
|
-
def account_sid
|
|
732
|
-
@properties['account_sid']
|
|
733
|
-
end
|
|
734
|
-
|
|
735
|
-
##
|
|
736
|
-
# @return [String] The description of the tool.
|
|
737
|
-
def description
|
|
738
|
-
@properties['description']
|
|
739
|
-
end
|
|
740
|
-
|
|
741
|
-
##
|
|
742
|
-
# @return [Boolean] True if the tool is enabled.
|
|
743
|
-
def enabled
|
|
744
|
-
@properties['enabled']
|
|
745
|
-
end
|
|
746
|
-
|
|
747
|
-
##
|
|
748
|
-
# @return [String] The tool ID.
|
|
749
|
-
def id
|
|
750
|
-
@properties['id']
|
|
751
|
-
end
|
|
752
|
-
|
|
753
|
-
##
|
|
754
|
-
# @return [Hash] The metadata related to method, url, input_schema to used with the Tool.
|
|
755
|
-
def meta
|
|
756
|
-
@properties['meta']
|
|
757
|
-
end
|
|
758
|
-
|
|
759
|
-
##
|
|
760
|
-
# @return [String] The name of the tool.
|
|
761
|
-
def name
|
|
762
|
-
@properties['name']
|
|
763
|
-
end
|
|
764
|
-
|
|
765
|
-
##
|
|
766
|
-
# @return [Boolean] The authentication requirement for the tool.
|
|
767
|
-
def requires_auth
|
|
768
|
-
@properties['requires_auth']
|
|
769
|
-
end
|
|
770
|
-
|
|
771
|
-
##
|
|
772
|
-
# @return [String] The type of the tool. ('WEBHOOK')
|
|
773
|
-
def type
|
|
774
|
-
@properties['type']
|
|
775
|
-
end
|
|
776
|
-
|
|
777
|
-
##
|
|
778
|
-
# @return [String] The url of the tool resource.
|
|
779
|
-
def url
|
|
780
|
-
@properties['url']
|
|
781
|
-
end
|
|
782
|
-
|
|
783
|
-
##
|
|
784
|
-
# @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.
|
|
785
|
-
def date_created
|
|
786
|
-
@properties['date_created']
|
|
787
|
-
end
|
|
788
|
-
|
|
789
|
-
##
|
|
790
|
-
# @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.
|
|
791
|
-
def date_updated
|
|
792
|
-
@properties['date_updated']
|
|
793
|
-
end
|
|
794
|
-
|
|
795
|
-
##
|
|
796
|
-
# @return [Array<AssistantsV1ServicePolicy>] The Policies associated with the tool.
|
|
797
|
-
def policies
|
|
798
|
-
@properties['policies']
|
|
799
|
-
end
|
|
800
|
-
|
|
801
|
-
##
|
|
802
|
-
# Delete the ToolInstance
|
|
803
|
-
# @return [Boolean] True if delete succeeds, false otherwise
|
|
804
|
-
def delete
|
|
805
|
-
|
|
806
|
-
context.delete
|
|
807
|
-
end
|
|
808
|
-
|
|
809
|
-
##
|
|
810
|
-
# Fetch the ToolInstance
|
|
811
|
-
# @return [ToolInstance] Fetched ToolInstance
|
|
812
|
-
def fetch
|
|
813
|
-
|
|
814
|
-
context.fetch
|
|
815
|
-
end
|
|
816
|
-
|
|
817
|
-
##
|
|
818
|
-
# Update the ToolInstance
|
|
819
|
-
# @param [AssistantsV1ServiceUpdateToolRequest] assistants_v1_service_update_tool_request
|
|
820
|
-
# @return [ToolInstance] Updated ToolInstance
|
|
821
|
-
def update(assistants_v1_service_update_tool_request: :unset
|
|
822
|
-
)
|
|
823
|
-
|
|
824
|
-
context.update(
|
|
825
|
-
assistants_v1_service_update_tool_request: assistants_v1_service_update_tool_request,
|
|
826
|
-
)
|
|
827
|
-
end
|
|
828
|
-
|
|
829
|
-
##
|
|
830
|
-
# Provide a user friendly representation
|
|
831
|
-
def to_s
|
|
832
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
833
|
-
"<Twilio.Assistants.V1.ToolInstance #{values}>"
|
|
834
|
-
end
|
|
835
|
-
|
|
836
|
-
##
|
|
837
|
-
# Provide a detailed, user friendly representation
|
|
838
|
-
def inspect
|
|
839
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
840
|
-
"<Twilio.Assistants.V1.ToolInstance #{values}>"
|
|
841
|
-
end
|
|
842
|
-
end
|
|
843
|
-
|
|
844
|
-
end
|
|
845
|
-
end
|
|
846
|
-
end
|
|
847
|
-
end
|