twilio-ruby 5.70.0 → 5.72.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +47 -0
  3. data/Makefile +6 -2
  4. data/README.md +2 -2
  5. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +4 -4
  6. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +3 -3
  7. data/lib/twilio-ruby/rest/client.rb +14 -0
  8. data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +14 -0
  9. data/lib/twilio-ruby/rest/media/v1/player_streamer.rb +4 -5
  10. data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +559 -0
  11. data/lib/twilio-ruby/rest/messaging/v1.rb +16 -0
  12. data/lib/twilio-ruby/rest/messaging.rb +8 -0
  13. data/lib/twilio-ruby/rest/microvisor/v1/app.rb +305 -0
  14. data/lib/twilio-ruby/rest/microvisor/v1/device.rb +332 -0
  15. data/lib/twilio-ruby/rest/microvisor/v1.rb +60 -0
  16. data/lib/twilio-ruby/rest/microvisor.rb +54 -0
  17. data/lib/twilio-ruby/rest/preview.rb +0 -25
  18. data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +235 -0
  19. data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +231 -0
  20. data/lib/twilio-ruby/rest/routes/v2/trunk.rb +235 -0
  21. data/lib/twilio-ruby/rest/routes/v2.rb +76 -0
  22. data/lib/twilio-ruby/rest/routes.rb +62 -0
  23. data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +16 -6
  24. data/lib/twilio-ruby/rest/verify/v2/safelist.rb +215 -0
  25. data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +7 -8
  26. data/lib/twilio-ruby/rest/verify/v2.rb +18 -0
  27. data/lib/twilio-ruby/rest/verify.rb +8 -0
  28. data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb +240 -0
  29. data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +16 -0
  30. data/lib/twilio-ruby/security/request_validator.rb +1 -1
  31. data/lib/twilio-ruby/version.rb +1 -1
  32. metadata +14 -8
  33. data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +0 -294
  34. data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +0 -275
  35. data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +0 -249
  36. data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -251
  37. data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -234
  38. data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -62
@@ -16,6 +16,7 @@ module Twilio
16
16
  super
17
17
  @version = 'v2'
18
18
  @forms = nil
19
+ @safelist = nil
19
20
  @services = nil
20
21
  @verification_attempts = nil
21
22
  @verification_attempts_summary = nil
@@ -38,6 +39,23 @@ module Twilio
38
39
  end
39
40
  end
40
41
 
42
+ ##
43
+ # @param [String] phone_number The phone number to be fetched from SafeList. Phone
44
+ # numbers must be in {E.164
45
+ # format}[https://www.twilio.com/docs/glossary/what-e164].
46
+ # @return [Twilio::REST::Verify::V2::SafelistContext] if phone_number was passed.
47
+ # @return [Twilio::REST::Verify::V2::SafelistList]
48
+ def safelist(phone_number=:unset)
49
+ if phone_number.nil?
50
+ raise ArgumentError, 'phone_number cannot be nil'
51
+ end
52
+ if phone_number == :unset
53
+ @safelist ||= SafelistList.new self
54
+ else
55
+ SafelistContext.new(self, phone_number)
56
+ end
57
+ end
58
+
41
59
  ##
42
60
  # @param [String] sid The Twilio-provided string that uniquely identifies the
43
61
  # Verification Service resource to fetch.
@@ -37,6 +37,14 @@ module Twilio
37
37
  self.v2.forms(form_type)
38
38
  end
39
39
 
40
+ ##
41
+ # @param [String] phone_number The phone number in SafeList.
42
+ # @return [Twilio::REST::Verify::V2::SafelistInstance] if phone_number was passed.
43
+ # @return [Twilio::REST::Verify::V2::SafelistList]
44
+ def safelist(phone_number=:unset)
45
+ self.v2.safelist(phone_number)
46
+ end
47
+
40
48
  ##
41
49
  # @param [String] sid The unique string that we created to identify the Service
42
50
  # resource.
@@ -0,0 +1,240 @@
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 Video < Domain
12
+ class V1 < Version
13
+ class RoomContext < InstanceContext
14
+ class ParticipantContext < InstanceContext
15
+ class AnonymizeList < ListResource
16
+ ##
17
+ # Initialize the AnonymizeList
18
+ # @param [Version] version Version that contains the resource
19
+ # @param [String] room_sid The SID of the participant's room.
20
+ # @param [String] sid The unique string that we created to identify the
21
+ # RoomParticipant resource.
22
+ # @return [AnonymizeList] AnonymizeList
23
+ def initialize(version, room_sid: nil, sid: nil)
24
+ super(version)
25
+
26
+ # Path Solution
27
+ @solution = {room_sid: room_sid, sid: sid}
28
+ end
29
+
30
+ ##
31
+ # Provide a user friendly representation
32
+ def to_s
33
+ '#<Twilio.Video.V1.AnonymizeList>'
34
+ end
35
+ end
36
+
37
+ class AnonymizePage < Page
38
+ ##
39
+ # Initialize the AnonymizePage
40
+ # @param [Version] version Version that contains the resource
41
+ # @param [Response] response Response from the API
42
+ # @param [Hash] solution Path solution for the resource
43
+ # @return [AnonymizePage] AnonymizePage
44
+ def initialize(version, response, solution)
45
+ super(version, response)
46
+
47
+ # Path Solution
48
+ @solution = solution
49
+ end
50
+
51
+ ##
52
+ # Build an instance of AnonymizeInstance
53
+ # @param [Hash] payload Payload response from the API
54
+ # @return [AnonymizeInstance] AnonymizeInstance
55
+ def get_instance(payload)
56
+ AnonymizeInstance.new(@version, payload, room_sid: @solution[:room_sid], sid: @solution[:sid], )
57
+ end
58
+
59
+ ##
60
+ # Provide a user friendly representation
61
+ def to_s
62
+ '<Twilio.Video.V1.AnonymizePage>'
63
+ end
64
+ end
65
+
66
+ class AnonymizeContext < InstanceContext
67
+ ##
68
+ # Initialize the AnonymizeContext
69
+ # @param [Version] version Version that contains the resource
70
+ # @param [String] room_sid The SID of the room with the participant to update.
71
+ # @param [String] sid The SID of the RoomParticipant resource to update.
72
+ # @return [AnonymizeContext] AnonymizeContext
73
+ def initialize(version, room_sid, sid)
74
+ super(version)
75
+
76
+ # Path Solution
77
+ @solution = {room_sid: room_sid, sid: sid, }
78
+ @uri = "/Rooms/#{@solution[:room_sid]}/Participants/#{@solution[:sid]}/Anonymize"
79
+ end
80
+
81
+ ##
82
+ # Update the AnonymizeInstance
83
+ # @return [AnonymizeInstance] Updated AnonymizeInstance
84
+ def update
85
+ payload = @version.update('POST', @uri)
86
+
87
+ AnonymizeInstance.new(@version, payload, room_sid: @solution[:room_sid], sid: @solution[:sid], )
88
+ end
89
+
90
+ ##
91
+ # Provide a user friendly representation
92
+ def to_s
93
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
94
+ "#<Twilio.Video.V1.AnonymizeContext #{context}>"
95
+ end
96
+
97
+ ##
98
+ # Provide a detailed, user friendly representation
99
+ def inspect
100
+ context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
101
+ "#<Twilio.Video.V1.AnonymizeContext #{context}>"
102
+ end
103
+ end
104
+
105
+ class AnonymizeInstance < InstanceResource
106
+ ##
107
+ # Initialize the AnonymizeInstance
108
+ # @param [Version] version Version that contains the resource
109
+ # @param [Hash] payload payload that contains response from Twilio
110
+ # @param [String] room_sid The SID of the participant's room.
111
+ # @param [String] sid The unique string that we created to identify the
112
+ # RoomParticipant resource.
113
+ # @return [AnonymizeInstance] AnonymizeInstance
114
+ def initialize(version, payload, room_sid: nil, sid: nil)
115
+ super(version)
116
+
117
+ # Marshaled Properties
118
+ @properties = {
119
+ 'sid' => payload['sid'],
120
+ 'room_sid' => payload['room_sid'],
121
+ 'account_sid' => payload['account_sid'],
122
+ 'status' => payload['status'],
123
+ 'identity' => payload['identity'],
124
+ 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
125
+ 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
126
+ 'start_time' => Twilio.deserialize_iso8601_datetime(payload['start_time']),
127
+ 'end_time' => Twilio.deserialize_iso8601_datetime(payload['end_time']),
128
+ 'duration' => payload['duration'] == nil ? payload['duration'] : payload['duration'].to_i,
129
+ 'url' => payload['url'],
130
+ }
131
+
132
+ # Context
133
+ @instance_context = nil
134
+ @params = {'room_sid' => room_sid, 'sid' => sid, }
135
+ end
136
+
137
+ ##
138
+ # Generate an instance context for the instance, the context is capable of
139
+ # performing various actions. All instance actions are proxied to the context
140
+ # @return [AnonymizeContext] AnonymizeContext for this AnonymizeInstance
141
+ def context
142
+ unless @instance_context
143
+ @instance_context = AnonymizeContext.new(@version, @params['room_sid'], @params['sid'], )
144
+ end
145
+ @instance_context
146
+ end
147
+
148
+ ##
149
+ # @return [String] The unique string that identifies the resource
150
+ def sid
151
+ @properties['sid']
152
+ end
153
+
154
+ ##
155
+ # @return [String] The SID of the participant's room
156
+ def room_sid
157
+ @properties['room_sid']
158
+ end
159
+
160
+ ##
161
+ # @return [String] The SID of the Account that created the resource
162
+ def account_sid
163
+ @properties['account_sid']
164
+ end
165
+
166
+ ##
167
+ # @return [anonymize.Status] The status of the Participant
168
+ def status
169
+ @properties['status']
170
+ end
171
+
172
+ ##
173
+ # @return [String] The SID of the participant
174
+ def identity
175
+ @properties['identity']
176
+ end
177
+
178
+ ##
179
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was created
180
+ def date_created
181
+ @properties['date_created']
182
+ end
183
+
184
+ ##
185
+ # @return [Time] The ISO 8601 date and time in GMT when the resource was last updated
186
+ def date_updated
187
+ @properties['date_updated']
188
+ end
189
+
190
+ ##
191
+ # @return [Time] The time of participant connected to the room in ISO 8601 format
192
+ def start_time
193
+ @properties['start_time']
194
+ end
195
+
196
+ ##
197
+ # @return [Time] The time when the participant disconnected from the room in ISO 8601 format
198
+ def end_time
199
+ @properties['end_time']
200
+ end
201
+
202
+ ##
203
+ # @return [String] Duration of time in seconds the participant was connected
204
+ def duration
205
+ @properties['duration']
206
+ end
207
+
208
+ ##
209
+ # @return [String] The absolute URL of the resource
210
+ def url
211
+ @properties['url']
212
+ end
213
+
214
+ ##
215
+ # Update the AnonymizeInstance
216
+ # @return [AnonymizeInstance] Updated AnonymizeInstance
217
+ def update
218
+ context.update
219
+ end
220
+
221
+ ##
222
+ # Provide a user friendly representation
223
+ def to_s
224
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
225
+ "<Twilio.Video.V1.AnonymizeInstance #{values}>"
226
+ end
227
+
228
+ ##
229
+ # Provide a detailed, user friendly representation
230
+ def inspect
231
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
232
+ "<Twilio.Video.V1.AnonymizeInstance #{values}>"
233
+ end
234
+ end
235
+ end
236
+ end
237
+ end
238
+ end
239
+ end
240
+ end
@@ -207,6 +207,7 @@ module Twilio
207
207
  @published_tracks = nil
208
208
  @subscribed_tracks = nil
209
209
  @subscribe_rules = nil
210
+ @anonymize = nil
210
211
  end
211
212
 
212
213
  ##
@@ -293,6 +294,14 @@ module Twilio
293
294
  @subscribe_rules
294
295
  end
295
296
 
297
+ ##
298
+ # Access the anonymize
299
+ # @return [AnonymizeList]
300
+ # @return [AnonymizeContext]
301
+ def anonymize
302
+ AnonymizeContext.new(@version, @solution[:room_sid], @solution[:sid], )
303
+ end
304
+
296
305
  ##
297
306
  # Provide a user friendly representation
298
307
  def to_s
@@ -462,6 +471,13 @@ module Twilio
462
471
  context.subscribe_rules
463
472
  end
464
473
 
474
+ ##
475
+ # Access the anonymize
476
+ # @return [anonymize] anonymize
477
+ def anonymize
478
+ context.anonymize
479
+ end
480
+
465
481
  ##
466
482
  # Provide a user friendly representation
467
483
  def to_s
@@ -32,7 +32,7 @@ module Twilio
32
32
  valid_body = true # default succeed, since body not always provided
33
33
  params_hash = body_or_hash(params)
34
34
  unless params_hash.is_a? Enumerable
35
- body_hash = URI.decode_www_form(parsed_url.query).to_h['bodySHA256']
35
+ body_hash = URI.decode_www_form(parsed_url.query || '').to_h['bodySHA256']
36
36
  params_hash = build_hash_for(params)
37
37
  valid_body = !(params_hash.nil? || body_hash.nil?) && secure_compare(params_hash, body_hash)
38
38
  params_hash = {}
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '5.70.0'
2
+ VERSION = '5.72.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.70.0
4
+ version: 5.72.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-07-21 00:00:00.000000000 Z
11
+ date: 2022-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt
@@ -491,7 +491,12 @@ files:
491
491
  - lib/twilio-ruby/rest/messaging/v1/service/short_code.rb
492
492
  - lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb
493
493
  - lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb
494
+ - lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb
494
495
  - lib/twilio-ruby/rest/messaging/v1/usecase.rb
496
+ - lib/twilio-ruby/rest/microvisor.rb
497
+ - lib/twilio-ruby/rest/microvisor/v1.rb
498
+ - lib/twilio-ruby/rest/microvisor/v1/app.rb
499
+ - lib/twilio-ruby/rest/microvisor/v1/device.rb
495
500
  - lib/twilio-ruby/rest/monitor.rb
496
501
  - lib/twilio-ruby/rest/monitor/v1.rb
497
502
  - lib/twilio-ruby/rest/monitor/v1/alert.rb
@@ -516,12 +521,6 @@ files:
516
521
  - lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb
517
522
  - lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb
518
523
  - lib/twilio-ruby/rest/preview.rb
519
- - lib/twilio-ruby/rest/preview/bulk_exports.rb
520
- - lib/twilio-ruby/rest/preview/bulk_exports/export.rb
521
- - lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb
522
- - lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb
523
- - lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb
524
- - lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb
525
524
  - lib/twilio-ruby/rest/preview/deployed_devices.rb
526
525
  - lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb
527
526
  - lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb
@@ -597,6 +596,11 @@ files:
597
596
  - lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb
598
597
  - lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb
599
598
  - lib/twilio-ruby/rest/proxy/v1/service/short_code.rb
599
+ - lib/twilio-ruby/rest/routes.rb
600
+ - lib/twilio-ruby/rest/routes/v2.rb
601
+ - lib/twilio-ruby/rest/routes/v2/phone_number.rb
602
+ - lib/twilio-ruby/rest/routes/v2/sip_domain.rb
603
+ - lib/twilio-ruby/rest/routes/v2/trunk.rb
600
604
  - lib/twilio-ruby/rest/serverless.rb
601
605
  - lib/twilio-ruby/rest/serverless/v1.rb
602
606
  - lib/twilio-ruby/rest/serverless/v1/service.rb
@@ -710,6 +714,7 @@ files:
710
714
  - lib/twilio-ruby/rest/verify.rb
711
715
  - lib/twilio-ruby/rest/verify/v2.rb
712
716
  - lib/twilio-ruby/rest/verify/v2/form.rb
717
+ - lib/twilio-ruby/rest/verify/v2/safelist.rb
713
718
  - lib/twilio-ruby/rest/verify/v2/service.rb
714
719
  - lib/twilio-ruby/rest/verify/v2/service/access_token.rb
715
720
  - lib/twilio-ruby/rest/verify/v2/service/entity.rb
@@ -736,6 +741,7 @@ files:
736
741
  - lib/twilio-ruby/rest/video/v1/room.rb
737
742
  - lib/twilio-ruby/rest/video/v1/room/recording.rb
738
743
  - lib/twilio-ruby/rest/video/v1/room/room_participant.rb
744
+ - lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_anonymize.rb
739
745
  - lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb
740
746
  - lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb
741
747
  - lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb