twilio-ruby 5.45.1 → 5.49.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGES.md +108 -0
- data/LICENSE +1 -1
- data/README.md +16 -2
- data/lib/twilio-ruby/rest/api.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010.rb +5 -4
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +8 -8
- data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +17 -17
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +11 -11
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +3 -3
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +5 -5
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +6 -3
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1.rb +5 -4
- data/lib/twilio-ruby/rest/bulkexports.rb +4 -2
- data/lib/twilio-ruby/rest/bulkexports/v1.rb +14 -10
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +7 -4
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +7 -4
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +5 -3
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +5 -3
- data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +5 -3
- data/lib/twilio-ruby/rest/chat/v1.rb +10 -8
- data/lib/twilio-ruby/rest/chat/v1/service.rb +5 -5
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +6 -6
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +9 -9
- data/lib/twilio-ruby/rest/chat/v2.rb +10 -8
- data/lib/twilio-ruby/rest/chat/v2/service.rb +5 -5
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +7 -7
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +6 -6
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +3 -3
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +27 -24
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +9 -9
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +10 -10
- data/lib/twilio-ruby/rest/client.rb +8 -1
- data/lib/twilio-ruby/rest/conversations/v1.rb +25 -20
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/role.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +7 -7
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +9 -9
- data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +9 -9
- data/lib/twilio-ruby/rest/events/v1.rb +20 -16
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +4 -4
- data/lib/twilio-ruby/rest/events/v1/schema.rb +4 -4
- data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +4 -4
- data/lib/twilio-ruby/rest/events/v1/sink.rb +8 -6
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +3 -3
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +3 -3
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +7 -6
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +3 -3
- data/lib/twilio-ruby/rest/fax/v1.rb +5 -4
- data/lib/twilio-ruby/rest/flex_api/v1.rb +15 -12
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +18 -4
- data/lib/twilio-ruby/rest/insights.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1.rb +11 -9
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +8 -9
- data/lib/twilio-ruby/rest/insights/v1/room.rb +55 -43
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +22 -22
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +10 -8
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +4 -4
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +10 -8
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +7 -7
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +3 -3
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +6 -6
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +4 -4
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +4 -4
- data/lib/twilio-ruby/rest/lookups/v1.rb +5 -4
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +16 -16
- data/lib/twilio-ruby/rest/messaging.rb +8 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +21 -4
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +328 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +1 -1
- data/lib/twilio-ruby/rest/monitor/v1.rb +10 -8
- data/lib/twilio-ruby/rest/notify/v1.rb +10 -8
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +16 -15
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +18 -18
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +1 -1
- data/lib/twilio-ruby/rest/preview.rb +4 -2
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +14 -10
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +7 -4
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +7 -4
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +5 -3
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/job.rb +5 -3
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +5 -3
- data/lib/twilio-ruby/rest/preview/deployed_devices.rb +5 -4
- data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +10 -8
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +13 -13
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +2 -2
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +8 -8
- data/lib/twilio-ruby/rest/preview/marketplace.rb +10 -8
- data/lib/twilio-ruby/rest/preview/sync.rb +5 -4
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +4 -8
- data/lib/twilio-ruby/rest/preview/trusted_comms.rb +5 -4
- data/lib/twilio-ruby/rest/preview/understand.rb +5 -4
- data/lib/twilio-ruby/rest/preview/wireless.rb +15 -12
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +2 -2
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1.rb +5 -4
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1.rb +5 -4
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +17 -7
- data/lib/twilio-ruby/rest/studio/v1.rb +5 -4
- data/lib/twilio-ruby/rest/studio/v2.rb +5 -4
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +6 -14
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +0 -8
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +0 -8
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +0 -8
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +0 -8
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +2 -10
- data/lib/twilio-ruby/rest/studio/v2/flow/test_user.rb +10 -16
- data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +6 -11
- data/lib/twilio-ruby/rest/supersim/v1.rb +25 -20
- data/lib/twilio-ruby/rest/supersim/v1/command.rb +4 -4
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +33 -12
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +5 -5
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +6 -6
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +5 -5
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +4 -4
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +3 -3
- data/lib/twilio-ruby/rest/sync/v1.rb +5 -4
- data/lib/twilio-ruby/rest/sync/v1/service.rb +0 -8
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +25 -52
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +0 -8
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +18 -40
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +46 -76
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +0 -8
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +18 -40
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +47 -79
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +1 -9
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +14 -38
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +1 -7
- data/lib/twilio-ruby/rest/taskrouter/v1.rb +5 -4
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +17 -17
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +10 -10
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +10 -10
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1.rb +5 -4
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +1 -1
- data/lib/twilio-ruby/rest/trusthub.rb +100 -0
- data/lib/twilio-ruby/rest/trusthub/v1.rb +146 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +523 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +359 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +330 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb +328 -0
- data/lib/twilio-ruby/rest/trusthub/v1/end_user.rb +356 -0
- data/lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb +271 -0
- data/lib/twilio-ruby/rest/trusthub/v1/policies.rb +262 -0
- data/lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb +369 -0
- data/lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb +271 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +523 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +359 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +330 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb +328 -0
- data/lib/twilio-ruby/rest/verify.rb +9 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +26 -8
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +7 -6
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +64 -13
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +10 -10
- data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +329 -0
- data/lib/twilio-ruby/rest/video/v1.rb +20 -16
- data/lib/twilio-ruby/rest/video/v1/composition.rb +16 -15
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +26 -26
- data/lib/twilio-ruby/rest/video/v1/recording.rb +6 -6
- data/lib/twilio-ruby/rest/video/v1/room.rb +10 -3
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_recording_rule.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1.rb +20 -16
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1.rb +15 -12
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +4 -4
- data/lib/twilio-ruby/twiml/voice_response.rb +38 -8
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/integration/api/v2010/account/conference_spec.rb +302 -44
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +4 -16
- data/spec/integration/api/v2010/account/message_spec.rb +37 -0
- data/spec/integration/events/v1/sink_spec.rb +14 -0
- data/spec/integration/flex_api/v1/configuration_spec.rb +24 -0
- data/spec/integration/insights/v1/call/summary_spec.rb +1 -0
- data/spec/integration/messaging/v1/brand_registration_spec.rb +143 -0
- data/spec/integration/preview/sync/service/document_spec.rb +1 -3
- data/spec/integration/serverless/v1/service/build_spec.rb +12 -2
- data/spec/integration/supersim/v1/fleet_spec.rb +8 -0
- data/spec/integration/sync/v1/service/document_spec.rb +1 -3
- data/spec/integration/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment_spec.rb +192 -0
- data/spec/integration/trusthub/v1/customer_profiles/customer_profiles_entity_assignments_spec.rb +186 -0
- data/spec/integration/trusthub/v1/customer_profiles/customer_profiles_evaluations_spec.rb +615 -0
- data/spec/integration/trusthub/v1/customer_profiles_spec.rb +255 -0
- data/spec/integration/trusthub/v1/end_user_spec.rb +247 -0
- data/spec/integration/trusthub/v1/end_user_type_spec.rb +176 -0
- data/spec/integration/trusthub/v1/policies_spec.rb +252 -0
- data/spec/integration/trusthub/v1/supporting_document_spec.rb +235 -0
- data/spec/integration/trusthub/v1/supporting_document_type_spec.rb +159 -0
- data/spec/integration/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment_spec.rb +192 -0
- data/spec/integration/trusthub/v1/trust_products/trust_products_entity_assignments_spec.rb +186 -0
- data/spec/integration/trusthub/v1/trust_products/trust_products_evaluations_spec.rb +615 -0
- data/spec/integration/trusthub/v1/trust_products_spec.rb +255 -0
- data/spec/integration/verify/v2/service/entity/factor_spec.rb +3 -3
- data/spec/integration/verify/v2/verification_attempt_spec.rb +146 -0
- data/spec/integration/video/v1/room_spec.rb +5 -0
- data/spec/twiml/voice_response_spec.rb +1 -1
- metadata +49 -2
@@ -0,0 +1,255 @@
|
|
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 'TrustProducts' do
|
12
|
+
it "can create" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.trusthub.v1.trust_products.create(friendly_name: 'friendly_name', email: 'email', policy_sid: 'RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
|
+
|
19
|
+
values = {
|
20
|
+
'FriendlyName' => 'friendly_name',
|
21
|
+
'Email' => 'email',
|
22
|
+
'PolicySid' => 'RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
23
|
+
}
|
24
|
+
expect(
|
25
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
26
|
+
method: 'post',
|
27
|
+
url: 'https://trusthub.twilio.com/v1/TrustProducts',
|
28
|
+
data: values,
|
29
|
+
))).to eq(true)
|
30
|
+
end
|
31
|
+
|
32
|
+
it "receives create responses" do
|
33
|
+
@holodeck.mock(Twilio::Response.new(
|
34
|
+
201,
|
35
|
+
%q[
|
36
|
+
{
|
37
|
+
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
38
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
39
|
+
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
40
|
+
"friendly_name": "friendly_name",
|
41
|
+
"status": "draft",
|
42
|
+
"email": "email",
|
43
|
+
"status_callback": "http://www.example.com",
|
44
|
+
"valid_until": null,
|
45
|
+
"date_created": "2019-07-30T22:29:24Z",
|
46
|
+
"date_updated": "2019-07-31T01:09:00Z",
|
47
|
+
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
48
|
+
"links": {
|
49
|
+
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
|
50
|
+
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
|
51
|
+
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
|
52
|
+
}
|
53
|
+
}
|
54
|
+
]
|
55
|
+
))
|
56
|
+
|
57
|
+
actual = @client.trusthub.v1.trust_products.create(friendly_name: 'friendly_name', email: 'email', policy_sid: 'RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
58
|
+
|
59
|
+
expect(actual).to_not eq(nil)
|
60
|
+
end
|
61
|
+
|
62
|
+
it "can read" do
|
63
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
64
|
+
|
65
|
+
expect {
|
66
|
+
@client.trusthub.v1.trust_products.list()
|
67
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
68
|
+
|
69
|
+
expect(
|
70
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
71
|
+
method: 'get',
|
72
|
+
url: 'https://trusthub.twilio.com/v1/TrustProducts',
|
73
|
+
))).to eq(true)
|
74
|
+
end
|
75
|
+
|
76
|
+
it "receives read_empty responses" do
|
77
|
+
@holodeck.mock(Twilio::Response.new(
|
78
|
+
200,
|
79
|
+
%q[
|
80
|
+
{
|
81
|
+
"results": [],
|
82
|
+
"meta": {
|
83
|
+
"page": 0,
|
84
|
+
"page_size": 50,
|
85
|
+
"first_page_url": "https://trusthub.twilio.com/v1/TrustProducts?PageSize=50&Page=0",
|
86
|
+
"previous_page_url": null,
|
87
|
+
"url": "https://trusthub.twilio.com/v1/TrustProducts?PageSize=50&Page=0",
|
88
|
+
"next_page_url": null,
|
89
|
+
"key": "results"
|
90
|
+
}
|
91
|
+
}
|
92
|
+
]
|
93
|
+
))
|
94
|
+
|
95
|
+
actual = @client.trusthub.v1.trust_products.list()
|
96
|
+
|
97
|
+
expect(actual).to_not eq(nil)
|
98
|
+
end
|
99
|
+
|
100
|
+
it "receives read_full responses" do
|
101
|
+
@holodeck.mock(Twilio::Response.new(
|
102
|
+
200,
|
103
|
+
%q[
|
104
|
+
{
|
105
|
+
"results": [
|
106
|
+
{
|
107
|
+
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
108
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
109
|
+
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
110
|
+
"friendly_name": "friendly_name",
|
111
|
+
"status": "provisionally-approved",
|
112
|
+
"email": "email",
|
113
|
+
"status_callback": "http://www.example.com",
|
114
|
+
"valid_until": "2020-07-31T01:00:00Z",
|
115
|
+
"date_created": "2019-07-30T22:29:24Z",
|
116
|
+
"date_updated": "2019-07-31T01:09:00Z",
|
117
|
+
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
118
|
+
"links": {
|
119
|
+
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
|
120
|
+
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
|
121
|
+
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
|
122
|
+
}
|
123
|
+
}
|
124
|
+
],
|
125
|
+
"meta": {
|
126
|
+
"page": 0,
|
127
|
+
"page_size": 50,
|
128
|
+
"first_page_url": "https://trusthub.twilio.com/v1/TrustProducts?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
|
129
|
+
"previous_page_url": null,
|
130
|
+
"url": "https://trusthub.twilio.com/v1/TrustProducts?Status=draft&FriendlyName=friendly_name&PolicySid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
|
131
|
+
"next_page_url": null,
|
132
|
+
"key": "results"
|
133
|
+
}
|
134
|
+
}
|
135
|
+
]
|
136
|
+
))
|
137
|
+
|
138
|
+
actual = @client.trusthub.v1.trust_products.list()
|
139
|
+
|
140
|
+
expect(actual).to_not eq(nil)
|
141
|
+
end
|
142
|
+
|
143
|
+
it "can fetch" do
|
144
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
145
|
+
|
146
|
+
expect {
|
147
|
+
@client.trusthub.v1.trust_products('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
148
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
149
|
+
|
150
|
+
expect(
|
151
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
152
|
+
method: 'get',
|
153
|
+
url: 'https://trusthub.twilio.com/v1/TrustProducts/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
154
|
+
))).to eq(true)
|
155
|
+
end
|
156
|
+
|
157
|
+
it "receives fetch responses" do
|
158
|
+
@holodeck.mock(Twilio::Response.new(
|
159
|
+
200,
|
160
|
+
%q[
|
161
|
+
{
|
162
|
+
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
163
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
164
|
+
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
165
|
+
"friendly_name": "friendly_name",
|
166
|
+
"status": "draft",
|
167
|
+
"valid_until": null,
|
168
|
+
"email": "email",
|
169
|
+
"status_callback": "http://www.example.com",
|
170
|
+
"date_created": "2019-07-30T22:29:24Z",
|
171
|
+
"date_updated": "2019-07-31T01:09:00Z",
|
172
|
+
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
173
|
+
"links": {
|
174
|
+
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
|
175
|
+
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
|
176
|
+
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
|
177
|
+
}
|
178
|
+
}
|
179
|
+
]
|
180
|
+
))
|
181
|
+
|
182
|
+
actual = @client.trusthub.v1.trust_products('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
183
|
+
|
184
|
+
expect(actual).to_not eq(nil)
|
185
|
+
end
|
186
|
+
|
187
|
+
it "can update" do
|
188
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
189
|
+
|
190
|
+
expect {
|
191
|
+
@client.trusthub.v1.trust_products('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
192
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
193
|
+
|
194
|
+
expect(
|
195
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
196
|
+
method: 'post',
|
197
|
+
url: 'https://trusthub.twilio.com/v1/TrustProducts/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
198
|
+
))).to eq(true)
|
199
|
+
end
|
200
|
+
|
201
|
+
it "receives update responses" do
|
202
|
+
@holodeck.mock(Twilio::Response.new(
|
203
|
+
200,
|
204
|
+
%q[
|
205
|
+
{
|
206
|
+
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
207
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
208
|
+
"policy_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
209
|
+
"friendly_name": "friendly_name",
|
210
|
+
"status": "draft",
|
211
|
+
"email": "email",
|
212
|
+
"status_callback": "http://www.example.com",
|
213
|
+
"valid_until": null,
|
214
|
+
"date_created": "2019-07-30T22:29:24Z",
|
215
|
+
"date_updated": "2019-07-31T01:09:00Z",
|
216
|
+
"url": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
217
|
+
"links": {
|
218
|
+
"trust_products_entity_assignments": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/EntityAssignments",
|
219
|
+
"trust_products_evaluations": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
|
220
|
+
"trust_products_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/TrustProducts/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments"
|
221
|
+
}
|
222
|
+
}
|
223
|
+
]
|
224
|
+
))
|
225
|
+
|
226
|
+
actual = @client.trusthub.v1.trust_products('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').update()
|
227
|
+
|
228
|
+
expect(actual).to_not eq(nil)
|
229
|
+
end
|
230
|
+
|
231
|
+
it "can delete" do
|
232
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
233
|
+
|
234
|
+
expect {
|
235
|
+
@client.trusthub.v1.trust_products('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
236
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
237
|
+
|
238
|
+
expect(
|
239
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
240
|
+
method: 'delete',
|
241
|
+
url: 'https://trusthub.twilio.com/v1/TrustProducts/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
242
|
+
))).to eq(true)
|
243
|
+
end
|
244
|
+
|
245
|
+
it "receives delete responses" do
|
246
|
+
@holodeck.mock(Twilio::Response.new(
|
247
|
+
204,
|
248
|
+
nil,
|
249
|
+
))
|
250
|
+
|
251
|
+
actual = @client.trusthub.v1.trust_products('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
252
|
+
|
253
|
+
expect(actual).to eq(true)
|
254
|
+
end
|
255
|
+
end
|
@@ -27,7 +27,7 @@ describe 'Factor' do
|
|
27
27
|
))).to eq(true)
|
28
28
|
end
|
29
29
|
|
30
|
-
it "receives
|
30
|
+
it "receives create_push responses" do
|
31
31
|
@holodeck.mock(Twilio::Response.new(
|
32
32
|
201,
|
33
33
|
%q[
|
@@ -105,7 +105,7 @@ describe 'Factor' do
|
|
105
105
|
))).to eq(true)
|
106
106
|
end
|
107
107
|
|
108
|
-
it "receives
|
108
|
+
it "receives fetch_push responses" do
|
109
109
|
@holodeck.mock(Twilio::Response.new(
|
110
110
|
200,
|
111
111
|
%q[
|
@@ -242,7 +242,7 @@ describe 'Factor' do
|
|
242
242
|
))).to eq(true)
|
243
243
|
end
|
244
244
|
|
245
|
-
it "receives
|
245
|
+
it "receives verify_push responses" do
|
246
246
|
@holodeck.mock(Twilio::Response.new(
|
247
247
|
200,
|
248
248
|
%q[
|
@@ -0,0 +1,146 @@
|
|
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 'VerificationAttempt' do
|
12
|
+
it "can read" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.verify.v2.verification_attempts.list()
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
|
+
|
19
|
+
expect(
|
20
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
21
|
+
method: 'get',
|
22
|
+
url: 'https://verify.twilio.com/v2/Attempts',
|
23
|
+
))).to eq(true)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "receives list_verification_attempts_empty responses" do
|
27
|
+
@holodeck.mock(Twilio::Response.new(
|
28
|
+
200,
|
29
|
+
%q[
|
30
|
+
{
|
31
|
+
"attempts": [],
|
32
|
+
"meta": {
|
33
|
+
"key": "attempts",
|
34
|
+
"page": 0,
|
35
|
+
"page_size": 50,
|
36
|
+
"first_page_url": "https://verify.twilio.com/v2/Attempts?PageSize=50&Page=0",
|
37
|
+
"previous_page_url": null,
|
38
|
+
"url": "https://verify.twilio.com/v2/Attempts?PageSize=50&Page=0",
|
39
|
+
"next_page_url": null
|
40
|
+
}
|
41
|
+
}
|
42
|
+
]
|
43
|
+
))
|
44
|
+
|
45
|
+
actual = @client.verify.v2.verification_attempts.list()
|
46
|
+
|
47
|
+
expect(actual).to_not eq(nil)
|
48
|
+
end
|
49
|
+
|
50
|
+
it "receives list_verification_attempts responses" do
|
51
|
+
@holodeck.mock(Twilio::Response.new(
|
52
|
+
200,
|
53
|
+
%q[
|
54
|
+
{
|
55
|
+
"attempts": [
|
56
|
+
{
|
57
|
+
"sid": "VLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
58
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
59
|
+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
60
|
+
"date_created": "2020-08-11T18:36:59Z",
|
61
|
+
"date_updated": "2020-08-11T18:37:00Z",
|
62
|
+
"conversion_status": "unconverted",
|
63
|
+
"channel": "sms",
|
64
|
+
"channel_data": {
|
65
|
+
"verification_sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
66
|
+
"to": "+573003003030",
|
67
|
+
"status": "unconfirmed",
|
68
|
+
"message_status": "undelivered",
|
69
|
+
"error_code": "30008",
|
70
|
+
"country": "CO",
|
71
|
+
"code_length": 6,
|
72
|
+
"locale": "es",
|
73
|
+
"mcc": "732",
|
74
|
+
"mnc": "103",
|
75
|
+
"carrier": "Colombia Movil (Tigo)"
|
76
|
+
},
|
77
|
+
"url": "https://verify.twilio.com/v2/Attempts/VLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
78
|
+
}
|
79
|
+
],
|
80
|
+
"meta": {
|
81
|
+
"key": "attempts",
|
82
|
+
"page": 0,
|
83
|
+
"page_size": 50,
|
84
|
+
"first_page_url": "https://verify.twilio.com/v2/Attempts?PageSize=50&Page=0",
|
85
|
+
"previous_page_url": null,
|
86
|
+
"url": "https://verify.twilio.com/v2/Attempts?PageSize=50&Page=0",
|
87
|
+
"next_page_url": null
|
88
|
+
}
|
89
|
+
}
|
90
|
+
]
|
91
|
+
))
|
92
|
+
|
93
|
+
actual = @client.verify.v2.verification_attempts.list()
|
94
|
+
|
95
|
+
expect(actual).to_not eq(nil)
|
96
|
+
end
|
97
|
+
|
98
|
+
it "can fetch" do
|
99
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
100
|
+
|
101
|
+
expect {
|
102
|
+
@client.verify.v2.verification_attempts('VLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
103
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
104
|
+
|
105
|
+
expect(
|
106
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
107
|
+
method: 'get',
|
108
|
+
url: 'https://verify.twilio.com/v2/Attempts/VLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
109
|
+
))).to eq(true)
|
110
|
+
end
|
111
|
+
|
112
|
+
it "receives fetch_verification_attempt responses" do
|
113
|
+
@holodeck.mock(Twilio::Response.new(
|
114
|
+
200,
|
115
|
+
%q[
|
116
|
+
{
|
117
|
+
"sid": "VLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
118
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
119
|
+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
120
|
+
"date_created": "2020-08-11T18:36:59Z",
|
121
|
+
"date_updated": "2020-08-11T18:37:00Z",
|
122
|
+
"conversion_status": "unconverted",
|
123
|
+
"channel": "sms",
|
124
|
+
"channel_data": {
|
125
|
+
"verification_sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
126
|
+
"to": "+573003003030",
|
127
|
+
"status": "unconfirmed",
|
128
|
+
"message_status": "undelivered",
|
129
|
+
"error_code": "30008",
|
130
|
+
"country": "CO",
|
131
|
+
"code_length": 6,
|
132
|
+
"locale": "es",
|
133
|
+
"mcc": "732",
|
134
|
+
"mnc": "103",
|
135
|
+
"carrier": "Colombia Movil (Tigo)"
|
136
|
+
},
|
137
|
+
"url": "https://verify.twilio.com/v2/Attempts/VLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
138
|
+
}
|
139
|
+
]
|
140
|
+
))
|
141
|
+
|
142
|
+
actual = @client.verify.v2.verification_attempts('VLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
143
|
+
|
144
|
+
expect(actual).to_not eq(nil)
|
145
|
+
end
|
146
|
+
end
|
@@ -37,6 +37,7 @@ describe 'Room' do
|
|
37
37
|
"enable_turn": true,
|
38
38
|
"unique_name": "unique_name",
|
39
39
|
"max_participants": 10,
|
40
|
+
"max_concurrent_published_tracks": 10,
|
40
41
|
"duration": 0,
|
41
42
|
"status_callback_method": "POST",
|
42
43
|
"status_callback": "",
|
@@ -88,6 +89,7 @@ describe 'Room' do
|
|
88
89
|
"sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
89
90
|
"enable_turn": true,
|
90
91
|
"unique_name": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
92
|
+
"max_concurrent_published_tracks": 10,
|
91
93
|
"max_participants": 10,
|
92
94
|
"duration": 0,
|
93
95
|
"status_callback_method": "POST",
|
@@ -127,6 +129,7 @@ describe 'Room' do
|
|
127
129
|
"enable_turn": true,
|
128
130
|
"unique_name": "room1",
|
129
131
|
"max_participants": 10,
|
132
|
+
"max_concurrent_published_tracks": 10,
|
130
133
|
"duration": 0,
|
131
134
|
"status_callback_method": "POST",
|
132
135
|
"status_callback": "",
|
@@ -209,6 +212,7 @@ describe 'Room' do
|
|
209
212
|
"end_time": "2017-04-03T22:21:51Z",
|
210
213
|
"duration": 2,
|
211
214
|
"max_participants": 10,
|
215
|
+
"max_concurrent_published_tracks": 10,
|
212
216
|
"record_participants_on_connect": false,
|
213
217
|
"video_codecs": [
|
214
218
|
"VP8"
|
@@ -270,6 +274,7 @@ describe 'Room' do
|
|
270
274
|
"enable_turn": true,
|
271
275
|
"unique_name": "unique_name",
|
272
276
|
"max_participants": 10,
|
277
|
+
"max_concurrent_published_tracks": 10,
|
273
278
|
"status_callback_method": "POST",
|
274
279
|
"status_callback": "",
|
275
280
|
"record_participants_on_connect": false,
|