twilio-ruby 7.0.0.pre.rc.1 → 7.0.0.pre.rc.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/.github/workflows/test-and-deploy.yml +9 -9
- data/CHANGES.md +46 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +28 -37
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +27 -3
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +17 -5
- data/lib/twilio-ruby/rest/client.rb +5 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +60 -1
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +10 -5
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +11 -1
- data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +384 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +446 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +247 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +393 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +386 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +233 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +332 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +256 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +112 -30
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +6 -6
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +9 -2
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +11 -4
- data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +5 -3
- data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +5 -3
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +5 -3
- data/lib/twilio-ruby/rest/numbers/v1.rb +3 -3
- data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +5 -3
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +15 -3
- data/lib/twilio-ruby/rest/oauth/v1/authorize.rb +143 -0
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +175 -0
- data/lib/twilio-ruby/rest/oauth/v1.rb +46 -0
- data/lib/twilio-ruby/rest/oauth.rb +6 -0
- data/lib/twilio-ruby/rest/oauth_base.rb +38 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +5 -3
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +26 -2
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +9 -3
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +9 -3
- data/lib/twilio-ruby/twiml/messaging_response.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +15 -6
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +0 -267
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +0 -332
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversational_ai.rb +0 -274
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversational_ai_report_insights.rb +0 -253
@@ -37,15 +37,18 @@ module Twilio
|
|
37
37
|
# Create the InteractionChannelParticipantInstance
|
38
38
|
# @param [Type] type
|
39
39
|
# @param [Object] media_properties JSON representing the Media Properties for the new Participant.
|
40
|
+
# @param [Object] routing_properties Object representing the Routing Properties for the new Participant.
|
40
41
|
# @return [InteractionChannelParticipantInstance] Created InteractionChannelParticipantInstance
|
41
42
|
def create(
|
42
43
|
type: nil,
|
43
|
-
media_properties: nil
|
44
|
+
media_properties: nil,
|
45
|
+
routing_properties: :unset
|
44
46
|
)
|
45
47
|
|
46
48
|
data = Twilio::Values.of({
|
47
49
|
'Type' => type,
|
48
50
|
'MediaProperties' => Twilio.serialize_object(media_properties),
|
51
|
+
'RoutingProperties' => Twilio.serialize_object(routing_properties),
|
49
52
|
})
|
50
53
|
|
51
54
|
|
@@ -256,6 +259,7 @@ module Twilio
|
|
256
259
|
'interaction_sid' => payload['interaction_sid'],
|
257
260
|
'channel_sid' => payload['channel_sid'],
|
258
261
|
'url' => payload['url'],
|
262
|
+
'routing_properties' => payload['routing_properties'],
|
259
263
|
}
|
260
264
|
|
261
265
|
# Context
|
@@ -304,6 +308,12 @@ module Twilio
|
|
304
308
|
@properties['url']
|
305
309
|
end
|
306
310
|
|
311
|
+
##
|
312
|
+
# @return [Hash] The Participant's routing properties.
|
313
|
+
def routing_properties
|
314
|
+
@properties['routing_properties']
|
315
|
+
end
|
316
|
+
|
307
317
|
##
|
308
318
|
# Update the InteractionChannelParticipantInstance
|
309
319
|
# @param [Status] status
|
@@ -0,0 +1,384 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Flex
|
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 FlexApi < FlexApiBase
|
19
|
+
class V1 < Version
|
20
|
+
class PluginContext < InstanceContext
|
21
|
+
|
22
|
+
class PluginVersionsList < ListResource
|
23
|
+
|
24
|
+
##
|
25
|
+
# Initialize the PluginVersionsList
|
26
|
+
# @param [Version] version Version that contains the resource
|
27
|
+
# @return [PluginVersionsList] PluginVersionsList
|
28
|
+
def initialize(version, plugin_sid: nil)
|
29
|
+
super(version)
|
30
|
+
# Path Solution
|
31
|
+
@solution = { plugin_sid: plugin_sid }
|
32
|
+
@uri = "/PluginService/Plugins/#{@solution[:plugin_sid]}/Versions"
|
33
|
+
|
34
|
+
end
|
35
|
+
##
|
36
|
+
# Create the PluginVersionsInstance
|
37
|
+
# @param [String] version The Flex Plugin Version's version.
|
38
|
+
# @param [String] plugin_url The URL of the Flex Plugin Version bundle
|
39
|
+
# @param [String] changelog The changelog of the Flex Plugin Version.
|
40
|
+
# @param [Boolean] private Whether this Flex Plugin Version requires authorization.
|
41
|
+
# @param [String] flex_metadata The Flex-Metadata HTTP request header
|
42
|
+
# @return [PluginVersionsInstance] Created PluginVersionsInstance
|
43
|
+
def create(
|
44
|
+
version: nil,
|
45
|
+
plugin_url: nil,
|
46
|
+
changelog: :unset,
|
47
|
+
private: :unset,
|
48
|
+
flex_metadata: :unset
|
49
|
+
)
|
50
|
+
|
51
|
+
data = Twilio::Values.of({
|
52
|
+
'Version' => version,
|
53
|
+
'PluginUrl' => plugin_url,
|
54
|
+
'Changelog' => changelog,
|
55
|
+
'Private' => private,
|
56
|
+
})
|
57
|
+
|
58
|
+
|
59
|
+
headers = Twilio::Values.of({ 'Flex-Metadata' => flex_metadata, })
|
60
|
+
payload = @version.create('POST', @uri, data: data, headers: headers)
|
61
|
+
PluginVersionsInstance.new(
|
62
|
+
@version,
|
63
|
+
payload,
|
64
|
+
plugin_sid: @solution[:plugin_sid],
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
|
69
|
+
##
|
70
|
+
# Lists PluginVersionsInstance records from the API as a list.
|
71
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
72
|
+
# memory before returning.
|
73
|
+
# @param [String] flex_metadata The Flex-Metadata HTTP request header
|
74
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
75
|
+
# guarantees to never return more than limit. Default is no limit
|
76
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
77
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
78
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
79
|
+
# efficient page size, i.e. min(limit, 1000)
|
80
|
+
# @return [Array] Array of up to limit results
|
81
|
+
def list(flex_metadata: :unset, limit: nil, page_size: nil)
|
82
|
+
self.stream(
|
83
|
+
flex_metadata: flex_metadata,
|
84
|
+
limit: limit,
|
85
|
+
page_size: page_size
|
86
|
+
).entries
|
87
|
+
end
|
88
|
+
|
89
|
+
##
|
90
|
+
# Streams Instance records from the API as an Enumerable.
|
91
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
92
|
+
# is reached.
|
93
|
+
# @param [String] flex_metadata The Flex-Metadata HTTP request header
|
94
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
95
|
+
# guarantees to never return more than limit. Default is no limit
|
96
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
97
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
98
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
99
|
+
# efficient page size, i.e. min(limit, 1000)
|
100
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
101
|
+
def stream(flex_metadata: :unset, limit: nil, page_size: nil)
|
102
|
+
limits = @version.read_limits(limit, page_size)
|
103
|
+
|
104
|
+
page = self.page(
|
105
|
+
flex_metadata: flex_metadata,
|
106
|
+
page_size: limits[:page_size], )
|
107
|
+
|
108
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
109
|
+
end
|
110
|
+
|
111
|
+
##
|
112
|
+
# When passed a block, yields PluginVersionsInstance records from the API.
|
113
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
114
|
+
# is reached.
|
115
|
+
def each
|
116
|
+
limits = @version.read_limits
|
117
|
+
|
118
|
+
page = self.page(page_size: limits[:page_size], )
|
119
|
+
|
120
|
+
@version.stream(page,
|
121
|
+
limit: limits[:limit],
|
122
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
123
|
+
end
|
124
|
+
|
125
|
+
##
|
126
|
+
# Retrieve a single page of PluginVersionsInstance records from the API.
|
127
|
+
# Request is executed immediately.
|
128
|
+
# @param [String] flex_metadata The Flex-Metadata HTTP request header
|
129
|
+
# @param [String] page_token PageToken provided by the API
|
130
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
131
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
132
|
+
# @return [Page] Page of PluginVersionsInstance
|
133
|
+
def page(flex_metadata: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
134
|
+
params = Twilio::Values.of({
|
135
|
+
'Flex-Metadata' => flex_metadata,
|
136
|
+
'PageToken' => page_token,
|
137
|
+
'Page' => page_number,
|
138
|
+
'PageSize' => page_size,
|
139
|
+
})
|
140
|
+
|
141
|
+
response = @version.page('GET', @uri, params: params)
|
142
|
+
|
143
|
+
PluginVersionsPage.new(@version, response, @solution)
|
144
|
+
end
|
145
|
+
|
146
|
+
##
|
147
|
+
# Retrieve a single page of PluginVersionsInstance records from the API.
|
148
|
+
# Request is executed immediately.
|
149
|
+
# @param [String] target_url API-generated URL for the requested results page
|
150
|
+
# @return [Page] Page of PluginVersionsInstance
|
151
|
+
def get_page(target_url)
|
152
|
+
response = @version.domain.request(
|
153
|
+
'GET',
|
154
|
+
target_url
|
155
|
+
)
|
156
|
+
PluginVersionsPage.new(@version, response, @solution)
|
157
|
+
end
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
# Provide a user friendly representation
|
162
|
+
def to_s
|
163
|
+
'#<Twilio.FlexApi.V1.PluginVersionsList>'
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
|
168
|
+
class PluginVersionsContext < InstanceContext
|
169
|
+
##
|
170
|
+
# Initialize the PluginVersionsContext
|
171
|
+
# @param [Version] version Version that contains the resource
|
172
|
+
# @param [String] plugin_sid The SID of the Flex Plugin the resource to belongs to.
|
173
|
+
# @param [String] sid The SID of the Flex Plugin Version resource to fetch.
|
174
|
+
# @return [PluginVersionsContext] PluginVersionsContext
|
175
|
+
def initialize(version, plugin_sid, sid)
|
176
|
+
super(version)
|
177
|
+
|
178
|
+
# Path Solution
|
179
|
+
@solution = { plugin_sid: plugin_sid, sid: sid, }
|
180
|
+
@uri = "/PluginService/Plugins/#{@solution[:plugin_sid]}/Versions/#{@solution[:sid]}"
|
181
|
+
|
182
|
+
|
183
|
+
end
|
184
|
+
##
|
185
|
+
# Fetch the PluginVersionsInstance
|
186
|
+
# @param [String] flex_metadata The Flex-Metadata HTTP request header
|
187
|
+
# @return [PluginVersionsInstance] Fetched PluginVersionsInstance
|
188
|
+
def fetch(
|
189
|
+
flex_metadata: :unset
|
190
|
+
)
|
191
|
+
|
192
|
+
|
193
|
+
headers = Twilio::Values.of({ 'Flex-Metadata' => flex_metadata, })
|
194
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
195
|
+
PluginVersionsInstance.new(
|
196
|
+
@version,
|
197
|
+
payload,
|
198
|
+
plugin_sid: @solution[:plugin_sid],
|
199
|
+
sid: @solution[:sid],
|
200
|
+
)
|
201
|
+
end
|
202
|
+
|
203
|
+
|
204
|
+
##
|
205
|
+
# Provide a user friendly representation
|
206
|
+
def to_s
|
207
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
208
|
+
"#<Twilio.FlexApi.V1.PluginVersionsContext #{context}>"
|
209
|
+
end
|
210
|
+
|
211
|
+
##
|
212
|
+
# Provide a detailed, user friendly representation
|
213
|
+
def inspect
|
214
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
215
|
+
"#<Twilio.FlexApi.V1.PluginVersionsContext #{context}>"
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
class PluginVersionsPage < Page
|
220
|
+
##
|
221
|
+
# Initialize the PluginVersionsPage
|
222
|
+
# @param [Version] version Version that contains the resource
|
223
|
+
# @param [Response] response Response from the API
|
224
|
+
# @param [Hash] solution Path solution for the resource
|
225
|
+
# @return [PluginVersionsPage] PluginVersionsPage
|
226
|
+
def initialize(version, response, solution)
|
227
|
+
super(version, response)
|
228
|
+
|
229
|
+
# Path Solution
|
230
|
+
@solution = solution
|
231
|
+
end
|
232
|
+
|
233
|
+
##
|
234
|
+
# Build an instance of PluginVersionsInstance
|
235
|
+
# @param [Hash] payload Payload response from the API
|
236
|
+
# @return [PluginVersionsInstance] PluginVersionsInstance
|
237
|
+
def get_instance(payload)
|
238
|
+
PluginVersionsInstance.new(@version, payload, plugin_sid: @solution[:plugin_sid])
|
239
|
+
end
|
240
|
+
|
241
|
+
##
|
242
|
+
# Provide a user friendly representation
|
243
|
+
def to_s
|
244
|
+
'<Twilio.FlexApi.V1.PluginVersionsPage>'
|
245
|
+
end
|
246
|
+
end
|
247
|
+
class PluginVersionsInstance < InstanceResource
|
248
|
+
##
|
249
|
+
# Initialize the PluginVersionsInstance
|
250
|
+
# @param [Version] version Version that contains the resource
|
251
|
+
# @param [Hash] payload payload that contains response from Twilio
|
252
|
+
# @param [String] account_sid The SID of the
|
253
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this PluginVersions
|
254
|
+
# resource.
|
255
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
256
|
+
# @return [PluginVersionsInstance] PluginVersionsInstance
|
257
|
+
def initialize(version, payload , plugin_sid: nil, sid: nil)
|
258
|
+
super(version)
|
259
|
+
|
260
|
+
# Marshaled Properties
|
261
|
+
@properties = {
|
262
|
+
'sid' => payload['sid'],
|
263
|
+
'plugin_sid' => payload['plugin_sid'],
|
264
|
+
'account_sid' => payload['account_sid'],
|
265
|
+
'version' => payload['version'],
|
266
|
+
'plugin_url' => payload['plugin_url'],
|
267
|
+
'changelog' => payload['changelog'],
|
268
|
+
'private' => payload['private'],
|
269
|
+
'archived' => payload['archived'],
|
270
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
271
|
+
'url' => payload['url'],
|
272
|
+
}
|
273
|
+
|
274
|
+
# Context
|
275
|
+
@instance_context = nil
|
276
|
+
@params = { 'plugin_sid' => plugin_sid || @properties['plugin_sid'] ,'sid' => sid || @properties['sid'] , }
|
277
|
+
end
|
278
|
+
|
279
|
+
##
|
280
|
+
# Generate an instance context for the instance, the context is capable of
|
281
|
+
# performing various actions. All instance actions are proxied to the context
|
282
|
+
# @return [PluginVersionsContext] CallContext for this CallInstance
|
283
|
+
def context
|
284
|
+
unless @instance_context
|
285
|
+
@instance_context = PluginVersionsContext.new(@version , @params['plugin_sid'], @params['sid'])
|
286
|
+
end
|
287
|
+
@instance_context
|
288
|
+
end
|
289
|
+
|
290
|
+
##
|
291
|
+
# @return [String] The unique string that we created to identify the Flex Plugin Version resource.
|
292
|
+
def sid
|
293
|
+
@properties['sid']
|
294
|
+
end
|
295
|
+
|
296
|
+
##
|
297
|
+
# @return [String] The SID of the Flex Plugin resource this Flex Plugin Version belongs to.
|
298
|
+
def plugin_sid
|
299
|
+
@properties['plugin_sid']
|
300
|
+
end
|
301
|
+
|
302
|
+
##
|
303
|
+
# @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Flex Plugin Version resource and owns this resource.
|
304
|
+
def account_sid
|
305
|
+
@properties['account_sid']
|
306
|
+
end
|
307
|
+
|
308
|
+
##
|
309
|
+
# @return [String] The unique version of this Flex Plugin Version.
|
310
|
+
def version
|
311
|
+
@properties['version']
|
312
|
+
end
|
313
|
+
|
314
|
+
##
|
315
|
+
# @return [String] The URL of where the Flex Plugin Version JavaScript bundle is hosted on.
|
316
|
+
def plugin_url
|
317
|
+
@properties['plugin_url']
|
318
|
+
end
|
319
|
+
|
320
|
+
##
|
321
|
+
# @return [String] A changelog that describes the changes this Flex Plugin Version brings.
|
322
|
+
def changelog
|
323
|
+
@properties['changelog']
|
324
|
+
end
|
325
|
+
|
326
|
+
##
|
327
|
+
# @return [Boolean] Whether to inject credentials while accessing this Plugin Version. The default value is false.
|
328
|
+
def private
|
329
|
+
@properties['private']
|
330
|
+
end
|
331
|
+
|
332
|
+
##
|
333
|
+
# @return [Boolean] Whether the Flex Plugin Version is archived. The default value is false.
|
334
|
+
def archived
|
335
|
+
@properties['archived']
|
336
|
+
end
|
337
|
+
|
338
|
+
##
|
339
|
+
# @return [Time] The date and time in GMT when the Flex Plugin Version was created specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
340
|
+
def date_created
|
341
|
+
@properties['date_created']
|
342
|
+
end
|
343
|
+
|
344
|
+
##
|
345
|
+
# @return [String] The absolute URL of the Flex Plugin Version resource.
|
346
|
+
def url
|
347
|
+
@properties['url']
|
348
|
+
end
|
349
|
+
|
350
|
+
##
|
351
|
+
# Fetch the PluginVersionsInstance
|
352
|
+
# @param [String] flex_metadata The Flex-Metadata HTTP request header
|
353
|
+
# @return [PluginVersionsInstance] Fetched PluginVersionsInstance
|
354
|
+
def fetch(
|
355
|
+
flex_metadata: :unset
|
356
|
+
)
|
357
|
+
|
358
|
+
context.fetch(
|
359
|
+
flex_metadata: flex_metadata,
|
360
|
+
)
|
361
|
+
end
|
362
|
+
|
363
|
+
##
|
364
|
+
# Provide a user friendly representation
|
365
|
+
def to_s
|
366
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
367
|
+
"<Twilio.FlexApi.V1.PluginVersionsInstance #{values}>"
|
368
|
+
end
|
369
|
+
|
370
|
+
##
|
371
|
+
# Provide a detailed, user friendly representation
|
372
|
+
def inspect
|
373
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
374
|
+
"<Twilio.FlexApi.V1.PluginVersionsInstance #{values}>"
|
375
|
+
end
|
376
|
+
end
|
377
|
+
|
378
|
+
end
|
379
|
+
end
|
380
|
+
end
|
381
|
+
end
|
382
|
+
end
|
383
|
+
|
384
|
+
|