twilio-ruby 5.34.0 → 5.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +126 -0
- data/README.md +24 -3
- data/lib/twilio-ruby.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +87 -87
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +14 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +47 -9
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +71 -71
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +29 -29
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +38 -3
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +12 -12
- data/lib/twilio-ruby/rest/autopilot.rb +6 -0
- data/lib/twilio-ruby/rest/autopilot/v1.rb +7 -0
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +0 -16
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +12 -3
- data/lib/twilio-ruby/rest/autopilot/v1/restore_assistant.rb +198 -0
- data/lib/twilio-ruby/rest/client.rb +35 -15
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +28 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +27 -4
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +2 -1
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +7 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +6 -3
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +8 -8
- data/lib/twilio-ruby/rest/notify/v1/service.rb +20 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +26 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +324 -0
- data/lib/twilio-ruby/rest/preview.rb +6 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +7 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb +193 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +26 -0
- data/lib/twilio-ruby/rest/{autopilot/v1/assistant/export_assistant.rb → preview/trusted_comms/business/brand.rb} +88 -71
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +266 -0
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +194 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +7 -0
- data/lib/twilio-ruby/rest/supersim.rb +18 -0
- data/lib/twilio-ruby/rest/supersim/v1.rb +30 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +63 -16
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +315 -0
- data/lib/twilio-ruby/rest/{authy/v1/service.rb → supersim/v1/network_access_profile.rb} +95 -121
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +352 -0
- data/lib/twilio-ruby/rest/verify.rb +9 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +16 -0
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/form.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/service.rb +74 -3
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity.rb +32 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/access_token.rb +141 -0
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor.rb +8 -8
- data/lib/twilio-ruby/rest/{authy/v1 → verify/v2}/service/entity/factor/challenge.rb +8 -8
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +425 -0
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +8 -4
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +8 -4
- data/lib/twilio-ruby/rest/voice.rb +36 -0
- data/lib/twilio-ruby/rest/voice/v1.rb +64 -0
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +513 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +379 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +458 -0
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +366 -0
- data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +346 -0
- data/lib/twilio-ruby/util/configuration.rb +9 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call_spec.rb +5 -5
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +177 -0
- data/spec/integration/api/v2010/account/conference_spec.rb +42 -14
- data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +8 -14
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +12 -4
- data/spec/integration/api/v2010/account/token_spec.rb +23 -11
- data/spec/integration/api/v2010/account/validation_request_spec.rb +1 -1
- data/spec/integration/autopilot/v1/assistant/query_spec.rb +4 -4
- data/spec/integration/autopilot/v1/assistant_spec.rb +4 -8
- data/spec/integration/autopilot/v1/restore_assistant_spec.rb +53 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +7 -0
- data/spec/integration/conversations/v1/conversation_spec.rb +16 -0
- data/spec/integration/flex_api/v1/configuration_spec.rb +3 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle/evaluation_spec.rb +623 -0
- data/spec/integration/numbers/v2/regulatory_compliance/bundle_spec.rb +4 -0
- data/spec/integration/preview/trusted_comms/brands_information_spec.rb +44 -0
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel/channel_spec.rb +54 -0
- data/spec/integration/preview/trusted_comms/business/brand/branded_channel_spec.rb +52 -0
- data/spec/integration/preview/trusted_comms/business/brand_spec.rb +49 -0
- data/spec/integration/preview/trusted_comms/business_spec.rb +1 -0
- data/spec/integration/serverless/v1/service/environment/log_spec.rb +1 -0
- data/spec/integration/supersim/v1/fleet_spec.rb +16 -7
- data/spec/integration/supersim/v1/network_access_profile/network_access_profile_network_spec.rb +179 -0
- data/spec/integration/supersim/v1/network_access_profile_spec.rb +223 -0
- data/spec/integration/supersim/v1/network_spec.rb +139 -0
- data/spec/integration/supersim/v1/sim_spec.rb +78 -6
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +13 -13
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +23 -23
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +28 -28
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +17 -17
- data/spec/integration/trunking/v1/trunk_spec.rb +33 -33
- data/spec/integration/{authy/v1 → verify/v2}/form_spec.rb +4 -4
- data/spec/integration/verify/v2/service/entity/access_token_spec.rb +46 -0
- data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor/challenge_spec.rb +73 -73
- data/spec/integration/{authy/v1 → verify/v2}/service/entity/factor_spec.rb +54 -54
- data/spec/integration/verify/v2/service/entity_spec.rb +204 -0
- data/spec/integration/verify/v2/service/webhook_spec.rb +262 -0
- data/spec/integration/verify/v2/service_spec.rb +32 -4
- data/spec/integration/voice/v1/byoc_trunk_spec.rb +250 -0
- data/spec/integration/voice/v1/connection_policy/connection_policy_target_spec.rb +246 -0
- data/spec/integration/voice/v1/connection_policy_spec.rb +226 -0
- data/spec/integration/voice/v1/ip_record_spec.rb +223 -0
- data/spec/integration/voice/v1/source_ip_mapping_spec.rb +219 -0
- data/spec/rest/client_spec.rb +168 -58
- data/spec/util/configuration_spec.rb +12 -0
- data/twilio-ruby.gemspec +1 -1
- metadata +63 -23
- data/lib/twilio-ruby/rest/authy.rb +0 -55
- data/lib/twilio-ruby/rest/authy/v1.rb +0 -59
- 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
@@ -13,9 +13,9 @@ describe 'Factor' do
|
|
13
13
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
14
|
|
15
15
|
expect {
|
16
|
-
@client.
|
17
|
-
|
18
|
-
|
16
|
+
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
17
|
+
.entities('identity') \
|
18
|
+
.factors.create(binding: 'binding', friendly_name: 'friendly_name', factor_type: 'app-push', config: 'config')
|
19
19
|
}.to raise_exception(Twilio::REST::TwilioError)
|
20
20
|
|
21
21
|
values = {
|
@@ -27,7 +27,7 @@ describe 'Factor' do
|
|
27
27
|
expect(
|
28
28
|
@holodeck.has_request?(Holodeck::Request.new(
|
29
29
|
method: 'post',
|
30
|
-
url: 'https://
|
30
|
+
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors',
|
31
31
|
data: values,
|
32
32
|
))).to eq(true)
|
33
33
|
end
|
@@ -39,7 +39,7 @@ describe 'Factor' do
|
|
39
39
|
{
|
40
40
|
"sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
41
41
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
42
|
-
"service_sid": "
|
42
|
+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
43
43
|
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
44
44
|
"identity": "ff483d1ff591898a9942916050d2ca3f",
|
45
45
|
"date_created": "2015-07-30T20:00:00Z",
|
@@ -53,17 +53,17 @@ describe 'Factor' do
|
|
53
53
|
"notification_platform": "fcm",
|
54
54
|
"notification_token": "test_token"
|
55
55
|
},
|
56
|
-
"url": "https://
|
56
|
+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
57
57
|
"links": {
|
58
|
-
"challenges": "https://
|
58
|
+
"challenges": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
|
59
59
|
}
|
60
60
|
}
|
61
61
|
]
|
62
62
|
))
|
63
63
|
|
64
|
-
actual = @client.
|
65
|
-
|
66
|
-
|
64
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
65
|
+
.entities('identity') \
|
66
|
+
.factors.create(binding: 'binding', friendly_name: 'friendly_name', factor_type: 'app-push', config: 'config')
|
67
67
|
|
68
68
|
expect(actual).to_not eq(nil)
|
69
69
|
end
|
@@ -72,16 +72,16 @@ describe 'Factor' do
|
|
72
72
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
73
73
|
|
74
74
|
expect {
|
75
|
-
@client.
|
76
|
-
|
77
|
-
|
75
|
+
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
76
|
+
.entities('identity') \
|
77
|
+
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
78
78
|
}.to raise_exception(Twilio::REST::TwilioError)
|
79
79
|
|
80
80
|
values = {}
|
81
81
|
expect(
|
82
82
|
@holodeck.has_request?(Holodeck::Request.new(
|
83
83
|
method: 'delete',
|
84
|
-
url: 'https://
|
84
|
+
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors/YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
85
85
|
))).to eq(true)
|
86
86
|
end
|
87
87
|
|
@@ -91,9 +91,9 @@ describe 'Factor' do
|
|
91
91
|
nil,
|
92
92
|
))
|
93
93
|
|
94
|
-
actual = @client.
|
95
|
-
|
96
|
-
|
94
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
95
|
+
.entities('identity') \
|
96
|
+
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
97
97
|
|
98
98
|
expect(actual).to eq(true)
|
99
99
|
end
|
@@ -102,16 +102,16 @@ describe 'Factor' do
|
|
102
102
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
103
103
|
|
104
104
|
expect {
|
105
|
-
@client.
|
106
|
-
|
107
|
-
|
105
|
+
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
106
|
+
.entities('identity') \
|
107
|
+
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
108
108
|
}.to raise_exception(Twilio::REST::TwilioError)
|
109
109
|
|
110
110
|
values = {}
|
111
111
|
expect(
|
112
112
|
@holodeck.has_request?(Holodeck::Request.new(
|
113
113
|
method: 'get',
|
114
|
-
url: 'https://
|
114
|
+
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors/YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
115
115
|
))).to eq(true)
|
116
116
|
end
|
117
117
|
|
@@ -122,7 +122,7 @@ describe 'Factor' do
|
|
122
122
|
{
|
123
123
|
"sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
124
124
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
125
|
-
"service_sid": "
|
125
|
+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
126
126
|
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
127
127
|
"identity": "ff483d1ff591898a9942916050d2ca3f",
|
128
128
|
"date_created": "2015-07-30T20:00:00Z",
|
@@ -136,17 +136,17 @@ describe 'Factor' do
|
|
136
136
|
"notification_platform": "fcm",
|
137
137
|
"notification_token": "test_token"
|
138
138
|
},
|
139
|
-
"url": "https://
|
139
|
+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
140
140
|
"links": {
|
141
|
-
"challenges": "https://
|
141
|
+
"challenges": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
|
142
142
|
}
|
143
143
|
}
|
144
144
|
]
|
145
145
|
))
|
146
146
|
|
147
|
-
actual = @client.
|
148
|
-
|
149
|
-
|
147
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
148
|
+
.entities('identity') \
|
149
|
+
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
150
150
|
|
151
151
|
expect(actual).to_not eq(nil)
|
152
152
|
end
|
@@ -155,16 +155,16 @@ describe 'Factor' do
|
|
155
155
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
156
156
|
|
157
157
|
expect {
|
158
|
-
@client.
|
159
|
-
|
160
|
-
|
158
|
+
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
159
|
+
.entities('identity') \
|
160
|
+
.factors.list()
|
161
161
|
}.to raise_exception(Twilio::REST::TwilioError)
|
162
162
|
|
163
163
|
values = {}
|
164
164
|
expect(
|
165
165
|
@holodeck.has_request?(Holodeck::Request.new(
|
166
166
|
method: 'get',
|
167
|
-
url: 'https://
|
167
|
+
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors',
|
168
168
|
))).to eq(true)
|
169
169
|
end
|
170
170
|
|
@@ -177,9 +177,9 @@ describe 'Factor' do
|
|
177
177
|
"meta": {
|
178
178
|
"page": 0,
|
179
179
|
"page_size": 50,
|
180
|
-
"first_page_url": "https://
|
180
|
+
"first_page_url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors?PageSize=50&Page=0",
|
181
181
|
"previous_page_url": null,
|
182
|
-
"url": "https://
|
182
|
+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors?PageSize=50&Page=0",
|
183
183
|
"next_page_url": null,
|
184
184
|
"key": "factors"
|
185
185
|
}
|
@@ -187,9 +187,9 @@ describe 'Factor' do
|
|
187
187
|
]
|
188
188
|
))
|
189
189
|
|
190
|
-
actual = @client.
|
191
|
-
|
192
|
-
|
190
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
191
|
+
.entities('identity') \
|
192
|
+
.factors.list()
|
193
193
|
|
194
194
|
expect(actual).to_not eq(nil)
|
195
195
|
end
|
@@ -203,7 +203,7 @@ describe 'Factor' do
|
|
203
203
|
{
|
204
204
|
"sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
205
205
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
206
|
-
"service_sid": "
|
206
|
+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
207
207
|
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
208
208
|
"identity": "ff483d1ff591898a9942916050d2ca3f",
|
209
209
|
"date_created": "2015-07-30T20:00:00Z",
|
@@ -217,18 +217,18 @@ describe 'Factor' do
|
|
217
217
|
"notification_platform": "fcm",
|
218
218
|
"notification_token": "test_token"
|
219
219
|
},
|
220
|
-
"url": "https://
|
220
|
+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
221
221
|
"links": {
|
222
|
-
"challenges": "https://
|
222
|
+
"challenges": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
|
223
223
|
}
|
224
224
|
}
|
225
225
|
],
|
226
226
|
"meta": {
|
227
227
|
"page": 0,
|
228
228
|
"page_size": 50,
|
229
|
-
"first_page_url": "https://
|
229
|
+
"first_page_url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors?PageSize=50&Page=0",
|
230
230
|
"previous_page_url": null,
|
231
|
-
"url": "https://
|
231
|
+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors?PageSize=50&Page=0",
|
232
232
|
"next_page_url": null,
|
233
233
|
"key": "factors"
|
234
234
|
}
|
@@ -236,9 +236,9 @@ describe 'Factor' do
|
|
236
236
|
]
|
237
237
|
))
|
238
238
|
|
239
|
-
actual = @client.
|
240
|
-
|
241
|
-
|
239
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
240
|
+
.entities('identity') \
|
241
|
+
.factors.list()
|
242
242
|
|
243
243
|
expect(actual).to_not eq(nil)
|
244
244
|
end
|
@@ -247,16 +247,16 @@ describe 'Factor' do
|
|
247
247
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
248
248
|
|
249
249
|
expect {
|
250
|
-
@client.
|
251
|
-
|
252
|
-
|
250
|
+
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
251
|
+
.entities('identity') \
|
252
|
+
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
253
253
|
}.to raise_exception(Twilio::REST::TwilioError)
|
254
254
|
|
255
255
|
values = {}
|
256
256
|
expect(
|
257
257
|
@holodeck.has_request?(Holodeck::Request.new(
|
258
258
|
method: 'post',
|
259
|
-
url: 'https://
|
259
|
+
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors/YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
260
260
|
))).to eq(true)
|
261
261
|
end
|
262
262
|
|
@@ -267,7 +267,7 @@ describe 'Factor' do
|
|
267
267
|
{
|
268
268
|
"sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
269
269
|
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
270
|
-
"service_sid": "
|
270
|
+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
271
271
|
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
272
272
|
"identity": "ff483d1ff591898a9942916050d2ca3f",
|
273
273
|
"date_created": "2015-07-30T20:00:00Z",
|
@@ -281,17 +281,17 @@ describe 'Factor' do
|
|
281
281
|
"notification_platform": "fcm",
|
282
282
|
"notification_token": "test_token"
|
283
283
|
},
|
284
|
-
"url": "https://
|
284
|
+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
285
285
|
"links": {
|
286
|
-
"challenges": "https://
|
286
|
+
"challenges": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges"
|
287
287
|
}
|
288
288
|
}
|
289
289
|
]
|
290
290
|
))
|
291
291
|
|
292
|
-
actual = @client.
|
293
|
-
|
294
|
-
|
292
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
293
|
+
.entities('identity') \
|
294
|
+
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
295
295
|
|
296
296
|
expect(actual).to_not eq(nil)
|
297
297
|
end
|
@@ -0,0 +1,204 @@
|
|
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.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
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://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/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": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
38
|
+
"date_created": "2015-07-30T20:00:00Z",
|
39
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
40
|
+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f",
|
41
|
+
"links": {
|
42
|
+
"factors": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors",
|
43
|
+
"access_tokens": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/AccessTokens"
|
44
|
+
}
|
45
|
+
}
|
46
|
+
]
|
47
|
+
))
|
48
|
+
|
49
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
50
|
+
.entities.create(identity: 'identity')
|
51
|
+
|
52
|
+
expect(actual).to_not eq(nil)
|
53
|
+
end
|
54
|
+
|
55
|
+
it "can delete" do
|
56
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
57
|
+
|
58
|
+
expect {
|
59
|
+
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
60
|
+
.entities('identity').delete()
|
61
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
62
|
+
|
63
|
+
values = {}
|
64
|
+
expect(
|
65
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
66
|
+
method: 'delete',
|
67
|
+
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity',
|
68
|
+
))).to eq(true)
|
69
|
+
end
|
70
|
+
|
71
|
+
it "receives delete responses" do
|
72
|
+
@holodeck.mock(Twilio::Response.new(
|
73
|
+
204,
|
74
|
+
nil,
|
75
|
+
))
|
76
|
+
|
77
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
78
|
+
.entities('identity').delete()
|
79
|
+
|
80
|
+
expect(actual).to eq(true)
|
81
|
+
end
|
82
|
+
|
83
|
+
it "can fetch" do
|
84
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
85
|
+
|
86
|
+
expect {
|
87
|
+
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
88
|
+
.entities('identity').fetch()
|
89
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
90
|
+
|
91
|
+
values = {}
|
92
|
+
expect(
|
93
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
94
|
+
method: 'get',
|
95
|
+
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity',
|
96
|
+
))).to eq(true)
|
97
|
+
end
|
98
|
+
|
99
|
+
it "receives fetch responses" do
|
100
|
+
@holodeck.mock(Twilio::Response.new(
|
101
|
+
200,
|
102
|
+
%q[
|
103
|
+
{
|
104
|
+
"sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
105
|
+
"identity": "ff483d1ff591898a9942916050d2ca3f",
|
106
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
107
|
+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
108
|
+
"date_created": "2015-07-30T20:00:00Z",
|
109
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
110
|
+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f",
|
111
|
+
"links": {
|
112
|
+
"factors": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors",
|
113
|
+
"access_tokens": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/AccessTokens"
|
114
|
+
}
|
115
|
+
}
|
116
|
+
]
|
117
|
+
))
|
118
|
+
|
119
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
120
|
+
.entities('identity').fetch()
|
121
|
+
|
122
|
+
expect(actual).to_not eq(nil)
|
123
|
+
end
|
124
|
+
|
125
|
+
it "can read" do
|
126
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
127
|
+
|
128
|
+
expect {
|
129
|
+
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
130
|
+
.entities.list()
|
131
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
132
|
+
|
133
|
+
values = {}
|
134
|
+
expect(
|
135
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
136
|
+
method: 'get',
|
137
|
+
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities',
|
138
|
+
))).to eq(true)
|
139
|
+
end
|
140
|
+
|
141
|
+
it "receives read_empty responses" do
|
142
|
+
@holodeck.mock(Twilio::Response.new(
|
143
|
+
200,
|
144
|
+
%q[
|
145
|
+
{
|
146
|
+
"entities": [],
|
147
|
+
"meta": {
|
148
|
+
"page": 0,
|
149
|
+
"page_size": 50,
|
150
|
+
"first_page_url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities?PageSize=50&Page=0",
|
151
|
+
"previous_page_url": null,
|
152
|
+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities?PageSize=50&Page=0",
|
153
|
+
"next_page_url": null,
|
154
|
+
"key": "entities"
|
155
|
+
}
|
156
|
+
}
|
157
|
+
]
|
158
|
+
))
|
159
|
+
|
160
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
161
|
+
.entities.list()
|
162
|
+
|
163
|
+
expect(actual).to_not eq(nil)
|
164
|
+
end
|
165
|
+
|
166
|
+
it "receives read_full responses" do
|
167
|
+
@holodeck.mock(Twilio::Response.new(
|
168
|
+
200,
|
169
|
+
%q[
|
170
|
+
{
|
171
|
+
"entities": [
|
172
|
+
{
|
173
|
+
"sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
174
|
+
"identity": "ff483d1ff591898a9942916050d2ca3f",
|
175
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
176
|
+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
177
|
+
"date_created": "2015-07-30T20:00:00Z",
|
178
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
179
|
+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f",
|
180
|
+
"links": {
|
181
|
+
"factors": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors",
|
182
|
+
"access_tokens": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/AccessTokens"
|
183
|
+
}
|
184
|
+
}
|
185
|
+
],
|
186
|
+
"meta": {
|
187
|
+
"page": 0,
|
188
|
+
"page_size": 50,
|
189
|
+
"first_page_url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities?PageSize=50&Page=0",
|
190
|
+
"previous_page_url": null,
|
191
|
+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities?PageSize=50&Page=0",
|
192
|
+
"next_page_url": null,
|
193
|
+
"key": "entities"
|
194
|
+
}
|
195
|
+
}
|
196
|
+
]
|
197
|
+
))
|
198
|
+
|
199
|
+
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
200
|
+
.entities.list()
|
201
|
+
|
202
|
+
expect(actual).to_not eq(nil)
|
203
|
+
end
|
204
|
+
end
|