twilio-ruby 5.41.0 → 5.45.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +99 -0
- data/{LICENSE.md → LICENSE} +0 -0
- data/PULL_REQUEST_TEMPLATE.md +3 -3
- data/README.md +18 -2
- data/lib/twilio-ruby.rb +1 -1
- data/lib/twilio-ruby/jwt/access_token.rb +7 -2
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +26 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +201 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +13 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +6 -1
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +5 -22
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +25 -40
- data/lib/twilio-ruby/rest/client.rb +29 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +32 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +17 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +32 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +8 -1
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +8 -1
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +12 -5
- data/lib/twilio-ruby/rest/flex_api.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +5 -5
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +88 -76
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +2 -2
- data/lib/twilio-ruby/rest/insights.rb +8 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +15 -0
- data/lib/twilio-ruby/rest/insights/v1/room.rb +487 -0
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +378 -0
- data/lib/twilio-ruby/rest/ip_messaging.rb +8 -10
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +6 -8
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +29 -68
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +198 -313
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +32 -59
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +23 -55
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +28 -71
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +31 -59
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +19 -39
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +29 -51
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +12 -18
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +6 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +29 -66
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +116 -205
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +23 -50
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +41 -91
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +23 -50
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +42 -118
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +46 -100
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +36 -89
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +19 -41
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +29 -53
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +23 -53
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +27 -56
- data/lib/twilio-ruby/rest/preview.rb +0 -21
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +5 -22
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +21 -39
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +0 -30
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +5 -5
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +4 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +4 -4
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +15 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +15 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +28 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +15 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +28 -5
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +15 -5
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +12 -9
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +16 -16
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +21 -24
- data/lib/twilio-ruby/rest/verify/v2/form.rb +4 -4
- data/lib/twilio-ruby/rest/verify/v2/service.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +3 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +23 -35
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +27 -49
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +24 -42
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +4 -4
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/room.rb +20 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +150 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +8 -4
- data/lib/twilio-ruby/util/configuration.rb +5 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/call/event_spec.rb +102 -0
- data/spec/integration/api/v2010/account/call/recording_spec.rb +4 -0
- data/spec/integration/api/v2010/account/call_spec.rb +20 -10
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +30 -0
- data/spec/integration/bulkexports/v1/export/export_custom_job_spec.rb +4 -2
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +30 -10
- data/spec/integration/conversations/v1/service/configuration_spec.rb +2 -0
- data/spec/integration/conversations/v1/service/conversation/participant_spec.rb +30 -10
- data/spec/integration/conversations/v1/service/user_spec.rb +9 -4
- data/spec/integration/conversations/v1/user_spec.rb +9 -4
- data/spec/integration/events/v1/sink/sink_test_spec.rb +1 -1
- data/spec/integration/events/v1/subscription_spec.rb +49 -0
- data/spec/integration/insights/v1/room/participant_spec.rb +147 -0
- data/spec/integration/insights/v1/room_spec.rb +164 -0
- data/spec/integration/ip_messaging/v1/credential_spec.rb +13 -13
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +11 -11
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +14 -14
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +14 -14
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +25 -25
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +13 -13
- data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +7 -7
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +17 -17
- data/spec/integration/ip_messaging/v1/service_spec.rb +9 -9
- data/spec/integration/ip_messaging/v2/credential_spec.rb +13 -13
- data/spec/integration/ip_messaging/v2/service/binding_spec.rb +11 -11
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +11 -11
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +13 -13
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +17 -17
- data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +15 -15
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +29 -29
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +13 -13
- data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +9 -9
- data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +20 -20
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +21 -21
- data/spec/integration/ip_messaging/v2/service_spec.rb +29 -29
- data/spec/integration/lookups/v1/phone_number_spec.rb +7 -7
- data/spec/integration/preview/bulk_exports/export/export_custom_job_spec.rb +4 -2
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +1 -1
- data/spec/integration/trunking/v1/trunk/recording_spec.rb +2 -6
- data/spec/integration/verify/v2/service/entity/challenge_spec.rb +4 -12
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +5 -15
- data/spec/integration/verify/v2/service/entity_spec.rb +4 -12
- data/spec/integration/video/v1/room/room_recording_rule_spec.rb +89 -0
- data/spec/integration/video/v1/room_spec.rb +10 -5
- data/spec/jwt/access_token_spec.rb +9 -1
- data/spec/rest/client_spec.rb +24 -2
- data/twilio-ruby.gemspec +2 -1
- metadata +30 -19
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
- data/lib/twilio-ruby/rest/preview/trusted_comms/business.rb +0 -213
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb +0 -108
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +0 -260
- data/lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb +0 -342
- data/spec/integration/preview/trusted_comms/branded_call_spec.rb +0 -59
- data/spec/integration/preview/trusted_comms/business/insights/impressions_rate_spec.rb +0 -56
- data/spec/integration/preview/trusted_comms/business/insights_spec.rb +0 -12
- data/spec/integration/preview/trusted_comms/business_spec.rb +0 -45
- data/spec/integration/preview/trusted_comms/phone_call_spec.rb +0 -59
@@ -63,7 +63,7 @@ describe 'PhoneNumber' do
|
|
63
63
|
"phone_number": "+15108675310",
|
64
64
|
"fraud": null,
|
65
65
|
"add_ons": null,
|
66
|
-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310
|
66
|
+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310"
|
67
67
|
}
|
68
68
|
]
|
69
69
|
))
|
@@ -91,7 +91,7 @@ describe 'PhoneNumber' do
|
|
91
91
|
"phone_number": "+4402077651182",
|
92
92
|
"fraud": null,
|
93
93
|
"add_ons": null,
|
94
|
-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+4402077651182
|
94
|
+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+4402077651182"
|
95
95
|
}
|
96
96
|
]
|
97
97
|
))
|
@@ -117,7 +117,7 @@ describe 'PhoneNumber' do
|
|
117
117
|
"national_format": "(510) 867-5310",
|
118
118
|
"phone_number": "+15108675310",
|
119
119
|
"add_ons": null,
|
120
|
-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310
|
120
|
+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310"
|
121
121
|
}
|
122
122
|
]
|
123
123
|
))
|
@@ -154,7 +154,7 @@ describe 'PhoneNumber' do
|
|
154
154
|
"code": null,
|
155
155
|
"results": {}
|
156
156
|
},
|
157
|
-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310
|
157
|
+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310"
|
158
158
|
}
|
159
159
|
]
|
160
160
|
))
|
@@ -229,7 +229,7 @@ describe 'PhoneNumber' do
|
|
229
229
|
}
|
230
230
|
}
|
231
231
|
},
|
232
|
-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+12127363100
|
232
|
+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+12127363100"
|
233
233
|
}
|
234
234
|
]
|
235
235
|
))
|
@@ -274,7 +274,7 @@ describe 'PhoneNumber' do
|
|
274
274
|
}
|
275
275
|
}
|
276
276
|
},
|
277
|
-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+19892008374
|
277
|
+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+19892008374"
|
278
278
|
}
|
279
279
|
]
|
280
280
|
))
|
@@ -324,7 +324,7 @@ describe 'PhoneNumber' do
|
|
324
324
|
}
|
325
325
|
}
|
326
326
|
},
|
327
|
-
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+16502530000
|
327
|
+
"url": "https://lookups.twilio.com/v1/PhoneNumbers/+16502530000"
|
328
328
|
}
|
329
329
|
]
|
330
330
|
))
|
@@ -91,13 +91,15 @@ describe 'ExportCustomJob' do
|
|
91
91
|
|
92
92
|
expect {
|
93
93
|
@client.preview.bulk_exports.exports('resource_type') \
|
94
|
-
.export_custom_jobs.create()
|
94
|
+
.export_custom_jobs.create(start_day: 'start_day', end_day: 'end_day', friendly_name: 'friendly_name')
|
95
95
|
}.to raise_exception(Twilio::REST::TwilioError)
|
96
96
|
|
97
|
+
values = {'StartDay' => 'start_day', 'EndDay' => 'end_day', 'FriendlyName' => 'friendly_name', }
|
97
98
|
expect(
|
98
99
|
@holodeck.has_request?(Holodeck::Request.new(
|
99
100
|
method: 'post',
|
100
101
|
url: 'https://preview.twilio.com/BulkExports/Exports/resource_type/Jobs',
|
102
|
+
data: values,
|
101
103
|
))).to eq(true)
|
102
104
|
end
|
103
105
|
|
@@ -120,7 +122,7 @@ describe 'ExportCustomJob' do
|
|
120
122
|
))
|
121
123
|
|
122
124
|
actual = @client.preview.bulk_exports.exports('resource_type') \
|
123
|
-
.export_custom_jobs.create()
|
125
|
+
.export_custom_jobs.create(start_day: 'start_day', end_day: 'end_day', friendly_name: 'friendly_name')
|
124
126
|
|
125
127
|
expect(actual).to_not eq(nil)
|
126
128
|
end
|
@@ -169,7 +169,7 @@ describe 'WorkerChannel' do
|
|
169
169
|
"sid": "WCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
170
170
|
"task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
171
171
|
"task_channel_unique_name": "default",
|
172
|
-
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/
|
172
|
+
"url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/WCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
173
173
|
"worker_sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
174
174
|
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
175
175
|
}
|
@@ -30,9 +30,7 @@ describe 'Recording' do
|
|
30
30
|
%q[
|
31
31
|
{
|
32
32
|
"mode": "do-not-record",
|
33
|
-
"trim": "do-not-trim"
|
34
|
-
"url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recording",
|
35
|
-
"trunk_sid": "TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
33
|
+
"trim": "do-not-trim"
|
36
34
|
}
|
37
35
|
]
|
38
36
|
))
|
@@ -64,9 +62,7 @@ describe 'Recording' do
|
|
64
62
|
%q[
|
65
63
|
{
|
66
64
|
"mode": "do-not-record",
|
67
|
-
"trim": "do-not-trim"
|
68
|
-
"url": "https://trunking.twilio.com/v1/Trunks/TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recording",
|
69
|
-
"trunk_sid": "TKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
65
|
+
"trim": "do-not-trim"
|
70
66
|
}
|
71
67
|
]
|
72
68
|
))
|
@@ -15,17 +15,15 @@ describe 'Challenge' do
|
|
15
15
|
expect {
|
16
16
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
17
17
|
.entities('identity') \
|
18
|
-
.challenges.create(factor_sid: 'YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
|
18
|
+
.challenges.create(factor_sid: 'YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
19
19
|
}.to raise_exception(Twilio::REST::TwilioError)
|
20
20
|
|
21
21
|
values = {'FactorSid' => 'YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', }
|
22
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
23
22
|
expect(
|
24
23
|
@holodeck.has_request?(Holodeck::Request.new(
|
25
24
|
method: 'post',
|
26
25
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Challenges',
|
27
26
|
data: values,
|
28
|
-
headers: headers,
|
29
27
|
))).to eq(true)
|
30
28
|
end
|
31
29
|
|
@@ -78,15 +76,13 @@ describe 'Challenge' do
|
|
78
76
|
expect {
|
79
77
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
80
78
|
.entities('identity') \
|
81
|
-
.challenges('YCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch(
|
79
|
+
.challenges('YCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
82
80
|
}.to raise_exception(Twilio::REST::TwilioError)
|
83
81
|
|
84
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
85
82
|
expect(
|
86
83
|
@holodeck.has_request?(Holodeck::Request.new(
|
87
84
|
method: 'get',
|
88
85
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Challenges/YCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
89
|
-
headers: headers,
|
90
86
|
))).to eq(true)
|
91
87
|
end
|
92
88
|
|
@@ -139,15 +135,13 @@ describe 'Challenge' do
|
|
139
135
|
expect {
|
140
136
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
141
137
|
.entities('identity') \
|
142
|
-
.challenges.list(
|
138
|
+
.challenges.list()
|
143
139
|
}.to raise_exception(Twilio::REST::TwilioError)
|
144
140
|
|
145
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
146
141
|
expect(
|
147
142
|
@holodeck.has_request?(Holodeck::Request.new(
|
148
143
|
method: 'get',
|
149
144
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Challenges',
|
150
|
-
headers: headers,
|
151
145
|
))).to eq(true)
|
152
146
|
end
|
153
147
|
|
@@ -239,15 +233,13 @@ describe 'Challenge' do
|
|
239
233
|
expect {
|
240
234
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
241
235
|
.entities('identity') \
|
242
|
-
.challenges('YCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(
|
236
|
+
.challenges('YCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
243
237
|
}.to raise_exception(Twilio::REST::TwilioError)
|
244
238
|
|
245
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
246
239
|
expect(
|
247
240
|
@holodeck.has_request?(Holodeck::Request.new(
|
248
241
|
method: 'post',
|
249
242
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Challenges/YCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
250
|
-
headers: headers,
|
251
243
|
))).to eq(true)
|
252
244
|
end
|
253
245
|
|
@@ -15,17 +15,15 @@ describe 'Factor' do
|
|
15
15
|
expect {
|
16
16
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
17
17
|
.entities('identity') \
|
18
|
-
.factors.create(friendly_name: 'friendly_name', factor_type: 'push'
|
18
|
+
.factors.create(friendly_name: 'friendly_name', factor_type: 'push')
|
19
19
|
}.to raise_exception(Twilio::REST::TwilioError)
|
20
20
|
|
21
21
|
values = {'FriendlyName' => 'friendly_name', 'FactorType' => 'push', }
|
22
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
23
22
|
expect(
|
24
23
|
@holodeck.has_request?(Holodeck::Request.new(
|
25
24
|
method: 'post',
|
26
25
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors',
|
27
26
|
data: values,
|
28
|
-
headers: headers,
|
29
27
|
))).to eq(true)
|
30
28
|
end
|
31
29
|
|
@@ -68,15 +66,13 @@ describe 'Factor' do
|
|
68
66
|
expect {
|
69
67
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
70
68
|
.entities('identity') \
|
71
|
-
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete(
|
69
|
+
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
72
70
|
}.to raise_exception(Twilio::REST::TwilioError)
|
73
71
|
|
74
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
75
72
|
expect(
|
76
73
|
@holodeck.has_request?(Holodeck::Request.new(
|
77
74
|
method: 'delete',
|
78
75
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors/YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
79
|
-
headers: headers,
|
80
76
|
))).to eq(true)
|
81
77
|
end
|
82
78
|
|
@@ -99,15 +95,13 @@ describe 'Factor' do
|
|
99
95
|
expect {
|
100
96
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
101
97
|
.entities('identity') \
|
102
|
-
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch(
|
98
|
+
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
103
99
|
}.to raise_exception(Twilio::REST::TwilioError)
|
104
100
|
|
105
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
106
101
|
expect(
|
107
102
|
@holodeck.has_request?(Holodeck::Request.new(
|
108
103
|
method: 'get',
|
109
104
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors/YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
110
|
-
headers: headers,
|
111
105
|
))).to eq(true)
|
112
106
|
end
|
113
107
|
|
@@ -150,15 +144,13 @@ describe 'Factor' do
|
|
150
144
|
expect {
|
151
145
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
152
146
|
.entities('identity') \
|
153
|
-
.factors.list(
|
147
|
+
.factors.list()
|
154
148
|
}.to raise_exception(Twilio::REST::TwilioError)
|
155
149
|
|
156
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
157
150
|
expect(
|
158
151
|
@holodeck.has_request?(Holodeck::Request.new(
|
159
152
|
method: 'get',
|
160
153
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors',
|
161
|
-
headers: headers,
|
162
154
|
))).to eq(true)
|
163
155
|
end
|
164
156
|
|
@@ -240,15 +232,13 @@ describe 'Factor' do
|
|
240
232
|
expect {
|
241
233
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
242
234
|
.entities('identity') \
|
243
|
-
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(
|
235
|
+
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
244
236
|
}.to raise_exception(Twilio::REST::TwilioError)
|
245
237
|
|
246
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
247
238
|
expect(
|
248
239
|
@holodeck.has_request?(Holodeck::Request.new(
|
249
240
|
method: 'post',
|
250
241
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors/YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
251
|
-
headers: headers,
|
252
242
|
))).to eq(true)
|
253
243
|
end
|
254
244
|
|
@@ -14,17 +14,15 @@ describe 'Entity' do
|
|
14
14
|
|
15
15
|
expect {
|
16
16
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
17
|
-
.entities.create(identity: 'identity'
|
17
|
+
.entities.create(identity: 'identity')
|
18
18
|
}.to raise_exception(Twilio::REST::TwilioError)
|
19
19
|
|
20
20
|
values = {'Identity' => 'identity', }
|
21
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
22
21
|
expect(
|
23
22
|
@holodeck.has_request?(Holodeck::Request.new(
|
24
23
|
method: 'post',
|
25
24
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities',
|
26
25
|
data: values,
|
27
|
-
headers: headers,
|
28
26
|
))).to eq(true)
|
29
27
|
end
|
30
28
|
|
@@ -59,15 +57,13 @@ describe 'Entity' do
|
|
59
57
|
|
60
58
|
expect {
|
61
59
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
62
|
-
.entities('identity').delete(
|
60
|
+
.entities('identity').delete()
|
63
61
|
}.to raise_exception(Twilio::REST::TwilioError)
|
64
62
|
|
65
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
66
63
|
expect(
|
67
64
|
@holodeck.has_request?(Holodeck::Request.new(
|
68
65
|
method: 'delete',
|
69
66
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity',
|
70
|
-
headers: headers,
|
71
67
|
))).to eq(true)
|
72
68
|
end
|
73
69
|
|
@@ -88,15 +84,13 @@ describe 'Entity' do
|
|
88
84
|
|
89
85
|
expect {
|
90
86
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
91
|
-
.entities('identity').fetch(
|
87
|
+
.entities('identity').fetch()
|
92
88
|
}.to raise_exception(Twilio::REST::TwilioError)
|
93
89
|
|
94
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
95
90
|
expect(
|
96
91
|
@holodeck.has_request?(Holodeck::Request.new(
|
97
92
|
method: 'get',
|
98
93
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity',
|
99
|
-
headers: headers,
|
100
94
|
))).to eq(true)
|
101
95
|
end
|
102
96
|
|
@@ -131,15 +125,13 @@ describe 'Entity' do
|
|
131
125
|
|
132
126
|
expect {
|
133
127
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
134
|
-
.entities.list(
|
128
|
+
.entities.list()
|
135
129
|
}.to raise_exception(Twilio::REST::TwilioError)
|
136
130
|
|
137
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
138
131
|
expect(
|
139
132
|
@holodeck.has_request?(Holodeck::Request.new(
|
140
133
|
method: 'get',
|
141
134
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities',
|
142
|
-
headers: headers,
|
143
135
|
))).to eq(true)
|
144
136
|
end
|
145
137
|
|
@@ -0,0 +1,89 @@
|
|
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 'RecordingRules' do
|
12
|
+
it "can fetch" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.video.v1.rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
17
|
+
.recording_rules.fetch()
|
18
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
19
|
+
|
20
|
+
expect(
|
21
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
22
|
+
method: 'get',
|
23
|
+
url: 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/RecordingRules',
|
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
|
+
"room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
33
|
+
"date_created": "2015-07-30T20:00:00Z",
|
34
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
35
|
+
"rules": [
|
36
|
+
{
|
37
|
+
"type": "include",
|
38
|
+
"all": true
|
39
|
+
}
|
40
|
+
]
|
41
|
+
}
|
42
|
+
]
|
43
|
+
))
|
44
|
+
|
45
|
+
actual = @client.video.v1.rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
46
|
+
.recording_rules.fetch()
|
47
|
+
|
48
|
+
expect(actual).to_not eq(nil)
|
49
|
+
end
|
50
|
+
|
51
|
+
it "can update" do
|
52
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
53
|
+
|
54
|
+
expect {
|
55
|
+
@client.video.v1.rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
56
|
+
.recording_rules.update()
|
57
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
58
|
+
|
59
|
+
expect(
|
60
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
61
|
+
method: 'post',
|
62
|
+
url: 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/RecordingRules',
|
63
|
+
))).to eq(true)
|
64
|
+
end
|
65
|
+
|
66
|
+
it "receives update responses" do
|
67
|
+
@holodeck.mock(Twilio::Response.new(
|
68
|
+
200,
|
69
|
+
%q[
|
70
|
+
{
|
71
|
+
"room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
72
|
+
"date_created": "2015-07-30T20:00:00Z",
|
73
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
74
|
+
"rules": [
|
75
|
+
{
|
76
|
+
"type": "include",
|
77
|
+
"all": true
|
78
|
+
}
|
79
|
+
]
|
80
|
+
}
|
81
|
+
]
|
82
|
+
))
|
83
|
+
|
84
|
+
actual = @client.video.v1.rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
85
|
+
.recording_rules.update()
|
86
|
+
|
87
|
+
expect(actual).to_not eq(nil)
|
88
|
+
end
|
89
|
+
end
|
@@ -49,7 +49,8 @@ describe 'Room' do
|
|
49
49
|
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
50
50
|
"links": {
|
51
51
|
"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
|
52
|
-
"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings"
|
52
|
+
"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",
|
53
|
+
"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"
|
53
54
|
}
|
54
55
|
}
|
55
56
|
]
|
@@ -100,7 +101,8 @@ describe 'Room' do
|
|
100
101
|
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
101
102
|
"links": {
|
102
103
|
"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
|
103
|
-
"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings"
|
104
|
+
"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",
|
105
|
+
"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"
|
104
106
|
}
|
105
107
|
}
|
106
108
|
]
|
@@ -137,7 +139,8 @@ describe 'Room' do
|
|
137
139
|
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
138
140
|
"links": {
|
139
141
|
"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
|
140
|
-
"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings"
|
142
|
+
"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",
|
143
|
+
"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"
|
141
144
|
}
|
142
145
|
}
|
143
146
|
]
|
@@ -214,7 +217,8 @@ describe 'Room' do
|
|
214
217
|
"url": "https://video.twilio.com/v1/Rooms/RM4070b618362c1682b2385b1f9982833c",
|
215
218
|
"links": {
|
216
219
|
"participants": "https://video.twilio.com/v1/Rooms/RM4070b618362c1682b2385b1f9982833c/Participants",
|
217
|
-
"recordings": "https://video.twilio.com/v1/Rooms/RM4070b618362c1682b2385b1f9982833c/Recordings"
|
220
|
+
"recordings": "https://video.twilio.com/v1/Rooms/RM4070b618362c1682b2385b1f9982833c/Recordings",
|
221
|
+
"recording_rules": "https://video.twilio.com/v1/Rooms/RM4070b618362c1682b2385b1f9982833c/RecordingRules"
|
218
222
|
}
|
219
223
|
}
|
220
224
|
],
|
@@ -278,7 +282,8 @@ describe 'Room' do
|
|
278
282
|
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
279
283
|
"links": {
|
280
284
|
"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
|
281
|
-
"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings"
|
285
|
+
"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",
|
286
|
+
"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"
|
282
287
|
}
|
283
288
|
}
|
284
289
|
]
|