twilio-ruby 5.40.4 → 5.45.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 +104 -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/accounts.rb +12 -0
- data/lib/twilio-ruby/rest/accounts/v1.rb +14 -0
- data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +186 -0
- data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +200 -0
- 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.rb +10 -2
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +13 -3
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +12 -5
- 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/call/summary.rb +7 -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 +5 -18
- 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 +12 -27
- data/lib/twilio-ruby/rest/preview/trusted_comms/{business.rb → branded_channel.rb} +63 -77
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb +165 -0
- 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 +54 -33
- 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 +36 -61
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +59 -57
- 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 +7 -4
- data/lib/twilio-ruby/util/configuration.rb +5 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/accounts/v1/auth_token_promotion_spec.rb +44 -0
- data/spec/integration/accounts/v1/secondary_auth_token_spec.rb +69 -0
- 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_spec.rb +1 -1
- data/spec/integration/conversations/v1/service/conversation_spec.rb +1 -1
- 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/call/summary_spec.rb +1 -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/preview/trusted_comms/{business/brand/branded_channel → branded_channel}/channel_spec.rb +4 -8
- data/spec/integration/preview/trusted_comms/{business/brand/branded_channel_spec.rb → branded_channel_spec.rb} +5 -9
- 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 +56 -20
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +11 -26
- data/spec/integration/verify/v2/service/entity_spec.rb +4 -12
- data/spec/integration/verify/v2/service_spec.rb +8 -4
- 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 +42 -28
- data/lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb +0 -243
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb +0 -233
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb +0 -260
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb +0 -189
- 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/brand_spec.rb +0 -48
- 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 -46
- 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
|
@@ -13,9 +13,7 @@ describe 'Channel' do
|
|
13
13
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
14
|
|
15
15
|
expect {
|
16
|
-
@client.preview.trusted_comms.
|
17
|
-
.brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
18
|
-
.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
16
|
+
@client.preview.trusted_comms.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
19
17
|
.channels.create(phone_number_sid: 'PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
20
18
|
}.to raise_exception(Twilio::REST::TwilioError)
|
21
19
|
|
@@ -23,7 +21,7 @@ describe 'Channel' do
|
|
23
21
|
expect(
|
24
22
|
@holodeck.has_request?(Holodeck::Request.new(
|
25
23
|
method: 'post',
|
26
|
-
url: 'https://preview.twilio.com/TrustedComms/
|
24
|
+
url: 'https://preview.twilio.com/TrustedComms/BrandedChannels/BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels',
|
27
25
|
data: values,
|
28
26
|
))).to eq(true)
|
29
27
|
end
|
@@ -39,14 +37,12 @@ describe 'Channel' do
|
|
39
37
|
"branded_channel_sid": "BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
40
38
|
"phone_number_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
41
39
|
"phone_number": "+15000000000",
|
42
|
-
"url": "https://preview.twilio.com/TrustedComms/
|
40
|
+
"url": "https://preview.twilio.com/TrustedComms/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels"
|
43
41
|
}
|
44
42
|
]
|
45
43
|
))
|
46
44
|
|
47
|
-
actual = @client.preview.trusted_comms.
|
48
|
-
.brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
49
|
-
.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
45
|
+
actual = @client.preview.trusted_comms.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
50
46
|
.channels.create(phone_number_sid: 'PNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
51
47
|
|
52
48
|
expect(actual).to_not eq(nil)
|
@@ -13,15 +13,13 @@ describe 'BrandedChannel' do
|
|
13
13
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
14
|
|
15
15
|
expect {
|
16
|
-
@client.preview.trusted_comms.
|
17
|
-
.brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
18
|
-
.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
16
|
+
@client.preview.trusted_comms.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
19
17
|
}.to raise_exception(Twilio::REST::TwilioError)
|
20
18
|
|
21
19
|
expect(
|
22
20
|
@holodeck.has_request?(Holodeck::Request.new(
|
23
21
|
method: 'get',
|
24
|
-
url: 'https://preview.twilio.com/TrustedComms/
|
22
|
+
url: 'https://preview.twilio.com/TrustedComms/BrandedChannels/BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
25
23
|
))).to eq(true)
|
26
24
|
end
|
27
25
|
|
@@ -35,16 +33,14 @@ describe 'BrandedChannel' do
|
|
35
33
|
"brand_sid": "BZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
36
34
|
"sid": "BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
37
35
|
"links": {
|
38
|
-
"channels": "https://preview.twilio.com/TrustedComms/
|
36
|
+
"channels": "https://preview.twilio.com/TrustedComms/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels"
|
39
37
|
},
|
40
|
-
"url": "https://preview.twilio.com/TrustedComms/
|
38
|
+
"url": "https://preview.twilio.com/TrustedComms/BrandedChannels/BWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
41
39
|
}
|
42
40
|
]
|
43
41
|
))
|
44
42
|
|
45
|
-
actual = @client.preview.trusted_comms.
|
46
|
-
.brands('BZXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
47
|
-
.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
43
|
+
actual = @client.preview.trusted_comms.branded_channels('BWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
48
44
|
|
49
45
|
expect(actual).to_not eq(nil)
|
50
46
|
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
|
|
@@ -46,8 +44,19 @@ describe 'Challenge' do
|
|
46
44
|
"expiration_date": "2015-07-30T20:00:00Z",
|
47
45
|
"status": "pending",
|
48
46
|
"responded_reason": "none",
|
49
|
-
"details":
|
50
|
-
|
47
|
+
"details": {
|
48
|
+
"message": "Hi! Mr. John Doe, would you like to sign up?",
|
49
|
+
"date": "2020-07-01T12:13:14Z",
|
50
|
+
"fields": [
|
51
|
+
{
|
52
|
+
"label": "Action",
|
53
|
+
"value": "Sign up in portal"
|
54
|
+
}
|
55
|
+
]
|
56
|
+
},
|
57
|
+
"hidden_details": {
|
58
|
+
"ip": "172.168.1.234"
|
59
|
+
},
|
51
60
|
"factor_type": "push",
|
52
61
|
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
53
62
|
}
|
@@ -67,15 +76,13 @@ describe 'Challenge' do
|
|
67
76
|
expect {
|
68
77
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
69
78
|
.entities('identity') \
|
70
|
-
.challenges('YCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch(
|
79
|
+
.challenges('YCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
71
80
|
}.to raise_exception(Twilio::REST::TwilioError)
|
72
81
|
|
73
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
74
82
|
expect(
|
75
83
|
@holodeck.has_request?(Holodeck::Request.new(
|
76
84
|
method: 'get',
|
77
85
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Challenges/YCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
78
|
-
headers: headers,
|
79
86
|
))).to eq(true)
|
80
87
|
end
|
81
88
|
|
@@ -96,8 +103,19 @@ describe 'Challenge' do
|
|
96
103
|
"expiration_date": "2015-07-30T20:00:00Z",
|
97
104
|
"status": "pending",
|
98
105
|
"responded_reason": "none",
|
99
|
-
"details":
|
100
|
-
|
106
|
+
"details": {
|
107
|
+
"message": "Hi! Mr. John Doe, would you like to sign up?",
|
108
|
+
"date": "2020-07-01T12:13:14Z",
|
109
|
+
"fields": [
|
110
|
+
{
|
111
|
+
"label": "Action",
|
112
|
+
"value": "Sign up in portal"
|
113
|
+
}
|
114
|
+
]
|
115
|
+
},
|
116
|
+
"hidden_details": {
|
117
|
+
"ip": "172.168.1.234"
|
118
|
+
},
|
101
119
|
"factor_type": "push",
|
102
120
|
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
103
121
|
}
|
@@ -117,15 +135,13 @@ describe 'Challenge' do
|
|
117
135
|
expect {
|
118
136
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
119
137
|
.entities('identity') \
|
120
|
-
.challenges.list(
|
138
|
+
.challenges.list()
|
121
139
|
}.to raise_exception(Twilio::REST::TwilioError)
|
122
140
|
|
123
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
124
141
|
expect(
|
125
142
|
@holodeck.has_request?(Holodeck::Request.new(
|
126
143
|
method: 'get',
|
127
144
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Challenges',
|
128
|
-
headers: headers,
|
129
145
|
))).to eq(true)
|
130
146
|
end
|
131
147
|
|
@@ -174,8 +190,19 @@ describe 'Challenge' do
|
|
174
190
|
"expiration_date": "2015-07-30T20:00:00Z",
|
175
191
|
"status": "pending",
|
176
192
|
"responded_reason": "none",
|
177
|
-
"details":
|
178
|
-
|
193
|
+
"details": {
|
194
|
+
"message": "Hi! Mr. John Doe, would you like to sign up?",
|
195
|
+
"date": "2020-07-01T12:13:14Z",
|
196
|
+
"fields": [
|
197
|
+
{
|
198
|
+
"label": "Action",
|
199
|
+
"value": "Sign up in portal"
|
200
|
+
}
|
201
|
+
]
|
202
|
+
},
|
203
|
+
"hidden_details": {
|
204
|
+
"ip": "172.168.1.234"
|
205
|
+
},
|
179
206
|
"factor_type": "push",
|
180
207
|
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
181
208
|
}
|
@@ -206,15 +233,13 @@ describe 'Challenge' do
|
|
206
233
|
expect {
|
207
234
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
208
235
|
.entities('identity') \
|
209
|
-
.challenges('YCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(
|
236
|
+
.challenges('YCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
210
237
|
}.to raise_exception(Twilio::REST::TwilioError)
|
211
238
|
|
212
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
213
239
|
expect(
|
214
240
|
@holodeck.has_request?(Holodeck::Request.new(
|
215
241
|
method: 'post',
|
216
242
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Challenges/YCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
217
|
-
headers: headers,
|
218
243
|
))).to eq(true)
|
219
244
|
end
|
220
245
|
|
@@ -235,8 +260,19 @@ describe 'Challenge' do
|
|
235
260
|
"expiration_date": "2015-07-30T20:00:00Z",
|
236
261
|
"status": "approved",
|
237
262
|
"responded_reason": "none",
|
238
|
-
"details":
|
239
|
-
|
263
|
+
"details": {
|
264
|
+
"message": "Hi! Mr. John Doe, would you like to sign up?",
|
265
|
+
"date": "2020-07-01T12:13:14Z",
|
266
|
+
"fields": [
|
267
|
+
{
|
268
|
+
"label": "Action",
|
269
|
+
"value": "Sign up in portal"
|
270
|
+
}
|
271
|
+
]
|
272
|
+
},
|
273
|
+
"hidden_details": {
|
274
|
+
"ip": "172.168.1.234"
|
275
|
+
},
|
240
276
|
"factor_type": "push",
|
241
277
|
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
242
278
|
}
|
@@ -15,22 +15,15 @@ describe 'Factor' do
|
|
15
15
|
expect {
|
16
16
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
17
17
|
.entities('identity') \
|
18
|
-
.factors.create(
|
18
|
+
.factors.create(friendly_name: 'friendly_name', factor_type: 'push')
|
19
19
|
}.to raise_exception(Twilio::REST::TwilioError)
|
20
20
|
|
21
|
-
values = {
|
22
|
-
'Binding' => 'binding',
|
23
|
-
'FriendlyName' => 'friendly_name',
|
24
|
-
'FactorType' => 'push',
|
25
|
-
'Config' => 'config',
|
26
|
-
}
|
27
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
21
|
+
values = {'FriendlyName' => 'friendly_name', 'FactorType' => 'push', }
|
28
22
|
expect(
|
29
23
|
@holodeck.has_request?(Holodeck::Request.new(
|
30
24
|
method: 'post',
|
31
25
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors',
|
32
26
|
data: values,
|
33
|
-
headers: headers,
|
34
27
|
))).to eq(true)
|
35
28
|
end
|
36
29
|
|
@@ -51,7 +44,7 @@ describe 'Factor' do
|
|
51
44
|
"factor_type": "push",
|
52
45
|
"config": {
|
53
46
|
"sdk_version": "1.0",
|
54
|
-
"app_id": "com.
|
47
|
+
"app_id": "com.example.myapp",
|
55
48
|
"notification_platform": "fcm",
|
56
49
|
"notification_token": "test_token"
|
57
50
|
},
|
@@ -62,7 +55,7 @@ describe 'Factor' do
|
|
62
55
|
|
63
56
|
actual = @client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
64
57
|
.entities('identity') \
|
65
|
-
.factors.create(
|
58
|
+
.factors.create(friendly_name: 'friendly_name', factor_type: 'push')
|
66
59
|
|
67
60
|
expect(actual).to_not eq(nil)
|
68
61
|
end
|
@@ -73,15 +66,13 @@ describe 'Factor' do
|
|
73
66
|
expect {
|
74
67
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
75
68
|
.entities('identity') \
|
76
|
-
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete(
|
69
|
+
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
77
70
|
}.to raise_exception(Twilio::REST::TwilioError)
|
78
71
|
|
79
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
80
72
|
expect(
|
81
73
|
@holodeck.has_request?(Holodeck::Request.new(
|
82
74
|
method: 'delete',
|
83
75
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors/YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
84
|
-
headers: headers,
|
85
76
|
))).to eq(true)
|
86
77
|
end
|
87
78
|
|
@@ -104,15 +95,13 @@ describe 'Factor' do
|
|
104
95
|
expect {
|
105
96
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
106
97
|
.entities('identity') \
|
107
|
-
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch(
|
98
|
+
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
108
99
|
}.to raise_exception(Twilio::REST::TwilioError)
|
109
100
|
|
110
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
111
101
|
expect(
|
112
102
|
@holodeck.has_request?(Holodeck::Request.new(
|
113
103
|
method: 'get',
|
114
104
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors/YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
115
|
-
headers: headers,
|
116
105
|
))).to eq(true)
|
117
106
|
end
|
118
107
|
|
@@ -133,7 +122,7 @@ describe 'Factor' do
|
|
133
122
|
"factor_type": "push",
|
134
123
|
"config": {
|
135
124
|
"sdk_version": "1.0",
|
136
|
-
"app_id": "com.
|
125
|
+
"app_id": "com.example.myapp",
|
137
126
|
"notification_platform": "fcm",
|
138
127
|
"notification_token": "test_token"
|
139
128
|
},
|
@@ -155,15 +144,13 @@ describe 'Factor' do
|
|
155
144
|
expect {
|
156
145
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
157
146
|
.entities('identity') \
|
158
|
-
.factors.list(
|
147
|
+
.factors.list()
|
159
148
|
}.to raise_exception(Twilio::REST::TwilioError)
|
160
149
|
|
161
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
162
150
|
expect(
|
163
151
|
@holodeck.has_request?(Holodeck::Request.new(
|
164
152
|
method: 'get',
|
165
153
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors',
|
166
|
-
headers: headers,
|
167
154
|
))).to eq(true)
|
168
155
|
end
|
169
156
|
|
@@ -212,7 +199,7 @@ describe 'Factor' do
|
|
212
199
|
"factor_type": "push",
|
213
200
|
"config": {
|
214
201
|
"sdk_version": "1.0",
|
215
|
-
"app_id": "com.
|
202
|
+
"app_id": "com.example.myapp",
|
216
203
|
"notification_platform": "fcm",
|
217
204
|
"notification_token": "test_token"
|
218
205
|
},
|
@@ -245,15 +232,13 @@ describe 'Factor' do
|
|
245
232
|
expect {
|
246
233
|
@client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
247
234
|
.entities('identity') \
|
248
|
-
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update(
|
235
|
+
.factors('YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
249
236
|
}.to raise_exception(Twilio::REST::TwilioError)
|
250
237
|
|
251
|
-
headers = {'Twilio-Sandbox-Mode' => 'twilio_sandbox_mode', }
|
252
238
|
expect(
|
253
239
|
@holodeck.has_request?(Holodeck::Request.new(
|
254
240
|
method: 'post',
|
255
241
|
url: 'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors/YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
256
|
-
headers: headers,
|
257
242
|
))).to eq(true)
|
258
243
|
end
|
259
244
|
|
@@ -274,7 +259,7 @@ describe 'Factor' do
|
|
274
259
|
"factor_type": "push",
|
275
260
|
"config": {
|
276
261
|
"sdk_version": "1.0",
|
277
|
-
"app_id": "com.
|
262
|
+
"app_id": "com.example.myapp",
|
278
263
|
"notification_platform": "fcm",
|
279
264
|
"notification_token": "test_token"
|
280
265
|
},
|