twilio-ruby 7.11.1 → 7.11.3
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/.github/workflows/test-and-deploy.yml +13 -1
- data/CHANGES.md +417 -0
- data/Gemfile.lock +2 -2
- data/README.md +2 -2
- data/githooks/pre-commit +11 -0
- 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/conversation.rb +101 -12
- 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/capacity.rb +161 -0
- data/lib/twilio-ruby/rest/insights/v3/custom_field_mapping.rb +279 -0
- 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 +29 -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 +33 -60
- 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/data_mapping.rb +3 -3
- 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/memory/v1/store.rb +3 -3
- data/lib/twilio-ruby/rest/memory/v1/trait_group.rb +3 -3
- 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/factor.rb +1 -1
- 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 +1 -60
- 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/recording_account_default_configuration.rb +547 -0
- 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/v2.rb +6 -0
- data/lib/twilio-ruby/rest/voice/v3/transcription.rb +259 -50
- data/lib/twilio-ruby/twiml/voice_response.rb +12 -6
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +9 -4
- data/lib/twilio-ruby/rest/memory/v1/event.rb +0 -320
- data/lib/twilio-ruby/rest/numbers/v2/caller_id.rb +0 -515
|
@@ -23,17 +23,20 @@ module Twilio
|
|
|
23
23
|
# @param [intelligence_configuration_id]: [String] The Intelligence Configuration identifier to execute the Rule within.
|
|
24
24
|
# @param [rule_id]: [String] The rule identifier to execute within the selected Intelligence Configuration.
|
|
25
25
|
# @param [conversation_id]: [String] The Conversation identifier to execute the Rule against.
|
|
26
|
-
|
|
26
|
+
# @param [rule]: [RuleExecutionList.RuleOverride]
|
|
27
|
+
attr_accessor :intelligence_configuration_id, :rule_id, :conversation_id, :rule
|
|
27
28
|
def initialize(payload)
|
|
28
29
|
@intelligence_configuration_id = payload["intelligence_configuration_id"]
|
|
29
30
|
@rule_id = payload["rule_id"]
|
|
30
31
|
@conversation_id = payload["conversation_id"]
|
|
32
|
+
@rule = payload["rule"]
|
|
31
33
|
end
|
|
32
34
|
def to_json(options = {})
|
|
33
35
|
{
|
|
34
36
|
"intelligenceConfigurationId": @intelligence_configuration_id,
|
|
35
37
|
"ruleId": @rule_id,
|
|
36
38
|
"conversationId": @conversation_id,
|
|
39
|
+
"rule": @rule,
|
|
37
40
|
}.to_json(options)
|
|
38
41
|
end
|
|
39
42
|
end
|
|
@@ -105,6 +108,22 @@ module Twilio
|
|
|
105
108
|
end
|
|
106
109
|
end
|
|
107
110
|
|
|
111
|
+
class OperatorOverride
|
|
112
|
+
# @param [id]: [String] The operator id (as configured in the stored rule) to override.
|
|
113
|
+
# @param [parameters]: [Hash<String, Object>] Parameter overrides merged into the stored operator's parameters.
|
|
114
|
+
attr_accessor :id, :parameters
|
|
115
|
+
def initialize(payload)
|
|
116
|
+
@id = payload["id"]
|
|
117
|
+
@parameters = payload["parameters"]
|
|
118
|
+
end
|
|
119
|
+
def to_json(options = {})
|
|
120
|
+
{
|
|
121
|
+
"id": @id,
|
|
122
|
+
"parameters": @parameters,
|
|
123
|
+
}.to_json(options)
|
|
124
|
+
end
|
|
125
|
+
end
|
|
126
|
+
|
|
108
127
|
class ResolvedContext
|
|
109
128
|
# @param [memory]: [ResolvedContextMemory]
|
|
110
129
|
# @param [knowledge]: [ResolvedContextKnowledge]
|
|
@@ -166,6 +185,19 @@ module Twilio
|
|
|
166
185
|
end
|
|
167
186
|
end
|
|
168
187
|
|
|
188
|
+
class RuleOverride
|
|
189
|
+
# @param [operators]: [Array<RuleExecutionList.OperatorOverride>] Operator parameter overrides, merged key-by-key into the stored operator's parameters (override wins on matching keys; unspecified keys retain their stored values). Operators in the stored rule not referenced here execute with their stored parameters unchanged.
|
|
190
|
+
attr_accessor :operators
|
|
191
|
+
def initialize(payload)
|
|
192
|
+
@operators = payload["operators"]
|
|
193
|
+
end
|
|
194
|
+
def to_json(options = {})
|
|
195
|
+
{
|
|
196
|
+
"operators": @operators,
|
|
197
|
+
}.to_json(options)
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
169
201
|
class SystemMetaData
|
|
170
202
|
# @param [resolved_model]: [String] The underlying LLM model used for this execution.
|
|
171
203
|
# @param [latency_ms]: [Integer] Operator execution time in milliseconds.
|
|
@@ -291,65 +323,6 @@ module Twilio
|
|
|
291
323
|
end
|
|
292
324
|
end
|
|
293
325
|
|
|
294
|
-
class RuleExecutionPageMetadata < PageMetadata
|
|
295
|
-
attr_reader :rule_execution_page
|
|
296
|
-
|
|
297
|
-
def initialize(version, response, solution, limit)
|
|
298
|
-
super(version, response)
|
|
299
|
-
@rule_execution_page = []
|
|
300
|
-
@limit = limit
|
|
301
|
-
key = get_key(response.body)
|
|
302
|
-
records = 0
|
|
303
|
-
while( limit != :unset && records < limit )
|
|
304
|
-
@rule_execution_page << RuleExecutionListResponse.new(version, @payload, key, limit - records)
|
|
305
|
-
@payload = self.next_page
|
|
306
|
-
break unless @payload
|
|
307
|
-
records += (@payload.body[key] || []).size
|
|
308
|
-
end
|
|
309
|
-
# Path Solution
|
|
310
|
-
@solution = solution
|
|
311
|
-
end
|
|
312
|
-
|
|
313
|
-
def each
|
|
314
|
-
@rule_execution_page.each do |record|
|
|
315
|
-
yield record
|
|
316
|
-
end
|
|
317
|
-
end
|
|
318
|
-
|
|
319
|
-
def to_s
|
|
320
|
-
'<Twilio::REST::Intelligence::V3PageMetadata>';
|
|
321
|
-
end
|
|
322
|
-
end
|
|
323
|
-
class RuleExecutionListResponse < InstanceListResource
|
|
324
|
-
|
|
325
|
-
# @param [Array<RuleExecutionInstance>] instance
|
|
326
|
-
# @param [Hash{String => Object}] headers
|
|
327
|
-
# @param [Integer] status_code
|
|
328
|
-
def initialize(version, payload, key, limit = :unset)
|
|
329
|
-
data_list = payload.body[key] || []
|
|
330
|
-
if limit != :unset
|
|
331
|
-
data_list = data_list[0, limit]
|
|
332
|
-
end
|
|
333
|
-
@rule_execution = data_list.map do |data|
|
|
334
|
-
RuleExecutionInstance.new(version, data)
|
|
335
|
-
end
|
|
336
|
-
@headers = payload.headers
|
|
337
|
-
@status_code = payload.status_code
|
|
338
|
-
end
|
|
339
|
-
|
|
340
|
-
def rule_execution
|
|
341
|
-
@rule_execution
|
|
342
|
-
end
|
|
343
|
-
|
|
344
|
-
def headers
|
|
345
|
-
@headers
|
|
346
|
-
end
|
|
347
|
-
|
|
348
|
-
def status_code
|
|
349
|
-
@status_code
|
|
350
|
-
end
|
|
351
|
-
end
|
|
352
|
-
|
|
353
326
|
class RuleExecutionInstance < InstanceResource
|
|
354
327
|
##
|
|
355
328
|
# Initialize the RuleExecutionInstance
|
|
@@ -196,65 +196,6 @@ module Twilio
|
|
|
196
196
|
end
|
|
197
197
|
end
|
|
198
198
|
|
|
199
|
-
class KnowledgeStatusPageMetadata < PageMetadata
|
|
200
|
-
attr_reader :knowledge_status_page
|
|
201
|
-
|
|
202
|
-
def initialize(version, response, solution, limit)
|
|
203
|
-
super(version, response)
|
|
204
|
-
@knowledge_status_page = []
|
|
205
|
-
@limit = limit
|
|
206
|
-
key = get_key(response.body)
|
|
207
|
-
records = 0
|
|
208
|
-
while( limit != :unset && records < limit )
|
|
209
|
-
@knowledge_status_page << KnowledgeStatusListResponse.new(version, @payload, key, limit - records)
|
|
210
|
-
@payload = self.next_page
|
|
211
|
-
break unless @payload
|
|
212
|
-
records += (@payload.body[key] || []).size
|
|
213
|
-
end
|
|
214
|
-
# Path Solution
|
|
215
|
-
@solution = solution
|
|
216
|
-
end
|
|
217
|
-
|
|
218
|
-
def each
|
|
219
|
-
@knowledge_status_page.each do |record|
|
|
220
|
-
yield record
|
|
221
|
-
end
|
|
222
|
-
end
|
|
223
|
-
|
|
224
|
-
def to_s
|
|
225
|
-
'<Twilio::REST::Knowledge::V1PageMetadata>';
|
|
226
|
-
end
|
|
227
|
-
end
|
|
228
|
-
class KnowledgeStatusListResponse < InstanceListResource
|
|
229
|
-
|
|
230
|
-
# @param [Array<KnowledgeStatusInstance>] instance
|
|
231
|
-
# @param [Hash{String => Object}] headers
|
|
232
|
-
# @param [Integer] status_code
|
|
233
|
-
def initialize(version, payload, key, limit = :unset)
|
|
234
|
-
data_list = payload.body[key] || []
|
|
235
|
-
if limit != :unset
|
|
236
|
-
data_list = data_list[0, limit]
|
|
237
|
-
end
|
|
238
|
-
@knowledge_status = data_list.map do |data|
|
|
239
|
-
KnowledgeStatusInstance.new(version, data)
|
|
240
|
-
end
|
|
241
|
-
@headers = payload.headers
|
|
242
|
-
@status_code = payload.status_code
|
|
243
|
-
end
|
|
244
|
-
|
|
245
|
-
def knowledge_status
|
|
246
|
-
@knowledge_status
|
|
247
|
-
end
|
|
248
|
-
|
|
249
|
-
def headers
|
|
250
|
-
@headers
|
|
251
|
-
end
|
|
252
|
-
|
|
253
|
-
def status_code
|
|
254
|
-
@status_code
|
|
255
|
-
end
|
|
256
|
-
end
|
|
257
|
-
|
|
258
199
|
class KnowledgeStatusInstance < InstanceResource
|
|
259
200
|
##
|
|
260
201
|
# Initialize the KnowledgeStatusInstance
|
|
@@ -197,65 +197,6 @@ module Twilio
|
|
|
197
197
|
end
|
|
198
198
|
end
|
|
199
199
|
|
|
200
|
-
class OperationPageMetadata < PageMetadata
|
|
201
|
-
attr_reader :operation_page
|
|
202
|
-
|
|
203
|
-
def initialize(version, response, solution, limit)
|
|
204
|
-
super(version, response)
|
|
205
|
-
@operation_page = []
|
|
206
|
-
@limit = limit
|
|
207
|
-
key = get_key(response.body)
|
|
208
|
-
records = 0
|
|
209
|
-
while( limit != :unset && records < limit )
|
|
210
|
-
@operation_page << OperationListResponse.new(version, @payload, key, limit - records)
|
|
211
|
-
@payload = self.next_page
|
|
212
|
-
break unless @payload
|
|
213
|
-
records += (@payload.body[key] || []).size
|
|
214
|
-
end
|
|
215
|
-
# Path Solution
|
|
216
|
-
@solution = solution
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
def each
|
|
220
|
-
@operation_page.each do |record|
|
|
221
|
-
yield record
|
|
222
|
-
end
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
def to_s
|
|
226
|
-
'<Twilio::REST::Knowledge::V2PageMetadata>';
|
|
227
|
-
end
|
|
228
|
-
end
|
|
229
|
-
class OperationListResponse < InstanceListResource
|
|
230
|
-
|
|
231
|
-
# @param [Array<OperationInstance>] instance
|
|
232
|
-
# @param [Hash{String => Object}] headers
|
|
233
|
-
# @param [Integer] status_code
|
|
234
|
-
def initialize(version, payload, key, limit = :unset)
|
|
235
|
-
data_list = payload.body[key] || []
|
|
236
|
-
if limit != :unset
|
|
237
|
-
data_list = data_list[0, limit]
|
|
238
|
-
end
|
|
239
|
-
@operation = data_list.map do |data|
|
|
240
|
-
OperationInstance.new(version, data)
|
|
241
|
-
end
|
|
242
|
-
@headers = payload.headers
|
|
243
|
-
@status_code = payload.status_code
|
|
244
|
-
end
|
|
245
|
-
|
|
246
|
-
def operation
|
|
247
|
-
@operation
|
|
248
|
-
end
|
|
249
|
-
|
|
250
|
-
def headers
|
|
251
|
-
@headers
|
|
252
|
-
end
|
|
253
|
-
|
|
254
|
-
def status_code
|
|
255
|
-
@status_code
|
|
256
|
-
end
|
|
257
|
-
end
|
|
258
|
-
|
|
259
200
|
class OperationInstance < InstanceResource
|
|
260
201
|
##
|
|
261
202
|
# Initialize the OperationInstance
|
|
@@ -140,65 +140,6 @@ module Twilio
|
|
|
140
140
|
end
|
|
141
141
|
end
|
|
142
142
|
|
|
143
|
-
class SearchPageMetadata < PageMetadata
|
|
144
|
-
attr_reader :search_page
|
|
145
|
-
|
|
146
|
-
def initialize(version, response, solution, limit)
|
|
147
|
-
super(version, response)
|
|
148
|
-
@search_page = []
|
|
149
|
-
@limit = limit
|
|
150
|
-
key = get_key(response.body)
|
|
151
|
-
records = 0
|
|
152
|
-
while( limit != :unset && records < limit )
|
|
153
|
-
@search_page << SearchListResponse.new(version, @payload, key, limit - records)
|
|
154
|
-
@payload = self.next_page
|
|
155
|
-
break unless @payload
|
|
156
|
-
records += (@payload.body[key] || []).size
|
|
157
|
-
end
|
|
158
|
-
# Path Solution
|
|
159
|
-
@solution = solution
|
|
160
|
-
end
|
|
161
|
-
|
|
162
|
-
def each
|
|
163
|
-
@search_page.each do |record|
|
|
164
|
-
yield record
|
|
165
|
-
end
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
def to_s
|
|
169
|
-
'<Twilio::REST::Knowledge::V2PageMetadata>';
|
|
170
|
-
end
|
|
171
|
-
end
|
|
172
|
-
class SearchListResponse < InstanceListResource
|
|
173
|
-
|
|
174
|
-
# @param [Array<SearchInstance>] instance
|
|
175
|
-
# @param [Hash{String => Object}] headers
|
|
176
|
-
# @param [Integer] status_code
|
|
177
|
-
def initialize(version, payload, key, limit = :unset)
|
|
178
|
-
data_list = payload.body[key] || []
|
|
179
|
-
if limit != :unset
|
|
180
|
-
data_list = data_list[0, limit]
|
|
181
|
-
end
|
|
182
|
-
@search = data_list.map do |data|
|
|
183
|
-
SearchInstance.new(version, data)
|
|
184
|
-
end
|
|
185
|
-
@headers = payload.headers
|
|
186
|
-
@status_code = payload.status_code
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
def search
|
|
190
|
-
@search
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
def headers
|
|
194
|
-
@headers
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
def status_code
|
|
198
|
-
@status_code
|
|
199
|
-
end
|
|
200
|
-
end
|
|
201
|
-
|
|
202
143
|
class SearchInstance < InstanceResource
|
|
203
144
|
##
|
|
204
145
|
# Initialize the SearchInstance
|
|
@@ -224,65 +224,6 @@ module Twilio
|
|
|
224
224
|
end
|
|
225
225
|
end
|
|
226
226
|
|
|
227
|
-
class PhoneNumberPageMetadata < PageMetadata
|
|
228
|
-
attr_reader :phone_number_page
|
|
229
|
-
|
|
230
|
-
def initialize(version, response, solution, limit)
|
|
231
|
-
super(version, response)
|
|
232
|
-
@phone_number_page = []
|
|
233
|
-
@limit = limit
|
|
234
|
-
key = get_key(response.body)
|
|
235
|
-
records = 0
|
|
236
|
-
while( limit != :unset && records < limit )
|
|
237
|
-
@phone_number_page << PhoneNumberListResponse.new(version, @payload, key, limit - records)
|
|
238
|
-
@payload = self.next_page
|
|
239
|
-
break unless @payload
|
|
240
|
-
records += (@payload.body[key] || []).size
|
|
241
|
-
end
|
|
242
|
-
# Path Solution
|
|
243
|
-
@solution = solution
|
|
244
|
-
end
|
|
245
|
-
|
|
246
|
-
def each
|
|
247
|
-
@phone_number_page.each do |record|
|
|
248
|
-
yield record
|
|
249
|
-
end
|
|
250
|
-
end
|
|
251
|
-
|
|
252
|
-
def to_s
|
|
253
|
-
'<Twilio::REST::Lookups::V1PageMetadata>';
|
|
254
|
-
end
|
|
255
|
-
end
|
|
256
|
-
class PhoneNumberListResponse < InstanceListResource
|
|
257
|
-
|
|
258
|
-
# @param [Array<PhoneNumberInstance>] instance
|
|
259
|
-
# @param [Hash{String => Object}] headers
|
|
260
|
-
# @param [Integer] status_code
|
|
261
|
-
def initialize(version, payload, key, limit = :unset)
|
|
262
|
-
data_list = payload.body[key] || []
|
|
263
|
-
if limit != :unset
|
|
264
|
-
data_list = data_list[0, limit]
|
|
265
|
-
end
|
|
266
|
-
@phone_number = data_list.map do |data|
|
|
267
|
-
PhoneNumberInstance.new(version, data)
|
|
268
|
-
end
|
|
269
|
-
@headers = payload.headers
|
|
270
|
-
@status_code = payload.status_code
|
|
271
|
-
end
|
|
272
|
-
|
|
273
|
-
def phone_number
|
|
274
|
-
@phone_number
|
|
275
|
-
end
|
|
276
|
-
|
|
277
|
-
def headers
|
|
278
|
-
@headers
|
|
279
|
-
end
|
|
280
|
-
|
|
281
|
-
def status_code
|
|
282
|
-
@status_code
|
|
283
|
-
end
|
|
284
|
-
end
|
|
285
|
-
|
|
286
227
|
class PhoneNumberInstance < InstanceResource
|
|
287
228
|
##
|
|
288
229
|
# Initialize the PhoneNumberInstance
|
|
@@ -296,65 +296,6 @@ module Twilio
|
|
|
296
296
|
end
|
|
297
297
|
end
|
|
298
298
|
|
|
299
|
-
class BucketPageMetadata < PageMetadata
|
|
300
|
-
attr_reader :bucket_page
|
|
301
|
-
|
|
302
|
-
def initialize(version, response, solution, limit)
|
|
303
|
-
super(version, response)
|
|
304
|
-
@bucket_page = []
|
|
305
|
-
@limit = limit
|
|
306
|
-
key = get_key(response.body)
|
|
307
|
-
records = 0
|
|
308
|
-
while( limit != :unset && records < limit )
|
|
309
|
-
@bucket_page << BucketListResponse.new(version, @payload, key, limit - records)
|
|
310
|
-
@payload = self.next_page
|
|
311
|
-
break unless @payload
|
|
312
|
-
records += (@payload.body[key] || []).size
|
|
313
|
-
end
|
|
314
|
-
# Path Solution
|
|
315
|
-
@solution = solution
|
|
316
|
-
end
|
|
317
|
-
|
|
318
|
-
def each
|
|
319
|
-
@bucket_page.each do |record|
|
|
320
|
-
yield record
|
|
321
|
-
end
|
|
322
|
-
end
|
|
323
|
-
|
|
324
|
-
def to_s
|
|
325
|
-
'<Twilio::REST::Lookups::V2PageMetadata>';
|
|
326
|
-
end
|
|
327
|
-
end
|
|
328
|
-
class BucketListResponse < InstanceListResource
|
|
329
|
-
|
|
330
|
-
# @param [Array<BucketInstance>] instance
|
|
331
|
-
# @param [Hash{String => Object}] headers
|
|
332
|
-
# @param [Integer] status_code
|
|
333
|
-
def initialize(version, payload, key, limit = :unset)
|
|
334
|
-
data_list = payload.body[key] || []
|
|
335
|
-
if limit != :unset
|
|
336
|
-
data_list = data_list[0, limit]
|
|
337
|
-
end
|
|
338
|
-
@bucket = data_list.map do |data|
|
|
339
|
-
BucketInstance.new(version, data)
|
|
340
|
-
end
|
|
341
|
-
@headers = payload.headers
|
|
342
|
-
@status_code = payload.status_code
|
|
343
|
-
end
|
|
344
|
-
|
|
345
|
-
def bucket
|
|
346
|
-
@bucket
|
|
347
|
-
end
|
|
348
|
-
|
|
349
|
-
def headers
|
|
350
|
-
@headers
|
|
351
|
-
end
|
|
352
|
-
|
|
353
|
-
def status_code
|
|
354
|
-
@status_code
|
|
355
|
-
end
|
|
356
|
-
end
|
|
357
|
-
|
|
358
299
|
class BucketInstance < InstanceResource
|
|
359
300
|
##
|
|
360
301
|
# Initialize the BucketInstance
|
|
@@ -346,65 +346,6 @@ module Twilio
|
|
|
346
346
|
end
|
|
347
347
|
end
|
|
348
348
|
|
|
349
|
-
class LookupOverridePageMetadata < PageMetadata
|
|
350
|
-
attr_reader :lookup_override_page
|
|
351
|
-
|
|
352
|
-
def initialize(version, response, solution, limit)
|
|
353
|
-
super(version, response)
|
|
354
|
-
@lookup_override_page = []
|
|
355
|
-
@limit = limit
|
|
356
|
-
key = get_key(response.body)
|
|
357
|
-
records = 0
|
|
358
|
-
while( limit != :unset && records < limit )
|
|
359
|
-
@lookup_override_page << LookupOverrideListResponse.new(version, @payload, key, limit - records)
|
|
360
|
-
@payload = self.next_page
|
|
361
|
-
break unless @payload
|
|
362
|
-
records += (@payload.body[key] || []).size
|
|
363
|
-
end
|
|
364
|
-
# Path Solution
|
|
365
|
-
@solution = solution
|
|
366
|
-
end
|
|
367
|
-
|
|
368
|
-
def each
|
|
369
|
-
@lookup_override_page.each do |record|
|
|
370
|
-
yield record
|
|
371
|
-
end
|
|
372
|
-
end
|
|
373
|
-
|
|
374
|
-
def to_s
|
|
375
|
-
'<Twilio::REST::Lookups::V2PageMetadata>';
|
|
376
|
-
end
|
|
377
|
-
end
|
|
378
|
-
class LookupOverrideListResponse < InstanceListResource
|
|
379
|
-
|
|
380
|
-
# @param [Array<LookupOverrideInstance>] instance
|
|
381
|
-
# @param [Hash{String => Object}] headers
|
|
382
|
-
# @param [Integer] status_code
|
|
383
|
-
def initialize(version, payload, key, limit = :unset)
|
|
384
|
-
data_list = payload.body[key] || []
|
|
385
|
-
if limit != :unset
|
|
386
|
-
data_list = data_list[0, limit]
|
|
387
|
-
end
|
|
388
|
-
@lookup_override = data_list.map do |data|
|
|
389
|
-
LookupOverrideInstance.new(version, data)
|
|
390
|
-
end
|
|
391
|
-
@headers = payload.headers
|
|
392
|
-
@status_code = payload.status_code
|
|
393
|
-
end
|
|
394
|
-
|
|
395
|
-
def lookup_override
|
|
396
|
-
@lookup_override
|
|
397
|
-
end
|
|
398
|
-
|
|
399
|
-
def headers
|
|
400
|
-
@headers
|
|
401
|
-
end
|
|
402
|
-
|
|
403
|
-
def status_code
|
|
404
|
-
@status_code
|
|
405
|
-
end
|
|
406
|
-
end
|
|
407
|
-
|
|
408
349
|
class LookupOverrideInstance < InstanceResource
|
|
409
350
|
##
|
|
410
351
|
# Initialize the LookupOverrideInstance
|
|
@@ -290,65 +290,6 @@ module Twilio
|
|
|
290
290
|
end
|
|
291
291
|
end
|
|
292
292
|
|
|
293
|
-
class PhoneNumberPageMetadata < PageMetadata
|
|
294
|
-
attr_reader :phone_number_page
|
|
295
|
-
|
|
296
|
-
def initialize(version, response, solution, limit)
|
|
297
|
-
super(version, response)
|
|
298
|
-
@phone_number_page = []
|
|
299
|
-
@limit = limit
|
|
300
|
-
key = get_key(response.body)
|
|
301
|
-
records = 0
|
|
302
|
-
while( limit != :unset && records < limit )
|
|
303
|
-
@phone_number_page << PhoneNumberListResponse.new(version, @payload, key, limit - records)
|
|
304
|
-
@payload = self.next_page
|
|
305
|
-
break unless @payload
|
|
306
|
-
records += (@payload.body[key] || []).size
|
|
307
|
-
end
|
|
308
|
-
# Path Solution
|
|
309
|
-
@solution = solution
|
|
310
|
-
end
|
|
311
|
-
|
|
312
|
-
def each
|
|
313
|
-
@phone_number_page.each do |record|
|
|
314
|
-
yield record
|
|
315
|
-
end
|
|
316
|
-
end
|
|
317
|
-
|
|
318
|
-
def to_s
|
|
319
|
-
'<Twilio::REST::Lookups::V2PageMetadata>';
|
|
320
|
-
end
|
|
321
|
-
end
|
|
322
|
-
class PhoneNumberListResponse < InstanceListResource
|
|
323
|
-
|
|
324
|
-
# @param [Array<PhoneNumberInstance>] instance
|
|
325
|
-
# @param [Hash{String => Object}] headers
|
|
326
|
-
# @param [Integer] status_code
|
|
327
|
-
def initialize(version, payload, key, limit = :unset)
|
|
328
|
-
data_list = payload.body[key] || []
|
|
329
|
-
if limit != :unset
|
|
330
|
-
data_list = data_list[0, limit]
|
|
331
|
-
end
|
|
332
|
-
@phone_number = data_list.map do |data|
|
|
333
|
-
PhoneNumberInstance.new(version, data)
|
|
334
|
-
end
|
|
335
|
-
@headers = payload.headers
|
|
336
|
-
@status_code = payload.status_code
|
|
337
|
-
end
|
|
338
|
-
|
|
339
|
-
def phone_number
|
|
340
|
-
@phone_number
|
|
341
|
-
end
|
|
342
|
-
|
|
343
|
-
def headers
|
|
344
|
-
@headers
|
|
345
|
-
end
|
|
346
|
-
|
|
347
|
-
def status_code
|
|
348
|
-
@status_code
|
|
349
|
-
end
|
|
350
|
-
end
|
|
351
|
-
|
|
352
293
|
class PhoneNumberInstance < InstanceResource
|
|
353
294
|
##
|
|
354
295
|
# Initialize the PhoneNumberInstance
|
|
@@ -246,65 +246,6 @@ module Twilio
|
|
|
246
246
|
end
|
|
247
247
|
end
|
|
248
248
|
|
|
249
|
-
class QueryPageMetadata < PageMetadata
|
|
250
|
-
attr_reader :query_page
|
|
251
|
-
|
|
252
|
-
def initialize(version, response, solution, limit)
|
|
253
|
-
super(version, response)
|
|
254
|
-
@query_page = []
|
|
255
|
-
@limit = limit
|
|
256
|
-
key = get_key(response.body)
|
|
257
|
-
records = 0
|
|
258
|
-
while( limit != :unset && records < limit )
|
|
259
|
-
@query_page << QueryListResponse.new(version, @payload, key, limit - records)
|
|
260
|
-
@payload = self.next_page
|
|
261
|
-
break unless @payload
|
|
262
|
-
records += (@payload.body[key] || []).size
|
|
263
|
-
end
|
|
264
|
-
# Path Solution
|
|
265
|
-
@solution = solution
|
|
266
|
-
end
|
|
267
|
-
|
|
268
|
-
def each
|
|
269
|
-
@query_page.each do |record|
|
|
270
|
-
yield record
|
|
271
|
-
end
|
|
272
|
-
end
|
|
273
|
-
|
|
274
|
-
def to_s
|
|
275
|
-
'<Twilio::REST::Lookups::V2PageMetadata>';
|
|
276
|
-
end
|
|
277
|
-
end
|
|
278
|
-
class QueryListResponse < InstanceListResource
|
|
279
|
-
|
|
280
|
-
# @param [Array<QueryInstance>] instance
|
|
281
|
-
# @param [Hash{String => Object}] headers
|
|
282
|
-
# @param [Integer] status_code
|
|
283
|
-
def initialize(version, payload, key, limit = :unset)
|
|
284
|
-
data_list = payload.body[key] || []
|
|
285
|
-
if limit != :unset
|
|
286
|
-
data_list = data_list[0, limit]
|
|
287
|
-
end
|
|
288
|
-
@query = data_list.map do |data|
|
|
289
|
-
QueryInstance.new(version, data)
|
|
290
|
-
end
|
|
291
|
-
@headers = payload.headers
|
|
292
|
-
@status_code = payload.status_code
|
|
293
|
-
end
|
|
294
|
-
|
|
295
|
-
def query
|
|
296
|
-
@query
|
|
297
|
-
end
|
|
298
|
-
|
|
299
|
-
def headers
|
|
300
|
-
@headers
|
|
301
|
-
end
|
|
302
|
-
|
|
303
|
-
def status_code
|
|
304
|
-
@status_code
|
|
305
|
-
end
|
|
306
|
-
end
|
|
307
|
-
|
|
308
249
|
class QueryInstance < InstanceResource
|
|
309
250
|
##
|
|
310
251
|
# Initialize the QueryInstance
|