twilio-ruby 5.20.1 → 5.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +22 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +4 -4
- data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +21 -20
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +21 -19
- data/lib/twilio-ruby/rest/api.rb +8 -7
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +32 -28
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +56 -37
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +27 -27
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +248 -165
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +35 -35
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +15 -11
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +104 -114
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +48 -46
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +29 -22
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +36 -28
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +35 -21
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +24 -20
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +27 -27
- data/lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb +7 -0
- data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +7 -0
- data/lib/twilio-ruby/rest/client.rb +8 -7
- data/lib/twilio-ruby/rest/fax.rb +2 -1
- data/lib/twilio-ruby/rest/fax/v1.rb +2 -1
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +85 -75
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +16 -16
- data/lib/twilio-ruby/rest/verify/v1/service.rb +8 -2
- data/lib/twilio-ruby/rest/verify/v1/service/verification.rb +120 -3
- data/lib/twilio-ruby/rest/video/v1/composition.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/authy/v1/service/entity/factor/challenge_spec.rb +5 -0
- data/spec/integration/authy/v1/service/entity/factor_spec.rb +4 -0
- data/spec/integration/verify/v1/service/verification_spec.rb +107 -1
- data/spec/integration/video/v1/composition_spec.rb +28 -3
- metadata +2 -2
@@ -213,7 +213,7 @@ module Twilio
|
|
213
213
|
# removed. You can find further information in the [Specifying Video
|
214
214
|
# Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) section. Defaults to `true`.
|
215
215
|
# @return [CompositionInstance] Newly created CompositionInstance
|
216
|
-
def create(room_sid:
|
216
|
+
def create(room_sid: nil, video_layout: :unset, audio_sources: :unset, audio_sources_excluded: :unset, resolution: :unset, format: :unset, status_callback: :unset, status_callback_method: :unset, trim: :unset)
|
217
217
|
data = Twilio::Values.of({
|
218
218
|
'RoomSid' => room_sid,
|
219
219
|
'VideoLayout' => Twilio.serialize_object(video_layout),
|
data/lib/twilio-ruby/version.rb
CHANGED
@@ -46,6 +46,7 @@ describe 'Challenge' do
|
|
46
46
|
"responded_reason": "none",
|
47
47
|
"details": "Hi! Mr. John Doe, would you like to sign up?",
|
48
48
|
"hidden_details": "Hidden details about the sign up",
|
49
|
+
"factor_strength": "low",
|
49
50
|
"factor_type": "sms",
|
50
51
|
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
51
52
|
}
|
@@ -129,6 +130,7 @@ describe 'Challenge' do
|
|
129
130
|
"responded_reason": "none",
|
130
131
|
"details": "details",
|
131
132
|
"hidden_details": "hidden_details",
|
133
|
+
"factor_strength": "low",
|
132
134
|
"factor_type": "sms",
|
133
135
|
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
134
136
|
}
|
@@ -162,6 +164,7 @@ describe 'Challenge' do
|
|
162
164
|
"responded_reason": "none",
|
163
165
|
"details": "details",
|
164
166
|
"hidden_details": "hidden_details",
|
167
|
+
"factor_strength": "low",
|
165
168
|
"factor_type": "sms",
|
166
169
|
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
167
170
|
}
|
@@ -213,6 +216,7 @@ describe 'Challenge' do
|
|
213
216
|
"responded_reason": "none",
|
214
217
|
"details": "Hi! Mr. John Doe, would you like to sign up?",
|
215
218
|
"hidden_details": "Hidden details about the sign up",
|
219
|
+
"factor_strength": "low",
|
216
220
|
"factor_type": "sms",
|
217
221
|
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
218
222
|
}
|
@@ -246,6 +250,7 @@ describe 'Challenge' do
|
|
246
250
|
"responded_reason": "none",
|
247
251
|
"details": "Hi! Mr. John Doe, would you like to sign up?",
|
248
252
|
"hidden_details": "Hidden details about the sign up",
|
253
|
+
"factor_strength": "low",
|
249
254
|
"factor_type": "sms",
|
250
255
|
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
251
256
|
}
|
@@ -41,6 +41,7 @@ describe 'Factor' do
|
|
41
41
|
"date_updated": "2015-07-30T20:00:00Z",
|
42
42
|
"friendly_name": "friendly_name",
|
43
43
|
"status": "unverified",
|
44
|
+
"factor_strength": "low",
|
44
45
|
"factor_type": "sms",
|
45
46
|
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
46
47
|
"links": {
|
@@ -118,6 +119,7 @@ describe 'Factor' do
|
|
118
119
|
"date_updated": "2015-07-30T20:00:00Z",
|
119
120
|
"friendly_name": "friendly_name",
|
120
121
|
"status": "unverified",
|
122
|
+
"factor_strength": "low",
|
121
123
|
"factor_type": "sms",
|
122
124
|
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
123
125
|
"links": {
|
@@ -193,6 +195,7 @@ describe 'Factor' do
|
|
193
195
|
"date_updated": "2015-07-30T20:00:00Z",
|
194
196
|
"friendly_name": "friendly_name",
|
195
197
|
"status": "unverified",
|
198
|
+
"factor_strength": "low",
|
196
199
|
"factor_type": "sms",
|
197
200
|
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
198
201
|
"links": {
|
@@ -251,6 +254,7 @@ describe 'Factor' do
|
|
251
254
|
"date_updated": "2015-07-30T20:00:00Z",
|
252
255
|
"friendly_name": "friendly_name",
|
253
256
|
"status": "verified",
|
257
|
+
"factor_strength": "low",
|
254
258
|
"factor_type": "sms",
|
255
259
|
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
256
260
|
"links": {
|
@@ -50,7 +50,8 @@ describe 'Verification' do
|
|
50
50
|
}
|
51
51
|
},
|
52
52
|
"amount": "$29.99",
|
53
|
-
"payee": "Acme"
|
53
|
+
"payee": "Acme",
|
54
|
+
"url": "https://verify.twilio.com/v1/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
54
55
|
}
|
55
56
|
]
|
56
57
|
))
|
@@ -60,4 +61,109 @@ describe 'Verification' do
|
|
60
61
|
|
61
62
|
expect(actual).to_not eq(nil)
|
62
63
|
end
|
64
|
+
|
65
|
+
it "can update" do
|
66
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
67
|
+
|
68
|
+
expect {
|
69
|
+
@client.verify.v1.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
70
|
+
.verifications('sid').update(status: 'canceled')
|
71
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
72
|
+
|
73
|
+
values = {'Status' => 'canceled', }
|
74
|
+
expect(
|
75
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
76
|
+
method: 'post',
|
77
|
+
url: 'https://verify.twilio.com/v1/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Verifications/sid',
|
78
|
+
data: values,
|
79
|
+
))).to eq(true)
|
80
|
+
end
|
81
|
+
|
82
|
+
it "receives update_verification responses" do
|
83
|
+
@holodeck.mock(Twilio::Response.new(
|
84
|
+
200,
|
85
|
+
%q[
|
86
|
+
{
|
87
|
+
"sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
88
|
+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
89
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
90
|
+
"to": "+14159373912",
|
91
|
+
"channel": "sms",
|
92
|
+
"status": "canceled",
|
93
|
+
"valid": null,
|
94
|
+
"date_created": "2015-07-30T20:00:00Z",
|
95
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
96
|
+
"lookup": {
|
97
|
+
"carrier": {
|
98
|
+
"error_code": null,
|
99
|
+
"name": "Carrier Name",
|
100
|
+
"mobile_country_code": "310",
|
101
|
+
"mobile_network_code": "150",
|
102
|
+
"type": "mobile"
|
103
|
+
}
|
104
|
+
},
|
105
|
+
"amount": "$29.99",
|
106
|
+
"payee": "Acme",
|
107
|
+
"url": "https://verify.twilio.com/v1/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
108
|
+
}
|
109
|
+
]
|
110
|
+
))
|
111
|
+
|
112
|
+
actual = @client.verify.v1.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
113
|
+
.verifications('sid').update(status: 'canceled')
|
114
|
+
|
115
|
+
expect(actual).to_not eq(nil)
|
116
|
+
end
|
117
|
+
|
118
|
+
it "can fetch" do
|
119
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
120
|
+
|
121
|
+
expect {
|
122
|
+
@client.verify.v1.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
123
|
+
.verifications('sid').fetch()
|
124
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
125
|
+
|
126
|
+
values = {}
|
127
|
+
expect(
|
128
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
129
|
+
method: 'get',
|
130
|
+
url: 'https://verify.twilio.com/v1/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Verifications/sid',
|
131
|
+
))).to eq(true)
|
132
|
+
end
|
133
|
+
|
134
|
+
it "receives fetch_verification responses" do
|
135
|
+
@holodeck.mock(Twilio::Response.new(
|
136
|
+
200,
|
137
|
+
%q[
|
138
|
+
{
|
139
|
+
"sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
140
|
+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
141
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
142
|
+
"to": "+14159373912",
|
143
|
+
"channel": "sms",
|
144
|
+
"status": "pending",
|
145
|
+
"valid": null,
|
146
|
+
"date_created": "2015-07-30T20:00:00Z",
|
147
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
148
|
+
"lookup": {
|
149
|
+
"carrier": {
|
150
|
+
"error_code": null,
|
151
|
+
"name": "Carrier Name",
|
152
|
+
"mobile_country_code": "310",
|
153
|
+
"mobile_network_code": "150",
|
154
|
+
"type": "mobile"
|
155
|
+
}
|
156
|
+
},
|
157
|
+
"amount": "$29.99",
|
158
|
+
"payee": "Acme",
|
159
|
+
"url": "https://verify.twilio.com/v1/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
160
|
+
}
|
161
|
+
]
|
162
|
+
))
|
163
|
+
|
164
|
+
actual = @client.verify.v1.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
165
|
+
.verifications('sid').fetch()
|
166
|
+
|
167
|
+
expect(actual).to_not eq(nil)
|
168
|
+
end
|
63
169
|
end
|
@@ -113,6 +113,30 @@ describe 'Composition' do
|
|
113
113
|
))).to eq(true)
|
114
114
|
end
|
115
115
|
|
116
|
+
it "receives read_enqueued responses" do
|
117
|
+
@holodeck.mock(Twilio::Response.new(
|
118
|
+
200,
|
119
|
+
%q[
|
120
|
+
{
|
121
|
+
"compositions": [],
|
122
|
+
"meta": {
|
123
|
+
"page": 0,
|
124
|
+
"page_size": 50,
|
125
|
+
"first_page_url": "https://video.twilio.com/v1/Compositions?PageSize=50&Page=0",
|
126
|
+
"previous_page_url": null,
|
127
|
+
"url": "https://video.twilio.com/v1/Compositions?PageSize=50&Page=0",
|
128
|
+
"next_page_url": null,
|
129
|
+
"key": "compositions"
|
130
|
+
}
|
131
|
+
}
|
132
|
+
]
|
133
|
+
))
|
134
|
+
|
135
|
+
actual = @client.video.v1.compositions.list()
|
136
|
+
|
137
|
+
expect(actual).to_not eq(nil)
|
138
|
+
end
|
139
|
+
|
116
140
|
it "receives read_empty responses" do
|
117
141
|
@holodeck.mock(Twilio::Response.new(
|
118
142
|
200,
|
@@ -250,14 +274,15 @@ describe 'Composition' do
|
|
250
274
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
251
275
|
|
252
276
|
expect {
|
253
|
-
@client.video.v1.compositions.create()
|
277
|
+
@client.video.v1.compositions.create(room_sid: 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
254
278
|
}.to raise_exception(Twilio::REST::TwilioError)
|
255
279
|
|
256
|
-
values = {}
|
280
|
+
values = {'RoomSid' => 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', }
|
257
281
|
expect(
|
258
282
|
@holodeck.has_request?(Holodeck::Request.new(
|
259
283
|
method: 'post',
|
260
284
|
url: 'https://video.twilio.com/v1/Compositions',
|
285
|
+
data: values,
|
261
286
|
))).to eq(true)
|
262
287
|
end
|
263
288
|
|
@@ -318,7 +343,7 @@ describe 'Composition' do
|
|
318
343
|
]
|
319
344
|
))
|
320
345
|
|
321
|
-
actual = @client.video.v1.compositions.create()
|
346
|
+
actual = @client.video.v1.compositions.create(room_sid: 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
322
347
|
|
323
348
|
expect(actual).to_not eq(nil)
|
324
349
|
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.
|
4
|
+
version: 5.21.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: 2019-
|
11
|
+
date: 2019-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|