twilio-ruby 5.67.3 → 5.68.0

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: 8d37fa716f009ccbc9d5ee9811fc3189a03e7bcb
4
- data.tar.gz: 6b6131fc2557ddc198144eb055c7fad105e53d8f
3
+ metadata.gz: 9724651d0b7ed05dfcdde2937d67260c6f0ef027
4
+ data.tar.gz: 331d9d70ee2603d42ddccfb9fbb27b11591c4629
5
5
  SHA512:
6
- metadata.gz: 1bcc67be6b13ac0862a1940c6efaeb8d4ce9a16d6f087d52c07e936ab041ca2557a35b2373358e2788a96c6d80f8fb70f313d09fb8eaffb50e809c5c68367cd8
7
- data.tar.gz: 30b767d5f2657da4388f0f1dfee239d4badf1c516c0e4736094507c017c9a58603f75750c558730d5ab74604141c175ef4474b1bd726555a8c423d5157499487
6
+ metadata.gz: f50a02b4891c8c5bf8990b934098d22b308531eea5fd7c83203cb729abe4b7a776f3a0a2a2e57bdd9cb71d9eff9d09d2b02fa085060eb19d704153908de2ea35
7
+ data.tar.gz: 25c34d50f1ee0ebaaf70cee380ae42345db449953f172852fde9fa8255a498d30a7381f873ea6acff1e2a435674875e46d5cb4dcac84eac9b9c7ee089a9ce569
data/CHANGES.md CHANGED
@@ -1,6 +1,23 @@
1
1
  twilio-ruby changelog
2
2
  =====================
3
3
 
4
+ [2022-06-29] Version 5.68.0
5
+ ---------------------------
6
+ **Api**
7
+ - Added `amazon-polly` to `usage_record` API.
8
+
9
+ **Insights**
10
+ - Added `annotation` field in call summary
11
+ - Added new endpoint to fetch/create/update Call Annotations
12
+
13
+ **Verify**
14
+ - Remove `api.verify.totp` beta flag and set maturity to `beta` for Verify TOTP properties and parameters. **(breaking change)**
15
+ - Changed summary param `verify_service_sid` to `service_sid` to be consistent with list attempts API **(breaking change)**
16
+
17
+ **Twiml**
18
+ - Add `maxQueueSize` to `Enqueue`
19
+
20
+
4
21
  [2022-06-15] Version 5.67.3
5
22
  ---------------------------
6
23
  **Lookups**
data/README.md CHANGED
@@ -34,13 +34,13 @@ This library supports the following Ruby implementations:
34
34
  To install using [Bundler][bundler] grab the latest stable version:
35
35
 
36
36
  ```ruby
37
- gem 'twilio-ruby', '~> 5.67.3'
37
+ gem 'twilio-ruby', '~> 5.68.0'
38
38
  ```
39
39
 
40
40
  To manually install `twilio-ruby` via [Rubygems][rubygems] simply gem install:
41
41
 
42
42
  ```bash
43
- gem install twilio-ruby -v 5.67.3
43
+ gem install twilio-ruby -v 5.68.0
44
44
  ```
45
45
 
46
46
  To build and install the development branch yourself from the latest source:
@@ -0,0 +1,322 @@
1
+ ##
2
+ # This code was generated by
3
+ # \ / _ _ _| _ _
4
+ # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
+ # / /
6
+ #
7
+ # frozen_string_literal: true
8
+
9
+ module Twilio
10
+ module REST
11
+ class Insights < Domain
12
+ class V1 < Version
13
+ class CallContext < InstanceContext
14
+ ##
15
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
16
+ class AnnotationList < ListResource
17
+ ##
18
+ # Initialize the AnnotationList
19
+ # @param [Version] version Version that contains the resource
20
+ # @param [String] call_sid The unique SID identifier of the Call.
21
+ # @return [AnnotationList] AnnotationList
22
+ def initialize(version, call_sid: nil)
23
+ super(version)
24
+
25
+ # Path Solution
26
+ @solution = {call_sid: call_sid}
27
+ end
28
+
29
+ ##
30
+ # Provide a user friendly representation
31
+ def to_s
32
+ '#<Twilio.Insights.V1.AnnotationList>'
33
+ end
34
+ end
35
+
36
+ ##
37
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
38
+ class AnnotationPage < Page
39
+ ##
40
+ # Initialize the AnnotationPage
41
+ # @param [Version] version Version that contains the resource
42
+ # @param [Response] response Response from the API
43
+ # @param [Hash] solution Path solution for the resource
44
+ # @return [AnnotationPage] AnnotationPage
45
+ def initialize(version, response, solution)
46
+ super(version, response)
47
+
48
+ # Path Solution
49
+ @solution = solution
50
+ end
51
+
52
+ ##
53
+ # Build an instance of AnnotationInstance
54
+ # @param [Hash] payload Payload response from the API
55
+ # @return [AnnotationInstance] AnnotationInstance
56
+ def get_instance(payload)
57
+ AnnotationInstance.new(@version, payload, call_sid: @solution[:call_sid], )
58
+ end
59
+
60
+ ##
61
+ # Provide a user friendly representation
62
+ def to_s
63
+ '<Twilio.Insights.V1.AnnotationPage>'
64
+ end
65
+ end
66
+
67
+ ##
68
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
69
+ class AnnotationContext < InstanceContext
70
+ ##
71
+ # Initialize the AnnotationContext
72
+ # @param [Version] version Version that contains the resource
73
+ # @param [String] call_sid The unique SID identifier of the Call.
74
+ # @return [AnnotationContext] AnnotationContext
75
+ def initialize(version, call_sid)
76
+ super(version)
77
+
78
+ # Path Solution
79
+ @solution = {call_sid: call_sid, }
80
+ @uri = "/Voice/#{@solution[:call_sid]}/Annotation"
81
+ end
82
+
83
+ ##
84
+ # Update the AnnotationInstance
85
+ # @param [annotation.AnsweredBy] answered_by Which entity answered the call as
86
+ # determined by Answering Machine Detection. Use this to provide feedback on
87
+ # Answering Machine Detection accuracy. Possible enumerated values, one of: human,
88
+ # machine. human indicates the call was answered by a person. machine indicates
89
+ # the call was answered by an answering machine.
90
+ # @param [annotation.ConnectivityIssue] connectivity_issue Specify if the call had
91
+ # any connectivity issues. Possible enumerated values, one :
92
+ # no_connectivity_issue, invalid_number, caller_id, dropped_call,
93
+ # number_reachability.
94
+ # @param [String] quality_issues Specify if the call had any subjective quality
95
+ # issues. Possible values, one or more of: no_quality_issue, low_volume,
96
+ # choppy_robotic, echo, dtmf, latency, owa, static_noise. Use comma separated
97
+ # values to indicate multiple quality issues for the same call
98
+ # @param [Boolean] spam Specify if the call was a spam call. Use this to provide
99
+ # feedback on whether calls placed from your account were marked as spam, or if
100
+ # inbound calls received by your account were unwanted spam. Is of type Boolean:
101
+ # true, false. Use true if the call was a spam call.
102
+ # @param [String] call_score Specify the call score. This is of type integer. Use
103
+ # a range of 1-5 to indicate the call experience score, with the following mapping
104
+ # as a reference for rating the call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor,
105
+ # 1: Bad].
106
+ # @param [String] comment Specify any comments pertaining to the call. This of
107
+ # type string with a max limit of 100 characters. Twilio does not treat this field
108
+ # as PII, so don’t put any PII in here.
109
+ # @param [String] incident Associate this call with an incident or support ticket.
110
+ # This is of type string with a max limit of 100 characters. Twilio does not treat
111
+ # this field as PII, so don’t put any PII in here.
112
+ # @return [AnnotationInstance] Updated AnnotationInstance
113
+ def update(answered_by: :unset, connectivity_issue: :unset, quality_issues: :unset, spam: :unset, call_score: :unset, comment: :unset, incident: :unset)
114
+ data = Twilio::Values.of({
115
+ 'AnsweredBy' => answered_by,
116
+ 'ConnectivityIssue' => connectivity_issue,
117
+ 'QualityIssues' => quality_issues,
118
+ 'Spam' => spam,
119
+ 'CallScore' => call_score,
120
+ 'Comment' => comment,
121
+ 'Incident' => incident,
122
+ })
123
+
124
+ payload = @version.update('POST', @uri, data: data)
125
+
126
+ AnnotationInstance.new(@version, payload, call_sid: @solution[:call_sid], )
127
+ end
128
+
129
+ ##
130
+ # Fetch the AnnotationInstance
131
+ # @return [AnnotationInstance] Fetched AnnotationInstance
132
+ def fetch
133
+ payload = @version.fetch('GET', @uri)
134
+
135
+ AnnotationInstance.new(@version, payload, call_sid: @solution[:call_sid], )
136
+ end
137
+
138
+ ##
139
+ # Provide a user friendly representation
140
+ def to_s
141
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
142
+ "#<Twilio.Insights.V1.AnnotationContext #{context}>"
143
+ end
144
+
145
+ ##
146
+ # Provide a detailed, user friendly representation
147
+ def inspect
148
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
149
+ "#<Twilio.Insights.V1.AnnotationContext #{context}>"
150
+ end
151
+ end
152
+
153
+ ##
154
+ # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
155
+ class AnnotationInstance < InstanceResource
156
+ ##
157
+ # Initialize the AnnotationInstance
158
+ # @param [Version] version Version that contains the resource
159
+ # @param [Hash] payload payload that contains response from Twilio
160
+ # @param [String] call_sid The unique SID identifier of the Call.
161
+ # @return [AnnotationInstance] AnnotationInstance
162
+ def initialize(version, payload, call_sid: nil)
163
+ super(version)
164
+
165
+ # Marshaled Properties
166
+ @properties = {
167
+ 'call_sid' => payload['call_sid'],
168
+ 'account_sid' => payload['account_sid'],
169
+ 'answered_by' => payload['answered_by'],
170
+ 'connectivity_issue' => payload['connectivity_issue'],
171
+ 'quality_issues' => payload['quality_issues'],
172
+ 'spam' => payload['spam'],
173
+ 'call_score' => payload['call_score'] == nil ? payload['call_score'] : payload['call_score'].to_i,
174
+ 'comment' => payload['comment'],
175
+ 'incident' => payload['incident'],
176
+ 'url' => payload['url'],
177
+ }
178
+
179
+ # Context
180
+ @instance_context = nil
181
+ @params = {'call_sid' => call_sid, }
182
+ end
183
+
184
+ ##
185
+ # Generate an instance context for the instance, the context is capable of
186
+ # performing various actions. All instance actions are proxied to the context
187
+ # @return [AnnotationContext] AnnotationContext for this AnnotationInstance
188
+ def context
189
+ unless @instance_context
190
+ @instance_context = AnnotationContext.new(@version, @params['call_sid'], )
191
+ end
192
+ @instance_context
193
+ end
194
+
195
+ ##
196
+ # @return [String] Call SID.
197
+ def call_sid
198
+ @properties['call_sid']
199
+ end
200
+
201
+ ##
202
+ # @return [String] Account SID.
203
+ def account_sid
204
+ @properties['account_sid']
205
+ end
206
+
207
+ ##
208
+ # @return [annotation.AnsweredBy] Indicates the answering entity as determined by Answering Machine Detection.
209
+ def answered_by
210
+ @properties['answered_by']
211
+ end
212
+
213
+ ##
214
+ # @return [annotation.ConnectivityIssue] Indicates if the call had any connectivity issue
215
+ def connectivity_issue
216
+ @properties['connectivity_issue']
217
+ end
218
+
219
+ ##
220
+ # @return [Array[String]] Indicates if the call had audio quality issues.
221
+ def quality_issues
222
+ @properties['quality_issues']
223
+ end
224
+
225
+ ##
226
+ # @return [Boolean] Call spam indicator
227
+ def spam
228
+ @properties['spam']
229
+ end
230
+
231
+ ##
232
+ # @return [String] Call Score
233
+ def call_score
234
+ @properties['call_score']
235
+ end
236
+
237
+ ##
238
+ # @return [String] User comments
239
+ def comment
240
+ @properties['comment']
241
+ end
242
+
243
+ ##
244
+ # @return [String] Call tag for incidents or support ticket
245
+ def incident
246
+ @properties['incident']
247
+ end
248
+
249
+ ##
250
+ # @return [String] The URL of this resource.
251
+ def url
252
+ @properties['url']
253
+ end
254
+
255
+ ##
256
+ # Update the AnnotationInstance
257
+ # @param [annotation.AnsweredBy] answered_by Which entity answered the call as
258
+ # determined by Answering Machine Detection. Use this to provide feedback on
259
+ # Answering Machine Detection accuracy. Possible enumerated values, one of: human,
260
+ # machine. human indicates the call was answered by a person. machine indicates
261
+ # the call was answered by an answering machine.
262
+ # @param [annotation.ConnectivityIssue] connectivity_issue Specify if the call had
263
+ # any connectivity issues. Possible enumerated values, one :
264
+ # no_connectivity_issue, invalid_number, caller_id, dropped_call,
265
+ # number_reachability.
266
+ # @param [String] quality_issues Specify if the call had any subjective quality
267
+ # issues. Possible values, one or more of: no_quality_issue, low_volume,
268
+ # choppy_robotic, echo, dtmf, latency, owa, static_noise. Use comma separated
269
+ # values to indicate multiple quality issues for the same call
270
+ # @param [Boolean] spam Specify if the call was a spam call. Use this to provide
271
+ # feedback on whether calls placed from your account were marked as spam, or if
272
+ # inbound calls received by your account were unwanted spam. Is of type Boolean:
273
+ # true, false. Use true if the call was a spam call.
274
+ # @param [String] call_score Specify the call score. This is of type integer. Use
275
+ # a range of 1-5 to indicate the call experience score, with the following mapping
276
+ # as a reference for rating the call [5: Excellent, 4: Good, 3 : Fair, 2 : Poor,
277
+ # 1: Bad].
278
+ # @param [String] comment Specify any comments pertaining to the call. This of
279
+ # type string with a max limit of 100 characters. Twilio does not treat this field
280
+ # as PII, so don’t put any PII in here.
281
+ # @param [String] incident Associate this call with an incident or support ticket.
282
+ # This is of type string with a max limit of 100 characters. Twilio does not treat
283
+ # this field as PII, so don’t put any PII in here.
284
+ # @return [AnnotationInstance] Updated AnnotationInstance
285
+ def update(answered_by: :unset, connectivity_issue: :unset, quality_issues: :unset, spam: :unset, call_score: :unset, comment: :unset, incident: :unset)
286
+ context.update(
287
+ answered_by: answered_by,
288
+ connectivity_issue: connectivity_issue,
289
+ quality_issues: quality_issues,
290
+ spam: spam,
291
+ call_score: call_score,
292
+ comment: comment,
293
+ incident: incident,
294
+ )
295
+ end
296
+
297
+ ##
298
+ # Fetch the AnnotationInstance
299
+ # @return [AnnotationInstance] Fetched AnnotationInstance
300
+ def fetch
301
+ context.fetch
302
+ end
303
+
304
+ ##
305
+ # Provide a user friendly representation
306
+ def to_s
307
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
308
+ "<Twilio.Insights.V1.AnnotationInstance #{values}>"
309
+ end
310
+
311
+ ##
312
+ # Provide a detailed, user friendly representation
313
+ def inspect
314
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
315
+ "<Twilio.Insights.V1.AnnotationInstance #{values}>"
316
+ end
317
+ end
318
+ end
319
+ end
320
+ end
321
+ end
322
+ end
@@ -134,6 +134,7 @@ module Twilio
134
134
  'attributes' => payload['attributes'],
135
135
  'properties' => payload['properties'],
136
136
  'trust' => payload['trust'],
137
+ 'annotation' => payload['annotation'],
137
138
  }
138
139
 
139
140
  # Context
@@ -278,6 +279,12 @@ module Twilio
278
279
  @properties['trust']
279
280
  end
280
281
 
282
+ ##
283
+ # @return [Hash] The annotation
284
+ def annotation
285
+ @properties['annotation']
286
+ end
287
+
281
288
  ##
282
289
  # Fetch the CallSummaryInstance
283
290
  # @param [call_summary.ProcessingState] processing_state The processing_state
@@ -10,8 +10,6 @@ module Twilio
10
10
  module REST
11
11
  class Insights < Domain
12
12
  class V1 < Version
13
- ##
14
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
15
13
  class CallList < ListResource
16
14
  ##
17
15
  # Initialize the CallList
@@ -31,8 +29,6 @@ module Twilio
31
29
  end
32
30
  end
33
31
 
34
- ##
35
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
36
32
  class CallPage < Page
37
33
  ##
38
34
  # Initialize the CallPage
@@ -62,8 +58,6 @@ module Twilio
62
58
  end
63
59
  end
64
60
 
65
- ##
66
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
67
61
  class CallContext < InstanceContext
68
62
  ##
69
63
  # Initialize the CallContext
@@ -81,6 +75,7 @@ module Twilio
81
75
  @events = nil
82
76
  @metrics = nil
83
77
  @summary = nil
78
+ @annotation = nil
84
79
  end
85
80
 
86
81
  ##
@@ -124,6 +119,14 @@ module Twilio
124
119
  CallSummaryContext.new(@version, @solution[:sid], )
125
120
  end
126
121
 
122
+ ##
123
+ # Access the annotation
124
+ # @return [AnnotationList]
125
+ # @return [AnnotationContext]
126
+ def annotation
127
+ AnnotationContext.new(@version, @solution[:sid], )
128
+ end
129
+
127
130
  ##
128
131
  # Provide a user friendly representation
129
132
  def to_s
@@ -139,8 +142,6 @@ module Twilio
139
142
  end
140
143
  end
141
144
 
142
- ##
143
- # PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
144
145
  class CallInstance < InstanceResource
145
146
  ##
146
147
  # Initialize the CallInstance
@@ -216,6 +217,13 @@ module Twilio
216
217
  context.summary
217
218
  end
218
219
 
220
+ ##
221
+ # Access the annotation
222
+ # @return [annotation] annotation
223
+ def annotation
224
+ context.annotation
225
+ end
226
+
219
227
  ##
220
228
  # Provide a user friendly representation
221
229
  def to_s
@@ -16,7 +16,6 @@ module Twilio
16
16
  super
17
17
  @version = 'v1'
18
18
  @settings = nil
19
- @annotation = nil
20
19
  @calls = nil
21
20
  @call_summaries = nil
22
21
  @conferences = nil
@@ -29,21 +28,6 @@ module Twilio
29
28
  @settings ||= SettingContext.new self
30
29
  end
31
30
 
32
- ##
33
- # @param [String] call_sid The call_sid
34
- # @return [Twilio::REST::Insights::V1::AnnotationContext] if call_sid was passed.
35
- # @return [Twilio::REST::Insights::V1::AnnotationList]
36
- def annotation(call_sid=:unset)
37
- if call_sid.nil?
38
- raise ArgumentError, 'call_sid cannot be nil'
39
- end
40
- if call_sid == :unset
41
- @annotation ||= AnnotationList.new self
42
- else
43
- AnnotationContext.new(self, call_sid)
44
- end
45
- end
46
-
47
31
  ##
48
32
  # @param [String] sid The sid
49
33
  # @return [Twilio::REST::Insights::V1::CallContext] if sid was passed.
@@ -34,14 +34,6 @@ module Twilio
34
34
  self.v1.settings()
35
35
  end
36
36
 
37
- ##
38
- # @param [String] call_sid The call_sid
39
- # @return [Twilio::REST::Insights::V1::AnnotationInstance] if call_sid was passed.
40
- # @return [Twilio::REST::Insights::V1::AnnotationList]
41
- def annotation(call_sid=:unset)
42
- self.v1.annotation(call_sid)
43
- end
44
-
45
37
  ##
46
38
  # @param [String] sid The sid
47
39
  # @return [Twilio::REST::Insights::V1::CallInstance] if sid was passed.
@@ -243,7 +243,6 @@ module Twilio
243
243
  # Marshaled Properties
244
244
  @properties = {
245
245
  'account_sid' => payload['account_sid'],
246
- 'bitrate' => payload['bitrate'].to_i,
247
246
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
248
247
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
249
248
  'duration' => payload['duration'].to_i,
@@ -282,12 +281,6 @@ module Twilio
282
281
  @properties['account_sid']
283
282
  end
284
283
 
285
- ##
286
- # @return [String] The bitrate of the media
287
- def bitrate
288
- @properties['bitrate']
289
- end
290
-
291
284
  ##
292
285
  # @return [Time] The ISO 8601 date and time in GMT when the resource was created
293
286
  def date_created
@@ -73,8 +73,8 @@ module Twilio
73
73
 
74
74
  ##
75
75
  # Fetch the VerificationAttemptsSummaryInstance
76
- # @param [String] verify_service_sid Filter used to consider only Verification
77
- # Attempts of the given verify service on the summary aggregation.
76
+ # @param [String] service_sid Filter used to consider only Verification Attempts
77
+ # of the given verify service on the summary aggregation.
78
78
  # @param [Time] date_created_after Datetime filter used to consider only
79
79
  # Verification Attempts created after this datetime on the summary aggregation.
80
80
  # Given as GMT in RFC 2822 format.
@@ -90,9 +90,9 @@ module Twilio
90
90
  # on the summary aggregation by Destination prefix. It is the prefix of a phone
91
91
  # number in E.164 format.
92
92
  # @return [VerificationAttemptsSummaryInstance] Fetched VerificationAttemptsSummaryInstance
93
- def fetch(verify_service_sid: :unset, date_created_after: :unset, date_created_before: :unset, country: :unset, channel: :unset, destination_prefix: :unset)
93
+ def fetch(service_sid: :unset, date_created_after: :unset, date_created_before: :unset, country: :unset, channel: :unset, destination_prefix: :unset)
94
94
  params = Twilio::Values.of({
95
- 'VerifyServiceSid' => verify_service_sid,
95
+ 'ServiceSid' => service_sid,
96
96
  'DateCreatedAfter' => Twilio.serialize_iso8601_datetime(date_created_after),
97
97
  'DateCreatedBefore' => Twilio.serialize_iso8601_datetime(date_created_before),
98
98
  'Country' => country,
@@ -186,8 +186,8 @@ module Twilio
186
186
 
187
187
  ##
188
188
  # Fetch the VerificationAttemptsSummaryInstance
189
- # @param [String] verify_service_sid Filter used to consider only Verification
190
- # Attempts of the given verify service on the summary aggregation.
189
+ # @param [String] service_sid Filter used to consider only Verification Attempts
190
+ # of the given verify service on the summary aggregation.
191
191
  # @param [Time] date_created_after Datetime filter used to consider only
192
192
  # Verification Attempts created after this datetime on the summary aggregation.
193
193
  # Given as GMT in RFC 2822 format.
@@ -203,9 +203,9 @@ module Twilio
203
203
  # on the summary aggregation by Destination prefix. It is the prefix of a phone
204
204
  # number in E.164 format.
205
205
  # @return [VerificationAttemptsSummaryInstance] Fetched VerificationAttemptsSummaryInstance
206
- def fetch(verify_service_sid: :unset, date_created_after: :unset, date_created_before: :unset, country: :unset, channel: :unset, destination_prefix: :unset)
206
+ def fetch(service_sid: :unset, date_created_after: :unset, date_created_before: :unset, country: :unset, channel: :unset, destination_prefix: :unset)
207
207
  context.fetch(
208
- verify_service_sid: verify_service_sid,
208
+ service_sid: service_sid,
209
209
  date_created_after: date_created_after,
210
210
  date_created_before: date_created_before,
211
211
  country: country,
@@ -69,13 +69,14 @@ module Twilio
69
69
  # Create a new <Enqueue> element
70
70
  # name:: Friendly name
71
71
  # action:: Action URL
72
+ # max_queue_size:: Maximum size of queue
72
73
  # method:: Action URL method
73
74
  # wait_url:: Wait URL
74
75
  # wait_url_method:: Wait URL method
75
76
  # workflow_sid:: TaskRouter Workflow SID
76
77
  # keyword_args:: additional attributes
77
- def enqueue(name: nil, action: nil, method: nil, wait_url: nil, wait_url_method: nil, workflow_sid: nil, **keyword_args)
78
- enqueue = Enqueue.new(name: name, action: action, method: method, wait_url: wait_url, wait_url_method: wait_url_method, workflow_sid: workflow_sid, **keyword_args)
78
+ def enqueue(name: nil, action: nil, max_queue_size: nil, method: nil, wait_url: nil, wait_url_method: nil, workflow_sid: nil, **keyword_args)
79
+ enqueue = Enqueue.new(name: name, action: action, max_queue_size: max_queue_size, method: method, wait_url: wait_url, wait_url_method: wait_url_method, workflow_sid: workflow_sid, **keyword_args)
79
80
 
80
81
  yield(enqueue) if block_given?
81
82
  append(enqueue)
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.67.3'
2
+ VERSION = '5.68.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.67.3
4
+ version: 5.68.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twilio API Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-15 00:00:00.000000000 Z
11
+ date: 2022-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -433,8 +433,8 @@ files:
433
433
  - lib/twilio-ruby/rest/frontline_api/v1/user.rb
434
434
  - lib/twilio-ruby/rest/insights.rb
435
435
  - lib/twilio-ruby/rest/insights/v1.rb
436
- - lib/twilio-ruby/rest/insights/v1/annotation.rb
437
436
  - lib/twilio-ruby/rest/insights/v1/call.rb
437
+ - lib/twilio-ruby/rest/insights/v1/call/annotation.rb
438
438
  - lib/twilio-ruby/rest/insights/v1/call/event.rb
439
439
  - lib/twilio-ruby/rest/insights/v1/call/metric.rb
440
440
  - lib/twilio-ruby/rest/insights/v1/call/summary.rb
@@ -1,271 +0,0 @@
1
- ##
2
- # This code was generated by
3
- # \ / _ _ _| _ _
4
- # | (_)\/(_)(_|\/| |(/_ v1.0.0
5
- # / /
6
- #
7
- # frozen_string_literal: true
8
-
9
- module Twilio
10
- module REST
11
- class Insights < Domain
12
- class V1 < Version
13
- class AnnotationList < ListResource
14
- ##
15
- # Initialize the AnnotationList
16
- # @param [Version] version Version that contains the resource
17
- # @return [AnnotationList] AnnotationList
18
- def initialize(version)
19
- super(version)
20
-
21
- # Path Solution
22
- @solution = {}
23
- end
24
-
25
- ##
26
- # Provide a user friendly representation
27
- def to_s
28
- '#<Twilio.Insights.V1.AnnotationList>'
29
- end
30
- end
31
-
32
- class AnnotationPage < Page
33
- ##
34
- # Initialize the AnnotationPage
35
- # @param [Version] version Version that contains the resource
36
- # @param [Response] response Response from the API
37
- # @param [Hash] solution Path solution for the resource
38
- # @return [AnnotationPage] AnnotationPage
39
- def initialize(version, response, solution)
40
- super(version, response)
41
-
42
- # Path Solution
43
- @solution = solution
44
- end
45
-
46
- ##
47
- # Build an instance of AnnotationInstance
48
- # @param [Hash] payload Payload response from the API
49
- # @return [AnnotationInstance] AnnotationInstance
50
- def get_instance(payload)
51
- AnnotationInstance.new(@version, payload, )
52
- end
53
-
54
- ##
55
- # Provide a user friendly representation
56
- def to_s
57
- '<Twilio.Insights.V1.AnnotationPage>'
58
- end
59
- end
60
-
61
- class AnnotationContext < InstanceContext
62
- ##
63
- # Initialize the AnnotationContext
64
- # @param [Version] version Version that contains the resource
65
- # @param [String] call_sid The call_sid
66
- # @return [AnnotationContext] AnnotationContext
67
- def initialize(version, call_sid)
68
- super(version)
69
-
70
- # Path Solution
71
- @solution = {call_sid: call_sid, }
72
- @uri = "/Voice/#{@solution[:call_sid]}/Annotation"
73
- end
74
-
75
- ##
76
- # Update the AnnotationInstance
77
- # @param [annotation.AnsweredBy] answered_by The answered_by
78
- # @param [annotation.ConnectivityIssue] connectivity_issue The connectivity_issue
79
- # @param [String] quality_issues The quality_issues
80
- # @param [Boolean] spam The spam
81
- # @param [String] call_score The call_score
82
- # @param [String] comment The comment
83
- # @param [String] incident The incident
84
- # @return [AnnotationInstance] Updated AnnotationInstance
85
- def update(answered_by: :unset, connectivity_issue: :unset, quality_issues: :unset, spam: :unset, call_score: :unset, comment: :unset, incident: :unset)
86
- data = Twilio::Values.of({
87
- 'AnsweredBy' => answered_by,
88
- 'ConnectivityIssue' => connectivity_issue,
89
- 'QualityIssues' => quality_issues,
90
- 'Spam' => spam,
91
- 'CallScore' => call_score,
92
- 'Comment' => comment,
93
- 'Incident' => incident,
94
- })
95
-
96
- payload = @version.update('POST', @uri, data: data)
97
-
98
- AnnotationInstance.new(@version, payload, call_sid: @solution[:call_sid], )
99
- end
100
-
101
- ##
102
- # Fetch the AnnotationInstance
103
- # @return [AnnotationInstance] Fetched AnnotationInstance
104
- def fetch
105
- payload = @version.fetch('GET', @uri)
106
-
107
- AnnotationInstance.new(@version, payload, call_sid: @solution[:call_sid], )
108
- end
109
-
110
- ##
111
- # Provide a user friendly representation
112
- def to_s
113
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
114
- "#<Twilio.Insights.V1.AnnotationContext #{context}>"
115
- end
116
-
117
- ##
118
- # Provide a detailed, user friendly representation
119
- def inspect
120
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
121
- "#<Twilio.Insights.V1.AnnotationContext #{context}>"
122
- end
123
- end
124
-
125
- class AnnotationInstance < InstanceResource
126
- ##
127
- # Initialize the AnnotationInstance
128
- # @param [Version] version Version that contains the resource
129
- # @param [Hash] payload payload that contains response from Twilio
130
- # @param [String] call_sid The call_sid
131
- # @return [AnnotationInstance] AnnotationInstance
132
- def initialize(version, payload, call_sid: nil)
133
- super(version)
134
-
135
- # Marshaled Properties
136
- @properties = {
137
- 'call_sid' => payload['call_sid'],
138
- 'account_sid' => payload['account_sid'],
139
- 'answered_by' => payload['answered_by'],
140
- 'connectivity_issue' => payload['connectivity_issue'],
141
- 'quality_issues' => payload['quality_issues'],
142
- 'spam' => payload['spam'],
143
- 'call_score' => payload['call_score'] == nil ? payload['call_score'] : payload['call_score'].to_i,
144
- 'comment' => payload['comment'],
145
- 'incident' => payload['incident'],
146
- 'url' => payload['url'],
147
- }
148
-
149
- # Context
150
- @instance_context = nil
151
- @params = {'call_sid' => call_sid || @properties['call_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 [AnnotationContext] AnnotationContext for this AnnotationInstance
158
- def context
159
- unless @instance_context
160
- @instance_context = AnnotationContext.new(@version, @params['call_sid'], )
161
- end
162
- @instance_context
163
- end
164
-
165
- ##
166
- # @return [String] The call_sid
167
- def call_sid
168
- @properties['call_sid']
169
- end
170
-
171
- ##
172
- # @return [String] The account_sid
173
- def account_sid
174
- @properties['account_sid']
175
- end
176
-
177
- ##
178
- # @return [annotation.AnsweredBy] The answered_by
179
- def answered_by
180
- @properties['answered_by']
181
- end
182
-
183
- ##
184
- # @return [annotation.ConnectivityIssue] The connectivity_issue
185
- def connectivity_issue
186
- @properties['connectivity_issue']
187
- end
188
-
189
- ##
190
- # @return [Array[String]] The quality_issues
191
- def quality_issues
192
- @properties['quality_issues']
193
- end
194
-
195
- ##
196
- # @return [Boolean] The spam
197
- def spam
198
- @properties['spam']
199
- end
200
-
201
- ##
202
- # @return [String] The call_score
203
- def call_score
204
- @properties['call_score']
205
- end
206
-
207
- ##
208
- # @return [String] The comment
209
- def comment
210
- @properties['comment']
211
- end
212
-
213
- ##
214
- # @return [String] The incident
215
- def incident
216
- @properties['incident']
217
- end
218
-
219
- ##
220
- # @return [String] The url
221
- def url
222
- @properties['url']
223
- end
224
-
225
- ##
226
- # Update the AnnotationInstance
227
- # @param [annotation.AnsweredBy] answered_by The answered_by
228
- # @param [annotation.ConnectivityIssue] connectivity_issue The connectivity_issue
229
- # @param [String] quality_issues The quality_issues
230
- # @param [Boolean] spam The spam
231
- # @param [String] call_score The call_score
232
- # @param [String] comment The comment
233
- # @param [String] incident The incident
234
- # @return [AnnotationInstance] Updated AnnotationInstance
235
- def update(answered_by: :unset, connectivity_issue: :unset, quality_issues: :unset, spam: :unset, call_score: :unset, comment: :unset, incident: :unset)
236
- context.update(
237
- answered_by: answered_by,
238
- connectivity_issue: connectivity_issue,
239
- quality_issues: quality_issues,
240
- spam: spam,
241
- call_score: call_score,
242
- comment: comment,
243
- incident: incident,
244
- )
245
- end
246
-
247
- ##
248
- # Fetch the AnnotationInstance
249
- # @return [AnnotationInstance] Fetched AnnotationInstance
250
- def fetch
251
- context.fetch
252
- end
253
-
254
- ##
255
- # Provide a user friendly representation
256
- def to_s
257
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
258
- "<Twilio.Insights.V1.AnnotationInstance #{values}>"
259
- end
260
-
261
- ##
262
- # Provide a detailed, user friendly representation
263
- def inspect
264
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
265
- "<Twilio.Insights.V1.AnnotationInstance #{values}>"
266
- end
267
- end
268
- end
269
- end
270
- end
271
- end