twilio-ruby 5.65.1 → 5.66.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/pr-lint.yml +15 -0
  3. data/CHANGES.md +41 -0
  4. data/README.md +2 -4
  5. data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +2 -2
  6. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +4 -4
  7. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +0 -7
  8. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +10 -10
  9. data/lib/twilio-ruby/rest/chat/v3/channel.rb +275 -0
  10. data/lib/twilio-ruby/rest/chat/v3.rb +48 -0
  11. data/lib/twilio-ruby/rest/chat.rb +16 -0
  12. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
  13. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +236 -0
  14. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +330 -0
  15. data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +377 -0
  16. data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +233 -0
  17. data/lib/twilio-ruby/rest/flex_api/v1.rb +16 -0
  18. data/lib/twilio-ruby/rest/flex_api.rb +9 -0
  19. data/lib/twilio-ruby/rest/insights/v1/annotation.rb +271 -0
  20. data/lib/twilio-ruby/rest/insights/v1.rb +16 -0
  21. data/lib/twilio-ruby/rest/insights.rb +8 -0
  22. data/lib/twilio-ruby/rest/media/v1/media_processor.rb +1 -1
  23. data/lib/twilio-ruby/rest/media/v1/media_recording.rb +26 -5
  24. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +14 -1
  25. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +3 -55
  26. data/lib/twilio-ruby/rest/supersim/v1.rb +0 -16
  27. data/lib/twilio-ruby/rest/supersim.rb +0 -9
  28. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +6 -2
  29. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +4 -2
  30. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +4 -2
  31. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +2 -1
  32. data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +234 -0
  33. data/lib/twilio-ruby/rest/verify/v2.rb +7 -0
  34. data/lib/twilio-ruby/rest/verify.rb +6 -0
  35. data/lib/twilio-ruby/rest/video/v1/composition.rb +14 -0
  36. data/lib/twilio-ruby/rest/video/v1/recording.rb +14 -0
  37. data/lib/twilio-ruby/version.rb +1 -1
  38. metadata +11 -3
  39. data/lib/twilio-ruby/rest/supersim/v1/command.rb +0 -368
@@ -97,7 +97,8 @@ module Twilio
97
97
  # above and below the specified thresholds in seconds are computed. For example,
98
98
  # `5,30` would show splits of Tasks that were canceled or accepted before and
99
99
  # after 5 seconds and before and after 30 seconds. This can be used to show short
100
- # abandoned Tasks or Tasks that failed to meet an SLA.
100
+ # abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate
101
+ # statistics on up to 10,000 Tasks for any given threshold.
101
102
  # @return [WorkspaceCumulativeStatisticsInstance] Fetched WorkspaceCumulativeStatisticsInstance
102
103
  def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
103
104
  params = Twilio::Values.of({
@@ -328,7 +329,8 @@ module Twilio
328
329
  # above and below the specified thresholds in seconds are computed. For example,
329
330
  # `5,30` would show splits of Tasks that were canceled or accepted before and
330
331
  # after 5 seconds and before and after 30 seconds. This can be used to show short
331
- # abandoned Tasks or Tasks that failed to meet an SLA.
332
+ # abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate
333
+ # statistics on up to 10,000 Tasks for any given threshold.
332
334
  # @return [WorkspaceCumulativeStatisticsInstance] Fetched WorkspaceCumulativeStatisticsInstance
333
335
  def fetch(end_date: :unset, minutes: :unset, start_date: :unset, task_channel: :unset, split_by_wait_time: :unset)
334
336
  context.fetch(
@@ -61,7 +61,8 @@ module Twilio
61
61
  # may include multiple Rate Limit values in each request.
62
62
  # @param [Hash] channel_configuration
63
63
  # {`email`}[https://www.twilio.com/docs/verify/email] channel configuration in
64
- # json format. Must include 'from' and 'from_name'.
64
+ # json format. The fields 'from' and 'from_name' are optional but if included the
65
+ # 'from' field must have a valid email address.
65
66
  # @param [String] app_hash Your {App
66
67
  # Hash}[https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string]
67
68
  # to be appended at the end of your verification SMS body. Applies only to SMS.
@@ -0,0 +1,234 @@
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 Verify < Domain
12
+ class V2 < Version
13
+ class VerificationAttemptsSummaryList < ListResource
14
+ ##
15
+ # Initialize the VerificationAttemptsSummaryList
16
+ # @param [Version] version Version that contains the resource
17
+ # @return [VerificationAttemptsSummaryList] VerificationAttemptsSummaryList
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.Verify.V2.VerificationAttemptsSummaryList>'
29
+ end
30
+ end
31
+
32
+ class VerificationAttemptsSummaryPage < Page
33
+ ##
34
+ # Initialize the VerificationAttemptsSummaryPage
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 [VerificationAttemptsSummaryPage] VerificationAttemptsSummaryPage
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 VerificationAttemptsSummaryInstance
48
+ # @param [Hash] payload Payload response from the API
49
+ # @return [VerificationAttemptsSummaryInstance] VerificationAttemptsSummaryInstance
50
+ def get_instance(payload)
51
+ VerificationAttemptsSummaryInstance.new(@version, payload, )
52
+ end
53
+
54
+ ##
55
+ # Provide a user friendly representation
56
+ def to_s
57
+ '<Twilio.Verify.V2.VerificationAttemptsSummaryPage>'
58
+ end
59
+ end
60
+
61
+ class VerificationAttemptsSummaryContext < InstanceContext
62
+ ##
63
+ # Initialize the VerificationAttemptsSummaryContext
64
+ # @param [Version] version Version that contains the resource
65
+ # @return [VerificationAttemptsSummaryContext] VerificationAttemptsSummaryContext
66
+ def initialize(version)
67
+ super(version)
68
+
69
+ # Path Solution
70
+ @solution = {}
71
+ @uri = "/Attempts/Summary"
72
+ end
73
+
74
+ ##
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.
78
+ # @param [Time] date_created_after Datetime filter used to consider only
79
+ # Verification Attempts created after this datetime on the summary aggregation.
80
+ # Given as GMT in RFC 2822 format.
81
+ # @param [Time] date_created_before Datetime filter used to consider only
82
+ # Verification Attempts created before this datetime on the summary aggregation.
83
+ # Given as GMT in RFC 2822 format.
84
+ # @param [String] country Filter used to consider only Verification Attempts sent
85
+ # to the specified destination country on the summary aggregation.
86
+ # @param [verification_attempts_summary.Channels] channel Filter Verification
87
+ # Attempts considered on the summary aggregation by communication channel. Valid
88
+ # values are `SMS` and `CALL`
89
+ # @param [String] destination_prefix Filter the Verification Attempts considered
90
+ # on the summary aggregation by Destination prefix. It is the prefix of a phone
91
+ # number in E.164 format.
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)
94
+ params = Twilio::Values.of({
95
+ 'VerifyServiceSid' => verify_service_sid,
96
+ 'DateCreatedAfter' => Twilio.serialize_iso8601_datetime(date_created_after),
97
+ 'DateCreatedBefore' => Twilio.serialize_iso8601_datetime(date_created_before),
98
+ 'Country' => country,
99
+ 'Channel' => channel,
100
+ 'DestinationPrefix' => destination_prefix,
101
+ })
102
+
103
+ payload = @version.fetch('GET', @uri, params: params)
104
+
105
+ VerificationAttemptsSummaryInstance.new(@version, payload, )
106
+ end
107
+
108
+ ##
109
+ # Provide a user friendly representation
110
+ def to_s
111
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
112
+ "#<Twilio.Verify.V2.VerificationAttemptsSummaryContext #{context}>"
113
+ end
114
+
115
+ ##
116
+ # Provide a detailed, user friendly representation
117
+ def inspect
118
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
119
+ "#<Twilio.Verify.V2.VerificationAttemptsSummaryContext #{context}>"
120
+ end
121
+ end
122
+
123
+ class VerificationAttemptsSummaryInstance < InstanceResource
124
+ ##
125
+ # Initialize the VerificationAttemptsSummaryInstance
126
+ # @param [Version] version Version that contains the resource
127
+ # @param [Hash] payload payload that contains response from Twilio
128
+ # @return [VerificationAttemptsSummaryInstance] VerificationAttemptsSummaryInstance
129
+ def initialize(version, payload)
130
+ super(version)
131
+
132
+ # Marshaled Properties
133
+ @properties = {
134
+ 'total_attempts' => payload['total_attempts'].to_i,
135
+ 'total_converted' => payload['total_converted'].to_i,
136
+ 'total_unconverted' => payload['total_unconverted'].to_i,
137
+ 'conversion_rate_percentage' => payload['conversion_rate_percentage'].to_f,
138
+ 'url' => payload['url'],
139
+ }
140
+
141
+ # Context
142
+ @instance_context = nil
143
+ @params = {}
144
+ end
145
+
146
+ ##
147
+ # Generate an instance context for the instance, the context is capable of
148
+ # performing various actions. All instance actions are proxied to the context
149
+ # @return [VerificationAttemptsSummaryContext] VerificationAttemptsSummaryContext for this VerificationAttemptsSummaryInstance
150
+ def context
151
+ unless @instance_context
152
+ @instance_context = VerificationAttemptsSummaryContext.new(@version, )
153
+ end
154
+ @instance_context
155
+ end
156
+
157
+ ##
158
+ # @return [String] Total of attempts made.
159
+ def total_attempts
160
+ @properties['total_attempts']
161
+ end
162
+
163
+ ##
164
+ # @return [String] Total of attempts confirmed by the end user.
165
+ def total_converted
166
+ @properties['total_converted']
167
+ end
168
+
169
+ ##
170
+ # @return [String] Total of attempts made that were not confirmed by the end user.
171
+ def total_unconverted
172
+ @properties['total_unconverted']
173
+ end
174
+
175
+ ##
176
+ # @return [String] Percentage of the confirmed messages over the total.
177
+ def conversion_rate_percentage
178
+ @properties['conversion_rate_percentage']
179
+ end
180
+
181
+ ##
182
+ # @return [String] The url
183
+ def url
184
+ @properties['url']
185
+ end
186
+
187
+ ##
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.
191
+ # @param [Time] date_created_after Datetime filter used to consider only
192
+ # Verification Attempts created after this datetime on the summary aggregation.
193
+ # Given as GMT in RFC 2822 format.
194
+ # @param [Time] date_created_before Datetime filter used to consider only
195
+ # Verification Attempts created before this datetime on the summary aggregation.
196
+ # Given as GMT in RFC 2822 format.
197
+ # @param [String] country Filter used to consider only Verification Attempts sent
198
+ # to the specified destination country on the summary aggregation.
199
+ # @param [verification_attempts_summary.Channels] channel Filter Verification
200
+ # Attempts considered on the summary aggregation by communication channel. Valid
201
+ # values are `SMS` and `CALL`
202
+ # @param [String] destination_prefix Filter the Verification Attempts considered
203
+ # on the summary aggregation by Destination prefix. It is the prefix of a phone
204
+ # number in E.164 format.
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)
207
+ context.fetch(
208
+ verify_service_sid: verify_service_sid,
209
+ date_created_after: date_created_after,
210
+ date_created_before: date_created_before,
211
+ country: country,
212
+ channel: channel,
213
+ destination_prefix: destination_prefix,
214
+ )
215
+ end
216
+
217
+ ##
218
+ # Provide a user friendly representation
219
+ def to_s
220
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
221
+ "<Twilio.Verify.V2.VerificationAttemptsSummaryInstance #{values}>"
222
+ end
223
+
224
+ ##
225
+ # Provide a detailed, user friendly representation
226
+ def inspect
227
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
228
+ "<Twilio.Verify.V2.VerificationAttemptsSummaryInstance #{values}>"
229
+ end
230
+ end
231
+ end
232
+ end
233
+ end
234
+ end
@@ -18,6 +18,7 @@ module Twilio
18
18
  @forms = nil
19
19
  @services = nil
20
20
  @verification_attempts = nil
21
+ @verification_attempts_summary = nil
21
22
  @templates = nil
22
23
  end
23
24
 
@@ -68,6 +69,12 @@ module Twilio
68
69
  end
69
70
  end
70
71
 
72
+ ##
73
+ # @return [Twilio::REST::Verify::V2::VerificationAttemptsSummaryContext]
74
+ def verification_attempts_summary
75
+ @verification_attempts_summary ||= VerificationAttemptsSummaryContext.new self
76
+ end
77
+
71
78
  ##
72
79
  # @return [Twilio::REST::Verify::V2::TemplateContext]
73
80
  def templates
@@ -55,6 +55,12 @@ module Twilio
55
55
  self.v2.verification_attempts(sid)
56
56
  end
57
57
 
58
+ ##
59
+ # @return [Twilio::REST::Verify::V2::VerificationAttemptsSummaryInstance]
60
+ def verification_attempts_summary
61
+ self.v2.verification_attempts_summary()
62
+ end
63
+
58
64
  ##
59
65
  # @return [Twilio::REST::Verify::V2::TemplateInstance]
60
66
  def templates
@@ -335,6 +335,8 @@ module Twilio
335
335
  'size' => payload['size'].to_i,
336
336
  'duration' => payload['duration'].to_i,
337
337
  'media_external_location' => payload['media_external_location'],
338
+ 'status_callback' => payload['status_callback'],
339
+ 'status_callback_method' => payload['status_callback_method'],
338
340
  'url' => payload['url'],
339
341
  'links' => payload['links'],
340
342
  }
@@ -457,6 +459,18 @@ module Twilio
457
459
  @properties['media_external_location']
458
460
  end
459
461
 
462
+ ##
463
+ # @return [String] The URL called to send status information on every composition event.
464
+ def status_callback
465
+ @properties['status_callback']
466
+ end
467
+
468
+ ##
469
+ # @return [String] The HTTP method used to call `status_callback`
470
+ def status_callback_method
471
+ @properties['status_callback_method']
472
+ end
473
+
460
474
  ##
461
475
  # @return [String] The absolute URL of the resource
462
476
  def url
@@ -273,6 +273,8 @@ module Twilio
273
273
  'track_name' => payload['track_name'],
274
274
  'offset' => payload['offset'].to_i,
275
275
  'media_external_location' => payload['media_external_location'],
276
+ 'status_callback' => payload['status_callback'],
277
+ 'status_callback_method' => payload['status_callback_method'],
276
278
  'links' => payload['links'],
277
279
  }
278
280
 
@@ -382,6 +384,18 @@ module Twilio
382
384
  @properties['media_external_location']
383
385
  end
384
386
 
387
+ ##
388
+ # @return [String] The URL called to send status information on every recording event.
389
+ def status_callback
390
+ @properties['status_callback']
391
+ end
392
+
393
+ ##
394
+ # @return [String] The HTTP method used to call `status_callback`
395
+ def status_callback_method
396
+ @properties['status_callback_method']
397
+ end
398
+
385
399
  ##
386
400
  # @return [String] The URLs of related resources
387
401
  def links
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.65.1'
2
+ VERSION = '5.66.1'
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.65.1
4
+ version: 5.66.1
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-03-09 00:00:00.000000000 Z
11
+ date: 2022-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -198,6 +198,7 @@ extra_rdoc_files:
198
198
  - LICENSE
199
199
  files:
200
200
  - ".dockerignore"
201
+ - ".github/workflows/pr-lint.yml"
201
202
  - ".github/workflows/test-and-deploy.yml"
202
203
  - ".gitignore"
203
204
  - ".rubocop.yml"
@@ -375,6 +376,8 @@ files:
375
376
  - lib/twilio-ruby/rest/chat/v2/service/user.rb
376
377
  - lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb
377
378
  - lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb
379
+ - lib/twilio-ruby/rest/chat/v3.rb
380
+ - lib/twilio-ruby/rest/chat/v3/channel.rb
378
381
  - lib/twilio-ruby/rest/client.rb
379
382
  - lib/twilio-ruby/rest/conversations.rb
380
383
  - lib/twilio-ruby/rest/conversations/v1.rb
@@ -424,12 +427,17 @@ files:
424
427
  - lib/twilio-ruby/rest/flex_api/v1/channel.rb
425
428
  - lib/twilio-ruby/rest/flex_api/v1/configuration.rb
426
429
  - lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb
430
+ - lib/twilio-ruby/rest/flex_api/v1/interaction.rb
431
+ - lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb
432
+ - lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb
433
+ - lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb
427
434
  - lib/twilio-ruby/rest/flex_api/v1/web_channel.rb
428
435
  - lib/twilio-ruby/rest/frontline_api.rb
429
436
  - lib/twilio-ruby/rest/frontline_api/v1.rb
430
437
  - lib/twilio-ruby/rest/frontline_api/v1/user.rb
431
438
  - lib/twilio-ruby/rest/insights.rb
432
439
  - lib/twilio-ruby/rest/insights/v1.rb
440
+ - lib/twilio-ruby/rest/insights/v1/annotation.rb
433
441
  - lib/twilio-ruby/rest/insights/v1/call.rb
434
442
  - lib/twilio-ruby/rest/insights/v1/call/event.rb
435
443
  - lib/twilio-ruby/rest/insights/v1/call/metric.rb
@@ -627,7 +635,6 @@ files:
627
635
  - lib/twilio-ruby/rest/studio/v2/flow_validate.rb
628
636
  - lib/twilio-ruby/rest/supersim.rb
629
637
  - lib/twilio-ruby/rest/supersim/v1.rb
630
- - lib/twilio-ruby/rest/supersim/v1/command.rb
631
638
  - lib/twilio-ruby/rest/supersim/v1/esim_profile.rb
632
639
  - lib/twilio-ruby/rest/supersim/v1/fleet.rb
633
640
  - lib/twilio-ruby/rest/supersim/v1/ip_command.rb
@@ -719,6 +726,7 @@ files:
719
726
  - lib/twilio-ruby/rest/verify/v2/service/webhook.rb
720
727
  - lib/twilio-ruby/rest/verify/v2/template.rb
721
728
  - lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
729
+ - lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb
722
730
  - lib/twilio-ruby/rest/video.rb
723
731
  - lib/twilio-ruby/rest/video/v1.rb
724
732
  - lib/twilio-ruby/rest/video/v1/composition.rb