twilio-ruby 7.0.2 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +43 -0
- data/Gemfile +1 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +1 -1
- data/lib/twilio-ruby/rest/client.rb +0 -5
- data/lib/twilio-ruby/rest/content/v2/content.rb +259 -0
- data/lib/twilio-ruby/rest/content/v2/content_and_approvals.rb +252 -0
- data/lib/twilio-ruby/rest/content/v2.rb +46 -0
- data/lib/twilio-ruby/rest/content_base.rb +6 -1
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +8 -1
- data/lib/twilio-ruby/rest/intelligence/v2/custom_operator.rb +444 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator.rb +355 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +215 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +196 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +357 -0
- data/lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb +355 -0
- data/lib/twilio-ruby/rest/intelligence/v2/service.rb +9 -8
- data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +18 -18
- data/lib/twilio-ruby/rest/intelligence/v2.rb +112 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +0 -7
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +86 -1
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +126 -2
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +148 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +167 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_fetch.rb +160 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +29 -32
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +2 -2
- data/lib/twilio-ruby/rest/preview/sync/service.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +2 -2
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +3 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +33 -4
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +4 -1
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +7 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +7 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +14 -9
- data/lib/twilio-ruby/rest/numbers/v1/porting_bulk_portability.rb +0 -230
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_fetch.rb +0 -252
- data/lib/twilio-ruby/rest/preview_messaging/v1/broadcast.rb +0 -164
- data/lib/twilio-ruby/rest/preview_messaging/v1/message.rb +0 -235
- data/lib/twilio-ruby/rest/preview_messaging/v1.rb +0 -46
- data/lib/twilio-ruby/rest/preview_messaging.rb +0 -12
- data/lib/twilio-ruby/rest/preview_messaging_base.rb +0 -38
@@ -0,0 +1,355 @@
|
|
1
|
+
##
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Intelligence
|
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 Intelligence < IntelligenceBase
|
19
|
+
class V2 < Version
|
20
|
+
class PrebuiltOperatorList < ListResource
|
21
|
+
|
22
|
+
##
|
23
|
+
# Initialize the PrebuiltOperatorList
|
24
|
+
# @param [Version] version Version that contains the resource
|
25
|
+
# @return [PrebuiltOperatorList] PrebuiltOperatorList
|
26
|
+
def initialize(version)
|
27
|
+
super(version)
|
28
|
+
# Path Solution
|
29
|
+
@solution = { }
|
30
|
+
@uri = "/Operators/PreBuilt"
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# Lists PrebuiltOperatorInstance records from the API as a list.
|
36
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
37
|
+
# memory before returning.
|
38
|
+
# @param [Availability] availability Returns Pre-built Operators with the provided availability type. Possible values: internal, beta, public, retired.
|
39
|
+
# @param [String] language_code Returns Pre-built Operators that support the provided language code.
|
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(availability: :unset, language_code: :unset, limit: nil, page_size: nil)
|
48
|
+
self.stream(
|
49
|
+
availability: availability,
|
50
|
+
language_code: language_code,
|
51
|
+
limit: limit,
|
52
|
+
page_size: page_size
|
53
|
+
).entries
|
54
|
+
end
|
55
|
+
|
56
|
+
##
|
57
|
+
# Streams Instance records from the API as an Enumerable.
|
58
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
59
|
+
# is reached.
|
60
|
+
# @param [Availability] availability Returns Pre-built Operators with the provided availability type. Possible values: internal, beta, public, retired.
|
61
|
+
# @param [String] language_code Returns Pre-built Operators that support the provided language code.
|
62
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
63
|
+
# guarantees to never return more than limit. Default is no limit
|
64
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
65
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
66
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
67
|
+
# efficient page size, i.e. min(limit, 1000)
|
68
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
69
|
+
def stream(availability: :unset, language_code: :unset, limit: nil, page_size: nil)
|
70
|
+
limits = @version.read_limits(limit, page_size)
|
71
|
+
|
72
|
+
page = self.page(
|
73
|
+
availability: availability,
|
74
|
+
language_code: language_code,
|
75
|
+
page_size: limits[:page_size], )
|
76
|
+
|
77
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
78
|
+
end
|
79
|
+
|
80
|
+
##
|
81
|
+
# When passed a block, yields PrebuiltOperatorInstance records from the API.
|
82
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
83
|
+
# is reached.
|
84
|
+
def each
|
85
|
+
limits = @version.read_limits
|
86
|
+
|
87
|
+
page = self.page(page_size: limits[:page_size], )
|
88
|
+
|
89
|
+
@version.stream(page,
|
90
|
+
limit: limits[:limit],
|
91
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
92
|
+
end
|
93
|
+
|
94
|
+
##
|
95
|
+
# Retrieve a single page of PrebuiltOperatorInstance records from the API.
|
96
|
+
# Request is executed immediately.
|
97
|
+
# @param [Availability] availability Returns Pre-built Operators with the provided availability type. Possible values: internal, beta, public, retired.
|
98
|
+
# @param [String] language_code Returns Pre-built Operators that support the provided language code.
|
99
|
+
# @param [String] page_token PageToken provided by the API
|
100
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
101
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
102
|
+
# @return [Page] Page of PrebuiltOperatorInstance
|
103
|
+
def page(availability: :unset, language_code: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
104
|
+
params = Twilio::Values.of({
|
105
|
+
'Availability' => availability,
|
106
|
+
'LanguageCode' => language_code,
|
107
|
+
'PageToken' => page_token,
|
108
|
+
'Page' => page_number,
|
109
|
+
'PageSize' => page_size,
|
110
|
+
})
|
111
|
+
|
112
|
+
response = @version.page('GET', @uri, params: params)
|
113
|
+
|
114
|
+
PrebuiltOperatorPage.new(@version, response, @solution)
|
115
|
+
end
|
116
|
+
|
117
|
+
##
|
118
|
+
# Retrieve a single page of PrebuiltOperatorInstance records from the API.
|
119
|
+
# Request is executed immediately.
|
120
|
+
# @param [String] target_url API-generated URL for the requested results page
|
121
|
+
# @return [Page] Page of PrebuiltOperatorInstance
|
122
|
+
def get_page(target_url)
|
123
|
+
response = @version.domain.request(
|
124
|
+
'GET',
|
125
|
+
target_url
|
126
|
+
)
|
127
|
+
PrebuiltOperatorPage.new(@version, response, @solution)
|
128
|
+
end
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
# Provide a user friendly representation
|
133
|
+
def to_s
|
134
|
+
'#<Twilio.Intelligence.V2.PrebuiltOperatorList>'
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
|
139
|
+
class PrebuiltOperatorContext < InstanceContext
|
140
|
+
##
|
141
|
+
# Initialize the PrebuiltOperatorContext
|
142
|
+
# @param [Version] version Version that contains the resource
|
143
|
+
# @param [String] sid A 34 character string that uniquely identifies this Pre-built Operator.
|
144
|
+
# @return [PrebuiltOperatorContext] PrebuiltOperatorContext
|
145
|
+
def initialize(version, sid)
|
146
|
+
super(version)
|
147
|
+
|
148
|
+
# Path Solution
|
149
|
+
@solution = { sid: sid, }
|
150
|
+
@uri = "/Operators/PreBuilt/#{@solution[:sid]}"
|
151
|
+
|
152
|
+
|
153
|
+
end
|
154
|
+
##
|
155
|
+
# Fetch the PrebuiltOperatorInstance
|
156
|
+
# @return [PrebuiltOperatorInstance] Fetched PrebuiltOperatorInstance
|
157
|
+
def fetch
|
158
|
+
|
159
|
+
|
160
|
+
payload = @version.fetch('GET', @uri)
|
161
|
+
PrebuiltOperatorInstance.new(
|
162
|
+
@version,
|
163
|
+
payload,
|
164
|
+
sid: @solution[:sid],
|
165
|
+
)
|
166
|
+
end
|
167
|
+
|
168
|
+
|
169
|
+
##
|
170
|
+
# Provide a user friendly representation
|
171
|
+
def to_s
|
172
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
173
|
+
"#<Twilio.Intelligence.V2.PrebuiltOperatorContext #{context}>"
|
174
|
+
end
|
175
|
+
|
176
|
+
##
|
177
|
+
# Provide a detailed, user friendly representation
|
178
|
+
def inspect
|
179
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
180
|
+
"#<Twilio.Intelligence.V2.PrebuiltOperatorContext #{context}>"
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
class PrebuiltOperatorPage < Page
|
185
|
+
##
|
186
|
+
# Initialize the PrebuiltOperatorPage
|
187
|
+
# @param [Version] version Version that contains the resource
|
188
|
+
# @param [Response] response Response from the API
|
189
|
+
# @param [Hash] solution Path solution for the resource
|
190
|
+
# @return [PrebuiltOperatorPage] PrebuiltOperatorPage
|
191
|
+
def initialize(version, response, solution)
|
192
|
+
super(version, response)
|
193
|
+
|
194
|
+
# Path Solution
|
195
|
+
@solution = solution
|
196
|
+
end
|
197
|
+
|
198
|
+
##
|
199
|
+
# Build an instance of PrebuiltOperatorInstance
|
200
|
+
# @param [Hash] payload Payload response from the API
|
201
|
+
# @return [PrebuiltOperatorInstance] PrebuiltOperatorInstance
|
202
|
+
def get_instance(payload)
|
203
|
+
PrebuiltOperatorInstance.new(@version, payload)
|
204
|
+
end
|
205
|
+
|
206
|
+
##
|
207
|
+
# Provide a user friendly representation
|
208
|
+
def to_s
|
209
|
+
'<Twilio.Intelligence.V2.PrebuiltOperatorPage>'
|
210
|
+
end
|
211
|
+
end
|
212
|
+
class PrebuiltOperatorInstance < InstanceResource
|
213
|
+
##
|
214
|
+
# Initialize the PrebuiltOperatorInstance
|
215
|
+
# @param [Version] version Version that contains the resource
|
216
|
+
# @param [Hash] payload payload that contains response from Twilio
|
217
|
+
# @param [String] account_sid The SID of the
|
218
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this PrebuiltOperator
|
219
|
+
# resource.
|
220
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
221
|
+
# @return [PrebuiltOperatorInstance] PrebuiltOperatorInstance
|
222
|
+
def initialize(version, payload , sid: nil)
|
223
|
+
super(version)
|
224
|
+
|
225
|
+
# Marshaled Properties
|
226
|
+
@properties = {
|
227
|
+
'account_sid' => payload['account_sid'],
|
228
|
+
'sid' => payload['sid'],
|
229
|
+
'friendly_name' => payload['friendly_name'],
|
230
|
+
'description' => payload['description'],
|
231
|
+
'author' => payload['author'],
|
232
|
+
'operator_type' => payload['operator_type'],
|
233
|
+
'version' => payload['version'] == nil ? payload['version'] : payload['version'].to_i,
|
234
|
+
'availability' => payload['availability'],
|
235
|
+
'config' => payload['config'],
|
236
|
+
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
237
|
+
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
238
|
+
'url' => payload['url'],
|
239
|
+
}
|
240
|
+
|
241
|
+
# Context
|
242
|
+
@instance_context = nil
|
243
|
+
@params = { 'sid' => sid || @properties['sid'] , }
|
244
|
+
end
|
245
|
+
|
246
|
+
##
|
247
|
+
# Generate an instance context for the instance, the context is capable of
|
248
|
+
# performing various actions. All instance actions are proxied to the context
|
249
|
+
# @return [PrebuiltOperatorContext] CallContext for this CallInstance
|
250
|
+
def context
|
251
|
+
unless @instance_context
|
252
|
+
@instance_context = PrebuiltOperatorContext.new(@version , @params['sid'])
|
253
|
+
end
|
254
|
+
@instance_context
|
255
|
+
end
|
256
|
+
|
257
|
+
##
|
258
|
+
# @return [String] The unique SID identifier of the Account the Pre-built Operator belongs to.
|
259
|
+
def account_sid
|
260
|
+
@properties['account_sid']
|
261
|
+
end
|
262
|
+
|
263
|
+
##
|
264
|
+
# @return [String] A 34 character string that uniquely identifies this Pre-built Operator.
|
265
|
+
def sid
|
266
|
+
@properties['sid']
|
267
|
+
end
|
268
|
+
|
269
|
+
##
|
270
|
+
# @return [String] A human-readable name of this resource, up to 64 characters.
|
271
|
+
def friendly_name
|
272
|
+
@properties['friendly_name']
|
273
|
+
end
|
274
|
+
|
275
|
+
##
|
276
|
+
# @return [String] A human-readable description of this resource, longer than the friendly name.
|
277
|
+
def description
|
278
|
+
@properties['description']
|
279
|
+
end
|
280
|
+
|
281
|
+
##
|
282
|
+
# @return [String] The creator of the Operator. Pre-built Operators can only be created by Twilio.
|
283
|
+
def author
|
284
|
+
@properties['author']
|
285
|
+
end
|
286
|
+
|
287
|
+
##
|
288
|
+
# @return [String] Operator Type for this Operator. References an existing Operator Type resource.
|
289
|
+
def operator_type
|
290
|
+
@properties['operator_type']
|
291
|
+
end
|
292
|
+
|
293
|
+
##
|
294
|
+
# @return [String] Numeric Operator version. Incremented with each update on the resource, used to ensure integrity when updating the Operator.
|
295
|
+
def version
|
296
|
+
@properties['version']
|
297
|
+
end
|
298
|
+
|
299
|
+
##
|
300
|
+
# @return [Availability]
|
301
|
+
def availability
|
302
|
+
@properties['availability']
|
303
|
+
end
|
304
|
+
|
305
|
+
##
|
306
|
+
# @return [Hash] Operator configuration, following the schema defined by the Operator Type. Only available on Custom Operators created by the Account, will be empty for Pre-Built Operators.
|
307
|
+
def config
|
308
|
+
@properties['config']
|
309
|
+
end
|
310
|
+
|
311
|
+
##
|
312
|
+
# @return [Time] The date that this Pre-built Operator was created, given in ISO 8601 format.
|
313
|
+
def date_created
|
314
|
+
@properties['date_created']
|
315
|
+
end
|
316
|
+
|
317
|
+
##
|
318
|
+
# @return [Time] The date that this Pre-built Operator was updated, given in ISO 8601 format.
|
319
|
+
def date_updated
|
320
|
+
@properties['date_updated']
|
321
|
+
end
|
322
|
+
|
323
|
+
##
|
324
|
+
# @return [String] The URL of this resource.
|
325
|
+
def url
|
326
|
+
@properties['url']
|
327
|
+
end
|
328
|
+
|
329
|
+
##
|
330
|
+
# Fetch the PrebuiltOperatorInstance
|
331
|
+
# @return [PrebuiltOperatorInstance] Fetched PrebuiltOperatorInstance
|
332
|
+
def fetch
|
333
|
+
|
334
|
+
context.fetch
|
335
|
+
end
|
336
|
+
|
337
|
+
##
|
338
|
+
# Provide a user friendly representation
|
339
|
+
def to_s
|
340
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
341
|
+
"<Twilio.Intelligence.V2.PrebuiltOperatorInstance #{values}>"
|
342
|
+
end
|
343
|
+
|
344
|
+
##
|
345
|
+
# Provide a detailed, user friendly representation
|
346
|
+
def inspect
|
347
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
348
|
+
"<Twilio.Intelligence.V2.PrebuiltOperatorInstance #{values}>"
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
end
|
353
|
+
end
|
354
|
+
end
|
355
|
+
end
|
@@ -36,7 +36,7 @@ module Twilio
|
|
36
36
|
# @param [Boolean] auto_transcribe Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
|
37
37
|
# @param [Boolean] data_logging Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
|
38
38
|
# @param [String] friendly_name A human readable description of this resource, up to 64 characters.
|
39
|
-
# @param [String] language_code The default language code
|
39
|
+
# @param [String] language_code The language code set during Service creation determines the Transcription language for all call recordings processed by that Service. The default is en-US if no language code is set. A Service can only support one language code, and it cannot be updated once it's set.
|
40
40
|
# @param [Boolean] auto_redaction Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.
|
41
41
|
# @param [Boolean] media_redaction Instructs the Speech Recognition service to automatically redact PII from all transcripts media made on this service. The auto_redaction flag must be enabled, results in error otherwise.
|
42
42
|
# @param [String] webhook_url The URL Twilio will request when executing the Webhook.
|
@@ -211,7 +211,6 @@ module Twilio
|
|
211
211
|
# @param [Boolean] auto_transcribe Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
|
212
212
|
# @param [Boolean] data_logging Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
|
213
213
|
# @param [String] friendly_name A human readable description of this resource, up to 64 characters.
|
214
|
-
# @param [String] language_code The default language code of the audio.
|
215
214
|
# @param [String] unique_name Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID.
|
216
215
|
# @param [Boolean] auto_redaction Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.
|
217
216
|
# @param [Boolean] media_redaction Instructs the Speech Recognition service to automatically redact PII from all transcripts media made on this service. The auto_redaction flag must be enabled, results in error otherwise.
|
@@ -223,7 +222,6 @@ module Twilio
|
|
223
222
|
auto_transcribe: :unset,
|
224
223
|
data_logging: :unset,
|
225
224
|
friendly_name: :unset,
|
226
|
-
language_code: :unset,
|
227
225
|
unique_name: :unset,
|
228
226
|
auto_redaction: :unset,
|
229
227
|
media_redaction: :unset,
|
@@ -236,7 +234,6 @@ module Twilio
|
|
236
234
|
'AutoTranscribe' => auto_transcribe,
|
237
235
|
'DataLogging' => data_logging,
|
238
236
|
'FriendlyName' => friendly_name,
|
239
|
-
'LanguageCode' => language_code,
|
240
237
|
'UniqueName' => unique_name,
|
241
238
|
'AutoRedaction' => auto_redaction,
|
242
239
|
'MediaRedaction' => media_redaction,
|
@@ -327,6 +324,7 @@ module Twilio
|
|
327
324
|
'url' => payload['url'],
|
328
325
|
'webhook_url' => payload['webhook_url'],
|
329
326
|
'webhook_http_method' => payload['webhook_http_method'],
|
327
|
+
'read_only_attached_operator_sids' => payload['read_only_attached_operator_sids'],
|
330
328
|
'version' => payload['version'] == nil ? payload['version'] : payload['version'].to_i,
|
331
329
|
}
|
332
330
|
|
@@ -395,7 +393,7 @@ module Twilio
|
|
395
393
|
end
|
396
394
|
|
397
395
|
##
|
398
|
-
# @return [String] The default language code
|
396
|
+
# @return [String] The language code set during Service creation determines the Transcription language for all call recordings processed by that Service. The default is en-US if no language code is set. A Service can only support one language code, and it cannot be updated once it's set.
|
399
397
|
def language_code
|
400
398
|
@properties['language_code']
|
401
399
|
end
|
@@ -430,6 +428,12 @@ module Twilio
|
|
430
428
|
@properties['webhook_http_method']
|
431
429
|
end
|
432
430
|
|
431
|
+
##
|
432
|
+
# @return [Array<String>] Operator sids attached to this service, read only
|
433
|
+
def read_only_attached_operator_sids
|
434
|
+
@properties['read_only_attached_operator_sids']
|
435
|
+
end
|
436
|
+
|
433
437
|
##
|
434
438
|
# @return [String] The version number of this Service.
|
435
439
|
def version
|
@@ -457,7 +461,6 @@ module Twilio
|
|
457
461
|
# @param [Boolean] auto_transcribe Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
|
458
462
|
# @param [Boolean] data_logging Data logging allows Twilio to improve the quality of the speech recognition & language understanding services through using customer data to refine, fine tune and evaluate machine learning models. Note: Data logging cannot be activated via API, only via www.twilio.com, as it requires additional consent.
|
459
463
|
# @param [String] friendly_name A human readable description of this resource, up to 64 characters.
|
460
|
-
# @param [String] language_code The default language code of the audio.
|
461
464
|
# @param [String] unique_name Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID.
|
462
465
|
# @param [Boolean] auto_redaction Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.
|
463
466
|
# @param [Boolean] media_redaction Instructs the Speech Recognition service to automatically redact PII from all transcripts media made on this service. The auto_redaction flag must be enabled, results in error otherwise.
|
@@ -469,7 +472,6 @@ module Twilio
|
|
469
472
|
auto_transcribe: :unset,
|
470
473
|
data_logging: :unset,
|
471
474
|
friendly_name: :unset,
|
472
|
-
language_code: :unset,
|
473
475
|
unique_name: :unset,
|
474
476
|
auto_redaction: :unset,
|
475
477
|
media_redaction: :unset,
|
@@ -482,7 +484,6 @@ module Twilio
|
|
482
484
|
auto_transcribe: auto_transcribe,
|
483
485
|
data_logging: data_logging,
|
484
486
|
friendly_name: friendly_name,
|
485
|
-
language_code: language_code,
|
486
487
|
unique_name: unique_name,
|
487
488
|
auto_redaction: auto_redaction,
|
488
489
|
media_redaction: media_redaction,
|
@@ -216,8 +216,8 @@ module Twilio
|
|
216
216
|
|
217
217
|
# Dependents
|
218
218
|
@sentences = nil
|
219
|
-
@operator_results = nil
|
220
219
|
@media = nil
|
220
|
+
@operator_results = nil
|
221
221
|
end
|
222
222
|
##
|
223
223
|
# Delete the TranscriptInstance
|
@@ -254,6 +254,16 @@ module Twilio
|
|
254
254
|
@sentences
|
255
255
|
end
|
256
256
|
##
|
257
|
+
# Access the media
|
258
|
+
# @return [MediaList]
|
259
|
+
# @return [MediaContext]
|
260
|
+
def media
|
261
|
+
MediaContext.new(
|
262
|
+
@version,
|
263
|
+
@solution[:sid]
|
264
|
+
)
|
265
|
+
end
|
266
|
+
##
|
257
267
|
# Access the operator_results
|
258
268
|
# @return [OperatorResultList]
|
259
269
|
# @return [OperatorResultContext] if sid was passed.
|
@@ -272,16 +282,6 @@ module Twilio
|
|
272
282
|
|
273
283
|
@operator_results
|
274
284
|
end
|
275
|
-
##
|
276
|
-
# Access the media
|
277
|
-
# @return [MediaList]
|
278
|
-
# @return [MediaContext]
|
279
|
-
def media
|
280
|
-
MediaContext.new(
|
281
|
-
@version,
|
282
|
-
@solution[:sid]
|
283
|
-
)
|
284
|
-
end
|
285
285
|
|
286
286
|
##
|
287
287
|
# Provide a user friendly representation
|
@@ -487,13 +487,6 @@ module Twilio
|
|
487
487
|
context.sentences
|
488
488
|
end
|
489
489
|
|
490
|
-
##
|
491
|
-
# Access the operator_results
|
492
|
-
# @return [operator_results] operator_results
|
493
|
-
def operator_results
|
494
|
-
context.operator_results
|
495
|
-
end
|
496
|
-
|
497
490
|
##
|
498
491
|
# Access the media
|
499
492
|
# @return [media] media
|
@@ -501,6 +494,13 @@ module Twilio
|
|
501
494
|
context.media
|
502
495
|
end
|
503
496
|
|
497
|
+
##
|
498
|
+
# Access the operator_results
|
499
|
+
# @return [operator_results] operator_results
|
500
|
+
def operator_results
|
501
|
+
context.operator_results
|
502
|
+
end
|
503
|
+
|
504
504
|
##
|
505
505
|
# Provide a user friendly representation
|
506
506
|
def to_s
|
@@ -21,10 +21,122 @@ module Twilio
|
|
21
21
|
def initialize(domain)
|
22
22
|
super
|
23
23
|
@version = 'v2'
|
24
|
+
@custom_operators = nil
|
25
|
+
@operators = nil
|
26
|
+
@operator_attachment = nil
|
27
|
+
@operator_attachments = nil
|
28
|
+
@operator_type = nil
|
29
|
+
@prebuilt_operators = nil
|
24
30
|
@services = nil
|
25
31
|
@transcripts = nil
|
26
32
|
end
|
27
33
|
|
34
|
+
##
|
35
|
+
# @param [String] sid A 34 character string that uniquely identifies this Custom Operator.
|
36
|
+
# @return [Twilio::REST::Intelligence::V2::CustomOperatorContext] if sid was passed.
|
37
|
+
# @return [Twilio::REST::Intelligence::V2::CustomOperatorList]
|
38
|
+
def custom_operators(sid=:unset)
|
39
|
+
if sid.nil?
|
40
|
+
raise ArgumentError, 'sid cannot be nil'
|
41
|
+
end
|
42
|
+
if sid == :unset
|
43
|
+
@custom_operators ||= CustomOperatorList.new self
|
44
|
+
else
|
45
|
+
CustomOperatorContext.new(self, sid)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
##
|
49
|
+
# @param [String] sid A 34 character string that uniquely identifies this Operator.
|
50
|
+
# @return [Twilio::REST::Intelligence::V2::OperatorContext] if sid was passed.
|
51
|
+
# @return [Twilio::REST::Intelligence::V2::OperatorList]
|
52
|
+
def operators(sid=:unset)
|
53
|
+
if sid.nil?
|
54
|
+
raise ArgumentError, 'sid cannot be nil'
|
55
|
+
end
|
56
|
+
if sid == :unset
|
57
|
+
@operators ||= OperatorList.new self
|
58
|
+
else
|
59
|
+
OperatorContext.new(self, sid)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
##
|
63
|
+
# @param [String] service_sid The unique SID identifier of the Service.
|
64
|
+
# @param [String] operator_sid The unique SID identifier of the Operator. Allows both Custom and Pre-built Operators.
|
65
|
+
# @return [Twilio::REST::Intelligence::V2::OperatorAttachmentContext] if serviceSid was passed.
|
66
|
+
# @return [Twilio::REST::Intelligence::V2::OperatorAttachmentList]
|
67
|
+
def operator_attachment(service_sid=:unset, operator_sid=:unset)
|
68
|
+
if service_sid.nil?
|
69
|
+
raise ArgumentError, 'service_sid cannot be nil'
|
70
|
+
end
|
71
|
+
if operator_sid.nil?
|
72
|
+
raise ArgumentError, 'operator_sid cannot be nil'
|
73
|
+
end
|
74
|
+
if service_sid == :unset && operator_sid == :unset
|
75
|
+
@operator_attachment ||= OperatorAttachmentList.new self
|
76
|
+
else
|
77
|
+
OperatorAttachmentContext.new(self, service_sid, operator_sid)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
##
|
81
|
+
# @param [String] service_sid The unique SID identifier of the Service.
|
82
|
+
# @param [String] operator_sid The unique SID identifier of the Operator. Allows both Custom and Pre-built Operators.
|
83
|
+
# @return [Twilio::REST::Intelligence::V2::OperatorAttachmentContext] if operatorSid was passed.
|
84
|
+
# @return [Twilio::REST::Intelligence::V2::OperatorAttachmentList]
|
85
|
+
def operator_attachment(service_sid=:unset, operator_sid=:unset)
|
86
|
+
if service_sid.nil?
|
87
|
+
raise ArgumentError, 'service_sid cannot be nil'
|
88
|
+
end
|
89
|
+
if operator_sid.nil?
|
90
|
+
raise ArgumentError, 'operator_sid cannot be nil'
|
91
|
+
end
|
92
|
+
if service_sid == :unset && operator_sid == :unset
|
93
|
+
@operator_attachment ||= OperatorAttachmentList.new self
|
94
|
+
else
|
95
|
+
OperatorAttachmentContext.new(self, service_sid, operator_sid)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
##
|
99
|
+
# @param [String] service_sid The unique SID identifier of the Service.
|
100
|
+
# @return [Twilio::REST::Intelligence::V2::OperatorAttachmentsContext] if serviceSid was passed.
|
101
|
+
# @return [Twilio::REST::Intelligence::V2::OperatorAttachmentsList]
|
102
|
+
def operator_attachments(service_sid=:unset)
|
103
|
+
if service_sid.nil?
|
104
|
+
raise ArgumentError, 'service_sid cannot be nil'
|
105
|
+
end
|
106
|
+
if service_sid == :unset
|
107
|
+
@operator_attachments ||= OperatorAttachmentsList.new self
|
108
|
+
else
|
109
|
+
OperatorAttachmentsContext.new(self, service_sid)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
##
|
113
|
+
# @param [String] sid A 34 character string that uniquely identifies this Operator Type.
|
114
|
+
# @return [Twilio::REST::Intelligence::V2::OperatorTypeContext] if sid was passed.
|
115
|
+
# @return [Twilio::REST::Intelligence::V2::OperatorTypeList]
|
116
|
+
def operator_type(sid=:unset)
|
117
|
+
if sid.nil?
|
118
|
+
raise ArgumentError, 'sid cannot be nil'
|
119
|
+
end
|
120
|
+
if sid == :unset
|
121
|
+
@operator_type ||= OperatorTypeList.new self
|
122
|
+
else
|
123
|
+
OperatorTypeContext.new(self, sid)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
##
|
127
|
+
# @param [String] sid A 34 character string that uniquely identifies this Pre-built Operator.
|
128
|
+
# @return [Twilio::REST::Intelligence::V2::PrebuiltOperatorContext] if sid was passed.
|
129
|
+
# @return [Twilio::REST::Intelligence::V2::PrebuiltOperatorList]
|
130
|
+
def prebuilt_operators(sid=:unset)
|
131
|
+
if sid.nil?
|
132
|
+
raise ArgumentError, 'sid cannot be nil'
|
133
|
+
end
|
134
|
+
if sid == :unset
|
135
|
+
@prebuilt_operators ||= PrebuiltOperatorList.new self
|
136
|
+
else
|
137
|
+
PrebuiltOperatorContext.new(self, sid)
|
138
|
+
end
|
139
|
+
end
|
28
140
|
##
|
29
141
|
# @param [String] sid A 34 character string that uniquely identifies this Service.
|
30
142
|
# @return [Twilio::REST::Intelligence::V2::ServiceContext] if sid was passed.
|
@@ -487,7 +487,6 @@ module Twilio
|
|
487
487
|
'usecase' => payload['usecase'],
|
488
488
|
'us_app_to_person_registered' => payload['us_app_to_person_registered'],
|
489
489
|
'use_inbound_webhook_on_number' => payload['use_inbound_webhook_on_number'],
|
490
|
-
'sending_windows' => payload['sending_windows'],
|
491
490
|
}
|
492
491
|
|
493
492
|
# Context
|
@@ -644,12 +643,6 @@ module Twilio
|
|
644
643
|
@properties['use_inbound_webhook_on_number']
|
645
644
|
end
|
646
645
|
|
647
|
-
##
|
648
|
-
# @return [Hash] A list of Sending Windows, which indicate defined time ranges in which a message can be sent, in the UTC time zone. Each window is defined by two strings, labeled \"start_time\" and \"end_time\".
|
649
|
-
def sending_windows
|
650
|
-
@properties['sending_windows']
|
651
|
-
end
|
652
|
-
|
653
646
|
##
|
654
647
|
# Delete the ServiceInstance
|
655
648
|
# @return [Boolean] True if delete succeeds, false otherwise
|