twilio-ruby 6.0.1 → 6.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 879e6c988389b279694568764e67cc0f6da872ec
4
- data.tar.gz: b2f437359378e1c21eeaca94f1fdfa3b976e4b7c
3
+ metadata.gz: 3d9c5df26cb77ec89ad4b30f0795bebdda2fd58b
4
+ data.tar.gz: f7202d7dccdda6c2afb34035af67e3e69e802b75
5
5
  SHA512:
6
- metadata.gz: 0ff88c428018101c5e78adea45e38b01e357714b397a86a587870253ed870225ced732f934ac2c4d5e70ad7f569aa7f4312a56b4c9019aac00ea520c5b091ada
7
- data.tar.gz: 5bf17165b9f5c77b2a92d14c596193cb7b6b4caa0c8594bd6050714d84814c087b176b141e573c12b2a70611b26e5e2d14cb94ed6893fa6210a8324884cbc2b1
6
+ metadata.gz: 69ecf3d3e407b6c49d7260c76540434695aba7fa314e97096e674a0fe0809ff093c9afa84c6ec073d1ec27fc950ca85c61f0c302021d19f97e93768a3d79a106
7
+ data.tar.gz: 70c452e99c1fa6ce5cd7462cee39ee246634763f4ebc2fe82daf141ed31fad2e2f08124e883da8706f71127d42124127d97940d2e83bbc1ef185a470bc5c0272
data/CHANGES.md CHANGED
@@ -1,6 +1,18 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2023-06-01] Version 6.0.2
5
+ --------------------------
6
+ **Api**
7
+ - Add `Trim` to create Conference Participant API
8
+
9
+ **Intelligence**
10
+ - First public beta release for Voice Intelligence APIs with client libraries
11
+
12
+ **Messaging**
13
+ - Add new `errors` attribute to us_app_to_person resource. This attribute will provide additional information about campaign registration errors.
14
+
15
+
4
16
  [2023-05-18] Version 6.0.1
5
17
  --------------------------
6
18
  **Library - Fix**
data/README.md CHANGED
@@ -39,13 +39,13 @@ This library supports the following Ruby implementations:
39
39
  To install using [Bundler][bundler] grab the latest stable version:
40
40
 
41
41
  ```ruby
42
- gem 'twilio-ruby', '~> 6.0.1'
42
+ gem 'twilio-ruby', '~> 6.0.2'
43
43
  ```
44
44
 
45
45
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
46
46
 
47
47
  ```bash
48
- gem install twilio-ruby -v 6.0.1
48
+ gem install twilio-ruby -v 6.0.2
49
49
  ```
50
50
 
51
51
  To build and install the development branch yourself from the latest source:
@@ -51,7 +51,7 @@ module Twilio
51
51
  # @param [Boolean] early_media Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`.
52
52
  # @param [String] max_participants The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
53
53
  # @param [String] conference_record Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
54
- # @param [String] conference_trim Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
54
+ # @param [String] conference_trim Whether to trim leading and trailing silence from the conference recording. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
55
55
  # @param [String] conference_status_callback The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
56
56
  # @param [String] conference_status_callback_method The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
57
57
  # @param [Array[String]] conference_status_callback_event The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and `announcement`. Separate multiple values with a space. Defaults to `start end`.
@@ -80,6 +80,7 @@ module Twilio
80
80
  # @param [String] machine_detection_silence_timeout The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000.
81
81
  # @param [String] amd_status_callback The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
82
82
  # @param [String] amd_status_callback_method The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
83
+ # @param [String] trim Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
83
84
  # @return [ParticipantInstance] Created ParticipantInstance
84
85
  def create(
85
86
  from: nil,
@@ -127,7 +128,8 @@ module Twilio
127
128
  machine_detection_speech_end_threshold: :unset,
128
129
  machine_detection_silence_timeout: :unset,
129
130
  amd_status_callback: :unset,
130
- amd_status_callback_method: :unset
131
+ amd_status_callback_method: :unset,
132
+ trim: :unset
131
133
  )
132
134
 
133
135
  data = Twilio::Values.of({
@@ -177,6 +179,7 @@ module Twilio
177
179
  'MachineDetectionSilenceTimeout' => machine_detection_silence_timeout,
178
180
  'AmdStatusCallback' => amd_status_callback,
179
181
  'AmdStatusCallbackMethod' => amd_status_callback_method,
182
+ 'Trim' => trim,
180
183
  })
181
184
 
182
185
  payload = @version.create('POST', @uri, data: data)
@@ -72,6 +72,11 @@ module Twilio
72
72
  @insights ||= Insights.new self
73
73
  end
74
74
  ##
75
+ # Access the Intelligence Twilio Domain
76
+ def intelligence
77
+ @intelligence ||= Intelligence.new self
78
+ end
79
+ ##
75
80
  # Access the IpMessaging Twilio Domain
76
81
  def ip_messaging
77
82
  @ip_messaging ||= IpMessaging.new self
@@ -0,0 +1,511 @@
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 ServiceList < ListResource
21
+ ##
22
+ # Initialize the ServiceList
23
+ # @param [Version] version Version that contains the resource
24
+ # @return [ServiceList] ServiceList
25
+ def initialize(version)
26
+ super(version)
27
+ # Path Solution
28
+ @solution = { }
29
+ @uri = "/Services"
30
+
31
+ end
32
+ ##
33
+ # Create the ServiceInstance
34
+ # @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.
35
+ # @param [Boolean] auto_transcribe Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
36
+ # @param [Boolean] data_logging Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
37
+ # @param [String] friendly_name A human readable description of this resource, up to 64 characters.
38
+ # @param [String] language_code The default language code of the audio.
39
+ # @param [Boolean] auto_redaction Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.
40
+ # @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.
41
+ # @param [String] webhook_url The URL Twilio will request when executing the Webhook.
42
+ # @param [HttpMethod] webhook_http_method
43
+ # @return [ServiceInstance] Created ServiceInstance
44
+ def create(
45
+ unique_name: nil,
46
+ auto_transcribe: :unset,
47
+ data_logging: :unset,
48
+ friendly_name: :unset,
49
+ language_code: :unset,
50
+ auto_redaction: :unset,
51
+ media_redaction: :unset,
52
+ webhook_url: :unset,
53
+ webhook_http_method: :unset
54
+ )
55
+
56
+ data = Twilio::Values.of({
57
+ 'UniqueName' => unique_name,
58
+ 'AutoTranscribe' => auto_transcribe,
59
+ 'DataLogging' => data_logging,
60
+ 'FriendlyName' => friendly_name,
61
+ 'LanguageCode' => language_code,
62
+ 'AutoRedaction' => auto_redaction,
63
+ 'MediaRedaction' => media_redaction,
64
+ 'WebhookUrl' => webhook_url,
65
+ 'WebhookHttpMethod' => webhook_http_method,
66
+ })
67
+
68
+ payload = @version.create('POST', @uri, data: data)
69
+ ServiceInstance.new(
70
+ @version,
71
+ payload,
72
+ )
73
+ end
74
+
75
+
76
+ ##
77
+ # Lists ServiceInstance records from the API as a list.
78
+ # Unlike stream(), this operation is eager and will load `limit` records into
79
+ # memory before returning.
80
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
81
+ # guarantees to never return more than limit. Default is no limit
82
+ # @param [Integer] page_size Number of records to fetch per request, when
83
+ # not set will use the default value of 50 records. If no page_size is defined
84
+ # but a limit is defined, stream() will attempt to read the limit with the most
85
+ # efficient page size, i.e. min(limit, 1000)
86
+ # @return [Array] Array of up to limit results
87
+ def list(limit: nil, page_size: nil)
88
+ self.stream(
89
+ limit: limit,
90
+ page_size: page_size
91
+ ).entries
92
+ end
93
+
94
+ ##
95
+ # Streams Instance records from the API as an Enumerable.
96
+ # This operation lazily loads records as efficiently as possible until the limit
97
+ # is reached.
98
+ # @param [Integer] limit Upper limit for the number of records to return. stream()
99
+ # guarantees to never return more than limit. Default is no limit
100
+ # @param [Integer] page_size Number of records to fetch per request, when
101
+ # not set will use the default value of 50 records. If no page_size is defined
102
+ # but a limit is defined, stream() will attempt to read the limit with the most
103
+ # efficient page size, i.e. min(limit, 1000)
104
+ # @return [Enumerable] Enumerable that will yield up to limit results
105
+ def stream(limit: nil, page_size: nil)
106
+ limits = @version.read_limits(limit, page_size)
107
+
108
+ page = self.page(
109
+ page_size: limits[:page_size], )
110
+
111
+ @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
112
+ end
113
+
114
+ ##
115
+ # When passed a block, yields ServiceInstance records from the API.
116
+ # This operation lazily loads records as efficiently as possible until the limit
117
+ # is reached.
118
+ def each
119
+ limits = @version.read_limits
120
+
121
+ page = self.page(page_size: limits[:page_size], )
122
+
123
+ @version.stream(page,
124
+ limit: limits[:limit],
125
+ page_limit: limits[:page_limit]).each {|x| yield x}
126
+ end
127
+
128
+ ##
129
+ # Retrieve a single page of ServiceInstance records from the API.
130
+ # Request is executed immediately.
131
+ # @param [String] page_token PageToken provided by the API
132
+ # @param [Integer] page_number Page Number, this value is simply for client state
133
+ # @param [Integer] page_size Number of records to return, defaults to 50
134
+ # @return [Page] Page of ServiceInstance
135
+ def page(page_token: :unset, page_number: :unset, page_size: :unset)
136
+ params = Twilio::Values.of({
137
+
138
+ 'PageToken' => page_token,
139
+ 'Page' => page_number,
140
+ 'PageSize' => page_size,
141
+ })
142
+
143
+ response = @version.page('GET', @uri, params: params)
144
+
145
+ ServicePage.new(@version, response, @solution)
146
+ end
147
+
148
+ ##
149
+ # Retrieve a single page of ServiceInstance records from the API.
150
+ # Request is executed immediately.
151
+ # @param [String] target_url API-generated URL for the requested results page
152
+ # @return [Page] Page of ServiceInstance
153
+ def get_page(target_url)
154
+ response = @version.domain.request(
155
+ 'GET',
156
+ target_url
157
+ )
158
+ ServicePage.new(@version, response, @solution)
159
+ end
160
+
161
+
162
+
163
+ # Provide a user friendly representation
164
+ def to_s
165
+ '#<Twilio.Intelligence.V2.ServiceList>'
166
+ end
167
+ end
168
+
169
+
170
+ ##
171
+ #PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
172
+ class ServiceContext < InstanceContext
173
+ ##
174
+ # Initialize the ServiceContext
175
+ # @param [Version] version Version that contains the resource
176
+ # @param [String] sid A 34 character string that uniquely identifies this Service.
177
+ # @return [ServiceContext] ServiceContext
178
+ def initialize(version, sid)
179
+ super(version)
180
+
181
+ # Path Solution
182
+ @solution = { sid: sid, }
183
+ @uri = "/Services/#{@solution[:sid]}"
184
+
185
+
186
+ end
187
+ ##
188
+ # Delete the ServiceInstance
189
+ # @return [Boolean] True if delete succeeds, false otherwise
190
+ def delete
191
+
192
+ @version.delete('DELETE', @uri)
193
+ end
194
+
195
+ ##
196
+ # Fetch the ServiceInstance
197
+ # @return [ServiceInstance] Fetched ServiceInstance
198
+ def fetch
199
+
200
+ payload = @version.fetch('GET', @uri)
201
+ ServiceInstance.new(
202
+ @version,
203
+ payload,
204
+ sid: @solution[:sid],
205
+ )
206
+ end
207
+
208
+ ##
209
+ # Update the ServiceInstance
210
+ # @param [Boolean] auto_transcribe Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
211
+ # @param [Boolean] data_logging Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
212
+ # @param [String] friendly_name A human readable description of this resource, up to 64 characters.
213
+ # @param [String] language_code The default language code of the audio.
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.
215
+ # @param [Boolean] auto_redaction Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.
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.
217
+ # @param [String] webhook_url The URL Twilio will request when executing the Webhook.
218
+ # @param [HttpMethod] webhook_http_method
219
+ # @param [String] if_match The If-Match HTTP request header
220
+ # @return [ServiceInstance] Updated ServiceInstance
221
+ def update(
222
+ auto_transcribe: :unset,
223
+ data_logging: :unset,
224
+ friendly_name: :unset,
225
+ language_code: :unset,
226
+ unique_name: :unset,
227
+ auto_redaction: :unset,
228
+ media_redaction: :unset,
229
+ webhook_url: :unset,
230
+ webhook_http_method: :unset,
231
+ if_match: :unset
232
+ )
233
+
234
+ data = Twilio::Values.of({
235
+ 'AutoTranscribe' => auto_transcribe,
236
+ 'DataLogging' => data_logging,
237
+ 'FriendlyName' => friendly_name,
238
+ 'LanguageCode' => language_code,
239
+ 'UniqueName' => unique_name,
240
+ 'AutoRedaction' => auto_redaction,
241
+ 'MediaRedaction' => media_redaction,
242
+ 'WebhookUrl' => webhook_url,
243
+ 'WebhookHttpMethod' => webhook_http_method,
244
+ })
245
+
246
+ headers = Twilio::Values.of({ 'If-Match' => if_match, })
247
+ payload = @version.update('POST', @uri, data: data, headers: headers)
248
+ ServiceInstance.new(
249
+ @version,
250
+ payload,
251
+ sid: @solution[:sid],
252
+ )
253
+ end
254
+
255
+
256
+ ##
257
+ # Provide a user friendly representation
258
+ def to_s
259
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
260
+ "#<Twilio.Intelligence.V2.ServiceContext #{context}>"
261
+ end
262
+
263
+ ##
264
+ # Provide a detailed, user friendly representation
265
+ def inspect
266
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
267
+ "#<Twilio.Intelligence.V2.ServiceContext #{context}>"
268
+ end
269
+ end
270
+
271
+ class ServicePage < Page
272
+ ##
273
+ # Initialize the ServicePage
274
+ # @param [Version] version Version that contains the resource
275
+ # @param [Response] response Response from the API
276
+ # @param [Hash] solution Path solution for the resource
277
+ # @return [ServicePage] ServicePage
278
+ def initialize(version, response, solution)
279
+ super(version, response)
280
+
281
+ # Path Solution
282
+ @solution = solution
283
+ end
284
+
285
+ ##
286
+ # Build an instance of ServiceInstance
287
+ # @param [Hash] payload Payload response from the API
288
+ # @return [ServiceInstance] ServiceInstance
289
+ def get_instance(payload)
290
+ ServiceInstance.new(@version, payload)
291
+ end
292
+
293
+ ##
294
+ # Provide a user friendly representation
295
+ def to_s
296
+ '<Twilio.Intelligence.V2.ServicePage>'
297
+ end
298
+ end
299
+ class ServiceInstance < InstanceResource
300
+ ##
301
+ # Initialize the ServiceInstance
302
+ # @param [Version] version Version that contains the resource
303
+ # @param [Hash] payload payload that contains response from Twilio
304
+ # @param [String] account_sid The SID of the
305
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this Service
306
+ # resource.
307
+ # @param [String] sid The SID of the Call resource to fetch.
308
+ # @return [ServiceInstance] ServiceInstance
309
+ def initialize(version, payload , sid: nil)
310
+ super(version)
311
+
312
+ # Marshaled Properties
313
+ @properties = {
314
+ 'account_sid' => payload['account_sid'],
315
+ 'auto_redaction' => payload['auto_redaction'],
316
+ 'media_redaction' => payload['media_redaction'],
317
+ 'auto_transcribe' => payload['auto_transcribe'],
318
+ 'data_logging' => payload['data_logging'],
319
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
320
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
321
+ 'friendly_name' => payload['friendly_name'],
322
+ 'language_code' => payload['language_code'],
323
+ 'sid' => payload['sid'],
324
+ 'unique_name' => payload['unique_name'],
325
+ 'url' => payload['url'],
326
+ 'webhook_url' => payload['webhook_url'],
327
+ 'webhook_http_method' => payload['webhook_http_method'],
328
+ 'version' => payload['version'] == nil ? payload['version'] : payload['version'].to_i,
329
+ }
330
+
331
+ # Context
332
+ @instance_context = nil
333
+ @params = { 'sid' => sid || @properties['sid'] , }
334
+ end
335
+
336
+ ##
337
+ # Generate an instance context for the instance, the context is capable of
338
+ # performing various actions. All instance actions are proxied to the context
339
+ # @return [ServiceContext] CallContext for this CallInstance
340
+ def context
341
+ unless @instance_context
342
+ @instance_context = ServiceContext.new(@version , @params['sid'])
343
+ end
344
+ @instance_context
345
+ end
346
+
347
+ ##
348
+ # @return [String] The unique SID identifier of the Account the Service belongs to.
349
+ def account_sid
350
+ @properties['account_sid']
351
+ end
352
+
353
+ ##
354
+ # @return [Boolean] Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.
355
+ def auto_redaction
356
+ @properties['auto_redaction']
357
+ end
358
+
359
+ ##
360
+ # @return [Boolean] 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.
361
+ def media_redaction
362
+ @properties['media_redaction']
363
+ end
364
+
365
+ ##
366
+ # @return [Boolean] Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
367
+ def auto_transcribe
368
+ @properties['auto_transcribe']
369
+ end
370
+
371
+ ##
372
+ # @return [Boolean] Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
373
+ def data_logging
374
+ @properties['data_logging']
375
+ end
376
+
377
+ ##
378
+ # @return [Time] The date that this Service was created, given in ISO 8601 format.
379
+ def date_created
380
+ @properties['date_created']
381
+ end
382
+
383
+ ##
384
+ # @return [Time] The date that this Service was updated, given in ISO 8601 format.
385
+ def date_updated
386
+ @properties['date_updated']
387
+ end
388
+
389
+ ##
390
+ # @return [String] A human readable description of this resource, up to 64 characters.
391
+ def friendly_name
392
+ @properties['friendly_name']
393
+ end
394
+
395
+ ##
396
+ # @return [String] The default language code of the audio.
397
+ def language_code
398
+ @properties['language_code']
399
+ end
400
+
401
+ ##
402
+ # @return [String] A 34 character string that uniquely identifies this Service.
403
+ def sid
404
+ @properties['sid']
405
+ end
406
+
407
+ ##
408
+ # @return [String] Provides a unique and addressable name to be assigned to this Service, assigned by the developer, to be optionally used in addition to SID.
409
+ def unique_name
410
+ @properties['unique_name']
411
+ end
412
+
413
+ ##
414
+ # @return [String] The URL of this resource.
415
+ def url
416
+ @properties['url']
417
+ end
418
+
419
+ ##
420
+ # @return [String] The URL Twilio will request when executing the Webhook.
421
+ def webhook_url
422
+ @properties['webhook_url']
423
+ end
424
+
425
+ ##
426
+ # @return [HttpMethod]
427
+ def webhook_http_method
428
+ @properties['webhook_http_method']
429
+ end
430
+
431
+ ##
432
+ # @return [String] The version number of this Service.
433
+ def version
434
+ @properties['version']
435
+ end
436
+
437
+ ##
438
+ # Delete the ServiceInstance
439
+ # @return [Boolean] True if delete succeeds, false otherwise
440
+ def delete
441
+
442
+ context.delete
443
+ end
444
+
445
+ ##
446
+ # Fetch the ServiceInstance
447
+ # @return [ServiceInstance] Fetched ServiceInstance
448
+ def fetch
449
+
450
+ context.fetch
451
+ end
452
+
453
+ ##
454
+ # Update the ServiceInstance
455
+ # @param [Boolean] auto_transcribe Instructs the Speech Recognition service to automatically transcribe all recordings made on the account.
456
+ # @param [Boolean] data_logging Data logging allows Twilio to improve the quality of the speech recognition through using customer data to refine its speech recognition models.
457
+ # @param [String] friendly_name A human readable description of this resource, up to 64 characters.
458
+ # @param [String] language_code The default language code of the audio.
459
+ # @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.
460
+ # @param [Boolean] auto_redaction Instructs the Speech Recognition service to automatically redact PII from all transcripts made on this service.
461
+ # @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.
462
+ # @param [String] webhook_url The URL Twilio will request when executing the Webhook.
463
+ # @param [HttpMethod] webhook_http_method
464
+ # @param [String] if_match The If-Match HTTP request header
465
+ # @return [ServiceInstance] Updated ServiceInstance
466
+ def update(
467
+ auto_transcribe: :unset,
468
+ data_logging: :unset,
469
+ friendly_name: :unset,
470
+ language_code: :unset,
471
+ unique_name: :unset,
472
+ auto_redaction: :unset,
473
+ media_redaction: :unset,
474
+ webhook_url: :unset,
475
+ webhook_http_method: :unset,
476
+ if_match: :unset
477
+ )
478
+
479
+ context.update(
480
+ auto_transcribe: auto_transcribe,
481
+ data_logging: data_logging,
482
+ friendly_name: friendly_name,
483
+ language_code: language_code,
484
+ unique_name: unique_name,
485
+ auto_redaction: auto_redaction,
486
+ media_redaction: media_redaction,
487
+ webhook_url: webhook_url,
488
+ webhook_http_method: webhook_http_method,
489
+ if_match: if_match,
490
+ )
491
+ end
492
+
493
+ ##
494
+ # Provide a user friendly representation
495
+ def to_s
496
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
497
+ "<Twilio.Intelligence.V2.ServiceInstance #{values}>"
498
+ end
499
+
500
+ ##
501
+ # Provide a detailed, user friendly representation
502
+ def inspect
503
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
504
+ "<Twilio.Intelligence.V2.ServiceInstance #{values}>"
505
+ end
506
+ end
507
+
508
+ end
509
+ end
510
+ end
511
+ end