twilio-ruby 5.63.0 → 5.65.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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test-and-deploy.yml +27 -3
  3. data/.rubocop.yml +1 -1
  4. data/.rubocop_todo.yml +84 -21
  5. data/CHANGES.md +79 -0
  6. data/Makefile +1 -4
  7. data/README.md +3 -2
  8. data/lib/rack/twilio_webhook_authentication.rb +25 -1
  9. data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +7 -0
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +674 -0
  11. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -0
  12. data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +447 -0
  13. data/lib/twilio-ruby/rest/conversations/v1.rb +17 -0
  14. data/lib/twilio-ruby/rest/conversations.rb +9 -0
  15. data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -77
  16. data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +33 -18
  17. data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +474 -0
  18. data/lib/twilio-ruby/rest/insights/v1/conference.rb +512 -0
  19. data/lib/twilio-ruby/rest/insights/v1.rb +16 -0
  20. data/lib/twilio-ruby/rest/insights.rb +8 -0
  21. data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +7 -0
  22. data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +75 -18
  23. data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +372 -0
  24. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +71 -30
  25. data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +1 -1
  26. data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +9 -9
  27. data/lib/twilio-ruby/rest/supersim/v1.rb +16 -0
  28. data/lib/twilio-ruby/rest/supersim.rb +9 -0
  29. data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +130 -8
  30. data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +7 -0
  31. data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +16 -6
  32. data/lib/twilio-ruby/rest/verify/v2/service.rb +8 -2
  33. data/lib/twilio-ruby/rest/verify/v2/template.rb +1 -1
  34. data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +89 -21
  35. data/lib/twilio-ruby/rest/verify.rb +2 -2
  36. data/lib/twilio-ruby/rest/video/v1/room.rb +7 -4
  37. data/lib/twilio-ruby/version.rb +1 -1
  38. data/sonar-project.properties +1 -1
  39. data/twilio-ruby.gemspec +0 -1
  40. metadata +7 -16
@@ -28,11 +28,24 @@ module Twilio
28
28
  # Unlike stream(), this operation is eager and will load `limit` records into
29
29
  # memory before returning.
30
30
  # @param [Time] date_created_after Datetime filter used to query Verification
31
- # Attempts created after this datetime.
31
+ # Attempts created after this datetime. Given as GMT in RFC 2822 format.
32
32
  # @param [Time] date_created_before Datetime filter used to query Verification
33
- # Attempts created before this datetime.
34
- # @param [String] channel_data_to Destination of a verification. Depending on the
35
- # type of channel, it could be a phone number in E.164 format or an email address.
33
+ # Attempts created before this datetime. Given as GMT in RFC 2822 format.
34
+ # @param [String] channel_data_to Destination of a verification. It is phone
35
+ # number in E.164 format.
36
+ # @param [String] country Filter used to query Verification Attempts sent to the
37
+ # specified destination country.
38
+ # @param [verification_attempt.Channels] channel Filter used to query Verification
39
+ # Attempts by communication channel. Valid values are `SMS` and `CALL`
40
+ # @param [String] verify_service_sid Filter used to query Verification Attempts by
41
+ # verify service. Only attempts of the provided SID will be returned.
42
+ # @param [String] verification_sid Filter used to return all the Verification
43
+ # Attempts of a single verification. Only attempts of the provided verification
44
+ # SID will be returned.
45
+ # @param [verification_attempt.ConversionStatus] status Filter used to query
46
+ # Verification Attempts by conversion status. Valid values are `UNCONVERTED`, for
47
+ # attempts that were not converted, and `CONVERTED`, for attempts that were
48
+ # confirmed.
36
49
  # @param [Integer] limit Upper limit for the number of records to return. stream()
37
50
  # guarantees to never return more than limit. Default is no limit
38
51
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -40,11 +53,16 @@ module Twilio
40
53
  # but a limit is defined, stream() will attempt to read the limit with the most
41
54
  # efficient page size, i.e. min(limit, 1000)
42
55
  # @return [Array] Array of up to limit results
43
- def list(date_created_after: :unset, date_created_before: :unset, channel_data_to: :unset, limit: nil, page_size: nil)
56
+ def list(date_created_after: :unset, date_created_before: :unset, channel_data_to: :unset, country: :unset, channel: :unset, verify_service_sid: :unset, verification_sid: :unset, status: :unset, limit: nil, page_size: nil)
44
57
  self.stream(
45
58
  date_created_after: date_created_after,
46
59
  date_created_before: date_created_before,
47
60
  channel_data_to: channel_data_to,
61
+ country: country,
62
+ channel: channel,
63
+ verify_service_sid: verify_service_sid,
64
+ verification_sid: verification_sid,
65
+ status: status,
48
66
  limit: limit,
49
67
  page_size: page_size
50
68
  ).entries
@@ -55,11 +73,24 @@ module Twilio
55
73
  # This operation lazily loads records as efficiently as possible until the limit
56
74
  # is reached.
57
75
  # @param [Time] date_created_after Datetime filter used to query Verification
58
- # Attempts created after this datetime.
76
+ # Attempts created after this datetime. Given as GMT in RFC 2822 format.
59
77
  # @param [Time] date_created_before Datetime filter used to query Verification
60
- # Attempts created before this datetime.
61
- # @param [String] channel_data_to Destination of a verification. Depending on the
62
- # type of channel, it could be a phone number in E.164 format or an email address.
78
+ # Attempts created before this datetime. Given as GMT in RFC 2822 format.
79
+ # @param [String] channel_data_to Destination of a verification. It is phone
80
+ # number in E.164 format.
81
+ # @param [String] country Filter used to query Verification Attempts sent to the
82
+ # specified destination country.
83
+ # @param [verification_attempt.Channels] channel Filter used to query Verification
84
+ # Attempts by communication channel. Valid values are `SMS` and `CALL`
85
+ # @param [String] verify_service_sid Filter used to query Verification Attempts by
86
+ # verify service. Only attempts of the provided SID will be returned.
87
+ # @param [String] verification_sid Filter used to return all the Verification
88
+ # Attempts of a single verification. Only attempts of the provided verification
89
+ # SID will be returned.
90
+ # @param [verification_attempt.ConversionStatus] status Filter used to query
91
+ # Verification Attempts by conversion status. Valid values are `UNCONVERTED`, for
92
+ # attempts that were not converted, and `CONVERTED`, for attempts that were
93
+ # confirmed.
63
94
  # @param [Integer] limit Upper limit for the number of records to return. stream()
64
95
  # guarantees to never return more than limit. Default is no limit.
65
96
  # @param [Integer] page_size Number of records to fetch per request, when
@@ -67,13 +98,18 @@ module Twilio
67
98
  # but a limit is defined, stream() will attempt to read the limit with the most
68
99
  # efficient page size, i.e. min(limit, 1000)
69
100
  # @return [Enumerable] Enumerable that will yield up to limit results
70
- def stream(date_created_after: :unset, date_created_before: :unset, channel_data_to: :unset, limit: nil, page_size: nil)
101
+ def stream(date_created_after: :unset, date_created_before: :unset, channel_data_to: :unset, country: :unset, channel: :unset, verify_service_sid: :unset, verification_sid: :unset, status: :unset, limit: nil, page_size: nil)
71
102
  limits = @version.read_limits(limit, page_size)
72
103
 
73
104
  page = self.page(
74
105
  date_created_after: date_created_after,
75
106
  date_created_before: date_created_before,
76
107
  channel_data_to: channel_data_to,
108
+ country: country,
109
+ channel: channel,
110
+ verify_service_sid: verify_service_sid,
111
+ verification_sid: verification_sid,
112
+ status: status,
77
113
  page_size: limits[:page_size],
78
114
  )
79
115
 
@@ -98,20 +134,38 @@ module Twilio
98
134
  # Retrieve a single page of VerificationAttemptInstance records from the API.
99
135
  # Request is executed immediately.
100
136
  # @param [Time] date_created_after Datetime filter used to query Verification
101
- # Attempts created after this datetime.
137
+ # Attempts created after this datetime. Given as GMT in RFC 2822 format.
102
138
  # @param [Time] date_created_before Datetime filter used to query Verification
103
- # Attempts created before this datetime.
104
- # @param [String] channel_data_to Destination of a verification. Depending on the
105
- # type of channel, it could be a phone number in E.164 format or an email address.
139
+ # Attempts created before this datetime. Given as GMT in RFC 2822 format.
140
+ # @param [String] channel_data_to Destination of a verification. It is phone
141
+ # number in E.164 format.
142
+ # @param [String] country Filter used to query Verification Attempts sent to the
143
+ # specified destination country.
144
+ # @param [verification_attempt.Channels] channel Filter used to query Verification
145
+ # Attempts by communication channel. Valid values are `SMS` and `CALL`
146
+ # @param [String] verify_service_sid Filter used to query Verification Attempts by
147
+ # verify service. Only attempts of the provided SID will be returned.
148
+ # @param [String] verification_sid Filter used to return all the Verification
149
+ # Attempts of a single verification. Only attempts of the provided verification
150
+ # SID will be returned.
151
+ # @param [verification_attempt.ConversionStatus] status Filter used to query
152
+ # Verification Attempts by conversion status. Valid values are `UNCONVERTED`, for
153
+ # attempts that were not converted, and `CONVERTED`, for attempts that were
154
+ # confirmed.
106
155
  # @param [String] page_token PageToken provided by the API
107
156
  # @param [Integer] page_number Page Number, this value is simply for client state
108
157
  # @param [Integer] page_size Number of records to return, defaults to 50
109
158
  # @return [Page] Page of VerificationAttemptInstance
110
- def page(date_created_after: :unset, date_created_before: :unset, channel_data_to: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
159
+ def page(date_created_after: :unset, date_created_before: :unset, channel_data_to: :unset, country: :unset, channel: :unset, verify_service_sid: :unset, verification_sid: :unset, status: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
111
160
  params = Twilio::Values.of({
112
161
  'DateCreatedAfter' => Twilio.serialize_iso8601_datetime(date_created_after),
113
162
  'DateCreatedBefore' => Twilio.serialize_iso8601_datetime(date_created_before),
114
163
  'ChannelData.To' => channel_data_to,
164
+ 'Country' => country,
165
+ 'Channel' => channel,
166
+ 'VerifyServiceSid' => verify_service_sid,
167
+ 'VerificationSid' => verification_sid,
168
+ 'Status' => status,
115
169
  'PageToken' => page_token,
116
170
  'Page' => page_number,
117
171
  'PageSize' => page_size,
@@ -224,10 +278,12 @@ module Twilio
224
278
  'sid' => payload['sid'],
225
279
  'account_sid' => payload['account_sid'],
226
280
  'service_sid' => payload['service_sid'],
281
+ 'verification_sid' => payload['verification_sid'],
227
282
  'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
228
283
  'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
229
284
  'conversion_status' => payload['conversion_status'],
230
285
  'channel' => payload['channel'],
286
+ 'price' => payload['price'],
231
287
  'channel_data' => payload['channel_data'],
232
288
  'url' => payload['url'],
233
289
  }
@@ -249,23 +305,29 @@ module Twilio
249
305
  end
250
306
 
251
307
  ##
252
- # @return [String] A string that uniquely identifies this Verification Attempt
308
+ # @return [String] The SID that uniquely identifies the verification attempt.
253
309
  def sid
254
310
  @properties['sid']
255
311
  end
256
312
 
257
313
  ##
258
- # @return [String] Account Sid
314
+ # @return [String] The SID of the Account that created the verification.
259
315
  def account_sid
260
316
  @properties['account_sid']
261
317
  end
262
318
 
263
319
  ##
264
- # @return [String] The service_sid
320
+ # @return [String] The SID of the verify service that generated this attempt.
265
321
  def service_sid
266
322
  @properties['service_sid']
267
323
  end
268
324
 
325
+ ##
326
+ # @return [String] The SID of the verification that generated this attempt.
327
+ def verification_sid
328
+ @properties['verification_sid']
329
+ end
330
+
269
331
  ##
270
332
  # @return [Time] The date this Attempt was created
271
333
  def date_created
@@ -279,19 +341,25 @@ module Twilio
279
341
  end
280
342
 
281
343
  ##
282
- # @return [verification_attempt.ConversionStatus] Status of a conversion
344
+ # @return [verification_attempt.ConversionStatus] Status of the conversion for the verification.
283
345
  def conversion_status
284
346
  @properties['conversion_status']
285
347
  end
286
348
 
287
349
  ##
288
- # @return [verification_attempt.Channels] Channel used for the attempt
350
+ # @return [verification_attempt.Channels] Communication channel used for the attempt.
289
351
  def channel
290
352
  @properties['channel']
291
353
  end
292
354
 
293
355
  ##
294
- # @return [Hash] Object with the channel information for an attempt
356
+ # @return [Hash] An object containing the charge for this verification attempt.
357
+ def price
358
+ @properties['price']
359
+ end
360
+
361
+ ##
362
+ # @return [Hash] An object containing the channel specific information for an attempt.
295
363
  def channel_data
296
364
  @properties['channel_data']
297
365
  end
@@ -47,8 +47,8 @@ module Twilio
47
47
  end
48
48
 
49
49
  ##
50
- # @param [String] sid A 34 character string that uniquely identifies this
51
- # Verification Attempt.
50
+ # @param [String] sid The SID that uniquely identifies the verification attempt
51
+ # resource.
52
52
  # @return [Twilio::REST::Verify::V2::VerificationAttemptInstance] if sid was passed.
53
53
  # @return [Twilio::REST::Verify::V2::VerificationAttemptList]
54
54
  def verification_attempts(sid=:unset)
@@ -30,10 +30,13 @@ module Twilio
30
30
  # `group-small`, or `group`. The default value is `group`.
31
31
  # @param [String] unique_name An application-defined string that uniquely
32
32
  # identifies the resource. It can be used as a `room_sid` in place of the
33
- # resource's `sid` in the URL to address the resource. This value is unique for
34
- # `in-progress` rooms. SDK clients can use this name to connect to the room. REST
35
- # API clients can use this name in place of the Room SID to interact with the room
36
- # as long as the room is `in-progress`.
33
+ # resource's `sid` in the URL to address the resource, assuming it does not
34
+ # contain any {reserved
35
+ # characters}[https://tools.ietf.org/html/rfc3986#section-2.2] that would need to
36
+ # be URL encoded. This value is unique for `in-progress` rooms. SDK clients can
37
+ # use this name to connect to the room. REST API clients can use this name in
38
+ # place of the Room SID to interact with the room as long as the room is
39
+ # `in-progress`.
37
40
  # @param [String] status_callback The URL we should call using the
38
41
  # `status_callback_method` to send status information to your application on every
39
42
  # room event. See {Status
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.63.0'
2
+ VERSION = '5.65.0'
3
3
  end
@@ -10,4 +10,4 @@ sonar.tests=spec/
10
10
  sonar.test.exclusions=spec/integration/**/*.spec.rb
11
11
 
12
12
  # For Code Coverage analysis
13
- sonar.ruby.coverage.reportPaths=coverage/.resultset.sonarqube.json
13
+ sonar.ruby.coverage.reportPaths=coverage/coverage.json
data/twilio-ruby.gemspec CHANGED
@@ -36,7 +36,6 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency 'rack', '~> 2.0'
37
37
  spec.add_development_dependency 'rake', '~> 13.0'
38
38
  spec.add_development_dependency 'rspec', '~> 3.0'
39
- spec.add_development_dependency 'rubocop', '~> 0.82.0'
40
39
  spec.add_development_dependency 'yard', '~> 0.9.9'
41
40
  spec.add_development_dependency 'logger', '~> 1.4.2'
42
41
  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.63.0
4
+ version: 5.65.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-01-12 00:00:00.000000000 Z
11
+ date: 2022-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -160,20 +160,6 @@ dependencies:
160
160
  - - "~>"
161
161
  - !ruby/object:Gem::Version
162
162
  version: '3.0'
163
- - !ruby/object:Gem::Dependency
164
- name: rubocop
165
- requirement: !ruby/object:Gem::Requirement
166
- requirements:
167
- - - "~>"
168
- - !ruby/object:Gem::Version
169
- version: 0.82.0
170
- type: :development
171
- prerelease: false
172
- version_requirements: !ruby/object:Gem::Requirement
173
- requirements:
174
- - - "~>"
175
- - !ruby/object:Gem::Version
176
- version: 0.82.0
177
163
  - !ruby/object:Gem::Dependency
178
164
  name: yard
179
165
  requirement: !ruby/object:Gem::Requirement
@@ -286,6 +272,7 @@ files:
286
272
  - lib/twilio-ruby/rest/api/v2010/account/call/payment.rb
287
273
  - lib/twilio-ruby/rest/api/v2010/account/call/recording.rb
288
274
  - lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb
275
+ - lib/twilio-ruby/rest/api/v2010/account/call/stream.rb
289
276
  - lib/twilio-ruby/rest/api/v2010/account/conference.rb
290
277
  - lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb
291
278
  - lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb
@@ -391,6 +378,7 @@ files:
391
378
  - lib/twilio-ruby/rest/client.rb
392
379
  - lib/twilio-ruby/rest/conversations.rb
393
380
  - lib/twilio-ruby/rest/conversations/v1.rb
381
+ - lib/twilio-ruby/rest/conversations/v1/address_configuration.rb
394
382
  - lib/twilio-ruby/rest/conversations/v1/configuration.rb
395
383
  - lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb
396
384
  - lib/twilio-ruby/rest/conversations/v1/conversation.rb
@@ -447,6 +435,8 @@ files:
447
435
  - lib/twilio-ruby/rest/insights/v1/call/metric.rb
448
436
  - lib/twilio-ruby/rest/insights/v1/call/summary.rb
449
437
  - lib/twilio-ruby/rest/insights/v1/call_summaries.rb
438
+ - lib/twilio-ruby/rest/insights/v1/conference.rb
439
+ - lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb
450
440
  - lib/twilio-ruby/rest/insights/v1/room.rb
451
441
  - lib/twilio-ruby/rest/insights/v1/room/participant.rb
452
442
  - lib/twilio-ruby/rest/insights/v1/setting.rb
@@ -637,6 +627,7 @@ files:
637
627
  - lib/twilio-ruby/rest/supersim.rb
638
628
  - lib/twilio-ruby/rest/supersim/v1.rb
639
629
  - lib/twilio-ruby/rest/supersim/v1/command.rb
630
+ - lib/twilio-ruby/rest/supersim/v1/esim_profile.rb
640
631
  - lib/twilio-ruby/rest/supersim/v1/fleet.rb
641
632
  - lib/twilio-ruby/rest/supersim/v1/ip_command.rb
642
633
  - lib/twilio-ruby/rest/supersim/v1/network.rb