twilio-ruby 7.10.7 → 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/.github/workflows/test-and-deploy.yml +43 -67
- data/.gitignore +0 -1
- data/CHANGES.md +267 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +154 -0
- data/README.md +3 -3
- data/Rakefile +1 -1
- data/lib/rack/twilio_webhook_authentication.rb +45 -2
- data/lib/twilio-ruby/rest/accounts/v1/auth_token_promotion.rb +25 -65
- 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 +48 -71
- 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/call.rb +6 -0
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +56 -2
- 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/client.rb +0 -5
- data/lib/twilio-ruby/rest/content/v1/content/approval_create.rb +11 -60
- 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/message.rb +10 -10
- 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/message.rb +10 -10
- data/lib/twilio-ruby/rest/conversations/v1/service/conversation_with_participants.rb +0 -59
- data/lib/twilio-ruby/rest/conversations/v2/action.rb +2 -61
- data/lib/twilio-ruby/rest/conversations/v2/communication.rb +43 -21
- data/lib/twilio-ruby/rest/conversations/v2/configuration.rb +584 -21
- data/lib/twilio-ruby/rest/conversations/v2/conversation.rb +28 -28
- data/lib/twilio-ruby/rest/conversations/v2/operation.rb +10 -69
- data/lib/twilio-ruby/rest/conversations/v2/participant.rb +58 -58
- data/lib/twilio-ruby/rest/conversations/v2.rb +55 -49
- 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 +2 -61
- data/lib/twilio-ruby/rest/iam/v1/o_auth_app.rb +15 -61
- data/lib/twilio-ruby/rest/iam/v1/token.rb +0 -59
- data/lib/twilio-ruby/rest/iam_base.rb +6 -1
- data/lib/twilio-ruby/rest/insights/v1/call/annotation.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/call/call_summary.rb +7 -59
- data/lib/twilio-ruby/rest/insights/v1/call/event.rb +7 -0
- data/lib/twilio-ruby/rest/insights/v1/call.rb +0 -59
- data/lib/twilio-ruby/rest/insights/v1/call_summaries.rb +7 -0
- 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/conversation.rb +8 -8
- data/lib/twilio-ruby/rest/intelligence/v3/rule_execution.rb +443 -0
- data/lib/twilio-ruby/rest/intelligence/v3.rb +6 -0
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +0 -59
- data/lib/twilio-ruby/rest/knowledge/v2/chunk.rb +28 -0
- data/lib/twilio-ruby/rest/knowledge/v2/knowledge.rb +38 -0
- data/lib/twilio-ruby/rest/knowledge/v2/operation.rb +0 -59
- data/lib/twilio-ruby/rest/knowledge/v2/search.rb +8 -176
- data/lib/twilio-ruby/rest/knowledge/v2.rb +1 -2
- 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 +9 -177
- data/lib/twilio-ruby/rest/memory/v1/conversation_summary.rb +15 -9
- data/lib/twilio-ruby/rest/memory/v1/data_mapping.rb +6 -12
- data/lib/twilio-ruby/rest/memory/v1/identifier.rb +1 -81
- data/lib/twilio-ruby/rest/memory/v1/identity_resolution_setting.rb +11 -191
- data/lib/twilio-ruby/rest/memory/v1/import.rb +28 -5
- data/lib/twilio-ruby/rest/memory/v1/lookup.rb +1 -60
- data/lib/twilio-ruby/rest/memory/v1/observation.rb +72 -22
- data/lib/twilio-ruby/rest/memory/v1/operation.rb +1 -60
- data/lib/twilio-ruby/rest/memory/v1/profile.rb +2 -2
- data/lib/twilio-ruby/rest/memory/v1/recall.rb +1 -60
- data/lib/twilio-ruby/rest/memory/v1/revision.rb +3 -5
- data/lib/twilio-ruby/rest/memory/v1/store.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/trait.rb +1 -1
- data/lib/twilio-ruby/rest/memory/v1/trait_group.rb +56 -6
- data/lib/twilio-ruby/rest/memory/v1.rb +3 -46
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration/brand_registration_otp.rb +0 -59
- data/lib/twilio-ruby/rest/messaging/v1/brand_registration.rb +0 -18
- 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/channels_sender.rb +23 -4
- 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 +4 -63
- 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 +172 -0
- data/lib/twilio-ruby/rest/numbers/v1/sms_verification_check.rb +179 -0
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification.rb +186 -0
- data/lib/twilio-ruby/rest/numbers/v1/voice_verification_check.rb +165 -0
- data/lib/twilio-ruby/rest/numbers/v1/webhook.rb +0 -59
- data/lib/twilio-ruby/rest/numbers/v1.rb +24 -0
- 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/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 +14 -61
- data/lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb +200 -0
- data/lib/twilio-ruby/rest/oauth/v2/token.rb +10 -63
- 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 -78
- 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 +406 -0
- data/lib/twilio-ruby/rest/routes/v3.rb +50 -0
- data/lib/twilio-ruby/rest/routes_base.rb +6 -1
- 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 +271 -0
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_brand_registration_embedded_session.rb +174 -0
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration.rb +262 -0
- data/lib/twilio-ruby/rest/trusthub/v1/a2p_campaign_registration_embedded_session.rb +174 -0
- 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 +386 -0
- data/lib/twilio-ruby/rest/trusthub/v1/trust_products_provisional_copy.rb +386 -0
- data/lib/twilio-ruby/rest/trusthub/v1.rb +74 -0
- 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 +497 -0
- data/lib/twilio-ruby/rest/voice/v2/configuration/default.rb +297 -0
- data/lib/twilio-ruby/rest/voice/v2/configuration.rb +353 -0
- data/lib/twilio-ruby/rest/voice/v2/recording.rb +557 -0
- data/lib/twilio-ruby/rest/voice/v2/transcription.rb +532 -0
- data/lib/twilio-ruby/rest/voice/v2/type.rb +459 -0
- data/lib/twilio-ruby/rest/voice/v2.rb +141 -0
- data/lib/twilio-ruby/rest/voice/v3/transcription.rb +259 -50
- data/lib/twilio-ruby/rest/voice_base.rb +5 -0
- data/lib/twilio-ruby/twiml/voice_response.rb +6 -68
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +36 -22
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_knowledge.rb +0 -558
- data/lib/twilio-ruby/rest/assistants/v1/assistant/assistants_tool.rb +0 -558
- data/lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb +0 -431
- data/lib/twilio-ruby/rest/assistants/v1/assistant/message.rb +0 -296
- data/lib/twilio-ruby/rest/assistants/v1/assistant.rb +0 -927
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/chunk.rb +0 -325
- data/lib/twilio-ruby/rest/assistants/v1/knowledge/knowledge_status.rb +0 -349
- data/lib/twilio-ruby/rest/assistants/v1/knowledge.rb +0 -871
- data/lib/twilio-ruby/rest/assistants/v1/policy.rb +0 -364
- data/lib/twilio-ruby/rest/assistants/v1/session/message.rb +0 -360
- data/lib/twilio-ruby/rest/assistants/v1/session.rb +0 -501
- data/lib/twilio-ruby/rest/assistants/v1/tool.rb +0 -847
- data/lib/twilio-ruby/rest/assistants/v1.rb +0 -104
- data/lib/twilio-ruby/rest/assistants.rb +0 -6
- data/lib/twilio-ruby/rest/assistants_base.rb +0 -38
- data/lib/twilio-ruby/rest/memory/v1/event.rb +0 -320
|
@@ -168,65 +168,6 @@ module Twilio
|
|
|
168
168
|
end
|
|
169
169
|
end
|
|
170
170
|
|
|
171
|
-
class TokenPageMetadata < PageMetadata
|
|
172
|
-
attr_reader :token_page
|
|
173
|
-
|
|
174
|
-
def initialize(version, response, solution, limit)
|
|
175
|
-
super(version, response)
|
|
176
|
-
@token_page = []
|
|
177
|
-
@limit = limit
|
|
178
|
-
key = get_key(response.body)
|
|
179
|
-
records = 0
|
|
180
|
-
while( limit != :unset && records < limit )
|
|
181
|
-
@token_page << TokenListResponse.new(version, @payload, key, limit - records)
|
|
182
|
-
@payload = self.next_page
|
|
183
|
-
break unless @payload
|
|
184
|
-
records += (@payload.body[key] || []).size
|
|
185
|
-
end
|
|
186
|
-
# Path Solution
|
|
187
|
-
@solution = solution
|
|
188
|
-
end
|
|
189
|
-
|
|
190
|
-
def each
|
|
191
|
-
@token_page.each do |record|
|
|
192
|
-
yield record
|
|
193
|
-
end
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
def to_s
|
|
197
|
-
'<Twilio::REST::Oauth::V1PageMetadata>';
|
|
198
|
-
end
|
|
199
|
-
end
|
|
200
|
-
class TokenListResponse < InstanceListResource
|
|
201
|
-
|
|
202
|
-
# @param [Array<TokenInstance>] instance
|
|
203
|
-
# @param [Hash{String => Object}] headers
|
|
204
|
-
# @param [Integer] status_code
|
|
205
|
-
def initialize(version, payload, key, limit = :unset)
|
|
206
|
-
data_list = payload.body[key] || []
|
|
207
|
-
if limit != :unset
|
|
208
|
-
data_list = data_list[0, limit]
|
|
209
|
-
end
|
|
210
|
-
@token = data_list.map do |data|
|
|
211
|
-
TokenInstance.new(version, data)
|
|
212
|
-
end
|
|
213
|
-
@headers = payload.headers
|
|
214
|
-
@status_code = payload.status_code
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
def token
|
|
218
|
-
@token
|
|
219
|
-
end
|
|
220
|
-
|
|
221
|
-
def headers
|
|
222
|
-
@headers
|
|
223
|
-
end
|
|
224
|
-
|
|
225
|
-
def status_code
|
|
226
|
-
@status_code
|
|
227
|
-
end
|
|
228
|
-
end
|
|
229
|
-
|
|
230
171
|
class TokenInstance < InstanceResource
|
|
231
172
|
##
|
|
232
173
|
# Initialize the TokenInstance
|
|
@@ -38,13 +38,17 @@ module Twilio
|
|
|
38
38
|
# @param [String] redirect_uri
|
|
39
39
|
# @param [String] scope
|
|
40
40
|
# @param [String] state
|
|
41
|
+
# @param [String] code_challenge
|
|
42
|
+
# @param [String] code_challenge_method
|
|
41
43
|
# @return [AuthorizeInstance] Fetched AuthorizeInstance
|
|
42
44
|
def fetch(
|
|
43
45
|
response_type: :unset,
|
|
44
46
|
client_id: :unset,
|
|
45
47
|
redirect_uri: :unset,
|
|
46
48
|
scope: :unset,
|
|
47
|
-
state: :unset
|
|
49
|
+
state: :unset,
|
|
50
|
+
code_challenge: :unset,
|
|
51
|
+
code_challenge_method: :unset
|
|
48
52
|
)
|
|
49
53
|
|
|
50
54
|
params = Twilio::Values.of({
|
|
@@ -53,6 +57,8 @@ module Twilio
|
|
|
53
57
|
'redirect_uri' => redirect_uri,
|
|
54
58
|
'scope' => scope,
|
|
55
59
|
'state' => state,
|
|
60
|
+
'code_challenge' => code_challenge,
|
|
61
|
+
'code_challenge_method' => code_challenge_method,
|
|
56
62
|
})
|
|
57
63
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
58
64
|
|
|
@@ -74,13 +80,17 @@ module Twilio
|
|
|
74
80
|
# @param [String] redirect_uri
|
|
75
81
|
# @param [String] scope
|
|
76
82
|
# @param [String] state
|
|
83
|
+
# @param [String] code_challenge
|
|
84
|
+
# @param [String] code_challenge_method
|
|
77
85
|
# @return [AuthorizeInstance] Fetched AuthorizeInstance
|
|
78
86
|
def fetch_with_metadata(
|
|
79
87
|
response_type: :unset,
|
|
80
88
|
client_id: :unset,
|
|
81
89
|
redirect_uri: :unset,
|
|
82
90
|
scope: :unset,
|
|
83
|
-
state: :unset
|
|
91
|
+
state: :unset,
|
|
92
|
+
code_challenge: :unset,
|
|
93
|
+
code_challenge_method: :unset
|
|
84
94
|
)
|
|
85
95
|
|
|
86
96
|
params = Twilio::Values.of({
|
|
@@ -89,6 +99,8 @@ module Twilio
|
|
|
89
99
|
'redirect_uri' => redirect_uri,
|
|
90
100
|
'scope' => scope,
|
|
91
101
|
'state' => state,
|
|
102
|
+
'code_challenge' => code_challenge,
|
|
103
|
+
'code_challenge_method' => code_challenge_method,
|
|
92
104
|
})
|
|
93
105
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
94
106
|
|
|
@@ -148,65 +160,6 @@ module Twilio
|
|
|
148
160
|
end
|
|
149
161
|
end
|
|
150
162
|
|
|
151
|
-
class AuthorizePageMetadata < PageMetadata
|
|
152
|
-
attr_reader :authorize_page
|
|
153
|
-
|
|
154
|
-
def initialize(version, response, solution, limit)
|
|
155
|
-
super(version, response)
|
|
156
|
-
@authorize_page = []
|
|
157
|
-
@limit = limit
|
|
158
|
-
key = get_key(response.body)
|
|
159
|
-
records = 0
|
|
160
|
-
while( limit != :unset && records < limit )
|
|
161
|
-
@authorize_page << AuthorizeListResponse.new(version, @payload, key, limit - records)
|
|
162
|
-
@payload = self.next_page
|
|
163
|
-
break unless @payload
|
|
164
|
-
records += (@payload.body[key] || []).size
|
|
165
|
-
end
|
|
166
|
-
# Path Solution
|
|
167
|
-
@solution = solution
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
def each
|
|
171
|
-
@authorize_page.each do |record|
|
|
172
|
-
yield record
|
|
173
|
-
end
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
def to_s
|
|
177
|
-
'<Twilio::REST::Oauth::V2PageMetadata>';
|
|
178
|
-
end
|
|
179
|
-
end
|
|
180
|
-
class AuthorizeListResponse < InstanceListResource
|
|
181
|
-
|
|
182
|
-
# @param [Array<AuthorizeInstance>] instance
|
|
183
|
-
# @param [Hash{String => Object}] headers
|
|
184
|
-
# @param [Integer] status_code
|
|
185
|
-
def initialize(version, payload, key, limit = :unset)
|
|
186
|
-
data_list = payload.body[key] || []
|
|
187
|
-
if limit != :unset
|
|
188
|
-
data_list = data_list[0, limit]
|
|
189
|
-
end
|
|
190
|
-
@authorize = data_list.map do |data|
|
|
191
|
-
AuthorizeInstance.new(version, data)
|
|
192
|
-
end
|
|
193
|
-
@headers = payload.headers
|
|
194
|
-
@status_code = payload.status_code
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
def authorize
|
|
198
|
-
@authorize
|
|
199
|
-
end
|
|
200
|
-
|
|
201
|
-
def headers
|
|
202
|
-
@headers
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
def status_code
|
|
206
|
-
@status_code
|
|
207
|
-
end
|
|
208
|
-
end
|
|
209
|
-
|
|
210
163
|
class AuthorizeInstance < InstanceResource
|
|
211
164
|
##
|
|
212
165
|
# Initialize the AuthorizeInstance
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
##
|
|
2
|
+
# This code was generated by
|
|
3
|
+
# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
4
|
+
# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
5
|
+
# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
6
|
+
#
|
|
7
|
+
# User OAuth API
|
|
8
|
+
# User OAuth 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 Oauth < OauthBase
|
|
19
|
+
class V2 < Version
|
|
20
|
+
class OauthAuthorizationServerList < ListResource
|
|
21
|
+
|
|
22
|
+
##
|
|
23
|
+
# Initialize the OauthAuthorizationServerList
|
|
24
|
+
# @param [Version] version Version that contains the resource
|
|
25
|
+
# @return [OauthAuthorizationServerList] OauthAuthorizationServerList
|
|
26
|
+
def initialize(version)
|
|
27
|
+
super(version)
|
|
28
|
+
|
|
29
|
+
# Path Solution
|
|
30
|
+
@solution = { }
|
|
31
|
+
@uri = "/oauth-authorization-server"
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
##
|
|
35
|
+
# Fetch the OauthAuthorizationServerInstance
|
|
36
|
+
# @return [OauthAuthorizationServerInstance] Fetched OauthAuthorizationServerInstance
|
|
37
|
+
def fetch
|
|
38
|
+
|
|
39
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
payload = @version.fetch('GET', @uri, headers: headers)
|
|
46
|
+
OauthAuthorizationServerInstance.new(
|
|
47
|
+
@version,
|
|
48
|
+
payload,
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
##
|
|
53
|
+
# Fetch the OauthAuthorizationServerInstanceMetadata
|
|
54
|
+
# @return [OauthAuthorizationServerInstance] Fetched OauthAuthorizationServerInstance
|
|
55
|
+
def fetch_with_metadata
|
|
56
|
+
|
|
57
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
response = @version.fetch_with_metadata('GET', @uri, headers: headers)
|
|
64
|
+
oauth_authorization_server_instance = OauthAuthorizationServerInstance.new(
|
|
65
|
+
@version,
|
|
66
|
+
response.body,
|
|
67
|
+
)
|
|
68
|
+
OauthAuthorizationServerInstanceMetadata.new(
|
|
69
|
+
@version,
|
|
70
|
+
oauth_authorization_server_instance,
|
|
71
|
+
response.headers,
|
|
72
|
+
response.status_code
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# Provide a user friendly representation
|
|
80
|
+
def to_s
|
|
81
|
+
'#<Twilio.Oauth.V2.OauthAuthorizationServerList>'
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
class OauthAuthorizationServerPage < Page
|
|
86
|
+
##
|
|
87
|
+
# Initialize the OauthAuthorizationServerPage
|
|
88
|
+
# @param [Version] version Version that contains the resource
|
|
89
|
+
# @param [Response] response Response from the API
|
|
90
|
+
# @param [Hash] solution Path solution for the resource
|
|
91
|
+
# @return [OauthAuthorizationServerPage] OauthAuthorizationServerPage
|
|
92
|
+
def initialize(version, response, solution)
|
|
93
|
+
super(version, response)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# Path Solution
|
|
97
|
+
@solution = solution
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
##
|
|
101
|
+
# Build an instance of OauthAuthorizationServerInstance
|
|
102
|
+
# @param [Hash] payload Payload response from the API
|
|
103
|
+
# @return [OauthAuthorizationServerInstance] OauthAuthorizationServerInstance
|
|
104
|
+
def get_instance(payload)
|
|
105
|
+
OauthAuthorizationServerInstance.new(@version, payload)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
##
|
|
109
|
+
# Provide a user friendly representation
|
|
110
|
+
def to_s
|
|
111
|
+
'<Twilio.Oauth.V2.OauthAuthorizationServerPage>'
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
class OauthAuthorizationServerInstance < InstanceResource
|
|
116
|
+
##
|
|
117
|
+
# Initialize the OauthAuthorizationServerInstance
|
|
118
|
+
# @param [Version] version Version that contains the resource
|
|
119
|
+
# @param [Hash] payload payload that contains response from Twilio
|
|
120
|
+
# @param [String] account_sid The SID of the
|
|
121
|
+
# {Account}[https://www.twilio.com/docs/iam/api/account] that created this OauthAuthorizationServer
|
|
122
|
+
# resource.
|
|
123
|
+
# @param [String] sid The SID of the Call resource to fetch.
|
|
124
|
+
# @return [OauthAuthorizationServerInstance] OauthAuthorizationServerInstance
|
|
125
|
+
def initialize(version, payload )
|
|
126
|
+
super(version)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
# Marshaled Properties
|
|
130
|
+
@properties = {
|
|
131
|
+
'issuer' => payload['issuer'],
|
|
132
|
+
'authorization_endpoint' => payload['authorization_endpoint'],
|
|
133
|
+
'token_endpoint' => payload['token_endpoint'],
|
|
134
|
+
'response_types_supported' => payload['response_types_supported'],
|
|
135
|
+
'grant_types_supported' => payload['grant_types_supported'],
|
|
136
|
+
'code_challenge_methods_supported' => payload['code_challenge_methods_supported'],
|
|
137
|
+
'token_endpoint_auth_methods_supported' => payload['token_endpoint_auth_methods_supported'],
|
|
138
|
+
}
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
##
|
|
143
|
+
# @return [String]
|
|
144
|
+
def issuer
|
|
145
|
+
@properties['issuer']
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
##
|
|
149
|
+
# @return [String]
|
|
150
|
+
def authorization_endpoint
|
|
151
|
+
@properties['authorization_endpoint']
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
##
|
|
155
|
+
# @return [String]
|
|
156
|
+
def token_endpoint
|
|
157
|
+
@properties['token_endpoint']
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
##
|
|
161
|
+
# @return [Array<String>]
|
|
162
|
+
def response_types_supported
|
|
163
|
+
@properties['response_types_supported']
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
##
|
|
167
|
+
# @return [Array<String>]
|
|
168
|
+
def grant_types_supported
|
|
169
|
+
@properties['grant_types_supported']
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
##
|
|
173
|
+
# @return [Array<String>]
|
|
174
|
+
def code_challenge_methods_supported
|
|
175
|
+
@properties['code_challenge_methods_supported']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
##
|
|
179
|
+
# @return [Array<String>]
|
|
180
|
+
def token_endpoint_auth_methods_supported
|
|
181
|
+
@properties['token_endpoint_auth_methods_supported']
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
##
|
|
185
|
+
# Provide a user friendly representation
|
|
186
|
+
def to_s
|
|
187
|
+
"<Twilio.Oauth.V2.OauthAuthorizationServerInstance>"
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
##
|
|
191
|
+
# Provide a detailed, user friendly representation
|
|
192
|
+
def inspect
|
|
193
|
+
"<Twilio.Oauth.V2.OauthAuthorizationServerInstance>"
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
end
|
|
@@ -42,17 +42,19 @@ module Twilio
|
|
|
42
42
|
# @param [String] audience The targeted audience uri
|
|
43
43
|
# @param [String] refresh_token JWT token related to refresh access token.
|
|
44
44
|
# @param [String] scope The scope of token
|
|
45
|
+
# @param [String] code_verifier The PKCE code verifier used to generate the code_challenge in the authorization request.
|
|
45
46
|
# @return [TokenInstance] Created TokenInstance
|
|
46
47
|
def create(
|
|
47
48
|
account_sid: :unset,
|
|
48
|
-
grant_type:
|
|
49
|
+
grant_type: nil,
|
|
49
50
|
client_id: :unset,
|
|
50
51
|
client_secret: :unset,
|
|
51
52
|
code: :unset,
|
|
52
53
|
redirect_uri: :unset,
|
|
53
54
|
audience: :unset,
|
|
54
55
|
refresh_token: :unset,
|
|
55
|
-
scope: :unset
|
|
56
|
+
scope: :unset,
|
|
57
|
+
code_verifier: :unset
|
|
56
58
|
)
|
|
57
59
|
|
|
58
60
|
params = Twilio::Values.of({
|
|
@@ -67,6 +69,7 @@ module Twilio
|
|
|
67
69
|
'audience' => audience,
|
|
68
70
|
'refresh_token' => refresh_token,
|
|
69
71
|
'scope' => scope,
|
|
72
|
+
'code_verifier' => code_verifier,
|
|
70
73
|
})
|
|
71
74
|
|
|
72
75
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
@@ -93,17 +96,19 @@ module Twilio
|
|
|
93
96
|
# @param [String] audience The targeted audience uri
|
|
94
97
|
# @param [String] refresh_token JWT token related to refresh access token.
|
|
95
98
|
# @param [String] scope The scope of token
|
|
99
|
+
# @param [String] code_verifier The PKCE code verifier used to generate the code_challenge in the authorization request.
|
|
96
100
|
# @return [TokenInstance] Created TokenInstance
|
|
97
101
|
def create_with_metadata(
|
|
98
102
|
account_sid: :unset,
|
|
99
|
-
grant_type:
|
|
103
|
+
grant_type: nil,
|
|
100
104
|
client_id: :unset,
|
|
101
105
|
client_secret: :unset,
|
|
102
106
|
code: :unset,
|
|
103
107
|
redirect_uri: :unset,
|
|
104
108
|
audience: :unset,
|
|
105
109
|
refresh_token: :unset,
|
|
106
|
-
scope: :unset
|
|
110
|
+
scope: :unset,
|
|
111
|
+
code_verifier: :unset
|
|
107
112
|
)
|
|
108
113
|
|
|
109
114
|
params = Twilio::Values.of({
|
|
@@ -118,6 +123,7 @@ module Twilio
|
|
|
118
123
|
'audience' => audience,
|
|
119
124
|
'refresh_token' => refresh_token,
|
|
120
125
|
'scope' => scope,
|
|
126
|
+
'code_verifier' => code_verifier,
|
|
121
127
|
})
|
|
122
128
|
|
|
123
129
|
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
|
@@ -178,65 +184,6 @@ module Twilio
|
|
|
178
184
|
end
|
|
179
185
|
end
|
|
180
186
|
|
|
181
|
-
class TokenPageMetadata < PageMetadata
|
|
182
|
-
attr_reader :token_page
|
|
183
|
-
|
|
184
|
-
def initialize(version, response, solution, limit)
|
|
185
|
-
super(version, response)
|
|
186
|
-
@token_page = []
|
|
187
|
-
@limit = limit
|
|
188
|
-
key = get_key(response.body)
|
|
189
|
-
records = 0
|
|
190
|
-
while( limit != :unset && records < limit )
|
|
191
|
-
@token_page << TokenListResponse.new(version, @payload, key, limit - records)
|
|
192
|
-
@payload = self.next_page
|
|
193
|
-
break unless @payload
|
|
194
|
-
records += (@payload.body[key] || []).size
|
|
195
|
-
end
|
|
196
|
-
# Path Solution
|
|
197
|
-
@solution = solution
|
|
198
|
-
end
|
|
199
|
-
|
|
200
|
-
def each
|
|
201
|
-
@token_page.each do |record|
|
|
202
|
-
yield record
|
|
203
|
-
end
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
def to_s
|
|
207
|
-
'<Twilio::REST::Oauth::V2PageMetadata>';
|
|
208
|
-
end
|
|
209
|
-
end
|
|
210
|
-
class TokenListResponse < InstanceListResource
|
|
211
|
-
|
|
212
|
-
# @param [Array<TokenInstance>] instance
|
|
213
|
-
# @param [Hash{String => Object}] headers
|
|
214
|
-
# @param [Integer] status_code
|
|
215
|
-
def initialize(version, payload, key, limit = :unset)
|
|
216
|
-
data_list = payload.body[key] || []
|
|
217
|
-
if limit != :unset
|
|
218
|
-
data_list = data_list[0, limit]
|
|
219
|
-
end
|
|
220
|
-
@token = data_list.map do |data|
|
|
221
|
-
TokenInstance.new(version, data)
|
|
222
|
-
end
|
|
223
|
-
@headers = payload.headers
|
|
224
|
-
@status_code = payload.status_code
|
|
225
|
-
end
|
|
226
|
-
|
|
227
|
-
def token
|
|
228
|
-
@token
|
|
229
|
-
end
|
|
230
|
-
|
|
231
|
-
def headers
|
|
232
|
-
@headers
|
|
233
|
-
end
|
|
234
|
-
|
|
235
|
-
def status_code
|
|
236
|
-
@status_code
|
|
237
|
-
end
|
|
238
|
-
end
|
|
239
|
-
|
|
240
187
|
class TokenInstance < InstanceResource
|
|
241
188
|
##
|
|
242
189
|
# Initialize the TokenInstance
|
|
@@ -214,65 +214,6 @@ module Twilio
|
|
|
214
214
|
end
|
|
215
215
|
end
|
|
216
216
|
|
|
217
|
-
class UsagePageMetadata < PageMetadata
|
|
218
|
-
attr_reader :usage_page
|
|
219
|
-
|
|
220
|
-
def initialize(version, response, solution, limit)
|
|
221
|
-
super(version, response)
|
|
222
|
-
@usage_page = []
|
|
223
|
-
@limit = limit
|
|
224
|
-
key = get_key(response.body)
|
|
225
|
-
records = 0
|
|
226
|
-
while( limit != :unset && records < limit )
|
|
227
|
-
@usage_page << UsageListResponse.new(version, @payload, key, limit - records)
|
|
228
|
-
@payload = self.next_page
|
|
229
|
-
break unless @payload
|
|
230
|
-
records += (@payload.body[key] || []).size
|
|
231
|
-
end
|
|
232
|
-
# Path Solution
|
|
233
|
-
@solution = solution
|
|
234
|
-
end
|
|
235
|
-
|
|
236
|
-
def each
|
|
237
|
-
@usage_page.each do |record|
|
|
238
|
-
yield record
|
|
239
|
-
end
|
|
240
|
-
end
|
|
241
|
-
|
|
242
|
-
def to_s
|
|
243
|
-
'<Twilio::REST::Preview::WirelessPageMetadata>';
|
|
244
|
-
end
|
|
245
|
-
end
|
|
246
|
-
class UsageListResponse < InstanceListResource
|
|
247
|
-
|
|
248
|
-
# @param [Array<UsageInstance>] instance
|
|
249
|
-
# @param [Hash{String => Object}] headers
|
|
250
|
-
# @param [Integer] status_code
|
|
251
|
-
def initialize(version, payload, key, limit = :unset)
|
|
252
|
-
data_list = payload.body[key] || []
|
|
253
|
-
if limit != :unset
|
|
254
|
-
data_list = data_list[0, limit]
|
|
255
|
-
end
|
|
256
|
-
@usage = data_list.map do |data|
|
|
257
|
-
UsageInstance.new(version, data)
|
|
258
|
-
end
|
|
259
|
-
@headers = payload.headers
|
|
260
|
-
@status_code = payload.status_code
|
|
261
|
-
end
|
|
262
|
-
|
|
263
|
-
def usage
|
|
264
|
-
@usage
|
|
265
|
-
end
|
|
266
|
-
|
|
267
|
-
def headers
|
|
268
|
-
@headers
|
|
269
|
-
end
|
|
270
|
-
|
|
271
|
-
def status_code
|
|
272
|
-
@status_code
|
|
273
|
-
end
|
|
274
|
-
end
|
|
275
|
-
|
|
276
217
|
class UsageInstance < InstanceResource
|
|
277
218
|
##
|
|
278
219
|
# Initialize the UsageInstance
|
|
@@ -148,65 +148,6 @@ module Twilio
|
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
-
class AuthorizePageMetadata < PageMetadata
|
|
152
|
-
attr_reader :authorize_page
|
|
153
|
-
|
|
154
|
-
def initialize(version, response, solution, limit)
|
|
155
|
-
super(version, response)
|
|
156
|
-
@authorize_page = []
|
|
157
|
-
@limit = limit
|
|
158
|
-
key = get_key(response.body)
|
|
159
|
-
records = 0
|
|
160
|
-
while( limit != :unset && records < limit )
|
|
161
|
-
@authorize_page << AuthorizeListResponse.new(version, @payload, key, limit - records)
|
|
162
|
-
@payload = self.next_page
|
|
163
|
-
break unless @payload
|
|
164
|
-
records += (@payload.body[key] || []).size
|
|
165
|
-
end
|
|
166
|
-
# Path Solution
|
|
167
|
-
@solution = solution
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
def each
|
|
171
|
-
@authorize_page.each do |record|
|
|
172
|
-
yield record
|
|
173
|
-
end
|
|
174
|
-
end
|
|
175
|
-
|
|
176
|
-
def to_s
|
|
177
|
-
'<Twilio::REST::PreviewIam::V1PageMetadata>';
|
|
178
|
-
end
|
|
179
|
-
end
|
|
180
|
-
class AuthorizeListResponse < InstanceListResource
|
|
181
|
-
|
|
182
|
-
# @param [Array<AuthorizeInstance>] instance
|
|
183
|
-
# @param [Hash{String => Object}] headers
|
|
184
|
-
# @param [Integer] status_code
|
|
185
|
-
def initialize(version, payload, key, limit = :unset)
|
|
186
|
-
data_list = payload.body[key] || []
|
|
187
|
-
if limit != :unset
|
|
188
|
-
data_list = data_list[0, limit]
|
|
189
|
-
end
|
|
190
|
-
@authorize = data_list.map do |data|
|
|
191
|
-
AuthorizeInstance.new(version, data)
|
|
192
|
-
end
|
|
193
|
-
@headers = payload.headers
|
|
194
|
-
@status_code = payload.status_code
|
|
195
|
-
end
|
|
196
|
-
|
|
197
|
-
def authorize
|
|
198
|
-
@authorize
|
|
199
|
-
end
|
|
200
|
-
|
|
201
|
-
def headers
|
|
202
|
-
@headers
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
def status_code
|
|
206
|
-
@status_code
|
|
207
|
-
end
|
|
208
|
-
end
|
|
209
|
-
|
|
210
151
|
class AuthorizeInstance < InstanceResource
|
|
211
152
|
##
|
|
212
153
|
# Initialize the AuthorizeInstance
|