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
@@ -68,10 +68,7 @@ describe 'IncomingPhoneNumber' do
|
|
68
68
|
"status": "in-use",
|
69
69
|
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
70
70
|
"subresource_uris": {
|
71
|
-
"assigned_add_ons": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json"
|
72
|
-
"local": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Local.json",
|
73
|
-
"mobile": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json",
|
74
|
-
"toll_free": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json"
|
71
|
+
"assigned_add_ons": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json"
|
75
72
|
}
|
76
73
|
}
|
77
74
|
]
|
@@ -142,10 +139,7 @@ describe 'IncomingPhoneNumber' do
|
|
142
139
|
"status": "in-use",
|
143
140
|
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
144
141
|
"subresource_uris": {
|
145
|
-
"assigned_add_ons": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json"
|
146
|
-
"local": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Local.json",
|
147
|
-
"mobile": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json",
|
148
|
-
"toll_free": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json"
|
142
|
+
"assigned_add_ons": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json"
|
149
143
|
}
|
150
144
|
}
|
151
145
|
]
|
@@ -247,10 +241,7 @@ describe 'IncomingPhoneNumber' do
|
|
247
241
|
"voice_receive_mode": "voice",
|
248
242
|
"status": "in-use",
|
249
243
|
"subresource_uris": {
|
250
|
-
"assigned_add_ons": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json"
|
251
|
-
"local": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Local.json",
|
252
|
-
"mobile": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json",
|
253
|
-
"toll_free": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json"
|
244
|
+
"assigned_add_ons": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json"
|
254
245
|
}
|
255
246
|
}
|
256
247
|
],
|
@@ -353,10 +344,7 @@ describe 'IncomingPhoneNumber' do
|
|
353
344
|
"voice_receive_mode": "voice",
|
354
345
|
"status": "in-use",
|
355
346
|
"subresource_uris": {
|
356
|
-
"assigned_add_ons": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json"
|
357
|
-
"local": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Local.json",
|
358
|
-
"mobile": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json",
|
359
|
-
"toll_free": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json"
|
347
|
+
"assigned_add_ons": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AssignedAddOns.json"
|
360
348
|
}
|
361
349
|
}
|
362
350
|
]
|
@@ -137,6 +137,43 @@ describe 'Message' do
|
|
137
137
|
expect(actual).to_not eq(nil)
|
138
138
|
end
|
139
139
|
|
140
|
+
it "receives create_with_queued_status responses" do
|
141
|
+
@holodeck.mock(Twilio::Response.new(
|
142
|
+
201,
|
143
|
+
%q[
|
144
|
+
{
|
145
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
146
|
+
"api_version": "2010-04-01",
|
147
|
+
"body": "Hello! \ud83d\udc4d",
|
148
|
+
"date_created": "Thu, 30 Jul 2015 20:12:31 +0000",
|
149
|
+
"date_sent": "Thu, 30 Jul 2015 20:12:33 +0000",
|
150
|
+
"date_updated": "Thu, 30 Jul 2015 20:12:33 +0000",
|
151
|
+
"direction": "outbound-api",
|
152
|
+
"error_code": null,
|
153
|
+
"error_message": null,
|
154
|
+
"from": "+14155552345",
|
155
|
+
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
156
|
+
"num_media": "0",
|
157
|
+
"num_segments": "1",
|
158
|
+
"price": null,
|
159
|
+
"price_unit": null,
|
160
|
+
"sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
161
|
+
"status": "queued",
|
162
|
+
"subresource_uris": {
|
163
|
+
"media": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json"
|
164
|
+
},
|
165
|
+
"to": "+14155552345",
|
166
|
+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
|
167
|
+
}
|
168
|
+
]
|
169
|
+
))
|
170
|
+
|
171
|
+
actual = @client.api.v2010.accounts('ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
172
|
+
.messages.create(to: '+15558675310')
|
173
|
+
|
174
|
+
expect(actual).to_not eq(nil)
|
175
|
+
end
|
176
|
+
|
140
177
|
it "can delete" do
|
141
178
|
@holodeck.mock(Twilio::Response.new(500, ''))
|
142
179
|
|
@@ -195,6 +195,20 @@ describe 'Sink' do
|
|
195
195
|
"sink_test": "https://events.twilio.com/v1/Sinks/DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab/Test",
|
196
196
|
"sink_validate": "https://events.twilio.com/v1/Sinks/DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab/Validate"
|
197
197
|
}
|
198
|
+
},
|
199
|
+
{
|
200
|
+
"status": "active",
|
201
|
+
"sink_configuration": {},
|
202
|
+
"description": "A webhook Sink",
|
203
|
+
"sid": "DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac",
|
204
|
+
"date_created": "2015-07-30T20:00:00Z",
|
205
|
+
"sink_type": "webhook",
|
206
|
+
"date_updated": "2015-07-30T20:00:00Z",
|
207
|
+
"url": "https://events.twilio.com/v1/Sinks/DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac",
|
208
|
+
"links": {
|
209
|
+
"sink_test": "https://events.twilio.com/v1/Sinks/DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac/Test",
|
210
|
+
"sink_validate": "https://events.twilio.com/v1/Sinks/DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac/Validate"
|
211
|
+
}
|
198
212
|
}
|
199
213
|
],
|
200
214
|
"meta": {
|
@@ -180,6 +180,14 @@ describe 'Configuration' do
|
|
180
180
|
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
181
181
|
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
|
182
182
|
],
|
183
|
+
"notifications": {
|
184
|
+
"enabled": true,
|
185
|
+
"mode": "whenNotInFocus"
|
186
|
+
},
|
187
|
+
"markdown": {
|
188
|
+
"enabled": false,
|
189
|
+
"mode": "readOnly"
|
190
|
+
},
|
183
191
|
"url": "https://flex-api.twilio.com/v1/Configuration"
|
184
192
|
}
|
185
193
|
]
|
@@ -361,6 +369,14 @@ describe 'Configuration' do
|
|
361
369
|
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
362
370
|
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
|
363
371
|
],
|
372
|
+
"notifications": {
|
373
|
+
"enabled": true,
|
374
|
+
"mode": "whenNotInFocus"
|
375
|
+
},
|
376
|
+
"markdown": {
|
377
|
+
"enabled": false,
|
378
|
+
"mode": "readOnly"
|
379
|
+
},
|
364
380
|
"url": "https://flex-api.twilio.com/v1/Configuration"
|
365
381
|
}
|
366
382
|
]
|
@@ -542,6 +558,14 @@ describe 'Configuration' do
|
|
542
558
|
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
543
559
|
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
|
544
560
|
],
|
561
|
+
"notifications": {
|
562
|
+
"enabled": true,
|
563
|
+
"mode": "whenNotInFocus"
|
564
|
+
},
|
565
|
+
"markdown": {
|
566
|
+
"enabled": false,
|
567
|
+
"mode": "readOnly"
|
568
|
+
},
|
545
569
|
"url": "https://flex-api.twilio.com/v1/Configuration"
|
546
570
|
}
|
547
571
|
]
|
@@ -0,0 +1,143 @@
|
|
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 'BrandRegistration' do
|
12
|
+
it "can fetch" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.messaging.v1.brand_registrations('BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
|
+
|
19
|
+
expect(
|
20
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
21
|
+
method: 'get',
|
22
|
+
url: 'https://messaging.twilio.com/v1/a2p/BrandRegistrations/BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
23
|
+
))).to eq(true)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "receives fetch responses" do
|
27
|
+
@holodeck.mock(Twilio::Response.new(
|
28
|
+
200,
|
29
|
+
%q[
|
30
|
+
{
|
31
|
+
"sid": "BN0044409f7e067e279523808d267e2d85",
|
32
|
+
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
|
33
|
+
"customer_profile_bundle_sid": "BU3344409f7e067e279523808d267e2d85",
|
34
|
+
"a2p_profile_bundle_sid": "BU3344409f7e067e279523808d267e2d85",
|
35
|
+
"date_created": "2021-01-27T14:18:35Z",
|
36
|
+
"date_updated": "2021-01-27T14:18:36Z",
|
37
|
+
"status": "PENDING",
|
38
|
+
"tcr_id": "BXXXXXX",
|
39
|
+
"failure_reason": "Registration error",
|
40
|
+
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85"
|
41
|
+
}
|
42
|
+
]
|
43
|
+
))
|
44
|
+
|
45
|
+
actual = @client.messaging.v1.brand_registrations('BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
46
|
+
|
47
|
+
expect(actual).to_not eq(nil)
|
48
|
+
end
|
49
|
+
|
50
|
+
it "can read" do
|
51
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
52
|
+
|
53
|
+
expect {
|
54
|
+
@client.messaging.v1.brand_registrations.list()
|
55
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
56
|
+
|
57
|
+
expect(
|
58
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
59
|
+
method: 'get',
|
60
|
+
url: 'https://messaging.twilio.com/v1/a2p/BrandRegistrations',
|
61
|
+
))).to eq(true)
|
62
|
+
end
|
63
|
+
|
64
|
+
it "receives read responses" do
|
65
|
+
@holodeck.mock(Twilio::Response.new(
|
66
|
+
200,
|
67
|
+
%q[
|
68
|
+
{
|
69
|
+
"meta": {
|
70
|
+
"page": 0,
|
71
|
+
"page_size": 50,
|
72
|
+
"first_page_url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations?PageSize=50&Page=0",
|
73
|
+
"previous_page_url": null,
|
74
|
+
"next_page_url": null,
|
75
|
+
"key": "data",
|
76
|
+
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations?PageSize=50&Page=0"
|
77
|
+
},
|
78
|
+
"data": [
|
79
|
+
{
|
80
|
+
"sid": "BN0044409f7e067e279523808d267e2d85",
|
81
|
+
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
|
82
|
+
"customer_profile_bundle_sid": "BU3344409f7e067e279523808d267e2d85",
|
83
|
+
"a2p_profile_bundle_sid": "BU3344409f7e067e279523808d267e2d85",
|
84
|
+
"date_created": "2021-01-27T14:18:35Z",
|
85
|
+
"date_updated": "2021-01-27T14:18:36Z",
|
86
|
+
"status": "APPROVED",
|
87
|
+
"tcr_id": "BXXXXXX",
|
88
|
+
"failure_reason": "Registration error",
|
89
|
+
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85"
|
90
|
+
}
|
91
|
+
]
|
92
|
+
}
|
93
|
+
]
|
94
|
+
))
|
95
|
+
|
96
|
+
actual = @client.messaging.v1.brand_registrations.list()
|
97
|
+
|
98
|
+
expect(actual).to_not eq(nil)
|
99
|
+
end
|
100
|
+
|
101
|
+
it "can create" do
|
102
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
103
|
+
|
104
|
+
expect {
|
105
|
+
@client.messaging.v1.brand_registrations.create(customer_profile_bundle_sid: 'BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', a2p_profile_bundle_sid: 'BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
106
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
107
|
+
|
108
|
+
values = {
|
109
|
+
'CustomerProfileBundleSid' => 'BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
110
|
+
'A2PProfileBundleSid' => 'BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
111
|
+
}
|
112
|
+
expect(
|
113
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
114
|
+
method: 'post',
|
115
|
+
url: 'https://messaging.twilio.com/v1/a2p/BrandRegistrations',
|
116
|
+
data: values,
|
117
|
+
))).to eq(true)
|
118
|
+
end
|
119
|
+
|
120
|
+
it "receives create responses" do
|
121
|
+
@holodeck.mock(Twilio::Response.new(
|
122
|
+
201,
|
123
|
+
%q[
|
124
|
+
{
|
125
|
+
"sid": "BN0044409f7e067e279523808d267e2d85",
|
126
|
+
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
|
127
|
+
"customer_profile_bundle_sid": "BU0000009f7e067e279523808d267e2d90",
|
128
|
+
"a2p_profile_bundle_sid": "BU1111109f7e067e279523808d267e2d85",
|
129
|
+
"date_created": "2021-01-28T10:45:51Z",
|
130
|
+
"date_updated": "2021-01-28T10:45:51Z",
|
131
|
+
"status": "PENDING",
|
132
|
+
"tcr_id": "BXXXXXX",
|
133
|
+
"failure_reason": "Registration error",
|
134
|
+
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85"
|
135
|
+
}
|
136
|
+
]
|
137
|
+
))
|
138
|
+
|
139
|
+
actual = @client.messaging.v1.brand_registrations.create(customer_profile_bundle_sid: 'BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', a2p_profile_bundle_sid: 'BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
140
|
+
|
141
|
+
expect(actual).to_not eq(nil)
|
142
|
+
end
|
143
|
+
end
|
@@ -57,15 +57,13 @@ describe 'Document' do
|
|
57
57
|
|
58
58
|
expect {
|
59
59
|
@client.preview.sync.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
60
|
-
.documents('ETXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete(
|
60
|
+
.documents('ETXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
61
61
|
}.to raise_exception(Twilio::REST::TwilioError)
|
62
62
|
|
63
|
-
headers = {'If-Match' => 'if_match', }
|
64
63
|
expect(
|
65
64
|
@holodeck.has_request?(Holodeck::Request.new(
|
66
65
|
method: 'delete',
|
67
66
|
url: 'https://preview.twilio.com/Sync/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Documents/ETXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
68
|
-
headers: headers,
|
69
67
|
))).to eq(true)
|
70
68
|
end
|
71
69
|
|
@@ -97,9 +97,14 @@ describe 'Build' do
|
|
97
97
|
"dependencies": [
|
98
98
|
{
|
99
99
|
"name": "twilio",
|
100
|
-
"version": "3.
|
100
|
+
"version": "3.29.2"
|
101
|
+
},
|
102
|
+
{
|
103
|
+
"name": "@twilio/runtime-handler",
|
104
|
+
"version": "1.0.1"
|
101
105
|
}
|
102
106
|
],
|
107
|
+
"runtime": "node10",
|
103
108
|
"status": "deploying",
|
104
109
|
"date_created": "2018-11-10T20:00:00Z",
|
105
110
|
"date_updated": "2018-11-10T20:00:00Z",
|
@@ -192,9 +197,14 @@ describe 'Build' do
|
|
192
197
|
"dependencies": [
|
193
198
|
{
|
194
199
|
"name": "twilio",
|
195
|
-
"version": "3.
|
200
|
+
"version": "3.29.2"
|
201
|
+
},
|
202
|
+
{
|
203
|
+
"name": "@twilio/runtime-handler",
|
204
|
+
"version": "1.0.1"
|
196
205
|
}
|
197
206
|
],
|
207
|
+
"runtime": "node10",
|
198
208
|
"status": "building",
|
199
209
|
"date_created": "2018-11-10T20:00:00Z",
|
200
210
|
"date_updated": "2018-11-10T20:00:00Z",
|
@@ -40,6 +40,8 @@ describe 'Fleet' do
|
|
40
40
|
"commands_enabled": true,
|
41
41
|
"commands_method": "GET",
|
42
42
|
"commands_url": "https://google.com",
|
43
|
+
"ip_commands_method": "GET",
|
44
|
+
"ip_commands_url": "https://google.com",
|
43
45
|
"network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
44
46
|
"sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
45
47
|
"url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -81,6 +83,8 @@ describe 'Fleet' do
|
|
81
83
|
"commands_enabled": true,
|
82
84
|
"commands_method": "POST",
|
83
85
|
"commands_url": null,
|
86
|
+
"ip_commands_method": "POST",
|
87
|
+
"ip_commands_url": null,
|
84
88
|
"network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
85
89
|
"sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
86
90
|
"url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -157,6 +161,8 @@ describe 'Fleet' do
|
|
157
161
|
"commands_enabled": true,
|
158
162
|
"commands_method": "POST",
|
159
163
|
"commands_url": null,
|
164
|
+
"ip_commands_method": "POST",
|
165
|
+
"ip_commands_url": null,
|
160
166
|
"network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
161
167
|
"sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
162
168
|
"url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -200,6 +206,8 @@ describe 'Fleet' do
|
|
200
206
|
"commands_enabled": true,
|
201
207
|
"commands_method": "POST",
|
202
208
|
"commands_url": null,
|
209
|
+
"ip_commands_method": "POST",
|
210
|
+
"ip_commands_url": null,
|
203
211
|
"network_access_profile_sid": "HAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
204
212
|
"sid": "HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
205
213
|
"url": "https://supersim.twilio.com/v1/Fleets/HFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
@@ -58,15 +58,13 @@ describe 'Document' do
|
|
58
58
|
|
59
59
|
expect {
|
60
60
|
@client.sync.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
61
|
-
.documents('ETXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete(
|
61
|
+
.documents('ETXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
62
62
|
}.to raise_exception(Twilio::REST::TwilioError)
|
63
63
|
|
64
|
-
headers = {'If-Match' => 'if_match', }
|
65
64
|
expect(
|
66
65
|
@holodeck.has_request?(Holodeck::Request.new(
|
67
66
|
method: 'delete',
|
68
67
|
url: 'https://sync.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Documents/ETXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
69
|
-
headers: headers,
|
70
68
|
))).to eq(true)
|
71
69
|
end
|
72
70
|
|
@@ -0,0 +1,192 @@
|
|
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 'CustomerProfilesChannelEndpointAssignment' do
|
12
|
+
it "can create" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.trusthub.v1.customer_profiles('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
17
|
+
.customer_profiles_channel_endpoint_assignment.create(channel_endpoint_type: 'channel_endpoint_type', channel_endpoint_sid: 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
18
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
19
|
+
|
20
|
+
values = {
|
21
|
+
'ChannelEndpointType' => 'channel_endpoint_type',
|
22
|
+
'ChannelEndpointSid' => 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
23
|
+
}
|
24
|
+
expect(
|
25
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
26
|
+
method: 'post',
|
27
|
+
url: 'https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments',
|
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": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
38
|
+
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
39
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
40
|
+
"channel_endpoint_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
41
|
+
"channel_endpoint_type": "phone-number",
|
42
|
+
"date_created": "2019-07-31T02:34:41Z",
|
43
|
+
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
44
|
+
}
|
45
|
+
]
|
46
|
+
))
|
47
|
+
|
48
|
+
actual = @client.trusthub.v1.customer_profiles('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
49
|
+
.customer_profiles_channel_endpoint_assignment.create(channel_endpoint_type: 'channel_endpoint_type', channel_endpoint_sid: 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
|
50
|
+
|
51
|
+
expect(actual).to_not eq(nil)
|
52
|
+
end
|
53
|
+
|
54
|
+
it "can read" do
|
55
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
56
|
+
|
57
|
+
expect {
|
58
|
+
@client.trusthub.v1.customer_profiles('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
59
|
+
.customer_profiles_channel_endpoint_assignment.list()
|
60
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
61
|
+
|
62
|
+
expect(
|
63
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
64
|
+
method: 'get',
|
65
|
+
url: 'https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments',
|
66
|
+
))).to eq(true)
|
67
|
+
end
|
68
|
+
|
69
|
+
it "receives read_empty responses" do
|
70
|
+
@holodeck.mock(Twilio::Response.new(
|
71
|
+
200,
|
72
|
+
%q[
|
73
|
+
{
|
74
|
+
"results": [],
|
75
|
+
"meta": {
|
76
|
+
"page": 0,
|
77
|
+
"page_size": 50,
|
78
|
+
"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?PageSize=50&Page=0",
|
79
|
+
"previous_page_url": null,
|
80
|
+
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?PageSize=50&Page=0",
|
81
|
+
"next_page_url": null,
|
82
|
+
"key": "results"
|
83
|
+
}
|
84
|
+
}
|
85
|
+
]
|
86
|
+
))
|
87
|
+
|
88
|
+
actual = @client.trusthub.v1.customer_profiles('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
89
|
+
.customer_profiles_channel_endpoint_assignment.list()
|
90
|
+
|
91
|
+
expect(actual).to_not eq(nil)
|
92
|
+
end
|
93
|
+
|
94
|
+
it "receives read_full responses" do
|
95
|
+
@holodeck.mock(Twilio::Response.new(
|
96
|
+
200,
|
97
|
+
%q[
|
98
|
+
{
|
99
|
+
"results": [
|
100
|
+
{
|
101
|
+
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
102
|
+
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
103
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
104
|
+
"channel_endpoint_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
105
|
+
"channel_endpoint_type": "phone-number",
|
106
|
+
"date_created": "2019-07-31T02:34:41Z",
|
107
|
+
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
108
|
+
}
|
109
|
+
],
|
110
|
+
"meta": {
|
111
|
+
"page": 0,
|
112
|
+
"page_size": 50,
|
113
|
+
"first_page_url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
|
114
|
+
"previous_page_url": null,
|
115
|
+
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments?ChannelEndpointSid=PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
|
116
|
+
"next_page_url": null,
|
117
|
+
"key": "results"
|
118
|
+
}
|
119
|
+
}
|
120
|
+
]
|
121
|
+
))
|
122
|
+
|
123
|
+
actual = @client.trusthub.v1.customer_profiles('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
124
|
+
.customer_profiles_channel_endpoint_assignment.list()
|
125
|
+
|
126
|
+
expect(actual).to_not eq(nil)
|
127
|
+
end
|
128
|
+
|
129
|
+
it "can fetch" do
|
130
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
131
|
+
|
132
|
+
expect {
|
133
|
+
@client.trusthub.v1.customer_profiles('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
134
|
+
.customer_profiles_channel_endpoint_assignment('RAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
135
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
136
|
+
|
137
|
+
expect(
|
138
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
139
|
+
method: 'get',
|
140
|
+
url: 'https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments/RAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
141
|
+
))).to eq(true)
|
142
|
+
end
|
143
|
+
|
144
|
+
it "receives fetch responses" do
|
145
|
+
@holodeck.mock(Twilio::Response.new(
|
146
|
+
200,
|
147
|
+
%q[
|
148
|
+
{
|
149
|
+
"sid": "RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
150
|
+
"customer_profile_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
151
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
152
|
+
"channel_endpoint_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
153
|
+
"channel_endpoint_type": "phone-number",
|
154
|
+
"date_created": "2019-07-31T02:34:41Z",
|
155
|
+
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelEndpointAssignments/RAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
156
|
+
}
|
157
|
+
]
|
158
|
+
))
|
159
|
+
|
160
|
+
actual = @client.trusthub.v1.customer_profiles('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
161
|
+
.customer_profiles_channel_endpoint_assignment('RAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
162
|
+
|
163
|
+
expect(actual).to_not eq(nil)
|
164
|
+
end
|
165
|
+
|
166
|
+
it "can delete" do
|
167
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
168
|
+
|
169
|
+
expect {
|
170
|
+
@client.trusthub.v1.customer_profiles('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
171
|
+
.customer_profiles_channel_endpoint_assignment('RAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
172
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
173
|
+
|
174
|
+
expect(
|
175
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
176
|
+
method: 'delete',
|
177
|
+
url: 'https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments/RAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
178
|
+
))).to eq(true)
|
179
|
+
end
|
180
|
+
|
181
|
+
it "receives delete responses" do
|
182
|
+
@holodeck.mock(Twilio::Response.new(
|
183
|
+
204,
|
184
|
+
nil,
|
185
|
+
))
|
186
|
+
|
187
|
+
actual = @client.trusthub.v1.customer_profiles('BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
188
|
+
.customer_profiles_channel_endpoint_assignment('RAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
189
|
+
|
190
|
+
expect(actual).to eq(true)
|
191
|
+
end
|
192
|
+
end
|