twilio-ruby 5.10.7 → 7.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.dockerignore +1 -0
- data/.github/ISSUE_TEMPLATE/bug_report.yml +69 -0
- data/.github/workflows/pr-lint.yml +21 -0
- data/.github/workflows/test-and-deploy.yml +147 -0
- data/.gitignore +11 -1
- data/.rubocop.yml +23 -6
- data/.rubocop_todo.yml +147 -73
- data/CHANGES.md +3392 -0
- data/CODE_OF_CONDUCT.md +73 -0
- data/CONTRIBUTING.md +14 -10
- data/Dockerfile +4 -3
- data/Gemfile +5 -8
- data/ISSUE_TEMPLATE.md +17 -13
- data/{LICENSE.md → LICENSE} +2 -2
- data/Makefile +22 -22
- data/PULL_REQUEST_TEMPLATE.md +30 -3
- data/README.md +219 -57
- data/Rakefile +0 -54
- data/UPGRADE.md +21 -0
- data/VERSIONS.md +9 -10
- data/advanced-examples/custom-http-client.md +170 -0
- data/cluster/cluster_oauth_spec.rb +19 -0
- data/cluster/cluster_orgs_spec.rb +40 -0
- data/cluster/cluster_spec.rb +75 -0
- data/examples/examples.rb +1 -1
- data/examples/public_oauth.rb +13 -0
- data/githooks/pre-commit +0 -0
- data/lib/rack/twilio_webhook_authentication.rb +25 -1
- data/lib/twilio-ruby/auth_strategy/auth_strategy.rb +19 -0
- data/lib/twilio-ruby/auth_strategy/no_auth_strategy.rb +17 -0
- data/lib/twilio-ruby/auth_strategy/token_auth_strategy.rb +39 -0
- data/lib/twilio-ruby/base/client_base.rb +131 -0
- data/lib/twilio-ruby/credential/auth_type.rb +17 -0
- data/lib/twilio-ruby/credential/client_credential_provider.rb +28 -0
- data/lib/twilio-ruby/credential/credential_provider.rb +11 -0
- data/lib/twilio-ruby/credential/orgs_credential_provider.rb +30 -0
- data/lib/twilio-ruby/framework/request.rb +8 -1
- data/lib/twilio-ruby/framework/{domain.rb → rest/domain.rb} +1 -2
- data/lib/twilio-ruby/framework/{error.rb → rest/error.rb} +3 -15
- data/lib/twilio-ruby/framework/{page.rb → rest/page.rb} +1 -0
- data/lib/twilio-ruby/framework/{version.rb → rest/version.rb} +7 -11
- data/lib/twilio-ruby/http/client_token_manager.rb +28 -0
- data/lib/twilio-ruby/http/http_client.rb +53 -17
- data/lib/twilio-ruby/http/org_token_manager.rb +28 -0
- data/lib/twilio-ruby/http.rb +5 -0
- data/lib/twilio-ruby/jwt/access_token.rb +20 -61
- data/lib/twilio-ruby/jwt/jwt.rb +6 -0
- data/lib/twilio-ruby/jwt/task_router.rb +2 -2
- data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +213 -0
- data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +137 -0
- data/lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb +137 -0
- data/lib/twilio-ruby/rest/accounts/v1/credential/aws.rb +398 -334
- data/lib/twilio-ruby/rest/accounts/v1/credential/public_key.rb +398 -341
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +123 -114
- data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +186 -0
- data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +233 -0
- data/lib/twilio-ruby/rest/accounts/v1.rb +64 -29
- data/lib/twilio-ruby/rest/accounts.rb +10 -28
- data/lib/twilio-ruby/rest/accounts_base.rb +38 -0
- data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +375 -364
- data/lib/twilio-ruby/rest/api/v2010/account/address.rb +584 -521
- data/lib/twilio-ruby/rest/api/v2010/account/application.rb +642 -606
- data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +324 -318
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/local.rb +398 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/machine_to_machine.rb +398 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb +398 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/national.rb +398 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/shared_cost.rb +398 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb +398 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/voip.rb +398 -0
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country.rb +442 -0
- data/lib/twilio-ruby/rest/api/v2010/account/balance.rb +150 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/event.rb +213 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +411 -413
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +335 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +521 -485
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +885 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +885 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +318 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +170 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +250 -0
- data/lib/twilio-ruby/rest/api/v2010/account/call.rb +973 -827
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +686 -576
- data/lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb +472 -450
- data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +506 -477
- data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +447 -399
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.rb +331 -346
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb +417 -420
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +547 -503
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +547 -503
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +547 -503
- data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +868 -865
- data/lib/twilio-ruby/rest/api/v2010/account/key.rb +356 -304
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +175 -162
- data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +355 -347
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +645 -601
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +165 -143
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +165 -143
- data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +411 -408
- data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +389 -364
- data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +357 -324
- data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +453 -390
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +204 -0
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb +386 -366
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result.rb +383 -380
- data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +379 -360
- data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +522 -478
- data/lib/twilio-ruby/rest/api/v2010/account/short_code.rb +434 -410
- data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +356 -312
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +402 -375
- data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +426 -383
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_credential_list_mapping.rb +366 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls/auth_calls_ip_access_control_list_mapping.rb +366 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls.rb +141 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations/auth_registrations_credential_list_mapping.rb +366 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations.rb +127 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +127 -0
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +360 -340
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +360 -340
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +677 -539
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +439 -410
- data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +426 -383
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +143 -150
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +179 -158
- data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +379 -348
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +319 -320
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +319 -320
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +319 -323
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +319 -320
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +319 -320
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +319 -320
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +319 -320
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +319 -320
- data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +386 -397
- data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +512 -492
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +114 -104
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +180 -167
- data/lib/twilio-ruby/rest/api/v2010/account.rb +1002 -934
- data/lib/twilio-ruby/rest/api/v2010.rb +127 -144
- data/lib/twilio-ruby/rest/api.rb +62 -60
- data/lib/twilio-ruby/rest/api_base.rb +38 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_knowledge.rb +371 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_tool.rb +371 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +311 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +206 -0
- data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +687 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +232 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +213 -0
- data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +629 -0
- data/lib/twilio-ruby/rest/assistants/v1/policy.rb +267 -0
- data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +267 -0
- data/lib/twilio-ruby/rest/assistants/v1/session.rb +335 -0
- data/lib/twilio-ruby/rest/assistants/v1/tool.rb +605 -0
- data/lib/twilio-ruby/rest/assistants/v1.rb +100 -0
- data/lib/twilio-ruby/rest/assistants.rb +6 -0
- data/lib/twilio-ruby/rest/assistants_base.rb +38 -0
- data/lib/twilio-ruby/rest/bulkexports/v1/export/day.rb +316 -0
- data/lib/twilio-ruby/rest/bulkexports/v1/export/export_custom_job.rb +315 -0
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +289 -0
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +261 -0
- data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +266 -0
- data/lib/twilio-ruby/rest/bulkexports/v1.rb +64 -0
- data/lib/twilio-ruby/rest/bulkexports.rb +25 -0
- data/lib/twilio-ruby/rest/bulkexports_base.rb +38 -0
- data/lib/twilio-ruby/rest/chat/v1/credential.rb +446 -393
- data/lib/twilio-ruby/rest/chat/v1/service/channel/invite.rb +395 -386
- data/lib/twilio-ruby/rest/chat/v1/service/channel/member.rb +449 -444
- data/lib/twilio-ruby/rest/chat/v1/service/channel/message.rb +465 -430
- data/lib/twilio-ruby/rest/chat/v1/service/channel.rb +561 -508
- data/lib/twilio-ruby/rest/chat/v1/service/role.rb +423 -368
- data/lib/twilio-ruby/rest/chat/v1/service/user/user_channel.rb +249 -238
- data/lib/twilio-ruby/rest/chat/v1/service/user.rb +492 -448
- data/lib/twilio-ruby/rest/chat/v1/service.rb +888 -914
- data/lib/twilio-ruby/rest/chat/v1.rb +58 -52
- data/lib/twilio-ruby/rest/chat/v2/credential.rb +446 -409
- data/lib/twilio-ruby/rest/chat/v2/service/binding.rb +386 -361
- data/lib/twilio-ruby/rest/chat/v2/service/channel/invite.rb +395 -389
- data/lib/twilio-ruby/rest/chat/v2/service/channel/member.rb +510 -492
- data/lib/twilio-ruby/rest/chat/v2/service/channel/message.rb +537 -514
- data/lib/twilio-ruby/rest/chat/v2/service/channel/webhook.rb +467 -422
- data/lib/twilio-ruby/rest/chat/v2/service/channel.rb +630 -576
- data/lib/twilio-ruby/rest/chat/v2/service/role.rb +423 -365
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_binding.rb +379 -377
- data/lib/twilio-ruby/rest/chat/v2/service/user/user_channel.rb +428 -240
- data/lib/twilio-ruby/rest/chat/v2/service/user.rb +534 -477
- data/lib/twilio-ruby/rest/chat/v2/service.rb +791 -740
- data/lib/twilio-ruby/rest/chat/v2.rb +58 -52
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +303 -0
- data/lib/twilio-ruby/rest/chat/v3.rb +71 -0
- data/lib/twilio-ruby/rest/chat.rb +12 -40
- data/lib/twilio-ruby/rest/chat_base.rb +48 -0
- data/lib/twilio-ruby/rest/client.rb +344 -400
- data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +190 -0
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +213 -0
- data/lib/twilio-ruby/rest/content/v1/content.rb +974 -0
- data/lib/twilio-ruby/rest/content/v1/content_and_approvals.rb +255 -0
- data/lib/twilio-ruby/rest/content/v1/legacy_content.rb +269 -0
- data/lib/twilio-ruby/rest/content/v1.rb +61 -0
- data/lib/twilio-ruby/rest/content/v2/content.rb +319 -0
- data/lib/twilio-ruby/rest/content/v2/content_and_approvals.rb +312 -0
- data/lib/twilio-ruby/rest/content/v2.rb +46 -0
- data/lib/twilio-ruby/rest/content.rb +15 -0
- data/lib/twilio-ruby/rest/content_base.rb +43 -0
- data/lib/twilio-ruby/rest/conversations/v1/address_configuration.rb +508 -0
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +294 -0
- data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +300 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message/delivery_receipt.rb +355 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/message.rb +567 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/participant.rb +528 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation/webhook.rb +458 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation.rb +653 -0
- data/lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb +263 -0
- data/lib/twilio-ruby/rest/conversations/v1/credential.rb +461 -0
- data/lib/twilio-ruby/rest/conversations/v1/participant_conversation.rb +316 -0
- data/lib/twilio-ruby/rest/conversations/v1/role.rb +420 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/binding.rb +385 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +347 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +293 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +327 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message/delivery_receipt.rb +366 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/message.rb +580 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/participant.rb +541 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation/webhook.rb +471 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation.rb +662 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb +269 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/participant_conversation.rb +321 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/role.rb +429 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user/user_conversation.rb +477 -0
- data/lib/twilio-ruby/rest/conversations/v1/service/user.rb +514 -0
- data/lib/twilio-ruby/rest/conversations/v1/service.rb +525 -0
- data/lib/twilio-ruby/rest/conversations/v1/user/user_conversation.rb +472 -0
- data/lib/twilio-ruby/rest/conversations/v1/user.rb +505 -0
- data/lib/twilio-ruby/rest/conversations/v1.rb +142 -0
- data/lib/twilio-ruby/rest/conversations.rb +79 -0
- data/lib/twilio-ruby/rest/conversations_base.rb +38 -0
- data/lib/twilio-ruby/rest/events/v1/event_type.rb +336 -0
- data/lib/twilio-ruby/rest/events/v1/schema/schema_version.rb +309 -0
- data/lib/twilio-ruby/rest/events/v1/schema.rb +242 -0
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +136 -0
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +143 -0
- data/lib/twilio-ruby/rest/events/v1/sink.rb +470 -0
- data/lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb +398 -0
- data/lib/twilio-ruby/rest/events/v1/subscription.rb +452 -0
- data/lib/twilio-ruby/rest/events/v1.rb +94 -0
- data/lib/twilio-ruby/rest/events.rb +43 -0
- data/lib/twilio-ruby/rest/events_base.rb +38 -0
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +460 -0
- data/lib/twilio-ruby/rest/flex_api/v1/channel.rb +395 -0
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +563 -0
- data/lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb +599 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +336 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +232 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +462 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +373 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +458 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +365 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +221 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +161 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +147 -0
- data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +200 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_invite.rb +261 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_channel_participant.rb +365 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb +352 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel.rb +449 -0
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +329 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +408 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +461 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +251 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +400 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +397 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +237 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +343 -0
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +260 -0
- data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +192 -0
- data/lib/twilio-ruby/rest/flex_api/v1/web_channel.rb +414 -0
- data/lib/twilio-ruby/rest/flex_api/v1.rb +320 -0
- data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +339 -0
- data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +155 -0
- data/lib/twilio-ruby/rest/flex_api/v2.rb +77 -0
- data/lib/twilio-ruby/rest/flex_api.rb +73 -0
- data/lib/twilio-ruby/rest/flex_api_base.rb +43 -0
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +286 -0
- data/lib/twilio-ruby/rest/frontline_api/v1.rb +49 -0
- data/lib/twilio-ruby/rest/frontline_api.rb +15 -0
- data/lib/twilio-ruby/rest/frontline_api_base.rb +38 -0
- data/lib/twilio-ruby/rest/iam/v1/api_key.rb +280 -0
- data/lib/twilio-ruby/rest/iam/v1/get_api_keys.rb +226 -0
- data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +181 -0
- data/lib/twilio-ruby/rest/iam/v1/token.rb +186 -0
- data/lib/twilio-ruby/rest/iam/v1.rb +67 -0
- data/lib/twilio-ruby/rest/iam.rb +6 -0
- data/lib/twilio-ruby/rest/iam_base.rb +38 -0
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +330 -0
- data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +357 -0
- data/lib/twilio-ruby/rest/insights/v1/call/event.rb +280 -0
- data/lib/twilio-ruby/rest/insights/v1/call/metric.rb +272 -0
- data/lib/twilio-ruby/rest/insights/v1/call.rb +275 -0
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +545 -0
- data/lib/twilio-ruby/rest/insights/v1/conference/conference_participant.rb +498 -0
- data/lib/twilio-ruby/rest/insights/v1/conference.rb +515 -0
- data/lib/twilio-ruby/rest/insights/v1/room/participant.rb +393 -0
- data/lib/twilio-ruby/rest/insights/v1/room.rb +508 -0
- data/lib/twilio-ruby/rest/insights/v1/setting.rb +267 -0
- data/lib/twilio-ruby/rest/insights/v1.rb +91 -0
- data/lib/twilio-ruby/rest/insights.rb +46 -0
- data/lib/twilio-ruby/rest/insights_base.rb +38 -0
- data/lib/twilio-ruby/rest/intelligence/v2/custom_operator.rb +464 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator.rb +363 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +223 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +201 -0
- data/lib/twilio-ruby/rest/intelligence/v2/operator_type.rb +365 -0
- data/lib/twilio-ruby/rest/intelligence/v2/prebuilt_operator.rb +363 -0
- data/lib/twilio-ruby/rest/intelligence/v2/service.rb +534 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +231 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/operator_result.rb +403 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/sentence.rb +265 -0
- data/lib/twilio-ruby/rest/intelligence/v2/transcript.rb +538 -0
- data/lib/twilio-ruby/rest/intelligence/v2.rb +176 -0
- data/lib/twilio-ruby/rest/intelligence.rb +6 -0
- data/lib/twilio-ruby/rest/intelligence_base.rb +38 -0
- data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +446 -393
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/invite.rb +395 -386
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +449 -444
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +465 -430
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +561 -508
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +423 -368
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user/user_channel.rb +249 -238
- data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +492 -448
- data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +888 -914
- data/lib/twilio-ruby/rest/ip_messaging/v1.rb +58 -52
- data/lib/twilio-ruby/rest/ip_messaging/v2/credential.rb +446 -409
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/binding.rb +386 -361
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/invite.rb +395 -389
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/member.rb +510 -492
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/message.rb +537 -514
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel/webhook.rb +467 -422
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/channel.rb +630 -576
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/role.rb +423 -365
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb +379 -377
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb +420 -240
- data/lib/twilio-ruby/rest/ip_messaging/v2/service/user.rb +534 -477
- data/lib/twilio-ruby/rest/ip_messaging/v2/service.rb +791 -740
- data/lib/twilio-ruby/rest/ip_messaging/v2.rb +58 -52
- data/lib/twilio-ruby/rest/ip_messaging.rb +9 -49
- data/lib/twilio-ruby/rest/ip_messaging_base.rb +43 -0
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/chunk.rb +232 -0
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +213 -0
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge.rb +617 -0
- data/lib/twilio-ruby/rest/knowledge/v1.rb +49 -0
- data/lib/twilio-ruby/rest/knowledge.rb +6 -0
- data/lib/twilio-ruby/rest/knowledge_base.rb +38 -0
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +249 -231
- data/lib/twilio-ruby/rest/lookups/v1.rb +43 -37
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +394 -0
- data/lib/twilio-ruby/rest/lookups/v2.rb +49 -0
- data/lib/twilio-ruby/rest/lookups.rb +5 -37
- data/lib/twilio-ruby/rest/lookups_base.rb +43 -0
- data/lib/twilio-ruby/rest/marketplace/v1/available_add_on/available_add_on_extension.rb +316 -0
- data/lib/twilio-ruby/rest/marketplace/v1/available_add_on.rb +343 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_extension.rb +363 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +162 -0
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on.rb +482 -0
- data/lib/twilio-ruby/rest/marketplace/v1/module_data.rb +221 -0
- data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +325 -0
- data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +146 -0
- data/lib/twilio-ruby/rest/marketplace/v1.rb +91 -0
- data/lib/twilio-ruby/rest/marketplace.rb +6 -0
- data/lib/twilio-ruby/rest/marketplace_base.rb +38 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +143 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_vetting.rb +379 -0
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +524 -0
- data/lib/twilio-ruby/rest/messaging/v1/deactivations.rb +196 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +295 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +300 -0
- data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +243 -0
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +171 -0
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +223 -0
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +201 -0
- data/lib/twilio-ruby/rest/messaging/v1/request_managed_cert.rb +243 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/alpha_sender.rb +370 -338
- data/lib/twilio-ruby/rest/messaging/v1/service/channel_sender.rb +383 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/destination_alpha_sender.rb +386 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/phone_number.rb +377 -342
- data/lib/twilio-ruby/rest/messaging/v1/service/short_code.rb +377 -337
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +637 -0
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +142 -0
- data/lib/twilio-ruby/rest/messaging/v1/service.rb +819 -620
- data/lib/twilio-ruby/rest/messaging/v1/tollfree_verification.rb +820 -0
- data/lib/twilio-ruby/rest/messaging/v1/usecase.rb +130 -0
- data/lib/twilio-ruby/rest/messaging/v1.rb +203 -37
- data/lib/twilio-ruby/rest/messaging/v2/channels_sender.rb +492 -0
- data/lib/twilio-ruby/rest/messaging/v2.rb +49 -0
- data/lib/twilio-ruby/rest/messaging.rb +53 -25
- data/lib/twilio-ruby/rest/messaging_base.rb +43 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_config.rb +382 -0
- data/lib/twilio-ruby/rest/microvisor/v1/account_secret.rb +375 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb +213 -0
- data/lib/twilio-ruby/rest/microvisor/v1/app.rb +361 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb +398 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb +391 -0
- data/lib/twilio-ruby/rest/microvisor/v1/device.rb +441 -0
- data/lib/twilio-ruby/rest/microvisor/v1.rb +94 -0
- data/lib/twilio-ruby/rest/microvisor.rb +24 -0
- data/lib/twilio-ruby/rest/microvisor_base.rb +38 -0
- data/lib/twilio-ruby/rest/monitor/v1/alert.rb +409 -409
- data/lib/twilio-ruby/rest/monitor/v1/event.rb +392 -365
- data/lib/twilio-ruby/rest/monitor/v1.rb +58 -52
- data/lib/twilio-ruby/rest/monitor.rb +7 -36
- data/lib/twilio-ruby/rest/monitor_base.rb +38 -0
- data/lib/twilio-ruby/rest/notify/v1/credential.rb +446 -408
- data/lib/twilio-ruby/rest/notify/v1/service/binding.rb +456 -447
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +321 -361
- data/lib/twilio-ruby/rest/notify/v1/service.rb +651 -635
- data/lib/twilio-ruby/rest/notify/v1.rb +58 -52
- data/lib/twilio-ruby/rest/notify.rb +7 -36
- data/lib/twilio-ruby/rest/notify_base.rb +38 -0
- data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +249 -0
- data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +132 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +304 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +328 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +260 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +153 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +170 -0
- data/lib/twilio-ruby/rest/numbers/v1/signing_request_configuration.rb +280 -0
- data/lib/twilio-ruby/rest/numbers/v1/webhook.rb +165 -0
- data/lib/twilio-ruby/rest/numbers/v1.rb +155 -0
- data/lib/twilio-ruby/rest/numbers/v2/authorization_document/dependent_hosted_number_order.rb +347 -0
- data/lib/twilio-ruby/rest/numbers/v2/authorization_document.rb +421 -0
- data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +274 -0
- data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +281 -0
- data/lib/twilio-ruby/rest/numbers/v2/hosted_number_order.rb +613 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/bundle_copy.rb +295 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/evaluation.rb +351 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/item_assignment.rb +364 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +208 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle.rb +637 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user.rb +424 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/end_user_type.rb +307 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb +356 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document.rb +452 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/supporting_document_type.rb +307 -0
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +186 -0
- data/lib/twilio-ruby/rest/numbers/v2.rb +100 -0
- data/lib/twilio-ruby/rest/numbers.rb +12 -0
- data/lib/twilio-ruby/rest/numbers_base.rb +43 -0
- data/lib/twilio-ruby/rest/oauth/v1/authorize.rb +148 -0
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +186 -0
- data/lib/twilio-ruby/rest/oauth/v1.rb +46 -0
- data/lib/twilio-ruby/rest/oauth.rb +6 -0
- data/lib/twilio-ruby/rest/oauth_base.rb +38 -0
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.rb +375 -396
- data/lib/twilio-ruby/rest/preview/hosted_numbers/authorization_document.rb +467 -452
- data/lib/twilio-ruby/rest/preview/hosted_numbers/hosted_number_order.rb +635 -636
- data/lib/twilio-ruby/rest/preview/hosted_numbers.rb +58 -54
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb +310 -297
- data/lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb +334 -313
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb +357 -333
- data/lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb +454 -412
- data/lib/twilio-ruby/rest/preview/marketplace.rb +58 -54
- data/lib/twilio-ruby/rest/preview/wireless/command.rb +402 -371
- data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +473 -409
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +241 -206
- data/lib/twilio-ruby/rest/preview/wireless/sim.rb +589 -529
- data/lib/twilio-ruby/rest/preview/wireless.rb +73 -67
- data/lib/twilio-ruby/rest/preview.rb +15 -143
- data/lib/twilio-ruby/rest/preview_base.rb +48 -0
- data/lib/twilio-ruby/rest/preview_iam/v1/authorize.rb +148 -0
- data/lib/twilio-ruby/rest/preview_iam/v1/token.rb +186 -0
- data/lib/twilio-ruby/rest/preview_iam/v1.rb +46 -0
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization/account.rb +309 -0
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb +375 -0
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization/user.rb +530 -0
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization.rb +277 -0
- data/lib/twilio-ruby/rest/preview_iam/versionless.rb +49 -0
- data/lib/twilio-ruby/rest/preview_iam.rb +9 -0
- data/lib/twilio-ruby/rest/preview_iam_base.rb +38 -0
- data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +308 -273
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +109 -118
- data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +301 -266
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +109 -118
- data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +308 -273
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +228 -197
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +123 -134
- data/lib/twilio-ruby/rest/pricing/v1.rb +46 -43
- data/lib/twilio-ruby/rest/pricing/v2/country.rb +309 -0
- data/lib/twilio-ruby/rest/pricing/v2/number.rb +247 -0
- data/lib/twilio-ruby/rest/pricing/v2/voice/country.rb +314 -0
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +252 -0
- data/lib/twilio-ruby/rest/pricing/v2/voice.rb +130 -0
- data/lib/twilio-ruby/rest/pricing/v2.rb +70 -0
- data/lib/twilio-ruby/rest/pricing.rb +24 -33
- data/lib/twilio-ruby/rest/pricing_base.rb +43 -0
- data/lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb +444 -357
- data/lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb +421 -441
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb +445 -449
- data/lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb +440 -449
- data/lib/twilio-ruby/rest/proxy/v1/service/session.rb +547 -528
- data/lib/twilio-ruby/rest/proxy/v1/service/short_code.rb +424 -339
- data/lib/twilio-ruby/rest/proxy/v1/service.rb +584 -535
- data/lib/twilio-ruby/rest/proxy/v1.rb +43 -37
- data/lib/twilio-ruby/rest/proxy.rb +4 -35
- data/lib/twilio-ruby/rest/proxy_base.rb +38 -0
- data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +281 -0
- data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +281 -0
- data/lib/twilio-ruby/rest/routes/v2/trunk.rb +281 -0
- data/lib/twilio-ruby/rest/routes/v2.rb +79 -0
- data/lib/twilio-ruby/rest/routes.rb +32 -0
- data/lib/twilio-ruby/rest/routes_base.rb +38 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb +334 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/asset.rb +443 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +224 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/build.rb +432 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/deployment.rb +364 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb +380 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment/variable.rb +438 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/environment.rb +481 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +235 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb +361 -0
- data/lib/twilio-ruby/rest/serverless/v1/service/function.rb +443 -0
- data/lib/twilio-ruby/rest/serverless/v1/service.rb +557 -0
- data/lib/twilio-ruby/rest/serverless/v1.rb +49 -0
- data/lib/twilio-ruby/rest/serverless.rb +15 -0
- data/lib/twilio-ruby/rest/serverless_base.rb +38 -0
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb +214 -207
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +229 -226
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step.rb +379 -365
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement.rb +443 -400
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +214 -207
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +229 -226
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step.rb +379 -370
- data/lib/twilio-ruby/rest/studio/v1/flow/execution.rb +495 -404
- data/lib/twilio-ruby/rest/studio/v1/flow.rb +395 -365
- data/lib/twilio-ruby/rest/studio/v1.rb +43 -37
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +224 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +235 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step.rb +389 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/execution.rb +494 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_revision.rb +358 -0
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb +245 -0
- data/lib/twilio-ruby/rest/studio/v2/flow.rb +555 -0
- data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +146 -0
- data/lib/twilio-ruby/rest/studio/v2.rb +55 -0
- data/lib/twilio-ruby/rest/studio.rb +11 -35
- data/lib/twilio-ruby/rest/studio_base.rb +43 -0
- data/lib/twilio-ruby/rest/supersim/v1/esim_profile.rb +417 -0
- data/lib/twilio-ruby/rest/supersim/v1/fleet.rb +502 -0
- data/lib/twilio-ruby/rest/supersim/v1/ip_command.rb +422 -0
- data/lib/twilio-ruby/rest/supersim/v1/network.rb +320 -0
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile/network_access_profile_network.rb +362 -0
- data/lib/twilio-ruby/rest/supersim/v1/network_access_profile.rb +410 -0
- data/lib/twilio-ruby/rest/supersim/v1/settings_update.rb +260 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim/billing_period.rb +253 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim/sim_ip_address.rb +211 -0
- data/lib/twilio-ruby/rest/supersim/v1/sim.rb +490 -0
- data/lib/twilio-ruby/rest/supersim/v1/sms_command.rb +382 -0
- data/lib/twilio-ruby/rest/supersim/v1/usage_record.rb +317 -0
- data/lib/twilio-ruby/rest/supersim/v1.rb +151 -0
- data/lib/twilio-ruby/rest/supersim.rb +88 -0
- data/lib/twilio-ruby/rest/supersim_base.rb +38 -0
- data/lib/twilio-ruby/rest/sync/v1/service/document/document_permission.rb +397 -381
- data/lib/twilio-ruby/rest/sync/v1/service/document.rb +482 -428
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_item.rb +491 -443
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list/sync_list_permission.rb +397 -381
- data/lib/twilio-ruby/rest/sync/v1/service/sync_list.rb +497 -442
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_item.rb +494 -444
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map/sync_map_permission.rb +397 -381
- data/lib/twilio-ruby/rest/sync/v1/service/sync_map.rb +497 -442
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +147 -142
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream.rb +446 -411
- data/lib/twilio-ruby/rest/sync/v1/service.rb +602 -514
- data/lib/twilio-ruby/rest/sync/v1.rb +43 -37
- data/lib/twilio-ruby/rest/sync.rb +4 -35
- data/lib/twilio-ruby/rest/sync_base.rb +38 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +432 -390
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +453 -419
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +721 -577
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +677 -621
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_channel.rb +436 -295
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +168 -0
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +367 -356
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +270 -229
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +238 -234
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +244 -268
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +601 -570
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/reservation.rb +703 -575
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_channel.rb +406 -392
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +243 -231
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +289 -262
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +223 -186
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +259 -232
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +648 -606
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +367 -363
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +253 -226
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +238 -234
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +550 -510
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +361 -350
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +242 -200
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +249 -230
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +747 -719
- data/lib/twilio-ruby/rest/taskrouter/v1.rb +43 -37
- data/lib/twilio-ruby/rest/taskrouter.rb +4 -35
- data/lib/twilio-ruby/rest/taskrouter_base.rb +38 -0
- data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +363 -322
- data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +363 -323
- data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +467 -429
- data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +496 -449
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +244 -0
- data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +650 -600
- data/lib/twilio-ruby/rest/trunking/v1.rb +43 -37
- data/lib/twilio-ruby/rest/trunking.rb +4 -36
- data/lib/twilio-ruby/rest/trunking_base.rb +38 -0
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +257 -0
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +365 -0
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +224 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_channel_endpoint_assignment.rb +384 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_entity_assignments.rb +368 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles/customer_profiles_evaluations.rb +356 -0
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles.rb +568 -0
- data/lib/twilio-ruby/rest/trusthub/v1/end_user.rb +419 -0
- data/lib/twilio-ruby/rest/trusthub/v1/end_user_type.rb +302 -0
- data/lib/twilio-ruby/rest/trusthub/v1/policies.rb +295 -0
- data/lib/twilio-ruby/rest/trusthub/v1/supporting_document.rb +433 -0
- data/lib/twilio-ruby/rest/trusthub/v1/supporting_document_type.rb +302 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_channel_endpoint_assignment.rb +384 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_entity_assignments.rb +368 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products/trust_products_evaluations.rb +356 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products.rb +568 -0
- data/lib/twilio-ruby/rest/trusthub/v1.rb +175 -0
- data/lib/twilio-ruby/rest/trusthub.rb +74 -0
- data/lib/twilio-ruby/rest/trusthub_base.rb +38 -0
- data/lib/twilio-ruby/rest/verify/v2/form.rb +208 -0
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +246 -0
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +292 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +205 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb +530 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb +478 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +276 -0
- data/lib/twilio-ruby/rest/verify/v2/service/entity.rb +449 -0
- data/lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb +412 -0
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb +438 -0
- data/lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb +453 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +409 -0
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +235 -0
- data/lib/twilio-ruby/rest/verify/v2/service/webhook.rb +480 -0
- data/lib/twilio-ruby/rest/verify/v2/service.rb +843 -0
- data/lib/twilio-ruby/rest/verify/v2/template.rb +233 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempt.rb +392 -0
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +254 -0
- data/lib/twilio-ruby/rest/verify/v2.rb +106 -0
- data/lib/twilio-ruby/rest/verify.rb +58 -0
- data/lib/twilio-ruby/rest/verify_base.rb +38 -0
- data/lib/twilio-ruby/rest/video/v1/composition.rb +498 -491
- data/lib/twilio-ruby/rest/video/v1/composition_hook.rb +561 -0
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +295 -271
- data/lib/twilio-ruby/rest/video/v1/recording.rb +441 -387
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +295 -271
- data/lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb +266 -0
- data/lib/twilio-ruby/rest/video/v1/room/participant/published_track.rb +341 -0
- data/lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb +194 -0
- data/lib/twilio-ruby/rest/video/v1/room/participant/subscribed_track.rb +348 -0
- data/lib/twilio-ruby/rest/video/v1/room/participant.rb +514 -0
- data/lib/twilio-ruby/rest/video/v1/room/recording_rules.rb +183 -0
- data/lib/twilio-ruby/rest/video/v1/room/room_recording.rb +437 -0
- data/lib/twilio-ruby/rest/video/v1/room.rb +635 -512
- data/lib/twilio-ruby/rest/video/v1.rb +100 -83
- data/lib/twilio-ruby/rest/video.rb +22 -40
- data/lib/twilio-ruby/rest/video_base.rb +38 -0
- data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +171 -0
- data/lib/twilio-ruby/rest/voice/v1/byoc_trunk.rb +537 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy/connection_policy_target.rb +473 -0
- data/lib/twilio-ruby/rest/voice/v1/connection_policy.rb +427 -0
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +149 -0
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.rb +206 -0
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/country.rb +390 -0
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +235 -0
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +131 -0
- data/lib/twilio-ruby/rest/voice/v1/ip_record.rb +413 -0
- data/lib/twilio-ruby/rest/voice/v1/source_ip_mapping.rb +396 -0
- data/lib/twilio-ruby/rest/voice/v1.rb +137 -0
- data/lib/twilio-ruby/rest/voice.rb +61 -0
- data/lib/twilio-ruby/rest/voice_base.rb +38 -0
- data/lib/twilio-ruby/rest/wireless/v1/command.rb +429 -361
- data/lib/twilio-ruby/rest/wireless/v1/rate_plan.rb +493 -439
- data/lib/twilio-ruby/rest/wireless/v1/sim/data_session.rb +303 -288
- data/lib/twilio-ruby/rest/wireless/v1/sim/usage_record.rb +244 -240
- data/lib/twilio-ruby/rest/wireless/v1/sim.rb +655 -611
- data/lib/twilio-ruby/rest/wireless/v1/usage_record.rb +238 -0
- data/lib/twilio-ruby/rest/wireless/v1.rb +79 -67
- data/lib/twilio-ruby/rest/wireless.rb +11 -34
- data/lib/twilio-ruby/rest/wireless_base.rb +38 -0
- data/lib/twilio-ruby/rest.rb +14 -0
- data/lib/twilio-ruby/security/request_validator.rb +102 -8
- data/lib/twilio-ruby/twiml/fax_response.rb +6 -3
- data/lib/twilio-ruby/twiml/messaging_response.rb +2 -2
- data/lib/twilio-ruby/twiml/twiml.rb +12 -1
- data/lib/twilio-ruby/twiml/voice_response.rb +1705 -81
- data/lib/twilio-ruby/util/configuration.rb +22 -5
- data/lib/twilio-ruby/version.rb +1 -1
- data/lib/twilio-ruby.rb +9 -25
- data/sonar-project.properties +13 -0
- data/twilio-ruby.gemspec +15 -10
- metadata +542 -646
- data/.travis.yml +0 -31
- data/conf/cacert.pem +0 -3376
- data/lib/twilio-ruby/framework/twilio_response.rb +0 -19
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +0 -509
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/machine_to_machine.rb +0 -398
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +0 -506
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/national.rb +0 -398
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/shared_cost.rb +0 -398
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +0 -506
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/voip.rb +0 -398
- data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +0 -459
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +0 -296
- data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +0 -314
- data/lib/twilio-ruby/rest/fax/v1/fax/fax_media.rb +0 -315
- data/lib/twilio-ruby/rest/fax/v1/fax.rb +0 -530
- data/lib/twilio-ruby/rest/fax/v1.rb +0 -43
- data/lib/twilio-ruby/rest/fax.rb +0 -46
- data/lib/twilio-ruby/rest/notify/v1/service/segment.rb +0 -225
- data/lib/twilio-ruby/rest/notify/v1/service/user/segment_memberships.rb +0 -262
- data/lib/twilio-ruby/rest/notify/v1/service/user/user_binding.rb +0 -438
- data/lib/twilio-ruby/rest/notify/v1/service/user.rb +0 -438
- data/lib/twilio-ruby/rest/preview/acc_security/service/verification.rb +0 -185
- data/lib/twilio-ruby/rest/preview/acc_security/service/verification_check.rb +0 -182
- data/lib/twilio-ruby/rest/preview/acc_security/service.rb +0 -388
- data/lib/twilio-ruby/rest/preview/acc_security.rb +0 -43
- data/lib/twilio-ruby/rest/preview/bulk_exports/export/day.rb +0 -211
- data/lib/twilio-ruby/rest/preview/bulk_exports/export.rb +0 -203
- data/lib/twilio-ruby/rest/preview/bulk_exports/export_configuration.rb +0 -227
- data/lib/twilio-ruby/rest/preview/bulk_exports.rb +0 -58
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/certificate.rb +0 -392
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/deployment.rb +0 -375
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/device.rb +0 -435
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet/key.rb +0 -386
- data/lib/twilio-ruby/rest/preview/deployed_devices/fleet.rb +0 -479
- data/lib/twilio-ruby/rest/preview/deployed_devices.rb +0 -44
- data/lib/twilio-ruby/rest/preview/proxy/service/phone_number.rb +0 -347
- data/lib/twilio-ruby/rest/preview/proxy/service/session/interaction.rb +0 -437
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant/message_interaction.rb +0 -455
- data/lib/twilio-ruby/rest/preview/proxy/service/session/participant.rb +0 -514
- data/lib/twilio-ruby/rest/preview/proxy/service/session.rb +0 -497
- data/lib/twilio-ruby/rest/preview/proxy/service/short_code.rb +0 -342
- data/lib/twilio-ruby/rest/preview/proxy/service.rb +0 -464
- data/lib/twilio-ruby/rest/preview/proxy.rb +0 -43
- data/lib/twilio-ruby/rest/preview/studio/flow/engagement/step.rb +0 -350
- data/lib/twilio-ruby/rest/preview/studio/flow/engagement.rb +0 -372
- data/lib/twilio-ruby/rest/preview/studio/flow.rb +0 -355
- data/lib/twilio-ruby/rest/preview/studio.rb +0 -43
- data/lib/twilio-ruby/rest/preview/sync/service/document/document_permission.rb +0 -390
- data/lib/twilio-ruby/rest/preview/sync/service/document.rb +0 -413
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_item.rb +0 -421
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list/sync_list_permission.rb +0 -390
- data/lib/twilio-ruby/rest/preview/sync/service/sync_list.rb +0 -411
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_item.rb +0 -418
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map/sync_map_permission.rb +0 -390
- data/lib/twilio-ruby/rest/preview/sync/service/sync_map.rb +0 -411
- data/lib/twilio-ruby/rest/preview/sync/service.rb +0 -472
- data/lib/twilio-ruby/rest/preview/sync.rb +0 -43
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type/field_value.rb +0 -392
- data/lib/twilio-ruby/rest/preview/understand/assistant/field_type.rb +0 -417
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent/field.rb +0 -379
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent/sample.rb +0 -438
- data/lib/twilio-ruby/rest/preview/understand/assistant/intent.rb +0 -447
- data/lib/twilio-ruby/rest/preview/understand/assistant/model_build.rb +0 -390
- data/lib/twilio-ruby/rest/preview/understand/assistant/query.rb +0 -443
- data/lib/twilio-ruby/rest/preview/understand/assistant.rb +0 -562
- data/lib/twilio-ruby/rest/preview/understand.rb +0 -43
- data/lib/twilio-ruby/rest/video/v1/room/recording.rb +0 -388
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_published_track.rb +0 -333
- data/lib/twilio-ruby/rest/video/v1/room/room_participant/room_participant_subscribed_track.rb +0 -313
- data/lib/twilio-ruby/rest/video/v1/room/room_participant.rb +0 -456
- data/spec/framework/request_spec.rb +0 -36
- data/spec/framework/serialize_spec.rb +0 -80
- data/spec/holodeck/holodeck.rb +0 -61
- data/spec/holodeck/hologram.rb +0 -4
- data/spec/http/http_client_spec.rb +0 -122
- data/spec/integration/accounts/v1/credential/aws_spec.rb +0 -226
- data/spec/integration/accounts/v1/credential/public_key_spec.rb +0 -226
- data/spec/integration/accounts/v1/credential_spec.rb +0 -12
- data/spec/integration/api/v2010/account/address/dependent_phone_number_spec.rb +0 -107
- data/spec/integration/api/v2010/account/address_spec.rb +0 -269
- data/spec/integration/api/v2010/account/application_spec.rb +0 -280
- data/spec/integration/api/v2010/account/authorized_connect_app_spec.rb +0 -139
- data/spec/integration/api/v2010/account/available_phone_number/local_spec.rb +0 -103
- data/spec/integration/api/v2010/account/available_phone_number/machine_to_machine_spec.rb +0 -103
- data/spec/integration/api/v2010/account/available_phone_number/mobile_spec.rb +0 -102
- data/spec/integration/api/v2010/account/available_phone_number/national_spec.rb +0 -103
- data/spec/integration/api/v2010/account/available_phone_number/shared_cost_spec.rb +0 -103
- data/spec/integration/api/v2010/account/available_phone_number/toll_free_spec.rb +0 -102
- data/spec/integration/api/v2010/account/available_phone_number/voip_spec.rb +0 -103
- data/spec/integration/api/v2010/account/available_phone_number_spec.rb +0 -130
- data/spec/integration/api/v2010/account/call/feedback_spec.rb +0 -139
- data/spec/integration/api/v2010/account/call/feedback_summary_spec.rb +0 -151
- data/spec/integration/api/v2010/account/call/notification_spec.rb +0 -181
- data/spec/integration/api/v2010/account/call/recording_spec.rb +0 -291
- data/spec/integration/api/v2010/account/call_spec.rb +0 -314
- data/spec/integration/api/v2010/account/conference/participant_spec.rb +0 -282
- data/spec/integration/api/v2010/account/conference/recording_spec.rb +0 -240
- data/spec/integration/api/v2010/account/conference_spec.rb +0 -179
- data/spec/integration/api/v2010/account/connect_app_spec.rb +0 -179
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension_spec.rb +0 -137
- data/spec/integration/api/v2010/account/incoming_phone_number/assigned_add_on_spec.rb +0 -223
- data/spec/integration/api/v2010/account/incoming_phone_number/local_spec.rb +0 -185
- data/spec/integration/api/v2010/account/incoming_phone_number/mobile_spec.rb +0 -185
- data/spec/integration/api/v2010/account/incoming_phone_number/toll_free_spec.rb +0 -185
- data/spec/integration/api/v2010/account/incoming_phone_number_spec.rb +0 -341
- data/spec/integration/api/v2010/account/key_spec.rb +0 -180
- data/spec/integration/api/v2010/account/message/feedback_spec.rb +0 -50
- data/spec/integration/api/v2010/account/message/media_spec.rb +0 -164
- data/spec/integration/api/v2010/account/message_spec.rb +0 -290
- data/spec/integration/api/v2010/account/new_key_spec.rb +0 -47
- data/spec/integration/api/v2010/account/new_signing_key_spec.rb +0 -47
- data/spec/integration/api/v2010/account/notification_spec.rb +0 -174
- data/spec/integration/api/v2010/account/outgoing_caller_id_spec.rb +0 -195
- data/spec/integration/api/v2010/account/queue/member_spec.rb +0 -169
- data/spec/integration/api/v2010/account/queue_spec.rb +0 -242
- data/spec/integration/api/v2010/account/recording/add_on_result/payload_spec.rb +0 -177
- data/spec/integration/api/v2010/account/recording/add_on_result_spec.rb +0 -168
- data/spec/integration/api/v2010/account/recording/transcription_spec.rb +0 -176
- data/spec/integration/api/v2010/account/recording_spec.rb +0 -189
- data/spec/integration/api/v2010/account/short_code_spec.rb +0 -182
- data/spec/integration/api/v2010/account/signing_key_spec.rb +0 -180
- data/spec/integration/api/v2010/account/sip/credential_list/credential_spec.rb +0 -256
- data/spec/integration/api/v2010/account/sip/credential_list_spec.rb +0 -244
- data/spec/integration/api/v2010/account/sip/domain/credential_list_mapping_spec.rb +0 -210
- data/spec/integration/api/v2010/account/sip/domain/ip_access_control_list_mapping_spec.rb +0 -220
- data/spec/integration/api/v2010/account/sip/domain_spec.rb +0 -287
- data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +0 -258
- data/spec/integration/api/v2010/account/sip/ip_access_control_list_spec.rb +0 -254
- data/spec/integration/api/v2010/account/sip_spec.rb +0 -12
- data/spec/integration/api/v2010/account/token_spec.rb +0 -58
- data/spec/integration/api/v2010/account/transcription_spec.rb +0 -169
- data/spec/integration/api/v2010/account/usage/record/all_time_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/daily_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/last_month_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/monthly_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/this_month_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/today_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/yearly_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record/yesterday_spec.rb +0 -113
- data/spec/integration/api/v2010/account/usage/record_spec.rb +0 -110
- data/spec/integration/api/v2010/account/usage/trigger_spec.rb +0 -285
- data/spec/integration/api/v2010/account/usage_spec.rb +0 -12
- data/spec/integration/api/v2010/account/validation_request_spec.rb +0 -48
- data/spec/integration/api/v2010/account_spec.rb +0 -272
- data/spec/integration/chat/v1/credential_spec.rb +0 -223
- data/spec/integration/chat/v1/service/channel/invite_spec.rb +0 -210
- data/spec/integration/chat/v1/service/channel/member_spec.rb +0 -284
- data/spec/integration/chat/v1/service/channel/message_spec.rb +0 -294
- data/spec/integration/chat/v1/service/channel_spec.rb +0 -277
- data/spec/integration/chat/v1/service/role_spec.rb +0 -263
- data/spec/integration/chat/v1/service/user/user_channel_spec.rb +0 -94
- data/spec/integration/chat/v1/service/user_spec.rb +0 -266
- data/spec/integration/chat/v1/service_spec.rb +0 -299
- data/spec/integration/chat/v2/credential_spec.rb +0 -223
- data/spec/integration/chat/v2/service/binding_spec.rb +0 -177
- data/spec/integration/chat/v2/service/channel/invite_spec.rb +0 -210
- data/spec/integration/chat/v2/service/channel/member_spec.rb +0 -257
- data/spec/integration/chat/v2/service/channel/message_spec.rb +0 -405
- data/spec/integration/chat/v2/service/channel/webhook_spec.rb +0 -307
- data/spec/integration/chat/v2/service/channel_spec.rb +0 -281
- data/spec/integration/chat/v2/service/role_spec.rb +0 -263
- data/spec/integration/chat/v2/service/user/user_binding_spec.rb +0 -180
- data/spec/integration/chat/v2/service/user/user_channel_spec.rb +0 -94
- data/spec/integration/chat/v2/service/user_spec.rb +0 -270
- data/spec/integration/chat/v2/service_spec.rb +0 -354
- data/spec/integration/fax/v1/fax/fax_media_spec.rb +0 -128
- data/spec/integration/fax/v1/fax_spec.rb +0 -271
- data/spec/integration/ip_messaging/v1/credential_spec.rb +0 -223
- data/spec/integration/ip_messaging/v1/service/channel/invite_spec.rb +0 -210
- data/spec/integration/ip_messaging/v1/service/channel/member_spec.rb +0 -284
- data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +0 -294
- data/spec/integration/ip_messaging/v1/service/channel_spec.rb +0 -277
- data/spec/integration/ip_messaging/v1/service/role_spec.rb +0 -263
- data/spec/integration/ip_messaging/v1/service/user/user_channel_spec.rb +0 -94
- data/spec/integration/ip_messaging/v1/service/user_spec.rb +0 -266
- data/spec/integration/ip_messaging/v1/service_spec.rb +0 -299
- data/spec/integration/ip_messaging/v2/credential_spec.rb +0 -223
- data/spec/integration/ip_messaging/v2/service/binding_spec.rb +0 -177
- data/spec/integration/ip_messaging/v2/service/channel/invite_spec.rb +0 -210
- data/spec/integration/ip_messaging/v2/service/channel/member_spec.rb +0 -257
- data/spec/integration/ip_messaging/v2/service/channel/message_spec.rb +0 -405
- data/spec/integration/ip_messaging/v2/service/channel/webhook_spec.rb +0 -307
- data/spec/integration/ip_messaging/v2/service/channel_spec.rb +0 -281
- data/spec/integration/ip_messaging/v2/service/role_spec.rb +0 -263
- data/spec/integration/ip_messaging/v2/service/user/user_binding_spec.rb +0 -180
- data/spec/integration/ip_messaging/v2/service/user/user_channel_spec.rb +0 -94
- data/spec/integration/ip_messaging/v2/service/user_spec.rb +0 -270
- data/spec/integration/ip_messaging/v2/service_spec.rb +0 -354
- data/spec/integration/lookups/v1/phone_number_spec.rb +0 -71
- data/spec/integration/messaging/v1/service/alpha_sender_spec.rb +0 -170
- data/spec/integration/messaging/v1/service/phone_number_spec.rb +0 -201
- data/spec/integration/messaging/v1/service/short_code_spec.rb +0 -173
- data/spec/integration/messaging/v1/service_spec.rb +0 -263
- data/spec/integration/monitor/v1/alert_spec.rb +0 -163
- data/spec/integration/monitor/v1/event_spec.rb +0 -150
- data/spec/integration/notify/v1/credential_spec.rb +0 -223
- data/spec/integration/notify/v1/service/binding_spec.rb +0 -225
- data/spec/integration/notify/v1/service/notification_spec.rb +0 -99
- data/spec/integration/notify/v1/service/segment_spec.rb +0 -86
- data/spec/integration/notify/v1/service/user/segment_memberships_spec.rb +0 -118
- data/spec/integration/notify/v1/service/user/user_binding_spec.rb +0 -268
- data/spec/integration/notify/v1/service/user_spec.rb +0 -213
- data/spec/integration/notify/v1/service_spec.rb +0 -286
- data/spec/integration/preview/acc_security/service/verification_check_spec.rb +0 -52
- data/spec/integration/preview/acc_security/service/verification_spec.rb +0 -52
- data/spec/integration/preview/acc_security/service_spec.rb +0 -185
- data/spec/integration/preview/bulk_exports/export/day_spec.rb +0 -58
- data/spec/integration/preview/bulk_exports/export_configuration_spec.rb +0 -79
- data/spec/integration/preview/bulk_exports/export_spec.rb +0 -45
- data/spec/integration/preview/deployed_devices/fleet/certificate_spec.rb +0 -238
- data/spec/integration/preview/deployed_devices/fleet/deployment_spec.rb +0 -233
- data/spec/integration/preview/deployed_devices/fleet/device_spec.rb +0 -249
- data/spec/integration/preview/deployed_devices/fleet/key_spec.rb +0 -237
- data/spec/integration/preview/deployed_devices/fleet_spec.rb +0 -246
- data/spec/integration/preview/hosted_numbers/authorization_document/dependent_hosted_number_order_spec.rb +0 -111
- data/spec/integration/preview/hosted_numbers/authorization_document_spec.rb +0 -227
- data/spec/integration/preview/hosted_numbers/hosted_number_order_spec.rb +0 -393
- data/spec/integration/preview/marketplace/available_add_on/available_add_on_extension_spec.rb +0 -123
- data/spec/integration/preview/marketplace/available_add_on_spec.rb +0 -144
- data/spec/integration/preview/marketplace/installed_add_on/installed_add_on_extension_spec.rb +0 -164
- data/spec/integration/preview/marketplace/installed_add_on_spec.rb +0 -254
- data/spec/integration/preview/proxy/service/phone_number_spec.rb +0 -173
- data/spec/integration/preview/proxy/service/session/interaction_spec.rb +0 -106
- data/spec/integration/preview/proxy/service/session/participant/message_interaction_spec.rb +0 -166
- data/spec/integration/preview/proxy/service/session/participant_spec.rb +0 -226
- data/spec/integration/preview/proxy/service/session_spec.rb +0 -218
- data/spec/integration/preview/proxy/service/short_code_spec.rb +0 -173
- data/spec/integration/preview/proxy/service_spec.rb +0 -202
- data/spec/integration/preview/studio/flow/engagement/step_spec.rb +0 -98
- data/spec/integration/preview/studio/flow/engagement_spec.rb +0 -145
- data/spec/integration/preview/studio/flow_spec.rb +0 -117
- data/spec/integration/preview/sync/service/document/document_permission_spec.rb +0 -204
- data/spec/integration/preview/sync/service/document_spec.rb +0 -254
- data/spec/integration/preview/sync/service/sync_list/sync_list_item_spec.rb +0 -254
- data/spec/integration/preview/sync/service/sync_list/sync_list_permission_spec.rb +0 -204
- data/spec/integration/preview/sync/service/sync_list_spec.rb +0 -209
- data/spec/integration/preview/sync/service/sync_map/sync_map_item_spec.rb +0 -254
- data/spec/integration/preview/sync/service/sync_map/sync_map_permission_spec.rb +0 -204
- data/spec/integration/preview/sync/service/sync_map_spec.rb +0 -209
- data/spec/integration/preview/sync/service_spec.rb +0 -246
- data/spec/integration/preview/understand/assistant/field_type/field_value_spec.rb +0 -210
- data/spec/integration/preview/understand/assistant/field_type_spec.rb +0 -246
- data/spec/integration/preview/understand/assistant/intent/field_spec.rb +0 -207
- data/spec/integration/preview/understand/assistant/intent/sample_spec.rb +0 -253
- data/spec/integration/preview/understand/assistant/intent_spec.rb +0 -250
- data/spec/integration/preview/understand/assistant/model_build_spec.rb +0 -241
- data/spec/integration/preview/understand/assistant/query_spec.rb +0 -306
- data/spec/integration/preview/understand/assistant_spec.rb +0 -266
- data/spec/integration/preview/wireless/command_spec.rb +0 -169
- data/spec/integration/preview/wireless/rate_plan_spec.rb +0 -262
- data/spec/integration/preview/wireless/sim/usage_spec.rb +0 -51
- data/spec/integration/preview/wireless/sim_spec.rb +0 -210
- data/spec/integration/pricing/v1/messaging/country_spec.rb +0 -139
- data/spec/integration/pricing/v1/messaging_spec.rb +0 -12
- data/spec/integration/pricing/v1/phone_number/country_spec.rb +0 -130
- data/spec/integration/pricing/v1/phone_number_spec.rb +0 -12
- data/spec/integration/pricing/v1/voice/country_spec.rb +0 -140
- data/spec/integration/pricing/v1/voice/number_spec.rb +0 -56
- data/spec/integration/pricing/v1/voice_spec.rb +0 -12
- data/spec/integration/proxy/v1/service/phone_number_spec.rb +0 -184
- data/spec/integration/proxy/v1/service/session/interaction_spec.rb +0 -136
- data/spec/integration/proxy/v1/service/session/participant/message_interaction_spec.rb +0 -166
- data/spec/integration/proxy/v1/service/session/participant_spec.rb +0 -181
- data/spec/integration/proxy/v1/service/session_spec.rb +0 -230
- data/spec/integration/proxy/v1/service/short_code_spec.rb +0 -182
- data/spec/integration/proxy/v1/service_spec.rb +0 -215
- data/spec/integration/studio/v1/flow/engagement/engagement_context_spec.rb +0 -51
- data/spec/integration/studio/v1/flow/engagement/step/step_context_spec.rb +0 -54
- data/spec/integration/studio/v1/flow/engagement/step_spec.rb +0 -101
- data/spec/integration/studio/v1/flow/engagement_spec.rb +0 -171
- data/spec/integration/studio/v1/flow/execution/execution_context_spec.rb +0 -51
- data/spec/integration/studio/v1/flow/execution/execution_step/execution_step_context_spec.rb +0 -54
- data/spec/integration/studio/v1/flow/execution/execution_step_spec.rb +0 -101
- data/spec/integration/studio/v1/flow/execution_spec.rb +0 -171
- data/spec/integration/studio/v1/flow_spec.rb +0 -117
- data/spec/integration/sync/v1/service/document/document_permission_spec.rb +0 -204
- data/spec/integration/sync/v1/service/document_spec.rb +0 -257
- data/spec/integration/sync/v1/service/sync_list/sync_list_item_spec.rb +0 -257
- data/spec/integration/sync/v1/service/sync_list/sync_list_permission_spec.rb +0 -204
- data/spec/integration/sync/v1/service/sync_list_spec.rb +0 -257
- data/spec/integration/sync/v1/service/sync_map/sync_map_item_spec.rb +0 -257
- data/spec/integration/sync/v1/service/sync_map/sync_map_permission_spec.rb +0 -204
- data/spec/integration/sync/v1/service/sync_map_spec.rb +0 -257
- data/spec/integration/sync/v1/service/sync_stream/stream_message_spec.rb +0 -47
- data/spec/integration/sync/v1/service/sync_stream_spec.rb +0 -249
- data/spec/integration/sync/v1/service_spec.rb +0 -254
- data/spec/integration/taskrouter/v1/workspace/activity_spec.rb +0 -236
- data/spec/integration/taskrouter/v1/workspace/event_spec.rb +0 -159
- data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +0 -194
- data/spec/integration/taskrouter/v1/workspace/task_channel_spec.rb +0 -129
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics_spec.rb +0 -96
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics_spec.rb +0 -81
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queue_statistics_spec.rb +0 -108
- data/spec/integration/taskrouter/v1/workspace/task_queue/task_queues_statistics_spec.rb +0 -146
- data/spec/integration/taskrouter/v1/workspace/task_queue_spec.rb +0 -298
- data/spec/integration/taskrouter/v1/workspace/task_spec.rb +0 -326
- data/spec/integration/taskrouter/v1/workspace/worker/reservation_spec.rb +0 -194
- data/spec/integration/taskrouter/v1/workspace/worker/worker_channel_spec.rb +0 -188
- data/spec/integration/taskrouter/v1/workspace/worker/worker_statistics_spec.rb +0 -92
- data/spec/integration/taskrouter/v1/workspace/worker/workers_cumulative_statistics_spec.rb +0 -89
- data/spec/integration/taskrouter/v1/workspace/worker/workers_real_time_statistics_spec.rb +0 -70
- data/spec/integration/taskrouter/v1/workspace/worker/workers_statistics_spec.rb +0 -116
- data/spec/integration/taskrouter/v1/workspace/worker_spec.rb +0 -294
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics_spec.rb +0 -97
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_real_time_statistics_spec.rb +0 -57
- data/spec/integration/taskrouter/v1/workspace/workflow/workflow_statistics_spec.rb +0 -71
- data/spec/integration/taskrouter/v1/workspace/workflow_spec.rb +0 -272
- data/spec/integration/taskrouter/v1/workspace/workspace_cumulative_statistics_spec.rb +0 -94
- data/spec/integration/taskrouter/v1/workspace/workspace_real_time_statistics_spec.rb +0 -72
- data/spec/integration/taskrouter/v1/workspace/workspace_statistics_spec.rb +0 -105
- data/spec/integration/taskrouter/v1/workspace_spec.rb +0 -295
- data/spec/integration/trunking/v1/trunk/credential_list_spec.rb +0 -192
- data/spec/integration/trunking/v1/trunk/ip_access_control_list_spec.rb +0 -192
- data/spec/integration/trunking/v1/trunk/origination_url_spec.rb +0 -252
- data/spec/integration/trunking/v1/trunk/phone_number_spec.rb +0 -267
- data/spec/integration/trunking/v1/trunk_spec.rb +0 -282
- data/spec/integration/video/v1/composition_settings_spec.rb +0 -86
- data/spec/integration/video/v1/composition_spec.rb +0 -325
- data/spec/integration/video/v1/recording_settings_spec.rb +0 -86
- data/spec/integration/video/v1/recording_spec.rb +0 -177
- data/spec/integration/video/v1/room/recording_spec.rb +0 -186
- data/spec/integration/video/v1/room/room_participant/room_participant_published_track_spec.rb +0 -96
- data/spec/integration/video/v1/room/room_participant/room_participant_subscribed_track_spec.rb +0 -134
- data/spec/integration/video/v1/room/room_participant_spec.rb +0 -187
- data/spec/integration/video/v1/room_spec.rb +0 -257
- data/spec/integration/wireless/v1/command_spec.rb +0 -166
- data/spec/integration/wireless/v1/rate_plan_spec.rb +0 -270
- data/spec/integration/wireless/v1/sim/data_session_spec.rb +0 -87
- data/spec/integration/wireless/v1/sim/usage_record_spec.rb +0 -67
- data/spec/integration/wireless/v1/sim_spec.rb +0 -216
- data/spec/jwt/access_token_spec.rb +0 -151
- data/spec/jwt/client_capability_spec.rb +0 -104
- data/spec/jwt/task_router_spec.rb +0 -172
- data/spec/rack/twilio_webhook_authentication_spec.rb +0 -106
- data/spec/rest/client_spec.rb +0 -61
- data/spec/security/request_validator_spec.rb +0 -113
- data/spec/spec_helper.rb +0 -38
- data/spec/support/fakeweb.rb +0 -2
- data/spec/twilio_spec.rb +0 -15
- data/spec/twiml/messaging_response_spec.rb +0 -235
- data/spec/twiml/voice_response_spec.rb +0 -807
- data/spec/util/configuration_spec.rb +0 -15
- data/spec/util/url_encode_spec.rb +0 -12
- /data/lib/twilio-ruby/framework/{helper.rb → rest/helper.rb} +0 -0
- /data/lib/twilio-ruby/framework/{obsolete_client.rb → rest/obsolete_client.rb} +0 -0
- /data/lib/twilio-ruby/framework/{resource.rb → rest/resource.rb} +0 -0
@@ -1,871 +1,874 @@
|
|
1
1
|
##
|
2
|
-
#
|
3
|
-
#
|
4
|
-
# |
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
2
|
+
# This code was generated by
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
6
|
+
#
|
7
|
+
# Twilio - Api
|
8
|
+
# This is the public Twilio REST API.
|
9
|
+
#
|
10
|
+
# NOTE: This class is auto generated by OpenAPI Generator.
|
11
|
+
# https://openapi-generator.tech
|
12
|
+
# Do not edit the class manually.
|
13
|
+
#
|
8
14
|
|
9
|
-
module Twilio
|
10
|
-
module REST
|
11
|
-
class Api < Domain
|
12
|
-
class V2010 < Version
|
13
|
-
class AccountContext < InstanceContext
|
14
|
-
class IncomingPhoneNumberList < ListResource
|
15
|
-
##
|
16
|
-
# Initialize the IncomingPhoneNumberList
|
17
|
-
# @param [Version] version Version that contains the resource
|
18
|
-
# @param [String] account_sid The unique id of the
|
19
|
-
# [Account](https://www.twilio.com/docs/iam/api/account) responsible for this
|
20
|
-
# phone number.
|
21
|
-
# @return [IncomingPhoneNumberList] IncomingPhoneNumberList
|
22
|
-
def initialize(version, account_sid: nil)
|
23
|
-
super(version)
|
24
|
-
|
25
|
-
# Path Solution
|
26
|
-
@solution = {account_sid: account_sid}
|
27
|
-
@uri = "/Accounts/#{@solution[:account_sid]}/IncomingPhoneNumbers.json"
|
28
|
-
|
29
|
-
# Components
|
30
|
-
@local = nil
|
31
|
-
@mobile = nil
|
32
|
-
@toll_free = nil
|
33
|
-
end
|
34
|
-
|
35
|
-
##
|
36
|
-
# Lists IncomingPhoneNumberInstance records from the API as a list.
|
37
|
-
# Unlike stream(), this operation is eager and will load `limit` records into
|
38
|
-
# memory before returning.
|
39
|
-
# @param [Boolean] beta Include phone numbers new to the Twilio platform. Possible
|
40
|
-
# values are either `true` or `false`. Default is `true`.
|
41
|
-
# @param [String] friendly_name Only show the incoming phone number resources with
|
42
|
-
# friendly names that exactly match this name.
|
43
|
-
# @param [String] phone_number Only show the incoming phone number resources that
|
44
|
-
# match this pattern. You can specify partial numbers and use '*' as a wildcard
|
45
|
-
# for any digit.
|
46
|
-
# @param [String] origin Include phone numbers based on the origin, by default,
|
47
|
-
# phone numbers of all origin are included. Possible values are either `twilio` or
|
48
|
-
# `hosted`.
|
49
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
50
|
-
# guarantees to never return more than limit. Default is no limit
|
51
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
52
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
53
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
54
|
-
# efficient page size, i.e. min(limit, 1000)
|
55
|
-
# @return [Array] Array of up to limit results
|
56
|
-
def list(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
|
57
|
-
self.stream(
|
58
|
-
beta: beta,
|
59
|
-
friendly_name: friendly_name,
|
60
|
-
phone_number: phone_number,
|
61
|
-
origin: origin,
|
62
|
-
limit: limit,
|
63
|
-
page_size: page_size
|
64
|
-
).entries
|
65
|
-
end
|
66
|
-
|
67
|
-
##
|
68
|
-
# Streams IncomingPhoneNumberInstance records from the API as an Enumerable.
|
69
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
70
|
-
# is reached.
|
71
|
-
# @param [Boolean] beta Include phone numbers new to the Twilio platform. Possible
|
72
|
-
# values are either `true` or `false`. Default is `true`.
|
73
|
-
# @param [String] friendly_name Only show the incoming phone number resources with
|
74
|
-
# friendly names that exactly match this name.
|
75
|
-
# @param [String] phone_number Only show the incoming phone number resources that
|
76
|
-
# match this pattern. You can specify partial numbers and use '*' as a wildcard
|
77
|
-
# for any digit.
|
78
|
-
# @param [String] origin Include phone numbers based on the origin, by default,
|
79
|
-
# phone numbers of all origin are included. Possible values are either `twilio` or
|
80
|
-
# `hosted`.
|
81
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
82
|
-
# guarantees to never return more than limit. Default is no limit.
|
83
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
84
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
85
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
86
|
-
# efficient page size, i.e. min(limit, 1000)
|
87
|
-
# @return [Enumerable] Enumerable that will yield up to limit results
|
88
|
-
def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
|
89
|
-
limits = @version.read_limits(limit, page_size)
|
90
|
-
|
91
|
-
page = self.page(
|
92
|
-
beta: beta,
|
93
|
-
friendly_name: friendly_name,
|
94
|
-
phone_number: phone_number,
|
95
|
-
origin: origin,
|
96
|
-
page_size: limits[:page_size],
|
97
|
-
)
|
98
|
-
|
99
|
-
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
100
|
-
end
|
101
|
-
|
102
|
-
##
|
103
|
-
# When passed a block, yields IncomingPhoneNumberInstance records from the API.
|
104
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
105
|
-
# is reached.
|
106
|
-
def each
|
107
|
-
limits = @version.read_limits
|
108
|
-
|
109
|
-
page = self.page(page_size: limits[:page_size], )
|
110
|
-
|
111
|
-
@version.stream(page,
|
112
|
-
limit: limits[:limit],
|
113
|
-
page_limit: limits[:page_limit]).each {|x| yield x}
|
114
|
-
end
|
115
|
-
|
116
|
-
##
|
117
|
-
# Retrieve a single page of IncomingPhoneNumberInstance records from the API.
|
118
|
-
# Request is executed immediately.
|
119
|
-
# @param [Boolean] beta Include phone numbers new to the Twilio platform. Possible
|
120
|
-
# values are either `true` or `false`. Default is `true`.
|
121
|
-
# @param [String] friendly_name Only show the incoming phone number resources with
|
122
|
-
# friendly names that exactly match this name.
|
123
|
-
# @param [String] phone_number Only show the incoming phone number resources that
|
124
|
-
# match this pattern. You can specify partial numbers and use '*' as a wildcard
|
125
|
-
# for any digit.
|
126
|
-
# @param [String] origin Include phone numbers based on the origin, by default,
|
127
|
-
# phone numbers of all origin are included. Possible values are either `twilio` or
|
128
|
-
# `hosted`.
|
129
|
-
# @param [String] page_token PageToken provided by the API
|
130
|
-
# @param [Integer] page_number Page Number, this value is simply for client state
|
131
|
-
# @param [Integer] page_size Number of records to return, defaults to 50
|
132
|
-
# @return [Page] Page of IncomingPhoneNumberInstance
|
133
|
-
def page(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
134
|
-
params = Twilio::Values.of({
|
135
|
-
'Beta' => beta,
|
136
|
-
'FriendlyName' => friendly_name,
|
137
|
-
'PhoneNumber' => phone_number,
|
138
|
-
'Origin' => origin,
|
139
|
-
'PageToken' => page_token,
|
140
|
-
'Page' => page_number,
|
141
|
-
'PageSize' => page_size,
|
142
|
-
})
|
143
|
-
response = @version.page(
|
144
|
-
'GET',
|
145
|
-
@uri,
|
146
|
-
params
|
147
|
-
)
|
148
|
-
IncomingPhoneNumberPage.new(@version, response, @solution)
|
149
|
-
end
|
150
|
-
|
151
|
-
##
|
152
|
-
# Retrieve a single page of IncomingPhoneNumberInstance records from the API.
|
153
|
-
# Request is executed immediately.
|
154
|
-
# @param [String] target_url API-generated URL for the requested results page
|
155
|
-
# @return [Page] Page of IncomingPhoneNumberInstance
|
156
|
-
def get_page(target_url)
|
157
|
-
response = @version.domain.request(
|
158
|
-
'GET',
|
159
|
-
target_url
|
160
|
-
)
|
161
|
-
IncomingPhoneNumberPage.new(@version, response, @solution)
|
162
|
-
end
|
163
|
-
|
164
|
-
##
|
165
|
-
# Retrieve a single page of IncomingPhoneNumberInstance records from the API.
|
166
|
-
# Request is executed immediately.
|
167
|
-
# @param [String] api_version The Twilio REST API version to use for incoming
|
168
|
-
# calls made to this number. If omitted, uses `2010-04-01`.
|
169
|
-
# @param [String] friendly_name A human readable descriptive text for this
|
170
|
-
# resource, up to 64 characters long. By default, the `FriendlyName` is a nicely
|
171
|
-
# formatted version of the phone number.
|
172
|
-
# @param [String] sms_application_sid The 34 character sid of the application
|
173
|
-
# Twilio should use to handle SMSs sent to the new number. If a
|
174
|
-
# `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and
|
175
|
-
# use those set on the application.
|
176
|
-
# @param [String] sms_fallback_method The HTTP method that should be used to
|
177
|
-
# request the `SmsFallbackUrl`. Must be either `GET` or `POST`. Defaults to
|
178
|
-
# `POST`.
|
179
|
-
# @param [String] sms_fallback_url A URL that Twilio will request if an error
|
180
|
-
# occurs requesting or executing the TwiML defined by `SmsUrl`.
|
181
|
-
# @param [String] sms_method The HTTP method that should be used to request the
|
182
|
-
# `SmsUrl`. Must be either `GET` or `POST`. Defaults to `POST`.
|
183
|
-
# @param [String] sms_url The URL Twilio will request when receiving an incoming
|
184
|
-
# SMS message to this number.
|
185
|
-
# @param [String] status_callback The URL that Twilio will request to pass status
|
186
|
-
# parameters (such as call ended) to your application.
|
187
|
-
# @param [String] status_callback_method The HTTP method Twilio will use to make
|
188
|
-
# requests to the `StatusCallback` URL. Either `GET` or `POST`. Defaults to
|
189
|
-
# `POST`.
|
190
|
-
# @param [String] voice_application_sid The 34 character sid of the application
|
191
|
-
# Twilio should use to handle phone calls to the new number. If a
|
192
|
-
# `VoiceApplicationSid` is present, Twilio will ignore all of the voice urls above
|
193
|
-
# and use those set on the application. Setting a `VoiceApplicationSid` will
|
194
|
-
# automatically delete your `TrunkSid` and vice versa.
|
195
|
-
# @param [Boolean] voice_caller_id_lookup Do a lookup of a caller's name from the
|
196
|
-
# CNAM database and post it to your app. Either `true` or `false`. Defaults to
|
197
|
-
# `false`.
|
198
|
-
# @param [String] voice_fallback_method The HTTP method that should be used to
|
199
|
-
# request the `VoiceFallbackUrl`. Either `GET` or `POST`. Defaults to `POST`.
|
200
|
-
# @param [String] voice_fallback_url The URL that Twilio will request if an error
|
201
|
-
# occurs retrieving or executing the TwiML requested by `Url`.
|
202
|
-
# @param [String] voice_method The HTTP method that should be used to request the
|
203
|
-
# `VoiceUrl`. Must be either `GET` or `POST`. Defaults to `POST`.
|
204
|
-
# @param [String] voice_url The URL that Twilio should request when somebody dials
|
205
|
-
# the new phone number. The VoiceURL will no longer be used if a
|
206
|
-
# `VoiceApplicationSid` or a `TrunkSid` is set.
|
207
|
-
# @param [incoming_phone_number.EmergencyStatus] emergency_status The
|
208
|
-
# emergency_status
|
209
|
-
# @param [String] emergency_address_sid The emergency_address_sid
|
210
|
-
# @param [String] trunk_sid The 34 character sid of the Trunk Twilio should use to
|
211
|
-
# handle phone calls to this number. If a `TrunkSid` is present, Twilio will
|
212
|
-
# ignore all of the voice urls and voice applications above and use those set on
|
213
|
-
# the Trunk. Setting a `TrunkSid` will automatically delete your
|
214
|
-
# `VoiceApplicationSid` and vice versa.
|
215
|
-
# @param [String] identity_sid The 34 character sid of the identity Twilio should
|
216
|
-
# use to associate with the number. Identities are required in some regions to
|
217
|
-
# meet local regulations
|
218
|
-
# @param [String] address_sid The 34 character sid of the address Twilio should
|
219
|
-
# use to associate with the number. Addresses are required in some regions to meet
|
220
|
-
# local regulations
|
221
|
-
# @param [String] phone_number The phone number you want to purchase. The number
|
222
|
-
# should be formatted starting with a '+' followed by the country code and the
|
223
|
-
# number in [E.164](http://en.wikipedia.org/wiki/E.164) format e.g.,
|
224
|
-
# '+15105555555'. **You must include either this or an `AreaCode` parameter to
|
225
|
-
# have your POST succeed.**
|
226
|
-
# @param [String] area_code The desired area code for your new incoming phone
|
227
|
-
# number. Any three digit, US or Canada area code is valid. Twilio will provision
|
228
|
-
# a random phone number within this area code for you. **You must include either
|
229
|
-
# this or a `PhoneNumber` parameter to have your POST succeed.** (US and Canada
|
230
|
-
# only)
|
231
|
-
# @return [IncomingPhoneNumberInstance] Newly created IncomingPhoneNumberInstance
|
232
|
-
def create(api_version: :unset, friendly_name: :unset, sms_application_sid: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, status_callback: :unset, status_callback_method: :unset, voice_application_sid: :unset, voice_caller_id_lookup: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset, emergency_status: :unset, emergency_address_sid: :unset, trunk_sid: :unset, identity_sid: :unset, address_sid: :unset, phone_number: :unset, area_code: :unset)
|
233
|
-
data = Twilio::Values.of({
|
234
|
-
'PhoneNumber' => phone_number,
|
235
|
-
'AreaCode' => area_code,
|
236
|
-
'ApiVersion' => api_version,
|
237
|
-
'FriendlyName' => friendly_name,
|
238
|
-
'SmsApplicationSid' => sms_application_sid,
|
239
|
-
'SmsFallbackMethod' => sms_fallback_method,
|
240
|
-
'SmsFallbackUrl' => sms_fallback_url,
|
241
|
-
'SmsMethod' => sms_method,
|
242
|
-
'SmsUrl' => sms_url,
|
243
|
-
'StatusCallback' => status_callback,
|
244
|
-
'StatusCallbackMethod' => status_callback_method,
|
245
|
-
'VoiceApplicationSid' => voice_application_sid,
|
246
|
-
'VoiceCallerIdLookup' => voice_caller_id_lookup,
|
247
|
-
'VoiceFallbackMethod' => voice_fallback_method,
|
248
|
-
'VoiceFallbackUrl' => voice_fallback_url,
|
249
|
-
'VoiceMethod' => voice_method,
|
250
|
-
'VoiceUrl' => voice_url,
|
251
|
-
'EmergencyStatus' => emergency_status,
|
252
|
-
'EmergencyAddressSid' => emergency_address_sid,
|
253
|
-
'TrunkSid' => trunk_sid,
|
254
|
-
'IdentitySid' => identity_sid,
|
255
|
-
'AddressSid' => address_sid,
|
256
|
-
})
|
257
|
-
|
258
|
-
payload = @version.create(
|
259
|
-
'POST',
|
260
|
-
@uri,
|
261
|
-
data: data
|
262
|
-
)
|
263
|
-
|
264
|
-
IncomingPhoneNumberInstance.new(@version, payload, account_sid: @solution[:account_sid], )
|
265
|
-
end
|
266
|
-
|
267
|
-
##
|
268
|
-
# Access the local
|
269
|
-
# @return [LocalList]
|
270
|
-
# @return [LocalContext]
|
271
|
-
def local
|
272
|
-
@local ||= LocalList.new(@version, account_sid: @solution[:account_sid], )
|
273
|
-
end
|
274
|
-
|
275
|
-
##
|
276
|
-
# Access the mobile
|
277
|
-
# @return [MobileList]
|
278
|
-
# @return [MobileContext]
|
279
|
-
def mobile
|
280
|
-
@mobile ||= MobileList.new(@version, account_sid: @solution[:account_sid], )
|
281
|
-
end
|
282
|
-
|
283
|
-
##
|
284
|
-
# Access the toll_free
|
285
|
-
# @return [TollFreeList]
|
286
|
-
# @return [TollFreeContext]
|
287
|
-
def toll_free
|
288
|
-
@toll_free ||= TollFreeList.new(@version, account_sid: @solution[:account_sid], )
|
289
|
-
end
|
290
|
-
|
291
|
-
##
|
292
|
-
# Provide a user friendly representation
|
293
|
-
def to_s
|
294
|
-
'#<Twilio.Api.V2010.IncomingPhoneNumberList>'
|
295
|
-
end
|
296
|
-
end
|
297
|
-
|
298
|
-
class IncomingPhoneNumberPage < Page
|
299
|
-
##
|
300
|
-
# Initialize the IncomingPhoneNumberPage
|
301
|
-
# @param [Version] version Version that contains the resource
|
302
|
-
# @param [Response] response Response from the API
|
303
|
-
# @param [Hash] solution Path solution for the resource
|
304
|
-
# @return [IncomingPhoneNumberPage] IncomingPhoneNumberPage
|
305
|
-
def initialize(version, response, solution)
|
306
|
-
super(version, response)
|
307
|
-
|
308
|
-
# Path Solution
|
309
|
-
@solution = solution
|
310
|
-
end
|
311
|
-
|
312
|
-
##
|
313
|
-
# Build an instance of IncomingPhoneNumberInstance
|
314
|
-
# @param [Hash] payload Payload response from the API
|
315
|
-
# @return [IncomingPhoneNumberInstance] IncomingPhoneNumberInstance
|
316
|
-
def get_instance(payload)
|
317
|
-
IncomingPhoneNumberInstance.new(@version, payload, account_sid: @solution[:account_sid], )
|
318
|
-
end
|
319
|
-
|
320
|
-
##
|
321
|
-
# Provide a user friendly representation
|
322
|
-
def to_s
|
323
|
-
'<Twilio.Api.V2010.IncomingPhoneNumberPage>'
|
324
|
-
end
|
325
|
-
end
|
326
|
-
|
327
|
-
class IncomingPhoneNumberContext < InstanceContext
|
328
|
-
##
|
329
|
-
# Initialize the IncomingPhoneNumberContext
|
330
|
-
# @param [Version] version Version that contains the resource
|
331
|
-
# @param [String] account_sid The account_sid
|
332
|
-
# @param [String] sid The incoming-phone-number Sid that uniquely identifies this
|
333
|
-
# resource
|
334
|
-
# @return [IncomingPhoneNumberContext] IncomingPhoneNumberContext
|
335
|
-
def initialize(version, account_sid, sid)
|
336
|
-
super(version)
|
337
|
-
|
338
|
-
# Path Solution
|
339
|
-
@solution = {account_sid: account_sid, sid: sid, }
|
340
|
-
@uri = "/Accounts/#{@solution[:account_sid]}/IncomingPhoneNumbers/#{@solution[:sid]}.json"
|
341
|
-
|
342
|
-
# Dependents
|
343
|
-
@assigned_add_ons = nil
|
344
|
-
end
|
345
|
-
|
346
|
-
##
|
347
|
-
# Update the IncomingPhoneNumberInstance
|
348
|
-
# @param [String] account_sid The unique 34 character id of the account to which
|
349
|
-
# you wish to transfer this phone number. See [Exchanging Numbers Between
|
350
|
-
# Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
|
351
|
-
# @param [String] api_version Calls to this phone number will start a new TwiML
|
352
|
-
# session with this API version. Either `2010-04-01` or `2008-08-01`.
|
353
|
-
# @param [String] friendly_name A human readable descriptive text for this
|
354
|
-
# resource, up to 64 characters long. By default, the `FriendlyName` is a nicely
|
355
|
-
# formatted version of the phone number.
|
356
|
-
# @param [String] sms_application_sid The 34 character sid of the application
|
357
|
-
# Twilio should use to handle SMSs sent to this number. If a `SmsApplicationSid`
|
358
|
-
# is present, Twilio will ignore all of the SMS urls above and use those set on
|
359
|
-
# the application instead.
|
360
|
-
# @param [String] sms_fallback_method The HTTP method that should be used to
|
361
|
-
# request the `SmsFallbackUrl`. Either `GET` or `POST`.
|
362
|
-
# @param [String] sms_fallback_url A URL that Twilio will request if an error
|
363
|
-
# occurs requesting or executing the TwiML defined by `SmsUrl`.
|
364
|
-
# @param [String] sms_method The HTTP method Twilio will use when making requests
|
365
|
-
# to the `SmsUrl`. Either `GET` or `POST`.
|
366
|
-
# @param [String] sms_url The URL that Twilio should request when somebody sends
|
367
|
-
# an SMS to the new phone number.
|
368
|
-
# @param [String] status_callback The URL that Twilio will request to pass status
|
369
|
-
# parameters (such as call ended) to your application.
|
370
|
-
# @param [String] status_callback_method The HTTP method Twilio will use to make
|
371
|
-
# requests to the `StatusCallback` URL. Either `GET` or `POST`.
|
372
|
-
# @param [String] voice_application_sid The 34 character sid of the application
|
373
|
-
# Twilio should use to handle phone calls to this number. If a
|
374
|
-
# `VoiceApplicationSid` is present, Twilio will ignore all of the voice urls above
|
375
|
-
# and use those set on the application instead. Setting a `VoiceApplicationSid`
|
376
|
-
# will automatically delete your `TrunkSid` and vice versa.
|
377
|
-
# @param [Boolean] voice_caller_id_lookup Look up the caller's caller-ID name from
|
378
|
-
# the CNAM database ($0.01 per look up). Either `true` or `false`.
|
379
|
-
# @param [String] voice_fallback_method The HTTP method Twilio will use when
|
380
|
-
# requesting the `VoiceFallbackUrl`. Either `GET` or `POST`.
|
381
|
-
# @param [String] voice_fallback_url A URL that Twilio will request if an error
|
382
|
-
# occurs requesting or executing the TwiML defined by `VoiceUrl`.
|
383
|
-
# @param [String] voice_method The HTTP method Twilio will use when requesting the
|
384
|
-
# above `Url`. Either `GET` or `POST`.
|
385
|
-
# @param [String] voice_url The URL that Twilio should request when somebody dials
|
386
|
-
# the phone number. The VoiceURL will no longer be used if a
|
387
|
-
# `VoiceApplicationSid` or a `TrunkSid` is set.
|
388
|
-
# @param [incoming_phone_number.EmergencyStatus] emergency_status The
|
389
|
-
# emergency_status
|
390
|
-
# @param [String] emergency_address_sid The emergency_address_sid
|
391
|
-
# @param [String] trunk_sid The 34 character sid of the Trunk Twilio should use to
|
392
|
-
# handle phone calls to this number. If a `TrunkSid` is present, Twilio will
|
393
|
-
# ignore all of the voice urls and voice applications above and use those set on
|
394
|
-
# the Trunk. Setting a `TrunkSid` will automatically delete your
|
395
|
-
# `VoiceApplicationSid` and vice versa.
|
396
|
-
# @param [incoming_phone_number.VoiceReceiveMode] voice_receive_mode The
|
397
|
-
# voice_receive_mode
|
398
|
-
# @param [String] identity_sid The 34 character sid of the identity Twilio should
|
399
|
-
# use to associate with the number. Identities are required in some regions to
|
400
|
-
# meet local regulations
|
401
|
-
# @param [String] address_sid The 34 character sid of the address Twilio should
|
402
|
-
# associate with the number. If the number has address restrictions, only another
|
403
|
-
# address that satisfies the requirement can replace the existing one.
|
404
|
-
# @return [IncomingPhoneNumberInstance] Updated IncomingPhoneNumberInstance
|
405
|
-
def update(account_sid: :unset, api_version: :unset, friendly_name: :unset, sms_application_sid: :unset, sms_fallback_method: :unset, sms_fallback_url: :unset, sms_method: :unset, sms_url: :unset, status_callback: :unset, status_callback_method: :unset, voice_application_sid: :unset, voice_caller_id_lookup: :unset, voice_fallback_method: :unset, voice_fallback_url: :unset, voice_method: :unset, voice_url: :unset, emergency_status: :unset, emergency_address_sid: :unset, trunk_sid: :unset, voice_receive_mode: :unset, identity_sid: :unset, address_sid: :unset)
|
406
|
-
data = Twilio::Values.of({
|
407
|
-
'AccountSid' => account_sid,
|
408
|
-
'ApiVersion' => api_version,
|
409
|
-
'FriendlyName' => friendly_name,
|
410
|
-
'SmsApplicationSid' => sms_application_sid,
|
411
|
-
'SmsFallbackMethod' => sms_fallback_method,
|
412
|
-
'SmsFallbackUrl' => sms_fallback_url,
|
413
|
-
'SmsMethod' => sms_method,
|
414
|
-
'SmsUrl' => sms_url,
|
415
|
-
'StatusCallback' => status_callback,
|
416
|
-
'StatusCallbackMethod' => status_callback_method,
|
417
|
-
'VoiceApplicationSid' => voice_application_sid,
|
418
|
-
'VoiceCallerIdLookup' => voice_caller_id_lookup,
|
419
|
-
'VoiceFallbackMethod' => voice_fallback_method,
|
420
|
-
'VoiceFallbackUrl' => voice_fallback_url,
|
421
|
-
'VoiceMethod' => voice_method,
|
422
|
-
'VoiceUrl' => voice_url,
|
423
|
-
'EmergencyStatus' => emergency_status,
|
424
|
-
'EmergencyAddressSid' => emergency_address_sid,
|
425
|
-
'TrunkSid' => trunk_sid,
|
426
|
-
'VoiceReceiveMode' => voice_receive_mode,
|
427
|
-
'IdentitySid' => identity_sid,
|
428
|
-
'AddressSid' => address_sid,
|
429
|
-
})
|
430
|
-
|
431
|
-
payload = @version.update(
|
432
|
-
'POST',
|
433
|
-
@uri,
|
434
|
-
data: data,
|
435
|
-
)
|
436
|
-
|
437
|
-
IncomingPhoneNumberInstance.new(
|
438
|
-
@version,
|
439
|
-
payload,
|
440
|
-
account_sid: @solution[:account_sid],
|
441
|
-
sid: @solution[:sid],
|
442
|
-
)
|
443
|
-
end
|
444
|
-
|
445
|
-
##
|
446
|
-
# Fetch a IncomingPhoneNumberInstance
|
447
|
-
# @return [IncomingPhoneNumberInstance] Fetched IncomingPhoneNumberInstance
|
448
|
-
def fetch
|
449
|
-
params = Twilio::Values.of({})
|
450
|
-
|
451
|
-
payload = @version.fetch(
|
452
|
-
'GET',
|
453
|
-
@uri,
|
454
|
-
params,
|
455
|
-
)
|
456
|
-
|
457
|
-
IncomingPhoneNumberInstance.new(
|
458
|
-
@version,
|
459
|
-
payload,
|
460
|
-
account_sid: @solution[:account_sid],
|
461
|
-
sid: @solution[:sid],
|
462
|
-
)
|
463
|
-
end
|
464
|
-
|
465
|
-
##
|
466
|
-
# Deletes the IncomingPhoneNumberInstance
|
467
|
-
# @return [Boolean] true if delete succeeds, true otherwise
|
468
|
-
def delete
|
469
|
-
@version.delete('delete', @uri)
|
470
|
-
end
|
471
|
-
|
472
|
-
##
|
473
|
-
# Access the assigned_add_ons
|
474
|
-
# @return [AssignedAddOnList]
|
475
|
-
# @return [AssignedAddOnContext] if sid was passed.
|
476
|
-
def assigned_add_ons(sid=:unset)
|
477
|
-
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
478
|
-
|
479
|
-
if sid != :unset
|
480
|
-
return AssignedAddOnContext.new(@version, @solution[:account_sid], @solution[:sid], sid, )
|
481
|
-
end
|
482
|
-
|
483
|
-
unless @assigned_add_ons
|
484
|
-
@assigned_add_ons = AssignedAddOnList.new(
|
485
|
-
@version,
|
486
|
-
account_sid: @solution[:account_sid],
|
487
|
-
resource_sid: @solution[:sid],
|
488
|
-
)
|
489
|
-
end
|
490
|
-
|
491
|
-
@assigned_add_ons
|
492
|
-
end
|
493
|
-
|
494
|
-
##
|
495
|
-
# Provide a user friendly representation
|
496
|
-
def to_s
|
497
|
-
context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
|
498
|
-
"#<Twilio.Api.V2010.IncomingPhoneNumberContext #{context}>"
|
499
|
-
end
|
500
|
-
end
|
501
|
-
|
502
|
-
class IncomingPhoneNumberInstance < InstanceResource
|
503
|
-
##
|
504
|
-
# Initialize the IncomingPhoneNumberInstance
|
505
|
-
# @param [Version] version Version that contains the resource
|
506
|
-
# @param [Hash] payload payload that contains response from Twilio
|
507
|
-
# @param [String] account_sid The unique id of the
|
508
|
-
# [Account](https://www.twilio.com/docs/iam/api/account) responsible for this
|
509
|
-
# phone number.
|
510
|
-
# @param [String] sid The incoming-phone-number Sid that uniquely identifies this
|
511
|
-
# resource
|
512
|
-
# @return [IncomingPhoneNumberInstance] IncomingPhoneNumberInstance
|
513
|
-
def initialize(version, payload, account_sid: nil, sid: nil)
|
514
|
-
super(version)
|
515
|
-
|
516
|
-
# Marshaled Properties
|
517
|
-
@properties = {
|
518
|
-
'account_sid' => payload['account_sid'],
|
519
|
-
'address_sid' => payload['address_sid'],
|
520
|
-
'address_requirements' => payload['address_requirements'],
|
521
|
-
'api_version' => payload['api_version'],
|
522
|
-
'beta' => payload['beta'],
|
523
|
-
'capabilities' => payload['capabilities'],
|
524
|
-
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
525
|
-
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
526
|
-
'friendly_name' => payload['friendly_name'],
|
527
|
-
'identity_sid' => payload['identity_sid'],
|
528
|
-
'phone_number' => payload['phone_number'],
|
529
|
-
'origin' => payload['origin'],
|
530
|
-
'sid' => payload['sid'],
|
531
|
-
'sms_application_sid' => payload['sms_application_sid'],
|
532
|
-
'sms_fallback_method' => payload['sms_fallback_method'],
|
533
|
-
'sms_fallback_url' => payload['sms_fallback_url'],
|
534
|
-
'sms_method' => payload['sms_method'],
|
535
|
-
'sms_url' => payload['sms_url'],
|
536
|
-
'status_callback' => payload['status_callback'],
|
537
|
-
'status_callback_method' => payload['status_callback_method'],
|
538
|
-
'trunk_sid' => payload['trunk_sid'],
|
539
|
-
'uri' => payload['uri'],
|
540
|
-
'voice_application_sid' => payload['voice_application_sid'],
|
541
|
-
'voice_caller_id_lookup' => payload['voice_caller_id_lookup'],
|
542
|
-
'voice_fallback_method' => payload['voice_fallback_method'],
|
543
|
-
'voice_fallback_url' => payload['voice_fallback_url'],
|
544
|
-
'voice_method' => payload['voice_method'],
|
545
|
-
'voice_url' => payload['voice_url'],
|
546
|
-
'emergency_status' => payload['emergency_status'],
|
547
|
-
'emergency_address_sid' => payload['emergency_address_sid'],
|
548
|
-
}
|
549
|
-
|
550
|
-
# Context
|
551
|
-
@instance_context = nil
|
552
|
-
@params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'], }
|
553
|
-
end
|
554
|
-
|
555
|
-
##
|
556
|
-
# Generate an instance context for the instance, the context is capable of
|
557
|
-
# performing various actions. All instance actions are proxied to the context
|
558
|
-
# @return [IncomingPhoneNumberContext] IncomingPhoneNumberContext for this IncomingPhoneNumberInstance
|
559
|
-
def context
|
560
|
-
unless @instance_context
|
561
|
-
@instance_context = IncomingPhoneNumberContext.new(@version, @params['account_sid'], @params['sid'], )
|
562
|
-
end
|
563
|
-
@instance_context
|
564
|
-
end
|
565
|
-
|
566
|
-
##
|
567
|
-
# @return [String] The unique sid that identifies this account
|
568
|
-
def account_sid
|
569
|
-
@properties['account_sid']
|
570
|
-
end
|
571
|
-
|
572
|
-
##
|
573
|
-
# @return [String] Unique string that identifies the address associated with number
|
574
|
-
def address_sid
|
575
|
-
@properties['address_sid']
|
576
|
-
end
|
577
|
-
|
578
|
-
##
|
579
|
-
# @return [incoming_phone_number.AddressRequirement] Indicates if the customer requires an address
|
580
|
-
def address_requirements
|
581
|
-
@properties['address_requirements']
|
582
|
-
end
|
583
|
-
|
584
|
-
##
|
585
|
-
# @return [String] The Twilio REST API version to use
|
586
|
-
def api_version
|
587
|
-
@properties['api_version']
|
588
|
-
end
|
589
|
-
|
590
|
-
##
|
591
|
-
# @return [Boolean] Indicates if the phone number is a beta number
|
592
|
-
def beta
|
593
|
-
@properties['beta']
|
594
|
-
end
|
595
|
-
|
596
|
-
##
|
597
|
-
# @return [String] Indicate if a phone can receive calls or messages
|
598
|
-
def capabilities
|
599
|
-
@properties['capabilities']
|
600
|
-
end
|
601
|
-
|
602
|
-
##
|
603
|
-
# @return [Time] The date this resource was created
|
604
|
-
def date_created
|
605
|
-
@properties['date_created']
|
606
|
-
end
|
607
|
-
|
608
|
-
##
|
609
|
-
# @return [Time] The date this resource was last updated
|
610
|
-
def date_updated
|
611
|
-
@properties['date_updated']
|
612
|
-
end
|
613
|
-
|
614
|
-
##
|
615
|
-
# @return [String] A human readable description of this resouce
|
616
|
-
def friendly_name
|
617
|
-
@properties['friendly_name']
|
618
|
-
end
|
619
|
-
|
620
|
-
##
|
621
|
-
# @return [String] Unique string that identifies the identity associated with number
|
622
|
-
def identity_sid
|
623
|
-
@properties['identity_sid']
|
624
|
-
end
|
625
|
-
|
626
|
-
##
|
627
|
-
# @return [String] The incoming phone number
|
628
|
-
def phone_number
|
629
|
-
@properties['phone_number']
|
630
|
-
end
|
631
|
-
|
632
|
-
##
|
633
|
-
# @return [String] Twilio owned phone numbers are marked as twilio while hosted phone numbers are marked as hosted.
|
634
|
-
def origin
|
635
|
-
@properties['origin']
|
636
|
-
end
|
637
|
-
|
638
|
-
##
|
639
|
-
# @return [String] A string that uniquely identifies this resource
|
640
|
-
def sid
|
641
|
-
@properties['sid']
|
642
|
-
end
|
643
|
-
|
644
|
-
##
|
645
|
-
# @return [String] Unique string that identifies the application
|
646
|
-
def sms_application_sid
|
647
|
-
@properties['sms_application_sid']
|
648
|
-
end
|
649
|
-
|
650
|
-
##
|
651
|
-
# @return [String] HTTP method used with sms fallback url
|
652
|
-
def sms_fallback_method
|
653
|
-
@properties['sms_fallback_method']
|
654
|
-
end
|
655
|
-
|
656
|
-
##
|
657
|
-
# @return [String] URL Twilio will request if an error occurs in executing TwiML
|
658
|
-
def sms_fallback_url
|
659
|
-
@properties['sms_fallback_url']
|
660
|
-
end
|
661
|
-
|
662
|
-
##
|
663
|
-
# @return [String] HTTP method to use with sms url
|
664
|
-
def sms_method
|
665
|
-
@properties['sms_method']
|
666
|
-
end
|
667
|
-
|
668
|
-
##
|
669
|
-
# @return [String] URL Twilio will request when receiving an SMS
|
670
|
-
def sms_url
|
671
|
-
@properties['sms_url']
|
672
|
-
end
|
673
|
-
|
674
|
-
##
|
675
|
-
# @return [String] URL Twilio will use to pass status parameters
|
676
|
-
def status_callback
|
677
|
-
@properties['status_callback']
|
678
|
-
end
|
679
|
-
|
680
|
-
##
|
681
|
-
# @return [String] HTTP method twilio will use with status callback
|
682
|
-
def status_callback_method
|
683
|
-
@properties['status_callback_method']
|
684
|
-
end
|
685
|
-
|
686
|
-
##
|
687
|
-
# @return [String] Unique string to identify the trunk
|
688
|
-
def trunk_sid
|
689
|
-
@properties['trunk_sid']
|
690
|
-
end
|
691
|
-
|
692
|
-
##
|
693
|
-
# @return [String] The URI for this resource
|
694
|
-
def uri
|
695
|
-
@properties['uri']
|
696
|
-
end
|
697
15
|
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
16
|
+
module Twilio
|
17
|
+
module REST
|
18
|
+
class Api < ApiBase
|
19
|
+
class V2010 < Version
|
20
|
+
class AccountContext < InstanceContext
|
21
|
+
|
22
|
+
class IncomingPhoneNumberList < ListResource
|
23
|
+
|
24
|
+
##
|
25
|
+
# Initialize the IncomingPhoneNumberList
|
26
|
+
# @param [Version] version Version that contains the resource
|
27
|
+
# @return [IncomingPhoneNumberList] IncomingPhoneNumberList
|
28
|
+
def initialize(version, account_sid: nil)
|
29
|
+
super(version)
|
30
|
+
# Path Solution
|
31
|
+
@solution = { account_sid: account_sid }
|
32
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/IncomingPhoneNumbers.json"
|
33
|
+
# Components
|
34
|
+
@toll_free = nil
|
35
|
+
@local = nil
|
36
|
+
@mobile = nil
|
37
|
+
end
|
38
|
+
##
|
39
|
+
# Create the IncomingPhoneNumberInstance
|
40
|
+
# @param [String] api_version The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
|
41
|
+
# @param [String] friendly_name A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number.
|
42
|
+
# @param [String] sms_application_sid The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
|
43
|
+
# @param [String] sms_fallback_method The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
44
|
+
# @param [String] sms_fallback_url The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
|
45
|
+
# @param [String] sms_method The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
46
|
+
# @param [String] sms_url The URL we should call when the new phone number receives an incoming SMS message.
|
47
|
+
# @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application.
|
48
|
+
# @param [String] status_callback_method The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
|
49
|
+
# @param [String] voice_application_sid The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
|
50
|
+
# @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
|
51
|
+
# @param [String] voice_fallback_method The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
52
|
+
# @param [String] voice_fallback_url The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
|
53
|
+
# @param [String] voice_method The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
54
|
+
# @param [String] voice_url The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
|
55
|
+
# @param [EmergencyStatus] emergency_status
|
56
|
+
# @param [String] emergency_address_sid The SID of the emergency address configuration to use for emergency calling from the new phone number.
|
57
|
+
# @param [String] trunk_sid The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
|
58
|
+
# @param [String] identity_sid The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
|
59
|
+
# @param [String] address_sid The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
|
60
|
+
# @param [VoiceReceiveMode] voice_receive_mode
|
61
|
+
# @param [String] bundle_sid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
|
62
|
+
# @param [String] phone_number The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
|
63
|
+
# @param [String] area_code The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only).
|
64
|
+
# @return [IncomingPhoneNumberInstance] Created IncomingPhoneNumberInstance
|
65
|
+
def create(
|
66
|
+
api_version: :unset,
|
67
|
+
friendly_name: :unset,
|
68
|
+
sms_application_sid: :unset,
|
69
|
+
sms_fallback_method: :unset,
|
70
|
+
sms_fallback_url: :unset,
|
71
|
+
sms_method: :unset,
|
72
|
+
sms_url: :unset,
|
73
|
+
status_callback: :unset,
|
74
|
+
status_callback_method: :unset,
|
75
|
+
voice_application_sid: :unset,
|
76
|
+
voice_caller_id_lookup: :unset,
|
77
|
+
voice_fallback_method: :unset,
|
78
|
+
voice_fallback_url: :unset,
|
79
|
+
voice_method: :unset,
|
80
|
+
voice_url: :unset,
|
81
|
+
emergency_status: :unset,
|
82
|
+
emergency_address_sid: :unset,
|
83
|
+
trunk_sid: :unset,
|
84
|
+
identity_sid: :unset,
|
85
|
+
address_sid: :unset,
|
86
|
+
voice_receive_mode: :unset,
|
87
|
+
bundle_sid: :unset,
|
88
|
+
phone_number: :unset,
|
89
|
+
area_code: :unset
|
90
|
+
)
|
91
|
+
|
92
|
+
data = Twilio::Values.of({
|
93
|
+
'ApiVersion' => api_version,
|
94
|
+
'FriendlyName' => friendly_name,
|
95
|
+
'SmsApplicationSid' => sms_application_sid,
|
96
|
+
'SmsFallbackMethod' => sms_fallback_method,
|
97
|
+
'SmsFallbackUrl' => sms_fallback_url,
|
98
|
+
'SmsMethod' => sms_method,
|
99
|
+
'SmsUrl' => sms_url,
|
100
|
+
'StatusCallback' => status_callback,
|
101
|
+
'StatusCallbackMethod' => status_callback_method,
|
102
|
+
'VoiceApplicationSid' => voice_application_sid,
|
103
|
+
'VoiceCallerIdLookup' => voice_caller_id_lookup,
|
104
|
+
'VoiceFallbackMethod' => voice_fallback_method,
|
105
|
+
'VoiceFallbackUrl' => voice_fallback_url,
|
106
|
+
'VoiceMethod' => voice_method,
|
107
|
+
'VoiceUrl' => voice_url,
|
108
|
+
'EmergencyStatus' => emergency_status,
|
109
|
+
'EmergencyAddressSid' => emergency_address_sid,
|
110
|
+
'TrunkSid' => trunk_sid,
|
111
|
+
'IdentitySid' => identity_sid,
|
112
|
+
'AddressSid' => address_sid,
|
113
|
+
'VoiceReceiveMode' => voice_receive_mode,
|
114
|
+
'BundleSid' => bundle_sid,
|
115
|
+
'PhoneNumber' => phone_number,
|
116
|
+
'AreaCode' => area_code,
|
117
|
+
})
|
118
|
+
|
119
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
payload = @version.create('POST', @uri, data: data, headers: headers)
|
126
|
+
IncomingPhoneNumberInstance.new(
|
127
|
+
@version,
|
128
|
+
payload,
|
129
|
+
account_sid: @solution[:account_sid],
|
130
|
+
)
|
131
|
+
end
|
132
|
+
|
133
|
+
|
134
|
+
##
|
135
|
+
# Lists IncomingPhoneNumberInstance records from the API as a list.
|
136
|
+
# Unlike stream(), this operation is eager and will load `limit` records into
|
137
|
+
# memory before returning.
|
138
|
+
# @param [Boolean] beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
|
139
|
+
# @param [String] friendly_name A string that identifies the IncomingPhoneNumber resources to read.
|
140
|
+
# @param [String] phone_number The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
|
141
|
+
# @param [String] origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
|
142
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
143
|
+
# guarantees to never return more than limit. Default is no limit
|
144
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
145
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
146
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
147
|
+
# efficient page size, i.e. min(limit, 1000)
|
148
|
+
# @return [Array] Array of up to limit results
|
149
|
+
def list(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
|
150
|
+
self.stream(
|
151
|
+
beta: beta,
|
152
|
+
friendly_name: friendly_name,
|
153
|
+
phone_number: phone_number,
|
154
|
+
origin: origin,
|
155
|
+
limit: limit,
|
156
|
+
page_size: page_size
|
157
|
+
).entries
|
158
|
+
end
|
159
|
+
|
160
|
+
##
|
161
|
+
# Streams Instance records from the API as an Enumerable.
|
162
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
163
|
+
# is reached.
|
164
|
+
# @param [Boolean] beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
|
165
|
+
# @param [String] friendly_name A string that identifies the IncomingPhoneNumber resources to read.
|
166
|
+
# @param [String] phone_number The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
|
167
|
+
# @param [String] origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
|
168
|
+
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
169
|
+
# guarantees to never return more than limit. Default is no limit
|
170
|
+
# @param [Integer] page_size Number of records to fetch per request, when
|
171
|
+
# not set will use the default value of 50 records. If no page_size is defined
|
172
|
+
# but a limit is defined, stream() will attempt to read the limit with the most
|
173
|
+
# efficient page size, i.e. min(limit, 1000)
|
174
|
+
# @return [Enumerable] Enumerable that will yield up to limit results
|
175
|
+
def stream(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, limit: nil, page_size: nil)
|
176
|
+
limits = @version.read_limits(limit, page_size)
|
177
|
+
|
178
|
+
page = self.page(
|
179
|
+
beta: beta,
|
180
|
+
friendly_name: friendly_name,
|
181
|
+
phone_number: phone_number,
|
182
|
+
origin: origin,
|
183
|
+
page_size: limits[:page_size], )
|
184
|
+
|
185
|
+
@version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
186
|
+
end
|
187
|
+
|
188
|
+
##
|
189
|
+
# When passed a block, yields IncomingPhoneNumberInstance records from the API.
|
190
|
+
# This operation lazily loads records as efficiently as possible until the limit
|
191
|
+
# is reached.
|
192
|
+
def each
|
193
|
+
limits = @version.read_limits
|
194
|
+
|
195
|
+
page = self.page(page_size: limits[:page_size], )
|
196
|
+
|
197
|
+
@version.stream(page,
|
198
|
+
limit: limits[:limit],
|
199
|
+
page_limit: limits[:page_limit]).each {|x| yield x}
|
200
|
+
end
|
201
|
+
|
202
|
+
##
|
203
|
+
# Retrieve a single page of IncomingPhoneNumberInstance records from the API.
|
204
|
+
# Request is executed immediately.
|
205
|
+
# @param [Boolean] beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
|
206
|
+
# @param [String] friendly_name A string that identifies the IncomingPhoneNumber resources to read.
|
207
|
+
# @param [String] phone_number The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
|
208
|
+
# @param [String] origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
|
209
|
+
# @param [String] page_token PageToken provided by the API
|
210
|
+
# @param [Integer] page_number Page Number, this value is simply for client state
|
211
|
+
# @param [Integer] page_size Number of records to return, defaults to 50
|
212
|
+
# @return [Page] Page of IncomingPhoneNumberInstance
|
213
|
+
def page(beta: :unset, friendly_name: :unset, phone_number: :unset, origin: :unset, page_token: :unset, page_number: :unset, page_size: :unset)
|
214
|
+
params = Twilio::Values.of({
|
215
|
+
'Beta' => beta,
|
216
|
+
'FriendlyName' => friendly_name,
|
217
|
+
'PhoneNumber' => phone_number,
|
218
|
+
'Origin' => origin,
|
219
|
+
'PageToken' => page_token,
|
220
|
+
'Page' => page_number,
|
221
|
+
'PageSize' => page_size,
|
222
|
+
})
|
223
|
+
headers = Twilio::Values.of({})
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
response = @version.page('GET', @uri, params: params, headers: headers)
|
228
|
+
|
229
|
+
IncomingPhoneNumberPage.new(@version, response, @solution)
|
230
|
+
end
|
231
|
+
|
232
|
+
##
|
233
|
+
# Retrieve a single page of IncomingPhoneNumberInstance records from the API.
|
234
|
+
# Request is executed immediately.
|
235
|
+
# @param [String] target_url API-generated URL for the requested results page
|
236
|
+
# @return [Page] Page of IncomingPhoneNumberInstance
|
237
|
+
def get_page(target_url)
|
238
|
+
response = @version.domain.request(
|
239
|
+
'GET',
|
240
|
+
target_url
|
241
|
+
)
|
242
|
+
IncomingPhoneNumberPage.new(@version, response, @solution)
|
243
|
+
end
|
244
|
+
|
245
|
+
|
246
|
+
##
|
247
|
+
# Access the toll_free
|
248
|
+
# @return [TollFreeList]
|
249
|
+
# @return [TollFreeContext]
|
250
|
+
def toll_free
|
251
|
+
@toll_free ||= TollFreeList.new(@version, account_sid: @solution[:account_sid] )
|
252
|
+
end
|
253
|
+
##
|
254
|
+
# Access the local
|
255
|
+
# @return [LocalList]
|
256
|
+
# @return [LocalContext]
|
257
|
+
def local
|
258
|
+
@local ||= LocalList.new(@version, account_sid: @solution[:account_sid] )
|
259
|
+
end
|
260
|
+
##
|
261
|
+
# Access the mobile
|
262
|
+
# @return [MobileList]
|
263
|
+
# @return [MobileContext]
|
264
|
+
def mobile
|
265
|
+
@mobile ||= MobileList.new(@version, account_sid: @solution[:account_sid] )
|
266
|
+
end
|
267
|
+
|
268
|
+
# Provide a user friendly representation
|
269
|
+
def to_s
|
270
|
+
'#<Twilio.Api.V2010.IncomingPhoneNumberList>'
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
|
275
|
+
class IncomingPhoneNumberContext < InstanceContext
|
276
|
+
##
|
277
|
+
# Initialize the IncomingPhoneNumberContext
|
278
|
+
# @param [Version] version Version that contains the resource
|
279
|
+
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
|
280
|
+
# @param [String] sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to update.
|
281
|
+
# @return [IncomingPhoneNumberContext] IncomingPhoneNumberContext
|
282
|
+
def initialize(version, account_sid, sid)
|
283
|
+
super(version)
|
284
|
+
|
285
|
+
# Path Solution
|
286
|
+
@solution = { account_sid: account_sid, sid: sid, }
|
287
|
+
@uri = "/Accounts/#{@solution[:account_sid]}/IncomingPhoneNumbers/#{@solution[:sid]}.json"
|
288
|
+
|
289
|
+
# Dependents
|
290
|
+
@assigned_add_ons = nil
|
291
|
+
end
|
292
|
+
##
|
293
|
+
# Delete the IncomingPhoneNumberInstance
|
294
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
295
|
+
def delete
|
296
|
+
|
297
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
@version.delete('DELETE', @uri, headers: headers)
|
302
|
+
end
|
303
|
+
|
304
|
+
##
|
305
|
+
# Fetch the IncomingPhoneNumberInstance
|
306
|
+
# @return [IncomingPhoneNumberInstance] Fetched IncomingPhoneNumberInstance
|
307
|
+
def fetch
|
308
|
+
|
309
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
316
|
+
IncomingPhoneNumberInstance.new(
|
317
|
+
@version,
|
318
|
+
payload,
|
319
|
+
account_sid: @solution[:account_sid],
|
320
|
+
sid: @solution[:sid],
|
321
|
+
)
|
322
|
+
end
|
323
|
+
|
324
|
+
##
|
325
|
+
# Update the IncomingPhoneNumberInstance
|
326
|
+
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
|
327
|
+
# @param [String] api_version The API version to use for incoming calls made to the phone number. The default is `2010-04-01`.
|
328
|
+
# @param [String] friendly_name A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
|
329
|
+
# @param [String] sms_application_sid The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
|
330
|
+
# @param [String] sms_fallback_method The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
331
|
+
# @param [String] sms_fallback_url The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
|
332
|
+
# @param [String] sms_method The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
333
|
+
# @param [String] sms_url The URL we should call when the phone number receives an incoming SMS message.
|
334
|
+
# @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application.
|
335
|
+
# @param [String] status_callback_method The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
|
336
|
+
# @param [String] voice_application_sid The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
|
337
|
+
# @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
|
338
|
+
# @param [String] voice_fallback_method The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
339
|
+
# @param [String] voice_fallback_url The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
|
340
|
+
# @param [String] voice_method The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
341
|
+
# @param [String] voice_url The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
|
342
|
+
# @param [EmergencyStatus] emergency_status
|
343
|
+
# @param [String] emergency_address_sid The SID of the emergency address configuration to use for emergency calling from this phone number.
|
344
|
+
# @param [String] trunk_sid The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
|
345
|
+
# @param [VoiceReceiveMode] voice_receive_mode
|
346
|
+
# @param [String] identity_sid The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations.
|
347
|
+
# @param [String] address_sid The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations.
|
348
|
+
# @param [String] bundle_sid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
|
349
|
+
# @return [IncomingPhoneNumberInstance] Updated IncomingPhoneNumberInstance
|
350
|
+
def update(
|
351
|
+
account_sid: :unset,
|
352
|
+
api_version: :unset,
|
353
|
+
friendly_name: :unset,
|
354
|
+
sms_application_sid: :unset,
|
355
|
+
sms_fallback_method: :unset,
|
356
|
+
sms_fallback_url: :unset,
|
357
|
+
sms_method: :unset,
|
358
|
+
sms_url: :unset,
|
359
|
+
status_callback: :unset,
|
360
|
+
status_callback_method: :unset,
|
361
|
+
voice_application_sid: :unset,
|
362
|
+
voice_caller_id_lookup: :unset,
|
363
|
+
voice_fallback_method: :unset,
|
364
|
+
voice_fallback_url: :unset,
|
365
|
+
voice_method: :unset,
|
366
|
+
voice_url: :unset,
|
367
|
+
emergency_status: :unset,
|
368
|
+
emergency_address_sid: :unset,
|
369
|
+
trunk_sid: :unset,
|
370
|
+
voice_receive_mode: :unset,
|
371
|
+
identity_sid: :unset,
|
372
|
+
address_sid: :unset,
|
373
|
+
bundle_sid: :unset
|
374
|
+
)
|
375
|
+
|
376
|
+
data = Twilio::Values.of({
|
377
|
+
'AccountSid' => account_sid,
|
378
|
+
'ApiVersion' => api_version,
|
379
|
+
'FriendlyName' => friendly_name,
|
380
|
+
'SmsApplicationSid' => sms_application_sid,
|
381
|
+
'SmsFallbackMethod' => sms_fallback_method,
|
382
|
+
'SmsFallbackUrl' => sms_fallback_url,
|
383
|
+
'SmsMethod' => sms_method,
|
384
|
+
'SmsUrl' => sms_url,
|
385
|
+
'StatusCallback' => status_callback,
|
386
|
+
'StatusCallbackMethod' => status_callback_method,
|
387
|
+
'VoiceApplicationSid' => voice_application_sid,
|
388
|
+
'VoiceCallerIdLookup' => voice_caller_id_lookup,
|
389
|
+
'VoiceFallbackMethod' => voice_fallback_method,
|
390
|
+
'VoiceFallbackUrl' => voice_fallback_url,
|
391
|
+
'VoiceMethod' => voice_method,
|
392
|
+
'VoiceUrl' => voice_url,
|
393
|
+
'EmergencyStatus' => emergency_status,
|
394
|
+
'EmergencyAddressSid' => emergency_address_sid,
|
395
|
+
'TrunkSid' => trunk_sid,
|
396
|
+
'VoiceReceiveMode' => voice_receive_mode,
|
397
|
+
'IdentitySid' => identity_sid,
|
398
|
+
'AddressSid' => address_sid,
|
399
|
+
'BundleSid' => bundle_sid,
|
400
|
+
})
|
401
|
+
|
402
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
payload = @version.update('POST', @uri, data: data, headers: headers)
|
409
|
+
IncomingPhoneNumberInstance.new(
|
410
|
+
@version,
|
411
|
+
payload,
|
412
|
+
account_sid: @solution[:account_sid],
|
413
|
+
sid: @solution[:sid],
|
414
|
+
)
|
415
|
+
end
|
416
|
+
|
417
|
+
##
|
418
|
+
# Access the assigned_add_ons
|
419
|
+
# @return [AssignedAddOnList]
|
420
|
+
# @return [AssignedAddOnContext] if sid was passed.
|
421
|
+
def assigned_add_ons(sid=:unset)
|
422
|
+
|
423
|
+
raise ArgumentError, 'sid cannot be nil' if sid.nil?
|
424
|
+
|
425
|
+
if sid != :unset
|
426
|
+
return AssignedAddOnContext.new(@version, @solution[:account_sid], @solution[:sid],sid )
|
427
|
+
end
|
428
|
+
|
429
|
+
unless @assigned_add_ons
|
430
|
+
@assigned_add_ons = AssignedAddOnList.new(
|
431
|
+
@version, account_sid: @solution[:account_sid], resource_sid: @solution[:sid], )
|
432
|
+
end
|
433
|
+
|
434
|
+
@assigned_add_ons
|
435
|
+
end
|
436
|
+
|
437
|
+
##
|
438
|
+
# Provide a user friendly representation
|
439
|
+
def to_s
|
440
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
441
|
+
"#<Twilio.Api.V2010.IncomingPhoneNumberContext #{context}>"
|
442
|
+
end
|
443
|
+
|
444
|
+
##
|
445
|
+
# Provide a detailed, user friendly representation
|
446
|
+
def inspect
|
447
|
+
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
448
|
+
"#<Twilio.Api.V2010.IncomingPhoneNumberContext #{context}>"
|
449
|
+
end
|
450
|
+
end
|
451
|
+
|
452
|
+
class IncomingPhoneNumberPage < Page
|
453
|
+
##
|
454
|
+
# Initialize the IncomingPhoneNumberPage
|
455
|
+
# @param [Version] version Version that contains the resource
|
456
|
+
# @param [Response] response Response from the API
|
457
|
+
# @param [Hash] solution Path solution for the resource
|
458
|
+
# @return [IncomingPhoneNumberPage] IncomingPhoneNumberPage
|
459
|
+
def initialize(version, response, solution)
|
460
|
+
super(version, response)
|
461
|
+
|
462
|
+
# Path Solution
|
463
|
+
@solution = solution
|
464
|
+
end
|
465
|
+
|
466
|
+
##
|
467
|
+
# Build an instance of IncomingPhoneNumberInstance
|
468
|
+
# @param [Hash] payload Payload response from the API
|
469
|
+
# @return [IncomingPhoneNumberInstance] IncomingPhoneNumberInstance
|
470
|
+
def get_instance(payload)
|
471
|
+
IncomingPhoneNumberInstance.new(@version, payload, account_sid: @solution[:account_sid])
|
472
|
+
end
|
473
|
+
|
474
|
+
##
|
475
|
+
# Provide a user friendly representation
|
476
|
+
def to_s
|
477
|
+
'<Twilio.Api.V2010.IncomingPhoneNumberPage>'
|
478
|
+
end
|
479
|
+
end
|
480
|
+
class IncomingPhoneNumberInstance < InstanceResource
|
481
|
+
##
|
482
|
+
# Initialize the IncomingPhoneNumberInstance
|
483
|
+
# @param [Version] version Version that contains the resource
|
484
|
+
# @param [Hash] payload payload that contains response from Twilio
|
485
|
+
# @param [String] account_sid The SID of the
|
486
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this IncomingPhoneNumber
|
487
|
+
# resource.
|
488
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
489
|
+
# @return [IncomingPhoneNumberInstance] IncomingPhoneNumberInstance
|
490
|
+
def initialize(version, payload , account_sid: nil, sid: nil)
|
491
|
+
super(version)
|
492
|
+
|
493
|
+
# Marshaled Properties
|
494
|
+
@properties = {
|
495
|
+
'account_sid' => payload['account_sid'],
|
496
|
+
'address_sid' => payload['address_sid'],
|
497
|
+
'address_requirements' => payload['address_requirements'],
|
498
|
+
'api_version' => payload['api_version'],
|
499
|
+
'beta' => payload['beta'],
|
500
|
+
'capabilities' => payload['capabilities'],
|
501
|
+
'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
|
502
|
+
'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
|
503
|
+
'friendly_name' => payload['friendly_name'],
|
504
|
+
'identity_sid' => payload['identity_sid'],
|
505
|
+
'phone_number' => payload['phone_number'],
|
506
|
+
'origin' => payload['origin'],
|
507
|
+
'sid' => payload['sid'],
|
508
|
+
'sms_application_sid' => payload['sms_application_sid'],
|
509
|
+
'sms_fallback_method' => payload['sms_fallback_method'],
|
510
|
+
'sms_fallback_url' => payload['sms_fallback_url'],
|
511
|
+
'sms_method' => payload['sms_method'],
|
512
|
+
'sms_url' => payload['sms_url'],
|
513
|
+
'status_callback' => payload['status_callback'],
|
514
|
+
'status_callback_method' => payload['status_callback_method'],
|
515
|
+
'trunk_sid' => payload['trunk_sid'],
|
516
|
+
'uri' => payload['uri'],
|
517
|
+
'voice_receive_mode' => payload['voice_receive_mode'],
|
518
|
+
'voice_application_sid' => payload['voice_application_sid'],
|
519
|
+
'voice_caller_id_lookup' => payload['voice_caller_id_lookup'],
|
520
|
+
'voice_fallback_method' => payload['voice_fallback_method'],
|
521
|
+
'voice_fallback_url' => payload['voice_fallback_url'],
|
522
|
+
'voice_method' => payload['voice_method'],
|
523
|
+
'voice_url' => payload['voice_url'],
|
524
|
+
'emergency_status' => payload['emergency_status'],
|
525
|
+
'emergency_address_sid' => payload['emergency_address_sid'],
|
526
|
+
'emergency_address_status' => payload['emergency_address_status'],
|
527
|
+
'bundle_sid' => payload['bundle_sid'],
|
528
|
+
'status' => payload['status'],
|
529
|
+
}
|
530
|
+
|
531
|
+
# Context
|
532
|
+
@instance_context = nil
|
533
|
+
@params = { 'account_sid' => account_sid ,'sid' => sid || @properties['sid'] , }
|
534
|
+
end
|
535
|
+
|
536
|
+
##
|
537
|
+
# Generate an instance context for the instance, the context is capable of
|
538
|
+
# performing various actions. All instance actions are proxied to the context
|
539
|
+
# @return [IncomingPhoneNumberContext] CallContext for this CallInstance
|
540
|
+
def context
|
541
|
+
unless @instance_context
|
542
|
+
@instance_context = IncomingPhoneNumberContext.new(@version , @params['account_sid'], @params['sid'])
|
543
|
+
end
|
544
|
+
@instance_context
|
545
|
+
end
|
546
|
+
|
547
|
+
##
|
548
|
+
# @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this IncomingPhoneNumber resource.
|
549
|
+
def account_sid
|
550
|
+
@properties['account_sid']
|
551
|
+
end
|
552
|
+
|
553
|
+
##
|
554
|
+
# @return [String] The SID of the Address resource associated with the phone number.
|
555
|
+
def address_sid
|
556
|
+
@properties['address_sid']
|
557
|
+
end
|
558
|
+
|
559
|
+
##
|
560
|
+
# @return [AddressRequirement]
|
561
|
+
def address_requirements
|
562
|
+
@properties['address_requirements']
|
563
|
+
end
|
564
|
+
|
565
|
+
##
|
566
|
+
# @return [String] The API version used to start a new TwiML session.
|
567
|
+
def api_version
|
568
|
+
@properties['api_version']
|
569
|
+
end
|
570
|
+
|
571
|
+
##
|
572
|
+
# @return [Boolean] Whether the phone number is new to the Twilio platform. Can be: `true` or `false`.
|
573
|
+
def beta
|
574
|
+
@properties['beta']
|
575
|
+
end
|
576
|
+
|
577
|
+
##
|
578
|
+
# @return [ApiV2010AccountIncomingPhoneNumberCapabilities]
|
579
|
+
def capabilities
|
580
|
+
@properties['capabilities']
|
581
|
+
end
|
582
|
+
|
583
|
+
##
|
584
|
+
# @return [Time] The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
585
|
+
def date_created
|
586
|
+
@properties['date_created']
|
587
|
+
end
|
588
|
+
|
589
|
+
##
|
590
|
+
# @return [Time] The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
|
591
|
+
def date_updated
|
592
|
+
@properties['date_updated']
|
593
|
+
end
|
594
|
+
|
595
|
+
##
|
596
|
+
# @return [String] The string that you assigned to describe the resource.
|
597
|
+
def friendly_name
|
598
|
+
@properties['friendly_name']
|
599
|
+
end
|
600
|
+
|
601
|
+
##
|
602
|
+
# @return [String] The SID of the Identity resource that we associate with the phone number. Some regions require an Identity to meet local regulations.
|
603
|
+
def identity_sid
|
604
|
+
@properties['identity_sid']
|
605
|
+
end
|
606
|
+
|
607
|
+
##
|
608
|
+
# @return [String] The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
|
609
|
+
def phone_number
|
610
|
+
@properties['phone_number']
|
611
|
+
end
|
612
|
+
|
613
|
+
##
|
614
|
+
# @return [String] The phone number's origin. `twilio` identifies Twilio-owned phone numbers and `hosted` identifies hosted phone numbers.
|
615
|
+
def origin
|
616
|
+
@properties['origin']
|
617
|
+
end
|
618
|
+
|
619
|
+
##
|
620
|
+
# @return [String] The unique string that that we created to identify this IncomingPhoneNumber resource.
|
621
|
+
def sid
|
622
|
+
@properties['sid']
|
623
|
+
end
|
624
|
+
|
625
|
+
##
|
626
|
+
# @return [String] The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application.
|
627
|
+
def sms_application_sid
|
628
|
+
@properties['sms_application_sid']
|
629
|
+
end
|
630
|
+
|
631
|
+
##
|
632
|
+
# @return [String] The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`.
|
633
|
+
def sms_fallback_method
|
634
|
+
@properties['sms_fallback_method']
|
635
|
+
end
|
636
|
+
|
637
|
+
##
|
638
|
+
# @return [String] The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`.
|
639
|
+
def sms_fallback_url
|
640
|
+
@properties['sms_fallback_url']
|
641
|
+
end
|
642
|
+
|
643
|
+
##
|
644
|
+
# @return [String] The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`.
|
645
|
+
def sms_method
|
646
|
+
@properties['sms_method']
|
647
|
+
end
|
648
|
+
|
649
|
+
##
|
650
|
+
# @return [String] The URL we call when the phone number receives an incoming SMS message.
|
651
|
+
def sms_url
|
652
|
+
@properties['sms_url']
|
653
|
+
end
|
654
|
+
|
655
|
+
##
|
656
|
+
# @return [String] The URL we call using the `status_callback_method` to send status information to your application.
|
657
|
+
def status_callback
|
658
|
+
@properties['status_callback']
|
659
|
+
end
|
660
|
+
|
661
|
+
##
|
662
|
+
# @return [String] The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`.
|
663
|
+
def status_callback_method
|
664
|
+
@properties['status_callback_method']
|
665
|
+
end
|
666
|
+
|
667
|
+
##
|
668
|
+
# @return [String] The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
|
669
|
+
def trunk_sid
|
670
|
+
@properties['trunk_sid']
|
671
|
+
end
|
672
|
+
|
673
|
+
##
|
674
|
+
# @return [String] The URI of the resource, relative to `https://api.twilio.com`.
|
675
|
+
def uri
|
676
|
+
@properties['uri']
|
677
|
+
end
|
678
|
+
|
679
|
+
##
|
680
|
+
# @return [VoiceReceiveMode]
|
681
|
+
def voice_receive_mode
|
682
|
+
@properties['voice_receive_mode']
|
683
|
+
end
|
684
|
+
|
685
|
+
##
|
686
|
+
# @return [String] The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
|
687
|
+
def voice_application_sid
|
688
|
+
@properties['voice_application_sid']
|
689
|
+
end
|
690
|
+
|
691
|
+
##
|
692
|
+
# @return [Boolean] Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: `true` or `false`.
|
693
|
+
def voice_caller_id_lookup
|
694
|
+
@properties['voice_caller_id_lookup']
|
695
|
+
end
|
696
|
+
|
697
|
+
##
|
698
|
+
# @return [String] The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`.
|
699
|
+
def voice_fallback_method
|
700
|
+
@properties['voice_fallback_method']
|
701
|
+
end
|
702
|
+
|
703
|
+
##
|
704
|
+
# @return [String] The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`.
|
705
|
+
def voice_fallback_url
|
706
|
+
@properties['voice_fallback_url']
|
707
|
+
end
|
708
|
+
|
709
|
+
##
|
710
|
+
# @return [String] The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`.
|
711
|
+
def voice_method
|
712
|
+
@properties['voice_method']
|
713
|
+
end
|
714
|
+
|
715
|
+
##
|
716
|
+
# @return [String] The URL we call when the phone number receives a call. The `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` is set.
|
717
|
+
def voice_url
|
718
|
+
@properties['voice_url']
|
719
|
+
end
|
720
|
+
|
721
|
+
##
|
722
|
+
# @return [EmergencyStatus]
|
723
|
+
def emergency_status
|
724
|
+
@properties['emergency_status']
|
725
|
+
end
|
726
|
+
|
727
|
+
##
|
728
|
+
# @return [String] The SID of the emergency address configuration that we use for emergency calling from this phone number.
|
729
|
+
def emergency_address_sid
|
730
|
+
@properties['emergency_address_sid']
|
731
|
+
end
|
732
|
+
|
733
|
+
##
|
734
|
+
# @return [EmergencyAddressStatus]
|
735
|
+
def emergency_address_status
|
736
|
+
@properties['emergency_address_status']
|
737
|
+
end
|
738
|
+
|
739
|
+
##
|
740
|
+
# @return [String] The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
|
741
|
+
def bundle_sid
|
742
|
+
@properties['bundle_sid']
|
743
|
+
end
|
744
|
+
|
745
|
+
##
|
746
|
+
# @return [String]
|
747
|
+
def status
|
748
|
+
@properties['status']
|
749
|
+
end
|
750
|
+
|
751
|
+
##
|
752
|
+
# Delete the IncomingPhoneNumberInstance
|
753
|
+
# @return [Boolean] True if delete succeeds, false otherwise
|
754
|
+
def delete
|
755
|
+
|
756
|
+
context.delete
|
757
|
+
end
|
758
|
+
|
759
|
+
##
|
760
|
+
# Fetch the IncomingPhoneNumberInstance
|
761
|
+
# @return [IncomingPhoneNumberInstance] Fetched IncomingPhoneNumberInstance
|
762
|
+
def fetch
|
763
|
+
|
764
|
+
context.fetch
|
765
|
+
end
|
766
|
+
|
767
|
+
##
|
768
|
+
# Update the IncomingPhoneNumberInstance
|
769
|
+
# @param [String] account_sid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
|
770
|
+
# @param [String] api_version The API version to use for incoming calls made to the phone number. The default is `2010-04-01`.
|
771
|
+
# @param [String] friendly_name A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
|
772
|
+
# @param [String] sms_application_sid The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
|
773
|
+
# @param [String] sms_fallback_method The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
774
|
+
# @param [String] sms_fallback_url The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
|
775
|
+
# @param [String] sms_method The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
776
|
+
# @param [String] sms_url The URL we should call when the phone number receives an incoming SMS message.
|
777
|
+
# @param [String] status_callback The URL we should call using the `status_callback_method` to send status information to your application.
|
778
|
+
# @param [String] status_callback_method The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
|
779
|
+
# @param [String] voice_application_sid The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
|
780
|
+
# @param [Boolean] voice_caller_id_lookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
|
781
|
+
# @param [String] voice_fallback_method The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
782
|
+
# @param [String] voice_fallback_url The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
|
783
|
+
# @param [String] voice_method The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
|
784
|
+
# @param [String] voice_url The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
|
785
|
+
# @param [EmergencyStatus] emergency_status
|
786
|
+
# @param [String] emergency_address_sid The SID of the emergency address configuration to use for emergency calling from this phone number.
|
787
|
+
# @param [String] trunk_sid The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
|
788
|
+
# @param [VoiceReceiveMode] voice_receive_mode
|
789
|
+
# @param [String] identity_sid The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations.
|
790
|
+
# @param [String] address_sid The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations.
|
791
|
+
# @param [String] bundle_sid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
|
792
|
+
# @return [IncomingPhoneNumberInstance] Updated IncomingPhoneNumberInstance
|
793
|
+
def update(
|
794
|
+
account_sid: :unset,
|
795
|
+
api_version: :unset,
|
796
|
+
friendly_name: :unset,
|
797
|
+
sms_application_sid: :unset,
|
798
|
+
sms_fallback_method: :unset,
|
799
|
+
sms_fallback_url: :unset,
|
800
|
+
sms_method: :unset,
|
801
|
+
sms_url: :unset,
|
802
|
+
status_callback: :unset,
|
803
|
+
status_callback_method: :unset,
|
804
|
+
voice_application_sid: :unset,
|
805
|
+
voice_caller_id_lookup: :unset,
|
806
|
+
voice_fallback_method: :unset,
|
807
|
+
voice_fallback_url: :unset,
|
808
|
+
voice_method: :unset,
|
809
|
+
voice_url: :unset,
|
810
|
+
emergency_status: :unset,
|
811
|
+
emergency_address_sid: :unset,
|
812
|
+
trunk_sid: :unset,
|
813
|
+
voice_receive_mode: :unset,
|
814
|
+
identity_sid: :unset,
|
815
|
+
address_sid: :unset,
|
816
|
+
bundle_sid: :unset
|
817
|
+
)
|
818
|
+
|
819
|
+
context.update(
|
820
|
+
account_sid: account_sid,
|
821
|
+
api_version: api_version,
|
822
|
+
friendly_name: friendly_name,
|
823
|
+
sms_application_sid: sms_application_sid,
|
824
|
+
sms_fallback_method: sms_fallback_method,
|
825
|
+
sms_fallback_url: sms_fallback_url,
|
826
|
+
sms_method: sms_method,
|
827
|
+
sms_url: sms_url,
|
828
|
+
status_callback: status_callback,
|
829
|
+
status_callback_method: status_callback_method,
|
830
|
+
voice_application_sid: voice_application_sid,
|
831
|
+
voice_caller_id_lookup: voice_caller_id_lookup,
|
832
|
+
voice_fallback_method: voice_fallback_method,
|
833
|
+
voice_fallback_url: voice_fallback_url,
|
834
|
+
voice_method: voice_method,
|
835
|
+
voice_url: voice_url,
|
836
|
+
emergency_status: emergency_status,
|
837
|
+
emergency_address_sid: emergency_address_sid,
|
838
|
+
trunk_sid: trunk_sid,
|
839
|
+
voice_receive_mode: voice_receive_mode,
|
840
|
+
identity_sid: identity_sid,
|
841
|
+
address_sid: address_sid,
|
842
|
+
bundle_sid: bundle_sid,
|
843
|
+
)
|
844
|
+
end
|
845
|
+
|
846
|
+
##
|
847
|
+
# Access the assigned_add_ons
|
848
|
+
# @return [assigned_add_ons] assigned_add_ons
|
849
|
+
def assigned_add_ons
|
850
|
+
context.assigned_add_ons
|
851
|
+
end
|
852
|
+
|
853
|
+
##
|
854
|
+
# Provide a user friendly representation
|
855
|
+
def to_s
|
856
|
+
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
857
|
+
"<Twilio.Api.V2010.IncomingPhoneNumberInstance #{values}>"
|
858
|
+
end
|
859
|
+
|
860
|
+
##
|
861
|
+
# Provide a detailed, user friendly representation
|
862
|
+
def inspect
|
863
|
+
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
864
|
+
"<Twilio.Api.V2010.IncomingPhoneNumberInstance #{values}>"
|
865
|
+
end
|
866
|
+
end
|
867
|
+
|
868
|
+
end
|
865
869
|
end
|
866
|
-
end
|
867
870
|
end
|
868
|
-
end
|
869
871
|
end
|
870
|
-
|
871
|
-
|
872
|
+
end
|
873
|
+
|
874
|
+
|