twilio-ruby 7.8.0 → 7.8.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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +20 -0
  3. data/README.md +2 -2
  4. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/local.rb +3 -3
  5. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb +3 -3
  6. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb +3 -3
  7. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/national.rb +3 -3
  8. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb +3 -3
  9. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb +3 -3
  10. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb +3 -3
  11. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
  12. data/lib/twilio-ruby/rest/content/v1/content.rb +38 -1
  13. data/lib/twilio-ruby/rest/intelligence/v2/service.rb +17 -1
  14. data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb +217 -0
  15. data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb +217 -0
  16. data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +43 -0
  17. data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +3 -3
  18. data/lib/twilio-ruby/rest/numbers/v3/hosted_number_order.rb +339 -0
  19. data/lib/twilio-ruby/rest/numbers/v3.rb +40 -0
  20. data/lib/twilio-ruby/rest/numbers_base.rb +5 -0
  21. data/lib/twilio-ruby/rest/oauth/v2/token.rb +186 -0
  22. data/lib/twilio-ruby/rest/oauth/v2.rb +40 -0
  23. data/lib/twilio-ruby/rest/oauth_base.rb +6 -1
  24. data/lib/twilio-ruby/rest/verify/v2/new_challenge.rb +335 -0
  25. data/lib/twilio-ruby/rest/verify/v2/service/new_factor.rb +297 -0
  26. data/lib/twilio-ruby/rest/verify/v2/service.rb +38 -0
  27. data/lib/twilio-ruby/rest/verify/v2.rb +15 -0
  28. data/lib/twilio-ruby/rest/voice_base.rb +6 -1
  29. data/lib/twilio-ruby/twiml/voice_response.rb +20 -0
  30. data/lib/twilio-ruby/version.rb +1 -1
  31. data/twilio-ruby.gemspec +1 -1
  32. metadata +12 -4
@@ -0,0 +1,217 @@
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 TranscriptContext < InstanceContext
21
+
22
+ class EncryptedOperatorResultsList < ListResource
23
+
24
+ ##
25
+ # Initialize the EncryptedOperatorResultsList
26
+ # @param [Version] version Version that contains the resource
27
+ # @return [EncryptedOperatorResultsList] EncryptedOperatorResultsList
28
+ def initialize(version, transcript_sid: nil)
29
+ super(version)
30
+ # Path Solution
31
+ @solution = { transcript_sid: transcript_sid }
32
+
33
+
34
+ end
35
+
36
+
37
+
38
+ # Provide a user friendly representation
39
+ def to_s
40
+ '#<Twilio.Intelligence.V2.EncryptedOperatorResultsList>'
41
+ end
42
+ end
43
+
44
+
45
+ class EncryptedOperatorResultsContext < InstanceContext
46
+ ##
47
+ # Initialize the EncryptedOperatorResultsContext
48
+ # @param [Version] version Version that contains the resource
49
+ # @param [String] transcript_sid The unique SID identifier of the Transcript.
50
+ # @return [EncryptedOperatorResultsContext] EncryptedOperatorResultsContext
51
+ def initialize(version, transcript_sid)
52
+ super(version)
53
+
54
+ # Path Solution
55
+ @solution = { transcript_sid: transcript_sid, }
56
+ @uri = "/Transcripts/#{@solution[:transcript_sid]}/OperatorResults/Encrypted"
57
+
58
+
59
+ end
60
+ ##
61
+ # Fetch the EncryptedOperatorResultsInstance
62
+ # @param [Boolean] redacted Grant access to PII Redacted/Unredacted Operator Results. If redaction is enabled, the default is `true` to access redacted operator results.
63
+ # @return [EncryptedOperatorResultsInstance] Fetched EncryptedOperatorResultsInstance
64
+ def fetch(
65
+ redacted: :unset
66
+ )
67
+
68
+ params = Twilio::Values.of({
69
+ 'Redacted' => redacted,
70
+ })
71
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
72
+
73
+
74
+
75
+
76
+
77
+ payload = @version.fetch('GET', @uri, params: params, headers: headers)
78
+ EncryptedOperatorResultsInstance.new(
79
+ @version,
80
+ payload,
81
+ transcript_sid: @solution[:transcript_sid],
82
+ )
83
+ end
84
+
85
+
86
+ ##
87
+ # Provide a user friendly representation
88
+ def to_s
89
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
90
+ "#<Twilio.Intelligence.V2.EncryptedOperatorResultsContext #{context}>"
91
+ end
92
+
93
+ ##
94
+ # Provide a detailed, user friendly representation
95
+ def inspect
96
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
97
+ "#<Twilio.Intelligence.V2.EncryptedOperatorResultsContext #{context}>"
98
+ end
99
+ end
100
+
101
+ class EncryptedOperatorResultsPage < Page
102
+ ##
103
+ # Initialize the EncryptedOperatorResultsPage
104
+ # @param [Version] version Version that contains the resource
105
+ # @param [Response] response Response from the API
106
+ # @param [Hash] solution Path solution for the resource
107
+ # @return [EncryptedOperatorResultsPage] EncryptedOperatorResultsPage
108
+ def initialize(version, response, solution)
109
+ super(version, response)
110
+
111
+ # Path Solution
112
+ @solution = solution
113
+ end
114
+
115
+ ##
116
+ # Build an instance of EncryptedOperatorResultsInstance
117
+ # @param [Hash] payload Payload response from the API
118
+ # @return [EncryptedOperatorResultsInstance] EncryptedOperatorResultsInstance
119
+ def get_instance(payload)
120
+ EncryptedOperatorResultsInstance.new(@version, payload, transcript_sid: @solution[:transcript_sid])
121
+ end
122
+
123
+ ##
124
+ # Provide a user friendly representation
125
+ def to_s
126
+ '<Twilio.Intelligence.V2.EncryptedOperatorResultsPage>'
127
+ end
128
+ end
129
+ class EncryptedOperatorResultsInstance < InstanceResource
130
+ ##
131
+ # Initialize the EncryptedOperatorResultsInstance
132
+ # @param [Version] version Version that contains the resource
133
+ # @param [Hash] payload payload that contains response from Twilio
134
+ # @param [String] account_sid The SID of the
135
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this EncryptedOperatorResults
136
+ # resource.
137
+ # @param [String] sid The SID of the Call resource to fetch.
138
+ # @return [EncryptedOperatorResultsInstance] EncryptedOperatorResultsInstance
139
+ def initialize(version, payload , transcript_sid: nil)
140
+ super(version)
141
+
142
+ # Marshaled Properties
143
+ @properties = {
144
+ 'locations' => payload['locations'],
145
+ 'transcript_sid' => payload['transcript_sid'],
146
+ 'url' => payload['url'],
147
+ }
148
+
149
+ # Context
150
+ @instance_context = nil
151
+ @params = { 'transcript_sid' => transcript_sid || @properties['transcript_sid'] , }
152
+ end
153
+
154
+ ##
155
+ # Generate an instance context for the instance, the context is capable of
156
+ # performing various actions. All instance actions are proxied to the context
157
+ # @return [EncryptedOperatorResultsContext] CallContext for this CallInstance
158
+ def context
159
+ unless @instance_context
160
+ @instance_context = EncryptedOperatorResultsContext.new(@version , @params['transcript_sid'])
161
+ end
162
+ @instance_context
163
+ end
164
+
165
+ ##
166
+ # @return [Array<String>] The locations of the encrypted operator results.
167
+ def locations
168
+ @properties['locations']
169
+ end
170
+
171
+ ##
172
+ # @return [String]
173
+ def transcript_sid
174
+ @properties['transcript_sid']
175
+ end
176
+
177
+ ##
178
+ # @return [String]
179
+ def url
180
+ @properties['url']
181
+ end
182
+
183
+ ##
184
+ # Fetch the EncryptedOperatorResultsInstance
185
+ # @param [Boolean] redacted Grant access to PII Redacted/Unredacted Operator Results. If redaction is enabled, the default is `true` to access redacted operator results.
186
+ # @return [EncryptedOperatorResultsInstance] Fetched EncryptedOperatorResultsInstance
187
+ def fetch(
188
+ redacted: :unset
189
+ )
190
+
191
+ context.fetch(
192
+ redacted: redacted,
193
+ )
194
+ end
195
+
196
+ ##
197
+ # Provide a user friendly representation
198
+ def to_s
199
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
200
+ "<Twilio.Intelligence.V2.EncryptedOperatorResultsInstance #{values}>"
201
+ end
202
+
203
+ ##
204
+ # Provide a detailed, user friendly representation
205
+ def inspect
206
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
207
+ "<Twilio.Intelligence.V2.EncryptedOperatorResultsInstance #{values}>"
208
+ end
209
+ end
210
+
211
+ end
212
+ end
213
+ end
214
+ end
215
+ end
216
+
217
+
@@ -0,0 +1,217 @@
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 TranscriptContext < InstanceContext
21
+
22
+ class EncryptedSentencesList < ListResource
23
+
24
+ ##
25
+ # Initialize the EncryptedSentencesList
26
+ # @param [Version] version Version that contains the resource
27
+ # @return [EncryptedSentencesList] EncryptedSentencesList
28
+ def initialize(version, transcript_sid: nil)
29
+ super(version)
30
+ # Path Solution
31
+ @solution = { transcript_sid: transcript_sid }
32
+
33
+
34
+ end
35
+
36
+
37
+
38
+ # Provide a user friendly representation
39
+ def to_s
40
+ '#<Twilio.Intelligence.V2.EncryptedSentencesList>'
41
+ end
42
+ end
43
+
44
+
45
+ class EncryptedSentencesContext < InstanceContext
46
+ ##
47
+ # Initialize the EncryptedSentencesContext
48
+ # @param [Version] version Version that contains the resource
49
+ # @param [String] transcript_sid The unique SID identifier of the Transcript.
50
+ # @return [EncryptedSentencesContext] EncryptedSentencesContext
51
+ def initialize(version, transcript_sid)
52
+ super(version)
53
+
54
+ # Path Solution
55
+ @solution = { transcript_sid: transcript_sid, }
56
+ @uri = "/Transcripts/#{@solution[:transcript_sid]}/Sentences/Encrypted"
57
+
58
+
59
+ end
60
+ ##
61
+ # Fetch the EncryptedSentencesInstance
62
+ # @param [Boolean] redacted Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences.
63
+ # @return [EncryptedSentencesInstance] Fetched EncryptedSentencesInstance
64
+ def fetch(
65
+ redacted: :unset
66
+ )
67
+
68
+ params = Twilio::Values.of({
69
+ 'Redacted' => redacted,
70
+ })
71
+ headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
72
+
73
+
74
+
75
+
76
+
77
+ payload = @version.fetch('GET', @uri, params: params, headers: headers)
78
+ EncryptedSentencesInstance.new(
79
+ @version,
80
+ payload,
81
+ transcript_sid: @solution[:transcript_sid],
82
+ )
83
+ end
84
+
85
+
86
+ ##
87
+ # Provide a user friendly representation
88
+ def to_s
89
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
90
+ "#<Twilio.Intelligence.V2.EncryptedSentencesContext #{context}>"
91
+ end
92
+
93
+ ##
94
+ # Provide a detailed, user friendly representation
95
+ def inspect
96
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
97
+ "#<Twilio.Intelligence.V2.EncryptedSentencesContext #{context}>"
98
+ end
99
+ end
100
+
101
+ class EncryptedSentencesPage < Page
102
+ ##
103
+ # Initialize the EncryptedSentencesPage
104
+ # @param [Version] version Version that contains the resource
105
+ # @param [Response] response Response from the API
106
+ # @param [Hash] solution Path solution for the resource
107
+ # @return [EncryptedSentencesPage] EncryptedSentencesPage
108
+ def initialize(version, response, solution)
109
+ super(version, response)
110
+
111
+ # Path Solution
112
+ @solution = solution
113
+ end
114
+
115
+ ##
116
+ # Build an instance of EncryptedSentencesInstance
117
+ # @param [Hash] payload Payload response from the API
118
+ # @return [EncryptedSentencesInstance] EncryptedSentencesInstance
119
+ def get_instance(payload)
120
+ EncryptedSentencesInstance.new(@version, payload, transcript_sid: @solution[:transcript_sid])
121
+ end
122
+
123
+ ##
124
+ # Provide a user friendly representation
125
+ def to_s
126
+ '<Twilio.Intelligence.V2.EncryptedSentencesPage>'
127
+ end
128
+ end
129
+ class EncryptedSentencesInstance < InstanceResource
130
+ ##
131
+ # Initialize the EncryptedSentencesInstance
132
+ # @param [Version] version Version that contains the resource
133
+ # @param [Hash] payload payload that contains response from Twilio
134
+ # @param [String] account_sid The SID of the
135
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this EncryptedSentences
136
+ # resource.
137
+ # @param [String] sid The SID of the Call resource to fetch.
138
+ # @return [EncryptedSentencesInstance] EncryptedSentencesInstance
139
+ def initialize(version, payload , transcript_sid: nil)
140
+ super(version)
141
+
142
+ # Marshaled Properties
143
+ @properties = {
144
+ 'location' => payload['location'],
145
+ 'transcript_sid' => payload['transcript_sid'],
146
+ 'url' => payload['url'],
147
+ }
148
+
149
+ # Context
150
+ @instance_context = nil
151
+ @params = { 'transcript_sid' => transcript_sid || @properties['transcript_sid'] , }
152
+ end
153
+
154
+ ##
155
+ # Generate an instance context for the instance, the context is capable of
156
+ # performing various actions. All instance actions are proxied to the context
157
+ # @return [EncryptedSentencesContext] CallContext for this CallInstance
158
+ def context
159
+ unless @instance_context
160
+ @instance_context = EncryptedSentencesContext.new(@version , @params['transcript_sid'])
161
+ end
162
+ @instance_context
163
+ end
164
+
165
+ ##
166
+ # @return [String] The location of the encrypted sentences.
167
+ def location
168
+ @properties['location']
169
+ end
170
+
171
+ ##
172
+ # @return [String]
173
+ def transcript_sid
174
+ @properties['transcript_sid']
175
+ end
176
+
177
+ ##
178
+ # @return [String]
179
+ def url
180
+ @properties['url']
181
+ end
182
+
183
+ ##
184
+ # Fetch the EncryptedSentencesInstance
185
+ # @param [Boolean] redacted Grant access to PII Redacted/Unredacted Sentences. If redaction is enabled, the default is `true` to access redacted sentences.
186
+ # @return [EncryptedSentencesInstance] Fetched EncryptedSentencesInstance
187
+ def fetch(
188
+ redacted: :unset
189
+ )
190
+
191
+ context.fetch(
192
+ redacted: redacted,
193
+ )
194
+ end
195
+
196
+ ##
197
+ # Provide a user friendly representation
198
+ def to_s
199
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
200
+ "<Twilio.Intelligence.V2.EncryptedSentencesInstance #{values}>"
201
+ end
202
+
203
+ ##
204
+ # Provide a detailed, user friendly representation
205
+ def inspect
206
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
207
+ "<Twilio.Intelligence.V2.EncryptedSentencesInstance #{values}>"
208
+ end
209
+ end
210
+
211
+ end
212
+ end
213
+ end
214
+ end
215
+ end
216
+
217
+
@@ -224,7 +224,9 @@ module Twilio
224
224
 
225
225
  # Dependents
226
226
  @sentences = nil
227
+ @encrypted_sentences = nil
227
228
  @media = nil
229
+ @encrypted_operator_results = nil
228
230
  @operator_results = nil
229
231
  end
230
232
  ##
@@ -270,6 +272,16 @@ module Twilio
270
272
  @sentences
271
273
  end
272
274
  ##
275
+ # Access the encrypted_sentences
276
+ # @return [EncryptedSentencesList]
277
+ # @return [EncryptedSentencesContext]
278
+ def encrypted_sentences
279
+ EncryptedSentencesContext.new(
280
+ @version,
281
+ @solution[:sid]
282
+ )
283
+ end
284
+ ##
273
285
  # Access the media
274
286
  # @return [MediaList]
275
287
  # @return [MediaContext]
@@ -280,6 +292,16 @@ module Twilio
280
292
  )
281
293
  end
282
294
  ##
295
+ # Access the encrypted_operator_results
296
+ # @return [EncryptedOperatorResultsList]
297
+ # @return [EncryptedOperatorResultsContext]
298
+ def encrypted_operator_results
299
+ EncryptedOperatorResultsContext.new(
300
+ @version,
301
+ @solution[:sid]
302
+ )
303
+ end
304
+ ##
283
305
  # Access the operator_results
284
306
  # @return [OperatorResultList]
285
307
  # @return [OperatorResultContext] if sid was passed.
@@ -371,6 +393,7 @@ module Twilio
371
393
  'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
372
394
  'url' => payload['url'],
373
395
  'redaction' => payload['redaction'],
396
+ 'encryption_credential_sid' => payload['encryption_credential_sid'],
374
397
  'links' => payload['links'],
375
398
  }
376
399
 
@@ -474,6 +497,12 @@ module Twilio
474
497
  @properties['redaction']
475
498
  end
476
499
 
500
+ ##
501
+ # @return [String] The unique SID identifier of the Public Key resource used to encrypt the sentences and operator results.
502
+ def encryption_credential_sid
503
+ @properties['encryption_credential_sid']
504
+ end
505
+
477
506
  ##
478
507
  # @return [Hash]
479
508
  def links
@@ -503,6 +532,13 @@ module Twilio
503
532
  context.sentences
504
533
  end
505
534
 
535
+ ##
536
+ # Access the encrypted_sentences
537
+ # @return [encrypted_sentences] encrypted_sentences
538
+ def encrypted_sentences
539
+ context.encrypted_sentences
540
+ end
541
+
506
542
  ##
507
543
  # Access the media
508
544
  # @return [media] media
@@ -510,6 +546,13 @@ module Twilio
510
546
  context.media
511
547
  end
512
548
 
549
+ ##
550
+ # Access the encrypted_operator_results
551
+ # @return [encrypted_operator_results] encrypted_operator_results
552
+ def encrypted_operator_results
553
+ context.encrypted_operator_results
554
+ end
555
+
513
556
  ##
514
557
  # Access the operator_results
515
558
  # @return [operator_results] operator_results
@@ -223,19 +223,19 @@ module Twilio
223
223
  end
224
224
 
225
225
  ##
226
- # @return [Date] Target date to port the number. We cannot guarantee that this date will be honored by the other carriers, please work with Ops to get a confirmation of the firm order commitment (FOC) date. Expected format is ISO Local Date, example: ‘2011-12-03`. This date must be at least 7 days in the future for US ports and 10 days in the future for Japanese ports. We can't guarantee the exact date and time, as this depends on the losing carrier
226
+ # @return [Date] Target date to port the number. We cannot guarantee that this date will be honored by the other carriers, please work with Ops to get a confirmation of the firm order commitment (FOC) date. Expected format is ISO Local Date, example: ‘2011-12-03`. This date must be at least 7 days in the future for US ports and 10 days in the future for Japanese ports. If a start and end range is provided, the date will be converted to its UTC equivalent with the ranges as reference and stored in UTC. We can't guarantee the exact date and time, as this depends on the losing carrier.
227
227
  def target_port_in_date
228
228
  @properties['target_port_in_date']
229
229
  end
230
230
 
231
231
  ##
232
- # @return [String] The earliest time that the port should occur on the target port in date. Expected format is ISO Offset Time, example: ‘10:15:00-08:00'. We can't guarantee the exact date and time, as this depends on the losing carrier
232
+ # @return [String] The earliest time that the port should occur on the target port in date. Expected format is ISO Offset Time, example: ‘10:15:00-08:00'. We can't guarantee the exact date and time, as this depends on the losing carrier. The time will be stored and returned as UTC standard timezone.
233
233
  def target_port_in_time_range_start
234
234
  @properties['target_port_in_time_range_start']
235
235
  end
236
236
 
237
237
  ##
238
- # @return [String] The latest time that the port should occur on the target port in date. Expected format is ISO Offset Time, example: ‘10:15:00-08:00'. We can't guarantee the exact date and time, as this depends on the losing carrier
238
+ # @return [String] The latest time that the port should occur on the target port in date. Expected format is ISO Offset Time, example: ‘10:15:00-08:00'. We can't guarantee the exact date and time, as this depends on the losing carrier. The time will be stored and returned as UTC standard timezone.
239
239
  def target_port_in_time_range_end
240
240
  @properties['target_port_in_time_range_end']
241
241
  end