twilio-ruby 5.37.0 → 5.38.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 +32 -9
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +41 -5
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -16
- data/lib/twilio-ruby/rest/client.rb +0 -7
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +28 -3
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +26 -0
- data/lib/twilio-ruby/rest/{authy/v1/service/entity.rb → verify/v2/service/webhook.rb} +154 -108
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +60 -0
- data/spec/integration/autopilot/v1/assistant_spec.rb +4 -8
- data/spec/integration/conversations/v1/conversation_spec.rb +16 -0
- data/spec/integration/verify/v2/service/webhook_spec.rb +262 -0
- data/spec/integration/verify/v2/service_spec.rb +8 -4
- metadata +5 -22
- data/lib/twilio-ruby/rest/authy.rb +0 -55
- data/lib/twilio-ruby/rest/authy/v1.rb +0 -59
- data/lib/twilio-ruby/rest/authy/v1/form.rb +0 -197
- data/lib/twilio-ruby/rest/authy/v1/service.rb +0 -404
- data/lib/twilio-ruby/rest/authy/v1/service/entity/factor.rb +0 -500
- data/lib/twilio-ruby/rest/authy/v1/service/entity/factor/challenge.rb +0 -494
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/export_assistant.rb +0 -222
- data/spec/integration/authy/v1/form_spec.rb +0 -48
- data/spec/integration/authy/v1/service/entity/factor/challenge_spec.rb +0 -353
- data/spec/integration/authy/v1/service/entity/factor_spec.rb +0 -298
- data/spec/integration/authy/v1/service/entity_spec.rb +0 -201
- data/spec/integration/authy/v1/service_spec.rb +0 -231
- data/spec/integration/autopilot/v1/assistant/export_assistant_spec.rb +0 -49
@@ -1,298 +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 'Factor' do
|
12
|
-
it "can create" do
|
13
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
-
|
15
|
-
expect {
|
16
|
-
@client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
17
|
-
.entities('identity') \
|
18
|
-
.factors.create(binding: 'binding', friendly_name: 'friendly_name', factor_type: 'app-push', config: 'config')
|
19
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
20
|
-
|
21
|
-
values = {
|
22
|
-
'Binding' => 'binding',
|
23
|
-
'FriendlyName' => 'friendly_name',
|
24
|
-
'FactorType' => 'app-push',
|
25
|
-
'Config' => 'config',
|
26
|
-
}
|
27
|
-
expect(
|
28
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
29
|
-
method: 'post',
|
30
|
-
url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors',
|
31
|
-
data: values,
|
32
|
-
))).to eq(true)
|
33
|
-
end
|
34
|
-
|
35
|
-
it "receives create responses" do
|
36
|
-
@holodeck.mock(Twilio::Response.new(
|
37
|
-
201,
|
38
|
-
%q[
|
39
|
-
{
|
40
|
-
"sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
41
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
42
|
-
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
43
|
-
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
44
|
-
"identity": "ff483d1ff591898a9942916050d2ca3f",
|
45
|
-
"date_created": "2015-07-30T20:00:00Z",
|
46
|
-
"date_updated": "2015-07-30T20:00:00Z",
|
47
|
-
"friendly_name": "friendly_name",
|
48
|
-
"status": "unverified",
|
49
|
-
"factor_type": "push",
|
50
|
-
"config": {
|
51
|
-
"sdk_version": "1.0",
|
52
|
-
"app_id": "com.authy.authy",
|
53
|
-
"notification_platform": "fcm",
|
54
|
-
"notification_token": "test_token"
|
55
|
-
},
|
56
|
-
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
57
|
-
"links": {
|
58
|
-
"challenges": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
|
59
|
-
}
|
60
|
-
}
|
61
|
-
]
|
62
|
-
))
|
63
|
-
|
64
|
-
actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
65
|
-
.entities('identity') \
|
66
|
-
.factors.create(binding: 'binding', friendly_name: 'friendly_name', factor_type: 'app-push', config: 'config')
|
67
|
-
|
68
|
-
expect(actual).to_not eq(nil)
|
69
|
-
end
|
70
|
-
|
71
|
-
it "can delete" do
|
72
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
73
|
-
|
74
|
-
expect {
|
75
|
-
@client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
76
|
-
.entities('identity') \
|
77
|
-
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
78
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
79
|
-
|
80
|
-
values = {}
|
81
|
-
expect(
|
82
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
83
|
-
method: 'delete',
|
84
|
-
url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors/YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
85
|
-
))).to eq(true)
|
86
|
-
end
|
87
|
-
|
88
|
-
it "receives delete responses" do
|
89
|
-
@holodeck.mock(Twilio::Response.new(
|
90
|
-
204,
|
91
|
-
nil,
|
92
|
-
))
|
93
|
-
|
94
|
-
actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
95
|
-
.entities('identity') \
|
96
|
-
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
97
|
-
|
98
|
-
expect(actual).to eq(true)
|
99
|
-
end
|
100
|
-
|
101
|
-
it "can fetch" do
|
102
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
103
|
-
|
104
|
-
expect {
|
105
|
-
@client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
106
|
-
.entities('identity') \
|
107
|
-
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
108
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
109
|
-
|
110
|
-
values = {}
|
111
|
-
expect(
|
112
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
113
|
-
method: 'get',
|
114
|
-
url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors/YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
115
|
-
))).to eq(true)
|
116
|
-
end
|
117
|
-
|
118
|
-
it "receives fetch responses" do
|
119
|
-
@holodeck.mock(Twilio::Response.new(
|
120
|
-
200,
|
121
|
-
%q[
|
122
|
-
{
|
123
|
-
"sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
124
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
125
|
-
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
126
|
-
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
127
|
-
"identity": "ff483d1ff591898a9942916050d2ca3f",
|
128
|
-
"date_created": "2015-07-30T20:00:00Z",
|
129
|
-
"date_updated": "2015-07-30T20:00:00Z",
|
130
|
-
"friendly_name": "friendly_name",
|
131
|
-
"status": "unverified",
|
132
|
-
"factor_type": "push",
|
133
|
-
"config": {
|
134
|
-
"sdk_version": "1.0",
|
135
|
-
"app_id": "com.authy.authy",
|
136
|
-
"notification_platform": "fcm",
|
137
|
-
"notification_token": "test_token"
|
138
|
-
},
|
139
|
-
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
140
|
-
"links": {
|
141
|
-
"challenges": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
|
142
|
-
}
|
143
|
-
}
|
144
|
-
]
|
145
|
-
))
|
146
|
-
|
147
|
-
actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
148
|
-
.entities('identity') \
|
149
|
-
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
150
|
-
|
151
|
-
expect(actual).to_not eq(nil)
|
152
|
-
end
|
153
|
-
|
154
|
-
it "can read" do
|
155
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
156
|
-
|
157
|
-
expect {
|
158
|
-
@client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
159
|
-
.entities('identity') \
|
160
|
-
.factors.list()
|
161
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
162
|
-
|
163
|
-
values = {}
|
164
|
-
expect(
|
165
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
166
|
-
method: 'get',
|
167
|
-
url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors',
|
168
|
-
))).to eq(true)
|
169
|
-
end
|
170
|
-
|
171
|
-
it "receives read_empty responses" do
|
172
|
-
@holodeck.mock(Twilio::Response.new(
|
173
|
-
200,
|
174
|
-
%q[
|
175
|
-
{
|
176
|
-
"factors": [],
|
177
|
-
"meta": {
|
178
|
-
"page": 0,
|
179
|
-
"page_size": 50,
|
180
|
-
"first_page_url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors?PageSize=50&Page=0",
|
181
|
-
"previous_page_url": null,
|
182
|
-
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors?PageSize=50&Page=0",
|
183
|
-
"next_page_url": null,
|
184
|
-
"key": "factors"
|
185
|
-
}
|
186
|
-
}
|
187
|
-
]
|
188
|
-
))
|
189
|
-
|
190
|
-
actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
191
|
-
.entities('identity') \
|
192
|
-
.factors.list()
|
193
|
-
|
194
|
-
expect(actual).to_not eq(nil)
|
195
|
-
end
|
196
|
-
|
197
|
-
it "receives read_full responses" do
|
198
|
-
@holodeck.mock(Twilio::Response.new(
|
199
|
-
200,
|
200
|
-
%q[
|
201
|
-
{
|
202
|
-
"factors": [
|
203
|
-
{
|
204
|
-
"sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
205
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
206
|
-
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
207
|
-
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
208
|
-
"identity": "ff483d1ff591898a9942916050d2ca3f",
|
209
|
-
"date_created": "2015-07-30T20:00:00Z",
|
210
|
-
"date_updated": "2015-07-30T20:00:00Z",
|
211
|
-
"friendly_name": "friendly_name",
|
212
|
-
"status": "unverified",
|
213
|
-
"factor_type": "push",
|
214
|
-
"config": {
|
215
|
-
"sdk_version": "1.0",
|
216
|
-
"app_id": "com.authy.authy",
|
217
|
-
"notification_platform": "fcm",
|
218
|
-
"notification_token": "test_token"
|
219
|
-
},
|
220
|
-
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
221
|
-
"links": {
|
222
|
-
"challenges": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
|
223
|
-
}
|
224
|
-
}
|
225
|
-
],
|
226
|
-
"meta": {
|
227
|
-
"page": 0,
|
228
|
-
"page_size": 50,
|
229
|
-
"first_page_url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors?PageSize=50&Page=0",
|
230
|
-
"previous_page_url": null,
|
231
|
-
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors?PageSize=50&Page=0",
|
232
|
-
"next_page_url": null,
|
233
|
-
"key": "factors"
|
234
|
-
}
|
235
|
-
}
|
236
|
-
]
|
237
|
-
))
|
238
|
-
|
239
|
-
actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
240
|
-
.entities('identity') \
|
241
|
-
.factors.list()
|
242
|
-
|
243
|
-
expect(actual).to_not eq(nil)
|
244
|
-
end
|
245
|
-
|
246
|
-
it "can update" do
|
247
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
248
|
-
|
249
|
-
expect {
|
250
|
-
@client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
251
|
-
.entities('identity') \
|
252
|
-
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
253
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
254
|
-
|
255
|
-
values = {}
|
256
|
-
expect(
|
257
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
258
|
-
method: 'post',
|
259
|
-
url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors/YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
260
|
-
))).to eq(true)
|
261
|
-
end
|
262
|
-
|
263
|
-
it "receives verify responses" do
|
264
|
-
@holodeck.mock(Twilio::Response.new(
|
265
|
-
200,
|
266
|
-
%q[
|
267
|
-
{
|
268
|
-
"sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
269
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
270
|
-
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
271
|
-
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
272
|
-
"identity": "ff483d1ff591898a9942916050d2ca3f",
|
273
|
-
"date_created": "2015-07-30T20:00:00Z",
|
274
|
-
"date_updated": "2015-07-30T20:00:00Z",
|
275
|
-
"friendly_name": "friendly_name",
|
276
|
-
"status": "verified",
|
277
|
-
"factor_type": "push",
|
278
|
-
"config": {
|
279
|
-
"sdk_version": "1.0",
|
280
|
-
"app_id": "com.authy.authy",
|
281
|
-
"notification_platform": "fcm",
|
282
|
-
"notification_token": "test_token"
|
283
|
-
},
|
284
|
-
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
285
|
-
"links": {
|
286
|
-
"challenges": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
|
287
|
-
}
|
288
|
-
}
|
289
|
-
]
|
290
|
-
))
|
291
|
-
|
292
|
-
actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
293
|
-
.entities('identity') \
|
294
|
-
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
295
|
-
|
296
|
-
expect(actual).to_not eq(nil)
|
297
|
-
end
|
298
|
-
end
|
@@ -1,201 +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 'Entity' do
|
12
|
-
it "can create" do
|
13
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
-
|
15
|
-
expect {
|
16
|
-
@client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
17
|
-
.entities.create(identity: 'identity')
|
18
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
19
|
-
|
20
|
-
values = {'Identity' => 'identity', }
|
21
|
-
expect(
|
22
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
23
|
-
method: 'post',
|
24
|
-
url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities',
|
25
|
-
data: values,
|
26
|
-
))).to eq(true)
|
27
|
-
end
|
28
|
-
|
29
|
-
it "receives create responses" do
|
30
|
-
@holodeck.mock(Twilio::Response.new(
|
31
|
-
201,
|
32
|
-
%q[
|
33
|
-
{
|
34
|
-
"sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
35
|
-
"identity": "ff483d1ff591898a9942916050d2ca3f",
|
36
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
37
|
-
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
38
|
-
"date_created": "2015-07-30T20:00:00Z",
|
39
|
-
"date_updated": "2015-07-30T20:00:00Z",
|
40
|
-
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f",
|
41
|
-
"links": {
|
42
|
-
"factors": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors"
|
43
|
-
}
|
44
|
-
}
|
45
|
-
]
|
46
|
-
))
|
47
|
-
|
48
|
-
actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
49
|
-
.entities.create(identity: 'identity')
|
50
|
-
|
51
|
-
expect(actual).to_not eq(nil)
|
52
|
-
end
|
53
|
-
|
54
|
-
it "can delete" do
|
55
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
56
|
-
|
57
|
-
expect {
|
58
|
-
@client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
59
|
-
.entities('identity').delete()
|
60
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
61
|
-
|
62
|
-
values = {}
|
63
|
-
expect(
|
64
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
65
|
-
method: 'delete',
|
66
|
-
url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity',
|
67
|
-
))).to eq(true)
|
68
|
-
end
|
69
|
-
|
70
|
-
it "receives delete responses" do
|
71
|
-
@holodeck.mock(Twilio::Response.new(
|
72
|
-
204,
|
73
|
-
nil,
|
74
|
-
))
|
75
|
-
|
76
|
-
actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
77
|
-
.entities('identity').delete()
|
78
|
-
|
79
|
-
expect(actual).to eq(true)
|
80
|
-
end
|
81
|
-
|
82
|
-
it "can fetch" do
|
83
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
84
|
-
|
85
|
-
expect {
|
86
|
-
@client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
87
|
-
.entities('identity').fetch()
|
88
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
89
|
-
|
90
|
-
values = {}
|
91
|
-
expect(
|
92
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
93
|
-
method: 'get',
|
94
|
-
url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity',
|
95
|
-
))).to eq(true)
|
96
|
-
end
|
97
|
-
|
98
|
-
it "receives fetch responses" do
|
99
|
-
@holodeck.mock(Twilio::Response.new(
|
100
|
-
200,
|
101
|
-
%q[
|
102
|
-
{
|
103
|
-
"sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
104
|
-
"identity": "ff483d1ff591898a9942916050d2ca3f",
|
105
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
106
|
-
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
107
|
-
"date_created": "2015-07-30T20:00:00Z",
|
108
|
-
"date_updated": "2015-07-30T20:00:00Z",
|
109
|
-
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f",
|
110
|
-
"links": {
|
111
|
-
"factors": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors"
|
112
|
-
}
|
113
|
-
}
|
114
|
-
]
|
115
|
-
))
|
116
|
-
|
117
|
-
actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
118
|
-
.entities('identity').fetch()
|
119
|
-
|
120
|
-
expect(actual).to_not eq(nil)
|
121
|
-
end
|
122
|
-
|
123
|
-
it "can read" do
|
124
|
-
@holodeck.mock(Twilio::Response.new(500, ''))
|
125
|
-
|
126
|
-
expect {
|
127
|
-
@client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
128
|
-
.entities.list()
|
129
|
-
}.to raise_exception(Twilio::REST::TwilioError)
|
130
|
-
|
131
|
-
values = {}
|
132
|
-
expect(
|
133
|
-
@holodeck.has_request?(Holodeck::Request.new(
|
134
|
-
method: 'get',
|
135
|
-
url: 'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities',
|
136
|
-
))).to eq(true)
|
137
|
-
end
|
138
|
-
|
139
|
-
it "receives read_empty responses" do
|
140
|
-
@holodeck.mock(Twilio::Response.new(
|
141
|
-
200,
|
142
|
-
%q[
|
143
|
-
{
|
144
|
-
"entities": [],
|
145
|
-
"meta": {
|
146
|
-
"page": 0,
|
147
|
-
"page_size": 50,
|
148
|
-
"first_page_url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities?PageSize=50&Page=0",
|
149
|
-
"previous_page_url": null,
|
150
|
-
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities?PageSize=50&Page=0",
|
151
|
-
"next_page_url": null,
|
152
|
-
"key": "entities"
|
153
|
-
}
|
154
|
-
}
|
155
|
-
]
|
156
|
-
))
|
157
|
-
|
158
|
-
actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
159
|
-
.entities.list()
|
160
|
-
|
161
|
-
expect(actual).to_not eq(nil)
|
162
|
-
end
|
163
|
-
|
164
|
-
it "receives read_full responses" do
|
165
|
-
@holodeck.mock(Twilio::Response.new(
|
166
|
-
200,
|
167
|
-
%q[
|
168
|
-
{
|
169
|
-
"entities": [
|
170
|
-
{
|
171
|
-
"sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
172
|
-
"identity": "ff483d1ff591898a9942916050d2ca3f",
|
173
|
-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
174
|
-
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
175
|
-
"date_created": "2015-07-30T20:00:00Z",
|
176
|
-
"date_updated": "2015-07-30T20:00:00Z",
|
177
|
-
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f",
|
178
|
-
"links": {
|
179
|
-
"factors": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors"
|
180
|
-
}
|
181
|
-
}
|
182
|
-
],
|
183
|
-
"meta": {
|
184
|
-
"page": 0,
|
185
|
-
"page_size": 50,
|
186
|
-
"first_page_url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities?PageSize=50&Page=0",
|
187
|
-
"previous_page_url": null,
|
188
|
-
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities?PageSize=50&Page=0",
|
189
|
-
"next_page_url": null,
|
190
|
-
"key": "entities"
|
191
|
-
}
|
192
|
-
}
|
193
|
-
]
|
194
|
-
))
|
195
|
-
|
196
|
-
actual = @client.authy.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
197
|
-
.entities.list()
|
198
|
-
|
199
|
-
expect(actual).to_not eq(nil)
|
200
|
-
end
|
201
|
-
end
|