twilio-ruby 7.2.1 → 7.3.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 +74 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +5 -599
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +200 -0
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +22 -1
- data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +303 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +626 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +229 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +593 -0
- data/lib/twilio-ruby/rest/assistants/v1/policy.rb +264 -0
- data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +264 -0
- data/lib/twilio-ruby/rest/assistants/v1/session.rb +328 -0
- data/lib/twilio-ruby/rest/assistants/v1/tool.rb +549 -0
- data/lib/twilio-ruby/rest/assistants/v1.rb +100 -0
- data/lib/twilio-ruby/rest/{preview_iam.rb → assistants.rb} +1 -1
- data/lib/twilio-ruby/rest/assistants_base.rb +38 -0
- data/lib/twilio-ruby/rest/client.rb +8 -3
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +11 -11
- data/lib/twilio-ruby/rest/content/v1/content.rb +167 -4
- data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +81 -1
- data/lib/twilio-ruby/rest/iam/v1/api_key.rb +270 -0
- data/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb +223 -0
- data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +177 -0
- data/lib/twilio-ruby/rest/iam/v1.rb +61 -0
- data/lib/twilio-ruby/rest/iam.rb +6 -0
- data/lib/twilio-ruby/rest/{preview_iam_base.rb → iam_base.rb} +10 -5
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +60 -12
- data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +1 -1
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb +16 -3
- data/lib/twilio-ruby/rest/intelligence/v2.rb +1 -1
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +16 -29
- data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +46 -20
- data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +199 -0
- data/lib/twilio-ruby/rest/marketplace/v1.rb +7 -1
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +4 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +40 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +10 -10
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +24 -17
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +7 -7
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_fetch.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb +96 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +2 -2
- data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +277 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +8 -5
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +7 -0
- data/lib/twilio-ruby/rest/numbers/v2.rb +15 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +2 -2
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +12 -3
- data/lib/twilio-ruby/rest/verify/v2/service.rb +4 -4
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +2 -1
- metadata +23 -4
@@ -0,0 +1,229 @@
|
|
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 Knowledge < InstanceContext
|
21
|
+
|
22
|
+
class ChunkList < ListResource
|
23
|
+
|
24
|
+
##
|
25
|
+
# Initialize the ChunkList
|
26
|
+
# @param [Version] version Version that contains the resource
|
27
|
+
# @return [ChunkList] ChunkList
|
28
|
+
def initialize(version, id: nil)
|
29
|
+
super(version)
|
30
|
+
# Path Solution
|
31
|
+
@solution = { id: id }
|
32
|
+
@uri = "/Knowledge/#{@solution[:id]}/Chunks"
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# Lists ChunkInstance records from the API as a list.
|
38
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
39
|
+
# memory before returning.
|
40
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
41
|
+
# guarantees to never return more than limit. Default is no limit
|
42
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
43
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
44
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
45
|
+
# efficient page size, i.e. min(limit, 1000)
|
46
|
+
# @return [Array] Array of up to limit results
|
47
|
+
def list(limit: nil, page_size: nil)
|
48
|
+
self.stream(
|
49
|
+
limit: limit,
|
50
|
+
page_size: page_size
|
51
|
+
).entries
|
52
|
+
end
|
53
|
+
|
54
|
+
##
|
55
|
+
# Streams Instance records from the API as an Enumerable.
|
56
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
57
|
+
# is reached.
|
58
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
59
|
+
# guarantees to never return more than limit. Default is no limit
|
60
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
61
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
62
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
63
|
+
# efficient page size, i.e. min(limit, 1000)
|
64
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
65
|
+
def stream(limit: nil, page_size: nil)
|
66
|
+
limits = @version.read_limits(limit, page_size)
|
67
|
+
|
68
|
+
page = self.page(
|
69
|
+
page_size: limits[:page_size], )
|
70
|
+
|
71
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# When passed a block, yields ChunkInstance records from the API.
|
76
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
77
|
+
# is reached.
|
78
|
+
def each
|
79
|
+
limits = @version.read_limits
|
80
|
+
|
81
|
+
page = self.page(page_size: limits[:page_size], )
|
82
|
+
|
83
|
+
@version.stream(page,
|
84
|
+
limit: limits[:limit],
|
85
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
86
|
+
end
|
87
|
+
|
88
|
+
##
|
89
|
+
# Retrieve a single page of ChunkInstance records from the API.
|
90
|
+
# Request is executed immediately.
|
91
|
+
# @param [String] page_token PageToken provided by the API
|
92
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
93
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
94
|
+
# @return [Page] Page of ChunkInstance
|
95
|
+
def page(page_token: :unset, page_number: :unset, page_size: :unset)
|
96
|
+
params = Twilio::Values.of({
|
97
|
+
'PageToken' => page_token,
|
98
|
+
'Page' => page_number,
|
99
|
+
'PageSize' => page_size,
|
100
|
+
})
|
101
|
+
|
102
|
+
response = @version.page('GET', @uri, params: params)
|
103
|
+
|
104
|
+
ChunkPage.new(@version, response, @solution)
|
105
|
+
end
|
106
|
+
|
107
|
+
##
|
108
|
+
# Retrieve a single page of ChunkInstance records from the API.
|
109
|
+
# Request is executed immediately.
|
110
|
+
# @param [String] target_url API-generated URL for the requested results page
|
111
|
+
# @return [Page] Page of ChunkInstance
|
112
|
+
def get_page(target_url)
|
113
|
+
response = @version.domain.request(
|
114
|
+
'GET',
|
115
|
+
target_url
|
116
|
+
)
|
117
|
+
ChunkPage.new(@version, response, @solution)
|
118
|
+
end
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
# Provide a user friendly representation
|
123
|
+
def to_s
|
124
|
+
'#<Twilio.Assistants.V1.ChunkList>'
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
class ChunkPage < Page
|
129
|
+
##
|
130
|
+
# Initialize the ChunkPage
|
131
|
+
# @param [Version] version Version that contains the resource
|
132
|
+
# @param [Response] response Response from the API
|
133
|
+
# @param [Hash] solution Path solution for the resource
|
134
|
+
# @return [ChunkPage] ChunkPage
|
135
|
+
def initialize(version, response, solution)
|
136
|
+
super(version, response)
|
137
|
+
|
138
|
+
# Path Solution
|
139
|
+
@solution = solution
|
140
|
+
end
|
141
|
+
|
142
|
+
##
|
143
|
+
# Build an instance of ChunkInstance
|
144
|
+
# @param [Hash] payload Payload response from the API
|
145
|
+
# @return [ChunkInstance] ChunkInstance
|
146
|
+
def get_instance(payload)
|
147
|
+
ChunkInstance.new(@version, payload, id: @solution[:id])
|
148
|
+
end
|
149
|
+
|
150
|
+
##
|
151
|
+
# Provide a user friendly representation
|
152
|
+
def to_s
|
153
|
+
'<Twilio.Assistants.V1.ChunkPage>'
|
154
|
+
end
|
155
|
+
end
|
156
|
+
class ChunkInstance < InstanceResource
|
157
|
+
##
|
158
|
+
# Initialize the ChunkInstance
|
159
|
+
# @param [Version] version Version that contains the resource
|
160
|
+
# @param [Hash] payload payload that contains response from Twilio
|
161
|
+
# @param [String] account_sid The SID of the
|
162
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this Chunk
|
163
|
+
# resource.
|
164
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
165
|
+
# @return [ChunkInstance] ChunkInstance
|
166
|
+
def initialize(version, payload , id: nil)
|
167
|
+
super(version)
|
168
|
+
|
169
|
+
# Marshaled Properties
|
170
|
+
@properties = {
|
171
|
+
'account_sid' => payload['account_sid'],
|
172
|
+
'content' => payload['content'],
|
173
|
+
'metadata' => payload['metadata'],
|
174
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
175
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
176
|
+
}
|
177
|
+
end
|
178
|
+
|
179
|
+
|
180
|
+
##
|
181
|
+
# @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Knowledge resource.
|
182
|
+
def account_sid
|
183
|
+
@properties['account_sid']
|
184
|
+
end
|
185
|
+
|
186
|
+
##
|
187
|
+
# @return [String] The chunk content.
|
188
|
+
def content
|
189
|
+
@properties['content']
|
190
|
+
end
|
191
|
+
|
192
|
+
##
|
193
|
+
# @return [Hash] The metadata of the chunk.
|
194
|
+
def metadata
|
195
|
+
@properties['metadata']
|
196
|
+
end
|
197
|
+
|
198
|
+
##
|
199
|
+
# @return [Time] The date and time in GMT when the Chunk was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
200
|
+
def date_created
|
201
|
+
@properties['date_created']
|
202
|
+
end
|
203
|
+
|
204
|
+
##
|
205
|
+
# @return [Time] The date and time in GMT when the Chunk was updated specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
206
|
+
def date_updated
|
207
|
+
@properties['date_updated']
|
208
|
+
end
|
209
|
+
|
210
|
+
##
|
211
|
+
# Provide a user friendly representation
|
212
|
+
def to_s
|
213
|
+
"<Twilio.Assistants.V1.ChunkInstance>"
|
214
|
+
end
|
215
|
+
|
216
|
+
##
|
217
|
+
# Provide a detailed, user friendly representation
|
218
|
+
def inspect
|
219
|
+
"<Twilio.Assistants.V1.ChunkInstance>"
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
|