twilio-ruby 7.11.1 → 7.11.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/CHANGES.md +221 -0
- data/Gemfile.lock +2 -2
- data/README.md +2 -2
- data/lib/rack/twilio_webhook_authentication.rb +45 -2
- data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/bulk_consents.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/bulk_contacts.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/credential.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/messaging_geopermissions.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/safelist.rb +0 -59
- data/lib/twilio-ruby/rest/accounts/v1/secondary_auth_token.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/balance.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/payment.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/siprec.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/stream.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/transcription.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/call/user_defined_message_subscription.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/message.rb +6 -0
- data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload/data.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_calls.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types/auth_type_registrations.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/auth_types.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/token.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +0 -59
- data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +0 -59
- data/lib/twilio-ruby/rest/bulkexports/v1/export/job.rb +0 -59
- data/lib/twilio-ruby/rest/bulkexports/v1/export.rb +0 -59
- data/lib/twilio-ruby/rest/bulkexports/v1/export_configuration.rb +0 -59
- data/lib/twilio-ruby/rest/chat/v3/channel.rb +0 -59
- data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +0 -59
- data/lib/twilio-ruby/rest/content/v1/content/approval_fetch.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/configuration/webhook.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/configuration.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/conversation_with_participants.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration/webhook.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/service/configuration.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v2/action.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +525 -0
- data/lib/twilio-ruby/rest/conversations/v2/operation.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v2.rb +10 -4
- data/lib/twilio-ruby/rest/events/v1/schema.rb +0 -59
- data/lib/twilio-ruby/rest/events/v1/sink/sink_test.rb +0 -59
- data/lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/assessments.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/configuration.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/insights_assessments_comment.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_category.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/insights_questionnaires_question.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb +12 -14
- data/lib/twilio-ruby/rest/flex_api/v1/insights_session.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_answer_sets.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/insights_settings_comment.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/interaction/interaction_channel/interaction_transfer.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/interaction.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_archive.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb +2 -4
- data/lib/twilio-ruby/rest/flex_api/v1/plugin_version_archive.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v1/provisioning_status.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v2/flex_user.rb +0 -59
- data/lib/twilio-ruby/rest/flex_api/v2/web_channels.rb +0 -59
- data/lib/twilio-ruby/rest/frontline_api/v1/user.rb +0 -59
- data/lib/twilio-ruby/rest/iam/v1/api_key.rb +0 -59
- data/lib/twilio-ruby/rest/iam/v1/new_api_key.rb +0 -59
- data/lib/twilio-ruby/rest/iam/v1/o_auth_app.rb +0 -59
- data/lib/twilio-ruby/rest/iam/v1/token.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/call.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/setting.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v2/inbound.rb +2 -261
- data/lib/twilio-ruby/rest/insights/v2/inbound_report.rb +258 -0
- data/lib/twilio-ruby/rest/insights/v2/outbound.rb +18 -299
- data/lib/twilio-ruby/rest/insights/v2/outbound_report.rb +258 -0
- data/lib/twilio-ruby/rest/insights/v2/report.rb +27 -184
- data/lib/twilio-ruby/rest/insights/v2.rb +14 -4
- data/lib/twilio-ruby/rest/insights/v3/metadata.rb +1 -60
- data/lib/twilio-ruby/rest/insights/v3/query.rb +1 -60
- data/lib/twilio-ruby/rest/insights/v3/query_job.rb +654 -0
- data/lib/twilio-ruby/rest/insights/v3/result.rb +195 -0
- data/lib/twilio-ruby/rest/insights/v3.rb +17 -1
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachment.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v2/operator_attachments.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_operator_results.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/encrypted_sentences.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb +0 -59
- data/lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb +0 -59
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +0 -59
- data/lib/twilio-ruby/rest/knowledge/v2/operation.rb +0 -59
- data/lib/twilio-ruby/rest/knowledge/v2/search.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/bucket.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/lookup_override.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/query.rb +0 -59
- data/lib/twilio-ruby/rest/lookups/v2/rate_limit.rb +0 -59
- data/lib/twilio-ruby/rest/marketplace/v1/installed_add_on/installed_add_on_usage.rb +0 -59
- data/lib/twilio-ruby/rest/marketplace/v1/module_data.rb +0 -59
- data/lib/twilio-ruby/rest/marketplace/v1/module_data_management.rb +0 -59
- data/lib/twilio-ruby/rest/marketplace/v1/referral_conversion.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/bulk.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/conversation_summary.rb +2 -4
- data/lib/twilio-ruby/rest/memory/v1/identifier.rb +0 -80
- data/lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/lookup.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/observation.rb +2 -4
- data/lib/twilio-ruby/rest/memory/v1/operation.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/recall.rb +0 -59
- data/lib/twilio-ruby/rest/memory/v1/revision.rb +2 -4
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/deactivations.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/domain_certs.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/domain_config.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/domain_config_messaging_service.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/domain_validate_dn.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/external_campaign.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/linkshortening_messaging_service_domain_association.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/request_managed_cert.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person.rb +2 -4
- data/lib/twilio-ruby/rest/messaging/v1/service/us_app_to_person_usecase.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/usecase.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v2/domain_certs.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb +0 -59
- data/lib/twilio-ruby/rest/notify/v1/service/notification.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/eligibility.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/embedded_session.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in_phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_portability.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/porting_webhook_configuration_delete.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/sender_id_registration.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification_check.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification_check.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1/webhook.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2/bulk_hosted_number_order.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2/bundle_clone.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/bundle/replace_items.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2/regulatory_compliance.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v2.rb +0 -16
- data/lib/twilio-ruby/rest/numbers/v3/hosted_number_order.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v1/authorize.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v1/token.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v2/authorize.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb +0 -59
- data/lib/twilio-ruby/rest/oauth/v2/token.rb +2 -61
- data/lib/twilio-ruby/rest/preview/wireless/sim/usage.rb +0 -59
- data/lib/twilio-ruby/rest/preview_iam/v1/authorize.rb +0 -59
- data/lib/twilio-ruby/rest/preview_iam/v1/token.rb +0 -59
- data/lib/twilio-ruby/rest/preview_iam/versionless/organization.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v1/voice.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v2/number.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v2/voice/number.rb +0 -59
- data/lib/twilio-ruby/rest/pricing/v2/voice.rb +0 -59
- data/lib/twilio-ruby/rest/routes/v2/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/routes/v2/sip_domain.rb +0 -59
- data/lib/twilio-ruby/rest/routes/v2/trunk.rb +0 -59
- data/lib/twilio-ruby/rest/routes/v3/phone_number.rb +0 -59
- data/lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb +0 -59
- data/lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/engagement_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v1/flow/engagement/step/step_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v1/flow/execution/execution_step/execution_step_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v2/flow/execution/execution_step/execution_step_context.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v2/flow/flow_test_user.rb +0 -59
- data/lib/twilio-ruby/rest/studio/v2/flow_validate.rb +0 -59
- data/lib/twilio-ruby/rest/sync/v1/service/sync_stream/stream_message.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_bulk_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_cumulative_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_cumulative_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_real_time_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +0 -59
- data/lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration_embedded_session.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration_embedded_session.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_inquiries.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_registration_inquiries.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/compliance_tollfree_inquiries.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/customer_profiles_provisional_copy.rb +0 -59
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/form.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/safelist.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/access_token.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/new_challenge.rb +3 -62
- data/lib/twilio-ruby/rest/verify/v2/service/new_factor.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/new_verify_factor.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/service/verification.rb +8 -61
- data/lib/twilio-ruby/rest/verify/v2/service/verification_check.rb +0 -59
- data/lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/composition_settings.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/recording_settings.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/room/participant/anonymize.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/room/participant/subscribe_rules.rb +0 -59
- data/lib/twilio-ruby/rest/video/v1/room/recording_rules.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v1/archived_call.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/bulk_country_update.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions/settings.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v1/dialing_permissions.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/account_default_configuration.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/configuration/default.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/configuration.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/recording.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/transcription.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v2/type.rb +0 -59
- data/lib/twilio-ruby/rest/voice/v3/transcription.rb +259 -50
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +6 -4
- data/lib/twilio-ruby/rest/memory/v1/event.rb +0 -320
- data/lib/twilio-ruby/rest/numbers/v2/caller_id.rb +0 -515
|
@@ -1,515 +0,0 @@
|
|
|
1
|
-
##
|
|
2
|
-
# This code was generated by
|
|
3
|
-
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
4
|
-
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
5
|
-
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
6
|
-
#
|
|
7
|
-
# Twilio - Numbers
|
|
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
|
-
#
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
module Twilio
|
|
17
|
-
module REST
|
|
18
|
-
class Numbers < NumbersBase
|
|
19
|
-
class V2 < Version
|
|
20
|
-
class CallerIdList < ListResource
|
|
21
|
-
|
|
22
|
-
##
|
|
23
|
-
# Initialize the CallerIdList
|
|
24
|
-
# @param [Version] version Version that contains the resource
|
|
25
|
-
# @return [CallerIdList] CallerIdList
|
|
26
|
-
def initialize(version)
|
|
27
|
-
super(version)
|
|
28
|
-
|
|
29
|
-
# Path Solution
|
|
30
|
-
@solution = { }
|
|
31
|
-
@uri = "/CallerIds"
|
|
32
|
-
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
##
|
|
36
|
-
# Lists CallerIdInstance 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 [Integer] limit Upper limit for the number of records to return. stream()
|
|
40
|
-
# guarantees to never return more than limit. Default is no limit
|
|
41
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
|
42
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
|
43
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
44
|
-
# efficient page size, i.e. min(limit, 1000)
|
|
45
|
-
# @return [Array] Array of up to limit results
|
|
46
|
-
def list(limit: nil, page_size: nil)
|
|
47
|
-
self.stream(
|
|
48
|
-
limit: limit,
|
|
49
|
-
page_size: page_size
|
|
50
|
-
).entries
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
##
|
|
54
|
-
# Streams Instance records from the API as an Enumerable.
|
|
55
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
|
56
|
-
# is reached.
|
|
57
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
58
|
-
# guarantees to never return more than limit. Default is no limit
|
|
59
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
|
60
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
|
61
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
62
|
-
# efficient page size, i.e. min(limit, 1000)
|
|
63
|
-
# @return [Enumerable] Enumerable that will yield up to limit results
|
|
64
|
-
def stream(limit: nil, page_size: nil)
|
|
65
|
-
limits = @version.read_limits(limit, page_size)
|
|
66
|
-
|
|
67
|
-
page = self.page(
|
|
68
|
-
page_size: limits[:page_size], )
|
|
69
|
-
|
|
70
|
-
return [].each if page.nil?
|
|
71
|
-
|
|
72
|
-
result = @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
|
|
73
|
-
return [].each if result.nil?
|
|
74
|
-
result
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
##
|
|
78
|
-
# Lists CallerIdPageMetadata records from the API as a list.
|
|
79
|
-
# @param [Integer] limit Upper limit for the number of records to return. stream()
|
|
80
|
-
# guarantees to never return more than limit. Default is no limit
|
|
81
|
-
# @param [Integer] page_size Number of records to fetch per request, when
|
|
82
|
-
# not set will use the default value of 50 records. If no page_size is defined
|
|
83
|
-
# but a limit is defined, stream() will attempt to read the limit with the most
|
|
84
|
-
# efficient page size, i.e. min(limit, 1000)
|
|
85
|
-
# @return [Array] Array of up to limit results
|
|
86
|
-
def list_with_metadata(limit: nil, page_size: nil)
|
|
87
|
-
limits = @version.read_limits(limit, page_size)
|
|
88
|
-
params = Twilio::Values.of({
|
|
89
|
-
|
|
90
|
-
'PageSize' => limits[:page_size],
|
|
91
|
-
});
|
|
92
|
-
headers = Twilio::Values.of({})
|
|
93
|
-
|
|
94
|
-
response = @version.page('GET', @uri, params: params, headers: headers)
|
|
95
|
-
|
|
96
|
-
CallerIdPageMetadata.new(@version, response, @solution, limits[:limit])
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
##
|
|
100
|
-
# When passed a block, yields CallerIdInstance records from the API.
|
|
101
|
-
# This operation lazily loads records as efficiently as possible until the limit
|
|
102
|
-
# is reached.
|
|
103
|
-
def each
|
|
104
|
-
limits = @version.read_limits
|
|
105
|
-
|
|
106
|
-
page = self.page(page_size: limits[:page_size], )
|
|
107
|
-
|
|
108
|
-
return [].each if page.nil?
|
|
109
|
-
|
|
110
|
-
result = @version.stream(page,
|
|
111
|
-
limit: limits[:limit],
|
|
112
|
-
page_limit: limits[:page_limit])
|
|
113
|
-
return [].each if result.nil?
|
|
114
|
-
result.each {|x| yield x}
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
##
|
|
118
|
-
# Retrieve a single page of CallerIdInstance records from the API.
|
|
119
|
-
# Request is executed immediately.
|
|
120
|
-
# @param [String] page_token PageToken provided by the API
|
|
121
|
-
# @param [Integer] page_number Page Number, this value is simply for client state
|
|
122
|
-
# @param [Integer] page_size Number of records to return, defaults to 50
|
|
123
|
-
# @return [Page] Page of CallerIdInstance
|
|
124
|
-
def page(page_token: :unset, page_number: :unset,page_size: :unset)
|
|
125
|
-
params = Twilio::Values.of({
|
|
126
|
-
'PageToken' => page_token,
|
|
127
|
-
'Page' => page_number,
|
|
128
|
-
'PageSize' => page_size,
|
|
129
|
-
})
|
|
130
|
-
headers = Twilio::Values.of({})
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
response = @version.page('GET', @uri, params: params, headers: headers)
|
|
135
|
-
|
|
136
|
-
CallerIdPage.new(@version, response, @solution)
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
##
|
|
140
|
-
# Retrieve a single page of CallerIdInstance records from the API.
|
|
141
|
-
# Request is executed immediately.
|
|
142
|
-
# @param [String] target_url API-generated URL for the requested results page
|
|
143
|
-
# @return [Page] Page of CallerIdInstance
|
|
144
|
-
def get_page(target_url)
|
|
145
|
-
response = @version.domain.request(
|
|
146
|
-
'GET',
|
|
147
|
-
target_url
|
|
148
|
-
)
|
|
149
|
-
CallerIdPage.new(@version, response, @solution)
|
|
150
|
-
end
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
# Provide a user friendly representation
|
|
155
|
-
def to_s
|
|
156
|
-
'#<Twilio.Numbers.V2.CallerIdList>'
|
|
157
|
-
end
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
class CallerIdContext < InstanceContext
|
|
162
|
-
##
|
|
163
|
-
# Initialize the CallerIdContext
|
|
164
|
-
# @param [Version] version Version that contains the resource
|
|
165
|
-
# @param [String] caller_id_sid
|
|
166
|
-
# @return [CallerIdContext] CallerIdContext
|
|
167
|
-
def initialize(version, caller_id_sid)
|
|
168
|
-
super(version)
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
# Path Solution
|
|
172
|
-
@solution = { caller_id_sid: caller_id_sid, }
|
|
173
|
-
@uri = "/CallerIds/#{@solution[:caller_id_sid]}"
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
end
|
|
177
|
-
##
|
|
178
|
-
# Delete the CallerIdInstance
|
|
179
|
-
# @return [Boolean] True if delete succeeds, false otherwise
|
|
180
|
-
def delete
|
|
181
|
-
|
|
182
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
@version.delete('DELETE', @uri, headers: headers)
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
##
|
|
191
|
-
# Delete the CallerIdInstanceMetadata
|
|
192
|
-
# @return [Boolean] True if delete succeeds, false otherwise
|
|
193
|
-
def delete_with_metadata
|
|
194
|
-
|
|
195
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
response = @version.delete_with_metadata('DELETE', @uri, headers: headers)
|
|
200
|
-
callerId_instance = CallerIdInstance.new(
|
|
201
|
-
@version,
|
|
202
|
-
response.body,
|
|
203
|
-
account_sid: @solution[:account_sid],
|
|
204
|
-
sid: @solution[:sid],
|
|
205
|
-
)
|
|
206
|
-
CallerIdInstanceMetadata.new(@version, callerId_instance, response.headers, response.status_code)
|
|
207
|
-
end
|
|
208
|
-
|
|
209
|
-
##
|
|
210
|
-
# Update the CallerIdInstance
|
|
211
|
-
# @return [CallerIdInstance] Updated CallerIdInstance
|
|
212
|
-
def update
|
|
213
|
-
|
|
214
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
payload = @version.update('POST', @uri, headers: headers)
|
|
221
|
-
CallerIdInstance.new(
|
|
222
|
-
@version,
|
|
223
|
-
payload,
|
|
224
|
-
caller_id_sid: @solution[:caller_id_sid],
|
|
225
|
-
)
|
|
226
|
-
end
|
|
227
|
-
|
|
228
|
-
##
|
|
229
|
-
# Update the CallerIdInstanceMetadata
|
|
230
|
-
# @return [CallerIdInstance] Updated CallerIdInstance
|
|
231
|
-
def update_with_metadata
|
|
232
|
-
|
|
233
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
response = @version.update_with_metadata('POST', @uri, headers: headers)
|
|
240
|
-
caller_id_instance = CallerIdInstance.new(
|
|
241
|
-
@version,
|
|
242
|
-
response.body,
|
|
243
|
-
caller_id_sid: @solution[:caller_id_sid],
|
|
244
|
-
)
|
|
245
|
-
CallerIdInstanceMetadata.new(
|
|
246
|
-
@version,
|
|
247
|
-
caller_id_instance,
|
|
248
|
-
response.headers,
|
|
249
|
-
response.status_code
|
|
250
|
-
)
|
|
251
|
-
end
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
##
|
|
255
|
-
# Provide a user friendly representation
|
|
256
|
-
def to_s
|
|
257
|
-
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
|
258
|
-
"#<Twilio.Numbers.V2.CallerIdContext #{context}>"
|
|
259
|
-
end
|
|
260
|
-
|
|
261
|
-
##
|
|
262
|
-
# Provide a detailed, user friendly representation
|
|
263
|
-
def inspect
|
|
264
|
-
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
|
265
|
-
"#<Twilio.Numbers.V2.CallerIdContext #{context}>"
|
|
266
|
-
end
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
class CallerIdInstanceMetadata < InstanceResourceMetadata
|
|
270
|
-
##
|
|
271
|
-
# Initializes a new CallerIdInstanceMetadata.
|
|
272
|
-
# @param [Version] version Version that contains the resource
|
|
273
|
-
# @param [}CallerIdInstance] caller_id_instance The instance associated with the metadata.
|
|
274
|
-
# @param [Hash] headers Header object with response headers.
|
|
275
|
-
# @param [Integer] status_code The HTTP status code of the response.
|
|
276
|
-
# @return [CallerIdInstanceMetadata] The initialized instance with metadata.
|
|
277
|
-
def initialize(version, caller_id_instance, headers, status_code)
|
|
278
|
-
super(version, headers, status_code)
|
|
279
|
-
@caller_id_instance = caller_id_instance
|
|
280
|
-
end
|
|
281
|
-
|
|
282
|
-
def caller_id
|
|
283
|
-
@caller_id_instance
|
|
284
|
-
end
|
|
285
|
-
|
|
286
|
-
def headers
|
|
287
|
-
@headers
|
|
288
|
-
end
|
|
289
|
-
|
|
290
|
-
def status_code
|
|
291
|
-
@status_code
|
|
292
|
-
end
|
|
293
|
-
|
|
294
|
-
def to_s
|
|
295
|
-
"<Twilio.Api.V2010.CallerIdInstanceMetadata status=#{@status_code}>"
|
|
296
|
-
end
|
|
297
|
-
end
|
|
298
|
-
|
|
299
|
-
class CallerIdListResponse < InstanceListResource
|
|
300
|
-
# @param [Array<CallerIdInstance>] instance
|
|
301
|
-
# @param [Hash{String => Object}] headers
|
|
302
|
-
# @param [Integer] status_code
|
|
303
|
-
def initialize(version, payload, key)
|
|
304
|
-
@caller_id_instance = payload.body[key].map do |data|
|
|
305
|
-
CallerIdInstance.new(version, data)
|
|
306
|
-
end
|
|
307
|
-
@headers = payload.headers
|
|
308
|
-
@status_code = payload.status_code
|
|
309
|
-
end
|
|
310
|
-
|
|
311
|
-
def caller_id_instance
|
|
312
|
-
@instance
|
|
313
|
-
end
|
|
314
|
-
end
|
|
315
|
-
|
|
316
|
-
class CallerIdPage < Page
|
|
317
|
-
##
|
|
318
|
-
# Initialize the CallerIdPage
|
|
319
|
-
# @param [Version] version Version that contains the resource
|
|
320
|
-
# @param [Response] response Response from the API
|
|
321
|
-
# @param [Hash] solution Path solution for the resource
|
|
322
|
-
# @return [CallerIdPage] CallerIdPage
|
|
323
|
-
def initialize(version, response, solution)
|
|
324
|
-
super(version, response)
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
# Path Solution
|
|
328
|
-
@solution = solution
|
|
329
|
-
end
|
|
330
|
-
|
|
331
|
-
##
|
|
332
|
-
# Build an instance of CallerIdInstance
|
|
333
|
-
# @param [Hash] payload Payload response from the API
|
|
334
|
-
# @return [CallerIdInstance] CallerIdInstance
|
|
335
|
-
def get_instance(payload)
|
|
336
|
-
CallerIdInstance.new(@version, payload)
|
|
337
|
-
end
|
|
338
|
-
|
|
339
|
-
##
|
|
340
|
-
# Provide a user friendly representation
|
|
341
|
-
def to_s
|
|
342
|
-
'<Twilio.Numbers.V2.CallerIdPage>'
|
|
343
|
-
end
|
|
344
|
-
end
|
|
345
|
-
|
|
346
|
-
class CallerIdPageMetadata < PageMetadata
|
|
347
|
-
attr_reader :caller_id_page
|
|
348
|
-
|
|
349
|
-
def initialize(version, response, solution, limit)
|
|
350
|
-
super(version, response)
|
|
351
|
-
@caller_id_page = []
|
|
352
|
-
@limit = limit
|
|
353
|
-
key = get_key(response.body)
|
|
354
|
-
records = 0
|
|
355
|
-
while( limit != :unset && records < limit )
|
|
356
|
-
@caller_id_page << CallerIdListResponse.new(version, @payload, key, limit - records)
|
|
357
|
-
@payload = self.next_page
|
|
358
|
-
break unless @payload
|
|
359
|
-
records += (@payload.body[key] || []).size
|
|
360
|
-
end
|
|
361
|
-
# Path Solution
|
|
362
|
-
@solution = solution
|
|
363
|
-
end
|
|
364
|
-
|
|
365
|
-
def each
|
|
366
|
-
@caller_id_page.each do |record|
|
|
367
|
-
yield record
|
|
368
|
-
end
|
|
369
|
-
end
|
|
370
|
-
|
|
371
|
-
def to_s
|
|
372
|
-
'<Twilio::REST::Numbers::V2PageMetadata>';
|
|
373
|
-
end
|
|
374
|
-
end
|
|
375
|
-
class CallerIdListResponse < InstanceListResource
|
|
376
|
-
|
|
377
|
-
# @param [Array<CallerIdInstance>] instance
|
|
378
|
-
# @param [Hash{String => Object}] headers
|
|
379
|
-
# @param [Integer] status_code
|
|
380
|
-
def initialize(version, payload, key, limit = :unset)
|
|
381
|
-
data_list = payload.body[key] || []
|
|
382
|
-
if limit != :unset
|
|
383
|
-
data_list = data_list[0, limit]
|
|
384
|
-
end
|
|
385
|
-
@caller_id = data_list.map do |data|
|
|
386
|
-
CallerIdInstance.new(version, data)
|
|
387
|
-
end
|
|
388
|
-
@headers = payload.headers
|
|
389
|
-
@status_code = payload.status_code
|
|
390
|
-
end
|
|
391
|
-
|
|
392
|
-
def caller_id
|
|
393
|
-
@caller_id
|
|
394
|
-
end
|
|
395
|
-
|
|
396
|
-
def headers
|
|
397
|
-
@headers
|
|
398
|
-
end
|
|
399
|
-
|
|
400
|
-
def status_code
|
|
401
|
-
@status_code
|
|
402
|
-
end
|
|
403
|
-
end
|
|
404
|
-
|
|
405
|
-
class CallerIdInstance < InstanceResource
|
|
406
|
-
##
|
|
407
|
-
# Initialize the CallerIdInstance
|
|
408
|
-
# @param [Version] version Version that contains the resource
|
|
409
|
-
# @param [Hash] payload payload that contains response from Twilio
|
|
410
|
-
# @param [String] account_sid The SID of the
|
|
411
|
-
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this CallerId
|
|
412
|
-
# resource.
|
|
413
|
-
# @param [String] sid The SID of the Call resource to fetch.
|
|
414
|
-
# @return [CallerIdInstance] CallerIdInstance
|
|
415
|
-
def initialize(version, payload , caller_id_sid: nil)
|
|
416
|
-
super(version)
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
# Marshaled Properties
|
|
420
|
-
@properties = {
|
|
421
|
-
'sid' => payload['sid'],
|
|
422
|
-
'account_sid' => payload['account_sid'],
|
|
423
|
-
'phone_number' => payload['phone_number'],
|
|
424
|
-
'friendly_name' => payload['friendly_name'],
|
|
425
|
-
'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
|
|
426
|
-
'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
# Context
|
|
430
|
-
@instance_context = nil
|
|
431
|
-
@params = { 'caller_id_sid' => caller_id_sid || @properties['caller_id_sid'] , }
|
|
432
|
-
end
|
|
433
|
-
|
|
434
|
-
##
|
|
435
|
-
# Generate an instance context for the instance, the context is capable of
|
|
436
|
-
# performing various actions. All instance actions are proxied to the context
|
|
437
|
-
# @return [CallerIdContext] CallContext for this CallInstance
|
|
438
|
-
def context
|
|
439
|
-
unless @instance_context
|
|
440
|
-
@instance_context = CallerIdContext.new(@version , @params['caller_id_sid'])
|
|
441
|
-
end
|
|
442
|
-
@instance_context
|
|
443
|
-
end
|
|
444
|
-
|
|
445
|
-
##
|
|
446
|
-
# @return [String] The unique SID of this Caller ID resource.
|
|
447
|
-
def sid
|
|
448
|
-
@properties['sid']
|
|
449
|
-
end
|
|
450
|
-
|
|
451
|
-
##
|
|
452
|
-
# @return [String] The Account SID that owns this Caller ID.
|
|
453
|
-
def account_sid
|
|
454
|
-
@properties['account_sid']
|
|
455
|
-
end
|
|
456
|
-
|
|
457
|
-
##
|
|
458
|
-
# @return [String] The phone number in E.164 format.
|
|
459
|
-
def phone_number
|
|
460
|
-
@properties['phone_number']
|
|
461
|
-
end
|
|
462
|
-
|
|
463
|
-
##
|
|
464
|
-
# @return [String] A human-readable name for this caller ID.
|
|
465
|
-
def friendly_name
|
|
466
|
-
@properties['friendly_name']
|
|
467
|
-
end
|
|
468
|
-
|
|
469
|
-
##
|
|
470
|
-
# @return [Time] The date this resource was created.
|
|
471
|
-
def date_created
|
|
472
|
-
@properties['date_created']
|
|
473
|
-
end
|
|
474
|
-
|
|
475
|
-
##
|
|
476
|
-
# @return [Time] The date this resource was last updated.
|
|
477
|
-
def date_updated
|
|
478
|
-
@properties['date_updated']
|
|
479
|
-
end
|
|
480
|
-
|
|
481
|
-
##
|
|
482
|
-
# Delete the CallerIdInstance
|
|
483
|
-
# @return [Boolean] True if delete succeeds, false otherwise
|
|
484
|
-
def delete
|
|
485
|
-
|
|
486
|
-
context.delete
|
|
487
|
-
end
|
|
488
|
-
|
|
489
|
-
##
|
|
490
|
-
# Update the CallerIdInstance
|
|
491
|
-
# @return [CallerIdInstance] Updated CallerIdInstance
|
|
492
|
-
def update
|
|
493
|
-
|
|
494
|
-
context.update
|
|
495
|
-
end
|
|
496
|
-
|
|
497
|
-
##
|
|
498
|
-
# Provide a user friendly representation
|
|
499
|
-
def to_s
|
|
500
|
-
values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
501
|
-
"<Twilio.Numbers.V2.CallerIdInstance #{values}>"
|
|
502
|
-
end
|
|
503
|
-
|
|
504
|
-
##
|
|
505
|
-
# Provide a detailed, user friendly representation
|
|
506
|
-
def inspect
|
|
507
|
-
values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
|
|
508
|
-
"<Twilio.Numbers.V2.CallerIdInstance #{values}>"
|
|
509
|
-
end
|
|
510
|
-
end
|
|
511
|
-
|
|
512
|
-
end
|
|
513
|
-
end
|
|
514
|
-
end
|
|
515
|
-
end
|