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
|
@@ -19,96 +19,6 @@ module Twilio
|
|
|
19
19
|
class V2 < Version
|
|
20
20
|
class OutboundList < ListResource
|
|
21
21
|
|
|
22
|
-
class CountyCarrierValueCarriers
|
|
23
|
-
# @param [carrier]: [String] The name of the carrier.
|
|
24
|
-
# @param [total_calls]: [Integer] Total number of outbound calls for the carrier in the country.
|
|
25
|
-
# @param [blocked_calls]: [Integer] Total number of blocked outbound calls for the carrier in the country.
|
|
26
|
-
# @param [blocked_calls_percentage]: [Float] Percentage of blocked outbound calls for the carrier in the country.
|
|
27
|
-
attr_accessor :carrier, :total_calls, :blocked_calls, :blocked_calls_percentage
|
|
28
|
-
def initialize(payload)
|
|
29
|
-
@carrier = payload["carrier"]
|
|
30
|
-
@total_calls = payload["total_calls"]
|
|
31
|
-
@blocked_calls = payload["blocked_calls"]
|
|
32
|
-
@blocked_calls_percentage = payload["blocked_calls_percentage"]
|
|
33
|
-
end
|
|
34
|
-
def to_json(options = {})
|
|
35
|
-
{
|
|
36
|
-
"carrier": @carrier,
|
|
37
|
-
"total_calls": @total_calls,
|
|
38
|
-
"blocked_calls": @blocked_calls,
|
|
39
|
-
"blocked_calls_percentage": @blocked_calls_percentage,
|
|
40
|
-
}.to_json(options)
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
class InsightsV2CreatePhoneNumbersReportRequest
|
|
45
|
-
# @param [time_range]: [InboundList.InsightsV2CreatePhoneNumbersReportRequestTimeRange]
|
|
46
|
-
# @param [filters]: [Array<InboundList.PhoneNumberReportFilter>]
|
|
47
|
-
# @param [size]: [String] The number of max available top Phone Numbers to generate.
|
|
48
|
-
attr_accessor :time_range, :filters, :size
|
|
49
|
-
def initialize(payload)
|
|
50
|
-
@time_range = payload["time_range"]
|
|
51
|
-
@filters = payload["filters"]
|
|
52
|
-
@size = payload["size"]
|
|
53
|
-
end
|
|
54
|
-
def to_json(options = {})
|
|
55
|
-
{
|
|
56
|
-
"time_range": @time_range,
|
|
57
|
-
"filters": @filters,
|
|
58
|
-
"size": @size,
|
|
59
|
-
}.to_json(options)
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
|
|
63
|
-
class InsightsV2CreatePhoneNumbersReportRequestTimeRange
|
|
64
|
-
# @param [start_datetime]: [Time] Start date time of the report
|
|
65
|
-
# @param [end_datetime]: [Time] End date time of the report
|
|
66
|
-
attr_accessor :start_datetime, :end_datetime
|
|
67
|
-
def initialize(payload)
|
|
68
|
-
@start_datetime = payload["start_datetime"]
|
|
69
|
-
@end_datetime = payload["end_datetime"]
|
|
70
|
-
end
|
|
71
|
-
def to_json(options = {})
|
|
72
|
-
{
|
|
73
|
-
"start_datetime": @start_datetime,
|
|
74
|
-
"end_datetime": @end_datetime,
|
|
75
|
-
}.to_json(options)
|
|
76
|
-
end
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
class PhoneNumberReportFilter
|
|
80
|
-
# @param [key]: [String] The name of the filter
|
|
81
|
-
# @param [values]: [Array<String>] List of supported filter values for the field name
|
|
82
|
-
attr_accessor :key, :values
|
|
83
|
-
def initialize(payload)
|
|
84
|
-
@key = payload["key"]
|
|
85
|
-
@values = payload["values"]
|
|
86
|
-
end
|
|
87
|
-
def to_json(options = {})
|
|
88
|
-
{
|
|
89
|
-
"key": @key,
|
|
90
|
-
"values": @values,
|
|
91
|
-
}.to_json(options)
|
|
92
|
-
end
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
class ReportFilter
|
|
96
|
-
# @param [key]: [String] The name of the filter 'call_state', 'call_direction', 'call_type', 'twilio_regions', 'caller_country_code', 'callee_country_code', 'silent'
|
|
97
|
-
# @param [values]: [Array<String>] List of supported filter values for the field name
|
|
98
|
-
attr_accessor :key, :values
|
|
99
|
-
def initialize(payload)
|
|
100
|
-
@key = payload["key"]
|
|
101
|
-
@values = payload["values"]
|
|
102
|
-
end
|
|
103
|
-
def to_json(options = {})
|
|
104
|
-
{
|
|
105
|
-
"key": @key,
|
|
106
|
-
"values": @values,
|
|
107
|
-
}.to_json(options)
|
|
108
|
-
end
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
|
|
112
22
|
##
|
|
113
23
|
# Initialize the OutboundList
|
|
114
24
|
# @param [Version] version Version that contains the resource
|
|
@@ -247,134 +157,6 @@ module Twilio
|
|
|
247
157
|
end
|
|
248
158
|
end
|
|
249
159
|
|
|
250
|
-
|
|
251
|
-
class OutboundContext < InstanceContext
|
|
252
|
-
##
|
|
253
|
-
# Initialize the OutboundContext
|
|
254
|
-
# @param [Version] version Version that contains the resource
|
|
255
|
-
# @param [String] report_id A unique Report Id.
|
|
256
|
-
# @return [OutboundContext] OutboundContext
|
|
257
|
-
def initialize(version, report_id)
|
|
258
|
-
super(version)
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
# Path Solution
|
|
262
|
-
@solution = { report_id: report_id, }
|
|
263
|
-
@uri = "/Voice/Reports/PhoneNumbers/Outbound"
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
end
|
|
267
|
-
##
|
|
268
|
-
# Create the OutboundInstance
|
|
269
|
-
# @param [InsightsV2CreatePhoneNumbersReportRequest] insights_v2_create_phone_numbers_report_request
|
|
270
|
-
# @return [OutboundInstance] Created OutboundInstance
|
|
271
|
-
def create(insights_v2_create_phone_numbers_report_request: :unset
|
|
272
|
-
)
|
|
273
|
-
|
|
274
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
275
|
-
headers['Content-Type'] = 'application/json'
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
payload = @version.create('POST', @uri, headers: headers, data: insights_v2_create_phone_numbers_report_request.to_json)
|
|
281
|
-
OutboundInstance.new(
|
|
282
|
-
@version,
|
|
283
|
-
payload,
|
|
284
|
-
report_id: @solution[:report_id],
|
|
285
|
-
)
|
|
286
|
-
end
|
|
287
|
-
|
|
288
|
-
##
|
|
289
|
-
# Create the OutboundInstanceMetadata
|
|
290
|
-
# @param [InsightsV2CreatePhoneNumbersReportRequest] insights_v2_create_phone_numbers_report_request
|
|
291
|
-
# @return [OutboundInstance] Created OutboundInstance
|
|
292
|
-
def create_with_metadata(insights_v2_create_phone_numbers_report_request: :unset
|
|
293
|
-
)
|
|
294
|
-
|
|
295
|
-
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
296
|
-
headers['Content-Type'] = 'application/json'
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
response = @version.create_with_metadata('POST', @uri, headers: headers, data: insights_v2_create_phone_numbers_report_request.to_json)
|
|
302
|
-
outbound_instance = OutboundInstance.new(
|
|
303
|
-
@version,
|
|
304
|
-
response.body,
|
|
305
|
-
report_id: @solution[:report_id],
|
|
306
|
-
)
|
|
307
|
-
OutboundInstanceMetadata.new(
|
|
308
|
-
@version,
|
|
309
|
-
outbound_instance,
|
|
310
|
-
response.headers,
|
|
311
|
-
response.status_code
|
|
312
|
-
)
|
|
313
|
-
end
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
##
|
|
317
|
-
# Provide a user friendly representation
|
|
318
|
-
def to_s
|
|
319
|
-
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
|
320
|
-
"#<Twilio.Insights.V2.OutboundContext #{context}>"
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
##
|
|
324
|
-
# Provide a detailed, user friendly representation
|
|
325
|
-
def inspect
|
|
326
|
-
context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
|
|
327
|
-
"#<Twilio.Insights.V2.OutboundContext #{context}>"
|
|
328
|
-
end
|
|
329
|
-
end
|
|
330
|
-
|
|
331
|
-
class OutboundInstanceMetadata < InstanceResourceMetadata
|
|
332
|
-
##
|
|
333
|
-
# Initializes a new OutboundInstanceMetadata.
|
|
334
|
-
# @param [Version] version Version that contains the resource
|
|
335
|
-
# @param [}OutboundInstance] outbound_instance The instance associated with the metadata.
|
|
336
|
-
# @param [Hash] headers Header object with response headers.
|
|
337
|
-
# @param [Integer] status_code The HTTP status code of the response.
|
|
338
|
-
# @return [OutboundInstanceMetadata] The initialized instance with metadata.
|
|
339
|
-
def initialize(version, outbound_instance, headers, status_code)
|
|
340
|
-
super(version, headers, status_code)
|
|
341
|
-
@outbound_instance = outbound_instance
|
|
342
|
-
end
|
|
343
|
-
|
|
344
|
-
def outbound
|
|
345
|
-
@outbound_instance
|
|
346
|
-
end
|
|
347
|
-
|
|
348
|
-
def headers
|
|
349
|
-
@headers
|
|
350
|
-
end
|
|
351
|
-
|
|
352
|
-
def status_code
|
|
353
|
-
@status_code
|
|
354
|
-
end
|
|
355
|
-
|
|
356
|
-
def to_s
|
|
357
|
-
"<Twilio.Api.V2010.OutboundInstanceMetadata status=#{@status_code}>"
|
|
358
|
-
end
|
|
359
|
-
end
|
|
360
|
-
|
|
361
|
-
class OutboundListResponse < InstanceListResource
|
|
362
|
-
# @param [Array<OutboundInstance>] instance
|
|
363
|
-
# @param [Hash{String => Object}] headers
|
|
364
|
-
# @param [Integer] status_code
|
|
365
|
-
def initialize(version, payload, key)
|
|
366
|
-
@outbound_instance = payload.body[key].map do |data|
|
|
367
|
-
OutboundInstance.new(version, data)
|
|
368
|
-
end
|
|
369
|
-
@headers = payload.headers
|
|
370
|
-
@status_code = payload.status_code
|
|
371
|
-
end
|
|
372
|
-
|
|
373
|
-
def outbound_instance
|
|
374
|
-
@instance
|
|
375
|
-
end
|
|
376
|
-
end
|
|
377
|
-
|
|
378
160
|
class OutboundPage < Page
|
|
379
161
|
##
|
|
380
162
|
# Initialize the OutboundPage
|
|
@@ -480,79 +262,30 @@ module Twilio
|
|
|
480
262
|
|
|
481
263
|
# Marshaled Properties
|
|
482
264
|
@properties = {
|
|
483
|
-
'account_sid' => payload['account_sid'],
|
|
484
|
-
'report_id' => payload['report_id'],
|
|
485
|
-
'status' => payload['status'],
|
|
486
|
-
'request_meta' => payload['request_meta'],
|
|
487
|
-
'url' => payload['url'],
|
|
488
265
|
'handle' => payload['handle'],
|
|
489
266
|
'total_calls' => payload['total_calls'] == nil ? payload['total_calls'] : payload['total_calls'].to_i,
|
|
490
267
|
'call_answer_score' => payload['call_answer_score'],
|
|
491
|
-
'call_state_percentage' => payload['call_state_percentage'],
|
|
492
|
-
'silent_calls_percentage' => payload['silent_calls_percentage'],
|
|
493
268
|
'calls_by_device_type' => payload['calls_by_device_type'],
|
|
494
269
|
'answer_rate_device_type' => payload['answer_rate_device_type'],
|
|
270
|
+
'call_state_percentage' => payload['call_state_percentage'],
|
|
495
271
|
'blocked_calls_by_carrier' => payload['blocked_calls_by_carrier'],
|
|
272
|
+
'silent_calls_percentage' => payload['silent_calls_percentage'],
|
|
496
273
|
'short_duration_calls_percentage' => payload['short_duration_calls_percentage'],
|
|
497
274
|
'long_duration_calls_percentage' => payload['long_duration_calls_percentage'],
|
|
498
275
|
'potential_robocalls_percentage' => payload['potential_robocalls_percentage'],
|
|
499
276
|
'answering_machine_detection' => payload['answering_machine_detection'],
|
|
500
277
|
}
|
|
501
|
-
|
|
502
|
-
# Context
|
|
503
|
-
@instance_context = nil
|
|
504
|
-
@params = { 'report_id' => report_id || @properties['report_id'] , }
|
|
505
278
|
end
|
|
506
279
|
|
|
507
|
-
##
|
|
508
|
-
# Generate an instance context for the instance, the context is capable of
|
|
509
|
-
# performing various actions. All instance actions are proxied to the context
|
|
510
|
-
# @return [OutboundContext] CallContext for this CallInstance
|
|
511
|
-
def context
|
|
512
|
-
unless @instance_context
|
|
513
|
-
@instance_context = OutboundContext.new(@version , @params['report_id'])
|
|
514
|
-
end
|
|
515
|
-
@instance_context
|
|
516
|
-
end
|
|
517
|
-
|
|
518
|
-
##
|
|
519
|
-
# @return [String] The unique SID identifier of the Account.
|
|
520
|
-
def account_sid
|
|
521
|
-
@properties['account_sid']
|
|
522
|
-
end
|
|
523
|
-
|
|
524
|
-
##
|
|
525
|
-
# @return [String] The report identifier as Voice Insights Report TTID.
|
|
526
|
-
def report_id
|
|
527
|
-
@properties['report_id']
|
|
528
|
-
end
|
|
529
280
|
|
|
530
281
|
##
|
|
531
|
-
# @return [
|
|
532
|
-
def status
|
|
533
|
-
@properties['status']
|
|
534
|
-
end
|
|
535
|
-
|
|
536
|
-
##
|
|
537
|
-
# @return [ReportMetadata]
|
|
538
|
-
def request_meta
|
|
539
|
-
@properties['request_meta']
|
|
540
|
-
end
|
|
541
|
-
|
|
542
|
-
##
|
|
543
|
-
# @return [String] The URL of this resource.
|
|
544
|
-
def url
|
|
545
|
-
@properties['url']
|
|
546
|
-
end
|
|
547
|
-
|
|
548
|
-
##
|
|
549
|
-
# @return [String] Inbound phone number handle represented in the report.
|
|
282
|
+
# @return [String] The outbound phone number handle.
|
|
550
283
|
def handle
|
|
551
284
|
@properties['handle']
|
|
552
285
|
end
|
|
553
286
|
|
|
554
287
|
##
|
|
555
|
-
# @return [String] Total number of calls made with the given handle during the report period.
|
|
288
|
+
# @return [String] Total number of outbound calls made with the given handle during the report period.
|
|
556
289
|
def total_calls
|
|
557
290
|
@properties['total_calls']
|
|
558
291
|
end
|
|
@@ -563,18 +296,6 @@ module Twilio
|
|
|
563
296
|
@properties['call_answer_score']
|
|
564
297
|
end
|
|
565
298
|
|
|
566
|
-
##
|
|
567
|
-
# @return [InsightsV2InboundPhoneNumberReportCallStatePercentage]
|
|
568
|
-
def call_state_percentage
|
|
569
|
-
@properties['call_state_percentage']
|
|
570
|
-
end
|
|
571
|
-
|
|
572
|
-
##
|
|
573
|
-
# @return [Float] Percentage of inbound calls with silence tags over total outbound calls. A silent tag is indicative of a connectivity issue or muted audio.
|
|
574
|
-
def silent_calls_percentage
|
|
575
|
-
@properties['silent_calls_percentage']
|
|
576
|
-
end
|
|
577
|
-
|
|
578
299
|
##
|
|
579
300
|
# @return [Hash<String, Integer>] Number of calls made with each device type. `voip`, `mobile`, `landline`, `unknown`
|
|
580
301
|
def calls_by_device_type
|
|
@@ -587,12 +308,24 @@ module Twilio
|
|
|
587
308
|
@properties['answer_rate_device_type']
|
|
588
309
|
end
|
|
589
310
|
|
|
311
|
+
##
|
|
312
|
+
# @return [InsightsV2OutboundPhoneNumberReportCallStatePercentage]
|
|
313
|
+
def call_state_percentage
|
|
314
|
+
@properties['call_state_percentage']
|
|
315
|
+
end
|
|
316
|
+
|
|
590
317
|
##
|
|
591
318
|
# @return [Array<CountyCarrierValue>] Percentage of blocked calls by carrier per country.
|
|
592
319
|
def blocked_calls_by_carrier
|
|
593
320
|
@properties['blocked_calls_by_carrier']
|
|
594
321
|
end
|
|
595
322
|
|
|
323
|
+
##
|
|
324
|
+
# @return [Float] Percentage of calls with silence tags over total calls. A silent tag is indicative of a connectivity issue or muted audio.
|
|
325
|
+
def silent_calls_percentage
|
|
326
|
+
@properties['silent_calls_percentage']
|
|
327
|
+
end
|
|
328
|
+
|
|
596
329
|
##
|
|
597
330
|
# @return [Float] Percentage of completed outbound calls under 10 seconds (PSTN Short call tags); More than 15% is typically low trust measured.
|
|
598
331
|
def short_duration_calls_percentage
|
|
@@ -617,30 +350,16 @@ module Twilio
|
|
|
617
350
|
@properties['answering_machine_detection']
|
|
618
351
|
end
|
|
619
352
|
|
|
620
|
-
##
|
|
621
|
-
# Create the OutboundInstance
|
|
622
|
-
# @param [InsightsV2CreatePhoneNumbersReportRequest] insights_v2_create_phone_numbers_report_request
|
|
623
|
-
# @return [OutboundInstance] Created OutboundInstance
|
|
624
|
-
def create(insights_v2_create_phone_numbers_report_request: :unset
|
|
625
|
-
)
|
|
626
|
-
|
|
627
|
-
context.create(
|
|
628
|
-
insights_v2_create_phone_numbers_report_request: insights_v2_create_phone_numbers_report_request,
|
|
629
|
-
)
|
|
630
|
-
end
|
|
631
|
-
|
|
632
353
|
##
|
|
633
354
|
# Provide a user friendly representation
|
|
634
355
|
def to_s
|
|
635
|
-
|
|
636
|
-
"<Twilio.Insights.V2.OutboundInstance #{values}>"
|
|
356
|
+
"<Twilio.Insights.V2.OutboundInstance>"
|
|
637
357
|
end
|
|
638
358
|
|
|
639
359
|
##
|
|
640
360
|
# Provide a detailed, user friendly representation
|
|
641
361
|
def inspect
|
|
642
|
-
|
|
643
|
-
"<Twilio.Insights.V2.OutboundInstance #{values}>"
|
|
362
|
+
"<Twilio.Insights.V2.OutboundInstance>"
|
|
644
363
|
end
|
|
645
364
|
end
|
|
646
365
|
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
6
|
+
#
|
|
7
|
+
# Sample/reference Twilio API.
|
|
8
|
+
# This is the reference API for the rest-proxy server.
|
|
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 Insights < InsightsBase
|
|
19
|
+
class V2 < Version
|
|
20
|
+
class OutboundReportList < ListResource
|
|
21
|
+
|
|
22
|
+
class InsightsV2CreatePhoneNumbersReportRequest
|
|
23
|
+
# @param [time_range]: [InboundReportList.InsightsV2CreatePhoneNumbersReportRequestTimeRange]
|
|
24
|
+
# @param [filters]: [Array<InboundReportList.PhoneNumberReportFilter>]
|
|
25
|
+
# @param [size]: [String] The number of max available top Phone Numbers to generate.
|
|
26
|
+
attr_accessor :time_range, :filters, :size
|
|
27
|
+
def initialize(payload)
|
|
28
|
+
@time_range = payload["time_range"]
|
|
29
|
+
@filters = payload["filters"]
|
|
30
|
+
@size = payload["size"]
|
|
31
|
+
end
|
|
32
|
+
def to_json(options = {})
|
|
33
|
+
{
|
|
34
|
+
"time_range": @time_range,
|
|
35
|
+
"filters": @filters,
|
|
36
|
+
"size": @size,
|
|
37
|
+
}.to_json(options)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
class InsightsV2CreatePhoneNumbersReportRequestTimeRange
|
|
42
|
+
# @param [start_datetime]: [Time] Start date time of the report
|
|
43
|
+
# @param [end_datetime]: [Time] End date time of the report
|
|
44
|
+
attr_accessor :start_datetime, :end_datetime
|
|
45
|
+
def initialize(payload)
|
|
46
|
+
@start_datetime = payload["start_datetime"]
|
|
47
|
+
@end_datetime = payload["end_datetime"]
|
|
48
|
+
end
|
|
49
|
+
def to_json(options = {})
|
|
50
|
+
{
|
|
51
|
+
"start_datetime": @start_datetime,
|
|
52
|
+
"end_datetime": @end_datetime,
|
|
53
|
+
}.to_json(options)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
class PhoneNumberReportFilter
|
|
58
|
+
# @param [key]: [String] The name of the filter
|
|
59
|
+
# @param [values]: [Array<String>] List of supported filter values for the field name
|
|
60
|
+
attr_accessor :key, :values
|
|
61
|
+
def initialize(payload)
|
|
62
|
+
@key = payload["key"]
|
|
63
|
+
@values = payload["values"]
|
|
64
|
+
end
|
|
65
|
+
def to_json(options = {})
|
|
66
|
+
{
|
|
67
|
+
"key": @key,
|
|
68
|
+
"values": @values,
|
|
69
|
+
}.to_json(options)
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
class ReportFilter
|
|
74
|
+
# @param [key]: [String] The name of the filter 'call_state', 'call_direction', 'call_type', 'twilio_regions', 'caller_country_code', 'callee_country_code', 'silent'
|
|
75
|
+
# @param [values]: [Array<String>] List of supported filter values for the field name
|
|
76
|
+
attr_accessor :key, :values
|
|
77
|
+
def initialize(payload)
|
|
78
|
+
@key = payload["key"]
|
|
79
|
+
@values = payload["values"]
|
|
80
|
+
end
|
|
81
|
+
def to_json(options = {})
|
|
82
|
+
{
|
|
83
|
+
"key": @key,
|
|
84
|
+
"values": @values,
|
|
85
|
+
}.to_json(options)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
##
|
|
91
|
+
# Initialize the OutboundReportList
|
|
92
|
+
# @param [Version] version Version that contains the resource
|
|
93
|
+
# @return [OutboundReportList] OutboundReportList
|
|
94
|
+
def initialize(version)
|
|
95
|
+
super(version)
|
|
96
|
+
|
|
97
|
+
# Path Solution
|
|
98
|
+
@solution = { }
|
|
99
|
+
@uri = "/Voice/Reports/PhoneNumbers/Outbound"
|
|
100
|
+
|
|
101
|
+
end
|
|
102
|
+
##
|
|
103
|
+
# Create the OutboundReportInstance
|
|
104
|
+
# @param [InsightsV2CreatePhoneNumbersReportRequest] insights_v2_create_phone_numbers_report_request
|
|
105
|
+
# @return [OutboundReportInstance] Created OutboundReportInstance
|
|
106
|
+
def create(insights_v2_create_phone_numbers_report_request: :unset
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
110
|
+
headers['Content-Type'] = 'application/json'
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
payload = @version.create('POST', @uri, headers: headers, data: insights_v2_create_phone_numbers_report_request.to_json)
|
|
116
|
+
OutboundReportInstance.new(
|
|
117
|
+
@version,
|
|
118
|
+
payload,
|
|
119
|
+
)
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
##
|
|
123
|
+
# Create the OutboundReportInstanceMetadata
|
|
124
|
+
# @param [InsightsV2CreatePhoneNumbersReportRequest] insights_v2_create_phone_numbers_report_request
|
|
125
|
+
# @return [OutboundReportInstance] Created OutboundReportInstance
|
|
126
|
+
def create_with_metadata(insights_v2_create_phone_numbers_report_request: :unset
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
130
|
+
headers['Content-Type'] = 'application/json'
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
response = @version.create_with_metadata('POST', @uri, headers: headers, data: insights_v2_create_phone_numbers_report_request.to_json)
|
|
136
|
+
outbound_report_instance = OutboundReportInstance.new(
|
|
137
|
+
@version,
|
|
138
|
+
response.body,
|
|
139
|
+
)
|
|
140
|
+
OutboundReportInstanceMetadata.new(
|
|
141
|
+
@version,
|
|
142
|
+
outbound_report_instance,
|
|
143
|
+
response.headers,
|
|
144
|
+
response.status_code
|
|
145
|
+
)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
# Provide a user friendly representation
|
|
152
|
+
def to_s
|
|
153
|
+
'#<Twilio.Insights.V2.OutboundReportList>'
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
class OutboundReportPage < Page
|
|
158
|
+
##
|
|
159
|
+
# Initialize the OutboundReportPage
|
|
160
|
+
# @param [Version] version Version that contains the resource
|
|
161
|
+
# @param [Response] response Response from the API
|
|
162
|
+
# @param [Hash] solution Path solution for the resource
|
|
163
|
+
# @return [OutboundReportPage] OutboundReportPage
|
|
164
|
+
def initialize(version, response, solution)
|
|
165
|
+
super(version, response)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
# Path Solution
|
|
169
|
+
@solution = solution
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
##
|
|
173
|
+
# Build an instance of OutboundReportInstance
|
|
174
|
+
# @param [Hash] payload Payload response from the API
|
|
175
|
+
# @return [OutboundReportInstance] OutboundReportInstance
|
|
176
|
+
def get_instance(payload)
|
|
177
|
+
OutboundReportInstance.new(@version, payload)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
##
|
|
181
|
+
# Provide a user friendly representation
|
|
182
|
+
def to_s
|
|
183
|
+
'<Twilio.Insights.V2.OutboundReportPage>'
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
class OutboundReportInstance < InstanceResource
|
|
188
|
+
##
|
|
189
|
+
# Initialize the OutboundReportInstance
|
|
190
|
+
# @param [Version] version Version that contains the resource
|
|
191
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
192
|
+
# @param [String] account_sid The SID of the
|
|
193
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this OutboundReport
|
|
194
|
+
# resource.
|
|
195
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
|
196
|
+
# @return [OutboundReportInstance] OutboundReportInstance
|
|
197
|
+
def initialize(version, payload )
|
|
198
|
+
super(version)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
# Marshaled Properties
|
|
202
|
+
@properties = {
|
|
203
|
+
'account_sid' => payload['account_sid'],
|
|
204
|
+
'report_id' => payload['report_id'],
|
|
205
|
+
'status' => payload['status'],
|
|
206
|
+
'request_meta' => payload['request_meta'],
|
|
207
|
+
'url' => payload['url'],
|
|
208
|
+
}
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
##
|
|
213
|
+
# @return [String] The unique SID identifier of the Account.
|
|
214
|
+
def account_sid
|
|
215
|
+
@properties['account_sid']
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
##
|
|
219
|
+
# @return [String] The report identifier as Voice Insights Report TTID.
|
|
220
|
+
def report_id
|
|
221
|
+
@properties['report_id']
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
##
|
|
225
|
+
# @return [ReportStatus]
|
|
226
|
+
def status
|
|
227
|
+
@properties['status']
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
##
|
|
231
|
+
# @return [ReportMetadata]
|
|
232
|
+
def request_meta
|
|
233
|
+
@properties['request_meta']
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
##
|
|
237
|
+
# @return [String] The URL of this resource.
|
|
238
|
+
def url
|
|
239
|
+
@properties['url']
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
##
|
|
243
|
+
# Provide a user friendly representation
|
|
244
|
+
def to_s
|
|
245
|
+
"<Twilio.Insights.V2.OutboundReportInstance>"
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
##
|
|
249
|
+
# Provide a detailed, user friendly representation
|
|
250
|
+
def inspect
|
|
251
|
+
"<Twilio.Insights.V2.OutboundReportInstance>"
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
end
|
|
258
|
+
end
|