twilio-ruby 5.39.0 → 5.40.1
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 -1
- data/CHANGES.md +80 -1
- data/CONTRIBUTING.md +2 -2
- data/ISSUE_TEMPLATE.md +5 -1
- data/Makefile +1 -1
- data/PULL_REQUEST_TEMPLATE.md +1 -1
- data/README.md +4 -3
- data/lib/twilio-ruby/framework/version.rb +1 -1
- data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +1 -1
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +7 -5
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +4 -4
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +79 -60
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +15 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +15 -1
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +15 -1
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -1
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/field_type/field_value.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/model_build.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/query.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/field.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/task/sample.rb +1 -1
- data/lib/twilio-ruby/rest/autopilot/v1/assistant/webhook.rb +1 -1
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +1 -1
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +1 -1
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +1 -1
- data/lib/twilio-ruby/rest/client.rb +7 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +1 -1
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +13 -3
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +1 -1
- data/lib/twilio-ruby/rest/events.rb +55 -0
- data/lib/twilio-ruby/rest/events/v1.rb +59 -0
- data/lib/twilio-ruby/rest/events/v1/sink.rb +380 -0
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +115 -0
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +119 -0
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +363 -0
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +322 -0
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +1 -1
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +1 -1
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/call/event.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +1 -1
- data/lib/twilio-ruby/rest/insights/v1/call/summary.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +1 -1
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +1 -1
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/messaging.rb +6 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +7 -0
- data/lib/twilio-ruby/rest/messaging/v1/deactivation.rb +164 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +1 -1
- 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/alert.rb +1 -1
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +1 -1
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +1 -1
- data/lib/twilio-ruby/rest/notify/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +17 -3
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +1 -1
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +1 -1
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +1 -1
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/export_custom_job.rb +1 -1
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +1 -1
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +1 -1
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +1 -1
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +1 -1
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +1 -1
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +1 -1
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +1 -1
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +1 -1
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +1 -1
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +1 -1
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +1 -1
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +1 -1
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +1 -1
- data/lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/field.rb +1 -1
- data/lib/twilio-ruby/rest/preview/understand/assistant/task/sample.rb +1 -1
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +1 -1
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +1 -1
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +1 -1
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +1 -1
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +43 -5
- data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +14 -2
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +1 -1
- data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +1 -1
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +1 -1
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/command.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +13 -12
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +1 -1
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +25 -5
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +76 -10
- data/lib/twilio-ruby/rest/sync/v1/service.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +1 -1
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +1 -1
- 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/task_queue/task_queue_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +1 -1
- 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/worker/workers_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +26 -4
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +1 -1
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service.rb +22 -10
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +11 -3
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +1 -1
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +4 -1
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/composition.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/recording.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +1 -1
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribe_rule.rb +0 -6
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +1 -1
- data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +6 -20
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +1 -1
- data/lib/twilio-ruby/rest/wireless/v1/usage_record.rb +1 -1
- data/lib/twilio-ruby/version.rb +1 -1
- data/spec/framework/version_spec.rb +166 -0
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +35 -36
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +39 -40
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +35 -36
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +25 -23
- data/spec/integration/api/v2010/account/message_spec.rb +37 -0
- data/spec/integration/bulkexports/v1/export/day_spec.rb +5 -5
- data/spec/integration/bulkexports/v1/export_configuration_spec.rb +4 -4
- data/spec/integration/bulkexports/v1/export_spec.rb +3 -3
- data/spec/integration/conversations/v1/conversation/message_spec.rb +38 -0
- data/spec/integration/conversations/v1/conversation/participant_spec.rb +56 -0
- data/spec/integration/conversations/v1/conversation_spec.rb +30 -0
- data/spec/integration/events/v1/sink/sink_test_spec.rb +42 -0
- data/spec/integration/events/v1/sink/sink_validate_spec.rb +44 -0
- data/spec/integration/events/v1/sink_spec.rb +217 -0
- data/spec/integration/events/v1/subscription/subscribed_event_spec.rb +212 -0
- data/spec/integration/events/v1/subscription_spec.rb +205 -0
- data/spec/integration/messaging/v1/deactivation_spec.rb +40 -0
- data/spec/integration/numbers/v2/regulatory_compliance/end_user_spec.rb +27 -0
- data/spec/integration/studio/v1/flow/execution/execution_step_spec.rb +1 -0
- data/spec/integration/studio/v2/flow/execution/execution_step_spec.rb +1 -0
- data/spec/integration/supersim/v1/usage_record_spec.rb +463 -18
- data/spec/integration/trunking/v1/trunk_spec.rb +4 -0
- data/spec/integration/verify/v2/service/access_token_spec.rb +1 -1
- data/spec/integration/verify/v2/service/entity/challenge_spec.rb +8 -8
- data/spec/integration/video/v1/room_spec.rb +37 -0
- data/spec/integration/wireless/v1/sim/data_session_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +24 -2
@@ -0,0 +1,212 @@
|
|
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 'SubscribedEvent' do
|
12
|
+
it "can read" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
17
|
+
.subscribed_events.list()
|
18
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
19
|
+
|
20
|
+
expect(
|
21
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
22
|
+
method: 'get',
|
23
|
+
url: 'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SubscribedEvents',
|
24
|
+
))).to eq(true)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "receives read_empty responses" do
|
28
|
+
@holodeck.mock(Twilio::Response.new(
|
29
|
+
200,
|
30
|
+
%q[
|
31
|
+
{
|
32
|
+
"types": [],
|
33
|
+
"meta": {
|
34
|
+
"page": 0,
|
35
|
+
"page_size": 10,
|
36
|
+
"first_page_url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents?PageSize=10&Page=0",
|
37
|
+
"previous_page_url": null,
|
38
|
+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents?PageSize=10&Page=0",
|
39
|
+
"next_page_url": null,
|
40
|
+
"key": "types"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
]
|
44
|
+
))
|
45
|
+
|
46
|
+
actual = @client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
47
|
+
.subscribed_events.list()
|
48
|
+
|
49
|
+
expect(actual).to_not eq(nil)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "receives read_results responses" do
|
53
|
+
@holodeck.mock(Twilio::Response.new(
|
54
|
+
200,
|
55
|
+
%q[
|
56
|
+
{
|
57
|
+
"types": [
|
58
|
+
{
|
59
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
60
|
+
"type": "Voice.Calls",
|
61
|
+
"version": 2,
|
62
|
+
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
63
|
+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/Voice.Calls"
|
64
|
+
},
|
65
|
+
{
|
66
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
67
|
+
"type": "Video.Rooms",
|
68
|
+
"version": 15,
|
69
|
+
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
70
|
+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/Video.Rooms"
|
71
|
+
}
|
72
|
+
],
|
73
|
+
"meta": {
|
74
|
+
"page": 0,
|
75
|
+
"page_size": 50,
|
76
|
+
"first_page_url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents?PageSize=50&Page=0",
|
77
|
+
"previous_page_url": null,
|
78
|
+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents?PageSize=50&Page=0",
|
79
|
+
"next_page_url": null,
|
80
|
+
"key": "types"
|
81
|
+
}
|
82
|
+
}
|
83
|
+
]
|
84
|
+
))
|
85
|
+
|
86
|
+
actual = @client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
87
|
+
.subscribed_events.list()
|
88
|
+
|
89
|
+
expect(actual).to_not eq(nil)
|
90
|
+
end
|
91
|
+
|
92
|
+
it "can create" do
|
93
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
94
|
+
|
95
|
+
expect {
|
96
|
+
@client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
97
|
+
.subscribed_events.create(type: 'type')
|
98
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
99
|
+
|
100
|
+
values = {'Type' => 'type', }
|
101
|
+
expect(
|
102
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
103
|
+
method: 'post',
|
104
|
+
url: 'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SubscribedEvents',
|
105
|
+
data: values,
|
106
|
+
))).to eq(true)
|
107
|
+
end
|
108
|
+
|
109
|
+
it "receives create_all_fields responses" do
|
110
|
+
@holodeck.mock(Twilio::Response.new(
|
111
|
+
201,
|
112
|
+
%q[
|
113
|
+
{
|
114
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
115
|
+
"type": "com.twilio.voice.call.initiated",
|
116
|
+
"version": 5,
|
117
|
+
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
118
|
+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/com.twilio.voice.call.initiated"
|
119
|
+
}
|
120
|
+
]
|
121
|
+
))
|
122
|
+
|
123
|
+
actual = @client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
124
|
+
.subscribed_events.create(type: 'type')
|
125
|
+
|
126
|
+
expect(actual).to_not eq(nil)
|
127
|
+
end
|
128
|
+
|
129
|
+
it "receives create_no_version responses" do
|
130
|
+
@holodeck.mock(Twilio::Response.new(
|
131
|
+
201,
|
132
|
+
%q[
|
133
|
+
{
|
134
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
135
|
+
"type": "com.twilio.voice.call.recorded",
|
136
|
+
"version": 2,
|
137
|
+
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
138
|
+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/com.twilio.voice.call.recorded"
|
139
|
+
}
|
140
|
+
]
|
141
|
+
))
|
142
|
+
|
143
|
+
actual = @client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
144
|
+
.subscribed_events.create(type: 'type')
|
145
|
+
|
146
|
+
expect(actual).to_not eq(nil)
|
147
|
+
end
|
148
|
+
|
149
|
+
it "can update" do
|
150
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
151
|
+
|
152
|
+
expect {
|
153
|
+
@client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
154
|
+
.subscribed_events('type').update(version: 1)
|
155
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
156
|
+
|
157
|
+
values = {'Version' => 1, }
|
158
|
+
expect(
|
159
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
160
|
+
method: 'post',
|
161
|
+
url: 'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SubscribedEvents/type',
|
162
|
+
data: values,
|
163
|
+
))).to eq(true)
|
164
|
+
end
|
165
|
+
|
166
|
+
it "receives update responses" do
|
167
|
+
@holodeck.mock(Twilio::Response.new(
|
168
|
+
200,
|
169
|
+
%q[
|
170
|
+
{
|
171
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
172
|
+
"type": "com.twilio.voice.call.initiated",
|
173
|
+
"version": 6,
|
174
|
+
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
175
|
+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/com.twilio.voice.call.initiated"
|
176
|
+
}
|
177
|
+
]
|
178
|
+
))
|
179
|
+
|
180
|
+
actual = @client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
181
|
+
.subscribed_events('type').update(version: 1)
|
182
|
+
|
183
|
+
expect(actual).to_not eq(nil)
|
184
|
+
end
|
185
|
+
|
186
|
+
it "can delete" do
|
187
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
188
|
+
|
189
|
+
expect {
|
190
|
+
@client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
191
|
+
.subscribed_events('type').delete()
|
192
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
193
|
+
|
194
|
+
expect(
|
195
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
196
|
+
method: 'delete',
|
197
|
+
url: 'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SubscribedEvents/type',
|
198
|
+
))).to eq(true)
|
199
|
+
end
|
200
|
+
|
201
|
+
it "receives delete responses" do
|
202
|
+
@holodeck.mock(Twilio::Response.new(
|
203
|
+
204,
|
204
|
+
nil,
|
205
|
+
))
|
206
|
+
|
207
|
+
actual = @client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
|
208
|
+
.subscribed_events('type').delete()
|
209
|
+
|
210
|
+
expect(actual).to eq(true)
|
211
|
+
end
|
212
|
+
end
|
@@ -0,0 +1,205 @@
|
|
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 'Subscription' do
|
12
|
+
it "can read" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.events.v1.subscriptions.list()
|
17
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
18
|
+
|
19
|
+
expect(
|
20
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
21
|
+
method: 'get',
|
22
|
+
url: 'https://events.twilio.com/v1/Subscriptions',
|
23
|
+
))).to eq(true)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "receives read_empty responses" do
|
27
|
+
@holodeck.mock(Twilio::Response.new(
|
28
|
+
200,
|
29
|
+
%q[
|
30
|
+
{
|
31
|
+
"subscriptions": [],
|
32
|
+
"meta": {
|
33
|
+
"page": 0,
|
34
|
+
"page_size": 10,
|
35
|
+
"first_page_url": "https://events.twilio.com/v1/Subscriptions?PageSize=10&Page=0",
|
36
|
+
"previous_page_url": null,
|
37
|
+
"url": "https://events.twilio.com/v1/Subscriptions?PageSize=10&Page=0",
|
38
|
+
"next_page_url": null,
|
39
|
+
"key": "subscriptions"
|
40
|
+
}
|
41
|
+
}
|
42
|
+
]
|
43
|
+
))
|
44
|
+
|
45
|
+
actual = @client.events.v1.subscriptions.list()
|
46
|
+
|
47
|
+
expect(actual).to_not eq(nil)
|
48
|
+
end
|
49
|
+
|
50
|
+
it "receives read_results responses" do
|
51
|
+
@holodeck.mock(Twilio::Response.new(
|
52
|
+
200,
|
53
|
+
%q[
|
54
|
+
{
|
55
|
+
"subscriptions": [
|
56
|
+
{
|
57
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
58
|
+
"date_created": "2015-07-30T20:00:00Z",
|
59
|
+
"date_updated": "2015-07-30T20:01:33Z",
|
60
|
+
"sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
61
|
+
"sink_sid": "DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
62
|
+
"description": "A subscription",
|
63
|
+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
64
|
+
"links": {
|
65
|
+
"subscribed_events": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents"
|
66
|
+
}
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
70
|
+
"date_created": "2015-07-30T20:00:00Z",
|
71
|
+
"date_updated": "2015-07-30T20:01:33Z",
|
72
|
+
"sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
|
73
|
+
"sink_sid": "DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
74
|
+
"description": "Another subscription",
|
75
|
+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
|
76
|
+
"links": {
|
77
|
+
"subscribed_events": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab/SubscribedEvents"
|
78
|
+
}
|
79
|
+
}
|
80
|
+
],
|
81
|
+
"meta": {
|
82
|
+
"page": 0,
|
83
|
+
"page_size": 20,
|
84
|
+
"first_page_url": "https://events.twilio.com/v1/Subscriptions?PageSize=20&Page=0",
|
85
|
+
"previous_page_url": null,
|
86
|
+
"url": "https://events.twilio.com/v1/Subscriptions?PageSize=20&Page=0",
|
87
|
+
"next_page_url": null,
|
88
|
+
"key": "subscriptions"
|
89
|
+
}
|
90
|
+
}
|
91
|
+
]
|
92
|
+
))
|
93
|
+
|
94
|
+
actual = @client.events.v1.subscriptions.list()
|
95
|
+
|
96
|
+
expect(actual).to_not eq(nil)
|
97
|
+
end
|
98
|
+
|
99
|
+
it "can fetch" do
|
100
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
101
|
+
|
102
|
+
expect {
|
103
|
+
@client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
104
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
105
|
+
|
106
|
+
expect(
|
107
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
108
|
+
method: 'get',
|
109
|
+
url: 'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
110
|
+
))).to eq(true)
|
111
|
+
end
|
112
|
+
|
113
|
+
it "receives fetch responses" do
|
114
|
+
@holodeck.mock(Twilio::Response.new(
|
115
|
+
200,
|
116
|
+
%q[
|
117
|
+
{
|
118
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
119
|
+
"date_created": "2015-07-30T20:00:00Z",
|
120
|
+
"date_updated": "2015-07-30T20:01:33Z",
|
121
|
+
"sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
122
|
+
"sink_sid": "DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
123
|
+
"description": "A subscription",
|
124
|
+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
125
|
+
"links": {
|
126
|
+
"subscribed_events": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents"
|
127
|
+
}
|
128
|
+
}
|
129
|
+
]
|
130
|
+
))
|
131
|
+
|
132
|
+
actual = @client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').fetch()
|
133
|
+
|
134
|
+
expect(actual).to_not eq(nil)
|
135
|
+
end
|
136
|
+
|
137
|
+
it "can create" do
|
138
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
139
|
+
|
140
|
+
expect {
|
141
|
+
@client.events.v1.subscriptions.create(description: 'description', sink_sid: 'DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', types: [{}])
|
142
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
143
|
+
|
144
|
+
values = {
|
145
|
+
'Description' => 'description',
|
146
|
+
'SinkSid' => 'DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
147
|
+
'Types' => Twilio.serialize_list([{}]) { |e| Twilio.serialize_object(e) },
|
148
|
+
}
|
149
|
+
expect(
|
150
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
151
|
+
method: 'post',
|
152
|
+
url: 'https://events.twilio.com/v1/Subscriptions',
|
153
|
+
data: values,
|
154
|
+
))).to eq(true)
|
155
|
+
end
|
156
|
+
|
157
|
+
it "receives create responses" do
|
158
|
+
@holodeck.mock(Twilio::Response.new(
|
159
|
+
201,
|
160
|
+
%q[
|
161
|
+
{
|
162
|
+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
163
|
+
"date_created": "2015-07-30T20:00:00Z",
|
164
|
+
"date_updated": "2015-07-30T20:01:33Z",
|
165
|
+
"sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
166
|
+
"sink_sid": "DGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
167
|
+
"description": "A subscription",
|
168
|
+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
|
169
|
+
"links": {
|
170
|
+
"subscribed_events": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents"
|
171
|
+
}
|
172
|
+
}
|
173
|
+
]
|
174
|
+
))
|
175
|
+
|
176
|
+
actual = @client.events.v1.subscriptions.create(description: 'description', sink_sid: 'DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', types: [{}])
|
177
|
+
|
178
|
+
expect(actual).to_not eq(nil)
|
179
|
+
end
|
180
|
+
|
181
|
+
it "can delete" do
|
182
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
183
|
+
|
184
|
+
expect {
|
185
|
+
@client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
186
|
+
}.to raise_exception(Twilio::REST::TwilioError)
|
187
|
+
|
188
|
+
expect(
|
189
|
+
@holodeck.has_request?(Holodeck::Request.new(
|
190
|
+
method: 'delete',
|
191
|
+
url: 'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
|
192
|
+
))).to eq(true)
|
193
|
+
end
|
194
|
+
|
195
|
+
it "receives delete responses" do
|
196
|
+
@holodeck.mock(Twilio::Response.new(
|
197
|
+
204,
|
198
|
+
nil,
|
199
|
+
))
|
200
|
+
|
201
|
+
actual = @client.events.v1.subscriptions('DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
|
202
|
+
|
203
|
+
expect(actual).to eq(true)
|
204
|
+
end
|
205
|
+
end
|
@@ -0,0 +1,40 @@
|
|
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 'Deactivations' do
|
12
|
+
it "can fetch" do
|
13
|
+
@holodeck.mock(Twilio::Response.new(500, ''))
|
14
|
+
|
15
|
+
expect {
|
16
|
+
@client.messaging.v1.deactivations().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/Deactivations',
|
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
|
+
"redirect_to": "https://www.twilio.com"
|
32
|
+
}
|
33
|
+
]
|
34
|
+
))
|
35
|
+
|
36
|
+
actual = @client.messaging.v1.deactivations().fetch()
|
37
|
+
|
38
|
+
expect(actual).to_not eq(nil)
|
39
|
+
end
|
40
|
+
end
|