twilio-ruby 5.31.2 → 5.31.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGES.md +31 -0
- data/CODE_OF_CONDUCT.md +73 -0
- data/ISSUE_TEMPLATE.md +13 -13
- data/LICENSE.md +1 -1
- data/PULL_REQUEST_TEMPLATE.md +31 -0
- data/README.md +3 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +35 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +0 -14
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +359 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +12 -6
- data/lib/twilio-ruby/rest/preview.rb +2 -9
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +2 -2
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +5 -5
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -5
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +21 -0
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +21 -13
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +5 -5
- data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service.rb +19 -3
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +4 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +9 -6
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call/notification_spec.rb +8 -44
- data/spec/integration/api/v2010/account/call/payment_spec.rb +135 -0
- data/spec/integration/api/v2010/account/call_spec.rb +20 -10
- data/spec/integration/preview/bulk_exports/export/job_spec.rb +3 -0
- data/spec/integration/studio/v2/flow_spec.rb +7 -3
- data/spec/integration/studio/v2/flow_validate_spec.rb +7 -3
- data/spec/integration/verify/v2/service/verification_check_spec.rb +26 -0
- data/spec/integration/verify/v2/service_spec.rb +4 -0
- metadata +7 -12
- data/lib/twilio-ruby/rest/preview/acc_security.rb +0 -43
- data/lib/twilio-ruby/rest/preview/acc_security/service.rb +0 -395
- data/lib/twilio-ruby/rest/preview/acc_security/service/verification.rb +0 -185
- data/lib/twilio-ruby/rest/preview/acc_security/service/verification_check.rb +0 -182
- data/spec/integration/preview/acc_security/service/verification_check_spec.rb +0 -52
- data/spec/integration/preview/acc_security/service/verification_spec.rb +0 -52
- data/spec/integration/preview/acc_security/service_spec.rb +0 -185
@@ -1,185 +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 'Service' do
|
12
|
-
it "can create" do
|
13
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
-
|
15
|
-
expect {
|
16
|
-
@client.preview.acc_security.services.create(name: 'name')
|
17
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
18
|
-
|
19
|
-
values = {'Name' => 'name', }
|
20
|
-
expect(
|
21
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
22
|
-
method: 'post',
|
23
|
-
url: 'https://preview.twilio.com/Verification/Services',
|
24
|
-
data: values,
|
25
|
-
))).to eq(true)
|
26
|
-
end
|
27
|
-
|
28
|
-
it "receives create_record responses" do
|
29
|
-
@holodeck.mock(Twilio::Response.new(
|
30
|
-
201,
|
31
|
-
%q[
|
32
|
-
{
|
33
|
-
"sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
34
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
35
|
-
"name": "name",
|
36
|
-
"code_length": 4,
|
37
|
-
"date_created": "2015-07-30T20:00:00Z",
|
38
|
-
"date_updated": "2015-07-30T20:00:00Z",
|
39
|
-
"url": "https://preview.twilio.com/Verification/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
40
|
-
"links": {
|
41
|
-
"verification_checks": "https://preview.twilio.com/Verification/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",
|
42
|
-
"verifications": "https://preview.twilio.com/Verification/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications"
|
43
|
-
}
|
44
|
-
}
|
45
|
-
]
|
46
|
-
))
|
47
|
-
|
48
|
-
actual = @client.preview.acc_security.services.create(name: 'name')
|
49
|
-
|
50
|
-
expect(actual).to_not eq(nil)
|
51
|
-
end
|
52
|
-
|
53
|
-
it "can fetch" do
|
54
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
55
|
-
|
56
|
-
expect {
|
57
|
-
@client.preview.acc_security.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
58
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
59
|
-
|
60
|
-
values = {}
|
61
|
-
expect(
|
62
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
63
|
-
method: 'get',
|
64
|
-
url: 'https://preview.twilio.com/Verification/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
65
|
-
))).to eq(true)
|
66
|
-
end
|
67
|
-
|
68
|
-
it "receives fetch_record responses" do
|
69
|
-
@holodeck.mock(Twilio::Response.new(
|
70
|
-
200,
|
71
|
-
%q[
|
72
|
-
{
|
73
|
-
"sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
74
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
75
|
-
"name": "name",
|
76
|
-
"code_length": 4,
|
77
|
-
"date_created": "2015-07-30T20:00:00Z",
|
78
|
-
"date_updated": "2015-07-30T20:00:00Z",
|
79
|
-
"url": "https://preview.twilio.com/Verification/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
80
|
-
"links": {
|
81
|
-
"verification_checks": "https://preview.twilio.com/Verification/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",
|
82
|
-
"verifications": "https://preview.twilio.com/Verification/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications"
|
83
|
-
}
|
84
|
-
}
|
85
|
-
]
|
86
|
-
))
|
87
|
-
|
88
|
-
actual = @client.preview.acc_security.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
89
|
-
|
90
|
-
expect(actual).to_not eq(nil)
|
91
|
-
end
|
92
|
-
|
93
|
-
it "can read" do
|
94
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
95
|
-
|
96
|
-
expect {
|
97
|
-
@client.preview.acc_security.services.list()
|
98
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
99
|
-
|
100
|
-
values = {}
|
101
|
-
expect(
|
102
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
103
|
-
method: 'get',
|
104
|
-
url: 'https://preview.twilio.com/Verification/Services',
|
105
|
-
))).to eq(true)
|
106
|
-
end
|
107
|
-
|
108
|
-
it "receives read_all responses" do
|
109
|
-
@holodeck.mock(Twilio::Response.new(
|
110
|
-
200,
|
111
|
-
%q[
|
112
|
-
{
|
113
|
-
"meta": {
|
114
|
-
"page": 0,
|
115
|
-
"page_size": 50,
|
116
|
-
"first_page_url": "https://preview.twilio.com/Verification/Services?PageSize=50&Page=0",
|
117
|
-
"previous_page_url": null,
|
118
|
-
"next_page_url": null,
|
119
|
-
"key": "services",
|
120
|
-
"url": "https://preview.twilio.com/Verification/Services?PageSize=50&Page=0"
|
121
|
-
},
|
122
|
-
"services": [
|
123
|
-
{
|
124
|
-
"sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
125
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
126
|
-
"name": "name",
|
127
|
-
"code_length": 4,
|
128
|
-
"date_created": "2015-07-30T20:00:00Z",
|
129
|
-
"date_updated": "2015-07-30T20:00:00Z",
|
130
|
-
"url": "https://preview.twilio.com/Verification/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
131
|
-
"links": {
|
132
|
-
"verification_checks": "https://preview.twilio.com/Verification/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",
|
133
|
-
"verifications": "https://preview.twilio.com/Verification/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications"
|
134
|
-
}
|
135
|
-
}
|
136
|
-
]
|
137
|
-
}
|
138
|
-
]
|
139
|
-
))
|
140
|
-
|
141
|
-
actual = @client.preview.acc_security.services.list()
|
142
|
-
|
143
|
-
expect(actual).to_not eq(nil)
|
144
|
-
end
|
145
|
-
|
146
|
-
it "can update" do
|
147
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
148
|
-
|
149
|
-
expect {
|
150
|
-
@client.preview.acc_security.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
151
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
152
|
-
|
153
|
-
values = {}
|
154
|
-
expect(
|
155
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
156
|
-
method: 'post',
|
157
|
-
url: 'https://preview.twilio.com/Verification/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
158
|
-
))).to eq(true)
|
159
|
-
end
|
160
|
-
|
161
|
-
it "receives update_record responses" do
|
162
|
-
@holodeck.mock(Twilio::Response.new(
|
163
|
-
200,
|
164
|
-
%q[
|
165
|
-
{
|
166
|
-
"sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
167
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
168
|
-
"name": "name",
|
169
|
-
"code_length": 4,
|
170
|
-
"date_created": "2015-07-30T20:00:00Z",
|
171
|
-
"date_updated": "2015-07-30T20:00:00Z",
|
172
|
-
"url": "https://preview.twilio.com/Verification/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
173
|
-
"links": {
|
174
|
-
"verification_checks": "https://preview.twilio.com/Verification/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/VerificationCheck",
|
175
|
-
"verifications": "https://preview.twilio.com/Verification/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Verifications"
|
176
|
-
}
|
177
|
-
}
|
178
|
-
]
|
179
|
-
))
|
180
|
-
|
181
|
-
actual = @client.preview.acc_security.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
182
|
-
|
183
|
-
expect(actual).to_not eq(nil)
|
184
|
-
end
|
185
|
-
end
|