twilio-ruby 5.31.4 → 5.31.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -0
- data/.rubocop_todo.yml +0 -11
- data/CHANGES.md +38 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +27 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +5 -1
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/messaging.rb +0 -15
- data/lib/twilio-ruby/rest/messaging/v1.rb +0 -22
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb +322 -0
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +49 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +427 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +224 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +387 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +239 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +215 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +10 -3
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +7 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +14 -0
- data/lib/twilio-ruby/rest/verify/v2/service.rb +5 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +5 -4
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call_spec.rb +30 -10
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +29 -0
- data/spec/integration/api/v2010/account/notification_spec.rb +1 -1
- data/spec/integration/api/v2010/account_spec.rb +45 -0
- data/spec/integration/flex_api/v1/configuration_spec.rb +3 -0
- data/spec/integration/numbers/v2/regulatory_compliance/regulation_spec.rb +183 -0
- data/spec/integration/studio/v2/flow/execution/execution_context_spec.rb +51 -0
- data/spec/integration/studio/v2/flow/execution/execution_step/execution_step_context_spec.rb +54 -0
- data/spec/integration/studio/v2/flow/execution/execution_step_spec.rb +101 -0
- data/spec/integration/studio/v2/flow/execution_spec.rb +169 -0
- data/spec/integration/studio/v2/flow/test_user_spec.rb +86 -0
- data/spec/integration/studio/v2/flow_spec.rb +16 -4
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics_spec.rb +6 -0
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics_spec.rb +2 -0
- data/spec/integration/taskrouter/v1/workspace/task_spec.rb +4 -0
- data/twilio-ruby.gemspec +1 -1
- metadata +22 -19
- data/lib/twilio-ruby/rest/messaging/v1/session.rb +0 -513
- data/lib/twilio-ruby/rest/messaging/v1/session/message.rb +0 -439
- data/lib/twilio-ruby/rest/messaging/v1/session/participant.rb +0 -458
- data/lib/twilio-ruby/rest/messaging/v1/session/webhook.rb +0 -444
- data/lib/twilio-ruby/rest/messaging/v1/webhook.rb +0 -299
- data/spec/integration/messaging/v1/session/message_spec.rb +0 -238
- data/spec/integration/messaging/v1/session/participant_spec.rb +0 -256
- data/spec/integration/messaging/v1/session/webhook_spec.rb +0 -300
- data/spec/integration/messaging/v1/session_spec.rb +0 -227
- data/spec/integration/messaging/v1/webhook_spec.rb +0 -94
@@ -1,94 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This code was generated by
|
3
|
-
# \ / _ _ _| _ _
|
4
|
-
# | (_)\/(_)(_|\/| |(/_ v1.0.0
|
5
|
-
# / /
|
6
|
-
#
|
7
|
-
# frozen_string_literal: true
|
8
|
-
|
9
|
-
require 'spec_helper.rb'
|
10
|
-
|
11
|
-
describe 'Webhook' do
|
12
|
-
it "can fetch" do
|
13
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
-
|
15
|
-
expect {
|
16
|
-
@client.messaging.v1.webhooks().fetch()
|
17
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
18
|
-
|
19
|
-
values = {}
|
20
|
-
expect(
|
21
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
22
|
-
method: 'get',
|
23
|
-
url: 'https://messaging.twilio.com/v1/Sessions/Webhooks',
|
24
|
-
))).to eq(true)
|
25
|
-
end
|
26
|
-
|
27
|
-
it "receives fetch responses" do
|
28
|
-
@holodeck.mock(Twilio::Response.new(
|
29
|
-
200,
|
30
|
-
%q[
|
31
|
-
{
|
32
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
33
|
-
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
34
|
-
"pre_webhook_url": "http://pre.url",
|
35
|
-
"post_webhook_url": "http://post.url",
|
36
|
-
"webhook_method": "GET",
|
37
|
-
"webhook_filters": [
|
38
|
-
"onMessageSend",
|
39
|
-
"onSessionAdded"
|
40
|
-
],
|
41
|
-
"pre_webhook_retry_count": 1,
|
42
|
-
"post_webhook_retry_count": 2,
|
43
|
-
"target": "http",
|
44
|
-
"url": "https://messaging.twilio.com/v1/Sessions/Webhooks"
|
45
|
-
}
|
46
|
-
]
|
47
|
-
))
|
48
|
-
|
49
|
-
actual = @client.messaging.v1.webhooks().fetch()
|
50
|
-
|
51
|
-
expect(actual).to_not eq(nil)
|
52
|
-
end
|
53
|
-
|
54
|
-
it "can update" do
|
55
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
56
|
-
|
57
|
-
expect {
|
58
|
-
@client.messaging.v1.webhooks().update()
|
59
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
60
|
-
|
61
|
-
values = {}
|
62
|
-
expect(
|
63
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
64
|
-
method: 'post',
|
65
|
-
url: 'https://messaging.twilio.com/v1/Sessions/Webhooks',
|
66
|
-
))).to eq(true)
|
67
|
-
end
|
68
|
-
|
69
|
-
it "receives update responses" do
|
70
|
-
@holodeck.mock(Twilio::Response.new(
|
71
|
-
200,
|
72
|
-
%q[
|
73
|
-
{
|
74
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
75
|
-
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
76
|
-
"pre_webhook_url": "http://pre.url",
|
77
|
-
"post_webhook_url": "http://post.url",
|
78
|
-
"webhook_method": "GET",
|
79
|
-
"webhook_filters": [
|
80
|
-
"onSessionAdded"
|
81
|
-
],
|
82
|
-
"pre_webhook_retry_count": 1,
|
83
|
-
"post_webhook_retry_count": 2,
|
84
|
-
"target": "flex",
|
85
|
-
"url": "https://messaging.twilio.com/v1/Sessions/Webhooks"
|
86
|
-
}
|
87
|
-
]
|
88
|
-
))
|
89
|
-
|
90
|
-
actual = @client.messaging.v1.webhooks().update()
|
91
|
-
|
92
|
-
expect(actual).to_not eq(nil)
|
93
|
-
end
|
94
|
-
end
|