twilio-ruby 5.23.1 → 5.24.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 +30 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +2 -2
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +26 -0
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +437 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/summary.rb +7 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb +61 -5
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +3 -19
- data/lib/twilio-ruby/rest/sync.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service.rb +62 -6
- data/lib/twilio-ruby/rest/verify/v2/service.rb +26 -0
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +416 -0
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +424 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +6 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +3 -3
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +142 -15
- data/spec/integration/api/v2010/account/conference_spec.rb +190 -20
- data/spec/integration/api/v2010/account/message_spec.rb +125 -51
- data/spec/integration/autopilot/v1/assistant/webhook_spec.rb +246 -0
- data/spec/integration/autopilot/v1/assistant_spec.rb +8 -4
- data/spec/integration/flex_api/v1/configuration_spec.rb +48 -0
- data/spec/integration/insights/v1/summary_spec.rb +1 -0
- data/spec/integration/preview/trusted_comms/current_call_spec.rb +9 -1
- data/spec/integration/sync/v1/service_spec.rb +12 -4
- data/spec/integration/verify/v2/service/rate_limit/bucket_spec.rb +249 -0
- data/spec/integration/verify/v2/service/rate_limit_spec.rb +221 -0
- data/spec/integration/verify/v2/service/verification_spec.rb +36 -0
- data/spec/integration/verify/v2/service_spec.rb +8 -4
- metadata +11 -2
@@ -62,6 +62,42 @@ describe 'Verification' do
|
|
62
62
|
expect(actual).to_not eq(nil)
|
63
63
|
end
|
64
64
|
|
65
|
+
it "receives create_verification_with_rate_limits responses" do
|
66
|
+
@holodeck.mock(Twilio::Response.new(
|
67
|
+
201,
|
68
|
+
%q[
|
69
|
+
{
|
70
|
+
"sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
71
|
+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
72
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
73
|
+
"to": "+14159373912",
|
74
|
+
"channel": "sms",
|
75
|
+
"status": "pending",
|
76
|
+
"valid": null,
|
77
|
+
"date_created": "2015-07-30T20:00:00Z",
|
78
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
79
|
+
"lookup": {
|
80
|
+
"carrier": {
|
81
|
+
"error_code": null,
|
82
|
+
"name": "Carrier Name",
|
83
|
+
"mobile_country_code": "310",
|
84
|
+
"mobile_network_code": "150",
|
85
|
+
"type": "mobile"
|
86
|
+
}
|
87
|
+
},
|
88
|
+
"amount": null,
|
89
|
+
"payee": null,
|
90
|
+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications/VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
91
|
+
}
|
92
|
+
]
|
93
|
+
))
|
94
|
+
|
95
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
96
|
+
.verifications.create(to: 'to', channel: 'channel')
|
97
|
+
|
98
|
+
expect(actual).to_not eq(nil)
|
99
|
+
end
|
100
|
+
|
65
101
|
it "can update" do
|
66
102
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
67
103
|
|
@@ -44,7 +44,8 @@ describe 'Service' do
|
|
44
44
|
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
45
45
|
"links": {
|
46
46
|
"verification_checks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",
|
47
|
-
"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications"
|
47
|
+
"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications",
|
48
|
+
"rate_limits": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RateLimits"
|
48
49
|
}
|
49
50
|
}
|
50
51
|
]
|
@@ -89,7 +90,8 @@ describe 'Service' do
|
|
89
90
|
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
90
91
|
"links": {
|
91
92
|
"verification_checks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",
|
92
|
-
"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications"
|
93
|
+
"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications",
|
94
|
+
"rate_limits": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RateLimits"
|
93
95
|
}
|
94
96
|
}
|
95
97
|
]
|
@@ -171,7 +173,8 @@ describe 'Service' do
|
|
171
173
|
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
172
174
|
"links": {
|
173
175
|
"verification_checks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",
|
174
|
-
"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications"
|
176
|
+
"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications",
|
177
|
+
"rate_limits": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RateLimits"
|
175
178
|
}
|
176
179
|
}
|
177
180
|
]
|
@@ -218,7 +221,8 @@ describe 'Service' do
|
|
218
221
|
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
219
222
|
"links": {
|
220
223
|
"verification_checks": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",
|
221
|
-
"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications"
|
224
|
+
"verifications": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications",
|
225
|
+
"rate_limits": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RateLimits"
|
222
226
|
}
|
223
227
|
}
|
224
228
|
]
|
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.24.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-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -263,6 +263,7 @@ files:
|
|
263
263
|
- lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb
|
264
264
|
- lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_actions.rb
|
265
265
|
- lib/twilio-ruby/rest/autopilot/v1/assistant/task/task_statistics.rb
|
266
|
+
- lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb
|
266
267
|
- lib/twilio-ruby/rest/chat.rb
|
267
268
|
- lib/twilio-ruby/rest/chat/v1.rb
|
268
269
|
- lib/twilio-ruby/rest/chat/v1/credential.rb
|
@@ -500,6 +501,8 @@ files:
|
|
500
501
|
- lib/twilio-ruby/rest/verify.rb
|
501
502
|
- lib/twilio-ruby/rest/verify/v2.rb
|
502
503
|
- lib/twilio-ruby/rest/verify/v2/service.rb
|
504
|
+
- lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
|
505
|
+
- lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb
|
503
506
|
- lib/twilio-ruby/rest/verify/v2/service/verification.rb
|
504
507
|
- lib/twilio-ruby/rest/verify/v2/service/verification_check.rb
|
505
508
|
- lib/twilio-ruby/rest/video.rb
|
@@ -635,6 +638,7 @@ files:
|
|
635
638
|
- spec/integration/autopilot/v1/assistant/task/task_actions_spec.rb
|
636
639
|
- spec/integration/autopilot/v1/assistant/task/task_statistics_spec.rb
|
637
640
|
- spec/integration/autopilot/v1/assistant/task_spec.rb
|
641
|
+
- spec/integration/autopilot/v1/assistant/webhook_spec.rb
|
638
642
|
- spec/integration/autopilot/v1/assistant_spec.rb
|
639
643
|
- spec/integration/chat/v1/credential_spec.rb
|
640
644
|
- spec/integration/chat/v1/service/channel/invite_spec.rb
|
@@ -824,6 +828,8 @@ files:
|
|
824
828
|
- spec/integration/trunking/v1/trunk/phone_number_spec.rb
|
825
829
|
- spec/integration/trunking/v1/trunk/terminating_sip_domain_spec.rb
|
826
830
|
- spec/integration/trunking/v1/trunk_spec.rb
|
831
|
+
- spec/integration/verify/v2/service/rate_limit/bucket_spec.rb
|
832
|
+
- spec/integration/verify/v2/service/rate_limit_spec.rb
|
827
833
|
- spec/integration/verify/v2/service/verification_check_spec.rb
|
828
834
|
- spec/integration/verify/v2/service/verification_spec.rb
|
829
835
|
- spec/integration/verify/v2/service_spec.rb
|
@@ -992,6 +998,7 @@ test_files:
|
|
992
998
|
- spec/integration/autopilot/v1/assistant/task/task_actions_spec.rb
|
993
999
|
- spec/integration/autopilot/v1/assistant/task/task_statistics_spec.rb
|
994
1000
|
- spec/integration/autopilot/v1/assistant/task_spec.rb
|
1001
|
+
- spec/integration/autopilot/v1/assistant/webhook_spec.rb
|
995
1002
|
- spec/integration/autopilot/v1/assistant_spec.rb
|
996
1003
|
- spec/integration/chat/v1/credential_spec.rb
|
997
1004
|
- spec/integration/chat/v1/service/channel/invite_spec.rb
|
@@ -1181,6 +1188,8 @@ test_files:
|
|
1181
1188
|
- spec/integration/trunking/v1/trunk/phone_number_spec.rb
|
1182
1189
|
- spec/integration/trunking/v1/trunk/terminating_sip_domain_spec.rb
|
1183
1190
|
- spec/integration/trunking/v1/trunk_spec.rb
|
1191
|
+
- spec/integration/verify/v2/service/rate_limit/bucket_spec.rb
|
1192
|
+
- spec/integration/verify/v2/service/rate_limit_spec.rb
|
1184
1193
|
- spec/integration/verify/v2/service/verification_check_spec.rb
|
1185
1194
|
- spec/integration/verify/v2/service/verification_spec.rb
|
1186
1195
|
- spec/integration/verify/v2/service_spec.rb
|