Class: Twilio::REST::Page

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/twilio-ruby/framework/rest/page.rb

Overview

Page Base Class

Direct Known Subclasses

Accounts::V1::AuthTokenPromotionPage, Accounts::V1::CredentialList::AwsPage, Accounts::V1::CredentialList::PublicKeyPage, Accounts::V1::CredentialPage, Accounts::V1::SecondaryAuthTokenPage, Api::V2010::AccountContext::AddressContext::DependentPhoneNumberPage, Api::V2010::AccountContext::AddressPage, Api::V2010::AccountContext::ApplicationPage, Api::V2010::AccountContext::AuthorizedConnectAppPage, Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::LocalPage, Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::MachineToMachinePage, Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::MobilePage, Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::NationalPage, Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::SharedCostPage, Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::TollFreePage, Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::VoipPage, Api::V2010::AccountContext::AvailablePhoneNumberCountryPage, Api::V2010::AccountContext::BalancePage, Api::V2010::AccountContext::CallContext::EventPage, Api::V2010::AccountContext::CallContext::FeedbackPage, Api::V2010::AccountContext::CallContext::NotificationPage, Api::V2010::AccountContext::CallContext::PaymentPage, Api::V2010::AccountContext::CallContext::RecordingPage, Api::V2010::AccountContext::CallList::FeedbackSummaryPage, Api::V2010::AccountContext::CallPage, Api::V2010::AccountContext::ConferenceContext::ParticipantPage, Api::V2010::AccountContext::ConferenceContext::RecordingPage, Api::V2010::AccountContext::ConferencePage, Api::V2010::AccountContext::ConnectAppPage, Api::V2010::AccountContext::IncomingPhoneNumberContext::AssignedAddOnContext::AssignedAddOnExtensionPage, Api::V2010::AccountContext::IncomingPhoneNumberContext::AssignedAddOnPage, Api::V2010::AccountContext::IncomingPhoneNumberList::LocalPage, Api::V2010::AccountContext::IncomingPhoneNumberList::MobilePage, Api::V2010::AccountContext::IncomingPhoneNumberList::TollFreePage, Api::V2010::AccountContext::IncomingPhoneNumberPage, Api::V2010::AccountContext::KeyPage, Api::V2010::AccountContext::MessageContext::FeedbackPage, Api::V2010::AccountContext::MessageContext::MediaPage, Api::V2010::AccountContext::MessagePage, Api::V2010::AccountContext::NewKeyPage, Api::V2010::AccountContext::NewSigningKeyPage, Api::V2010::AccountContext::NotificationPage, Api::V2010::AccountContext::OutgoingCallerIdPage, Api::V2010::AccountContext::QueueContext::MemberPage, Api::V2010::AccountContext::QueuePage, Api::V2010::AccountContext::RecordingContext::AddOnResultContext::PayloadPage, Api::V2010::AccountContext::RecordingContext::AddOnResultPage, Api::V2010::AccountContext::RecordingContext::TranscriptionPage, Api::V2010::AccountContext::RecordingPage, Api::V2010::AccountContext::ShortCodePage, Api::V2010::AccountContext::SigningKeyPage, Api::V2010::AccountContext::SipList::CredentialListContext::CredentialPage, Api::V2010::AccountContext::SipList::CredentialListPage, Api::V2010::AccountContext::SipList::DomainContext::AuthTypesList::AuthTypeCallsList::AuthCallsCredentialListMappingPage, Api::V2010::AccountContext::SipList::DomainContext::AuthTypesList::AuthTypeCallsList::AuthCallsIpAccessControlListMappingPage, Api::V2010::AccountContext::SipList::DomainContext::AuthTypesList::AuthTypeCallsPage, Api::V2010::AccountContext::SipList::DomainContext::AuthTypesList::AuthTypeRegistrationsList::AuthRegistrationsCredentialListMappingPage, Api::V2010::AccountContext::SipList::DomainContext::AuthTypesList::AuthTypeRegistrationsPage, Api::V2010::AccountContext::SipList::DomainContext::AuthTypesPage, Api::V2010::AccountContext::SipList::DomainContext::CredentialListMappingPage, Api::V2010::AccountContext::SipList::DomainContext::IpAccessControlListMappingPage, Api::V2010::AccountContext::SipList::DomainPage, Api::V2010::AccountContext::SipList::IpAccessControlListContext::IpAddressPage, Api::V2010::AccountContext::SipList::IpAccessControlListPage, Api::V2010::AccountContext::SipPage, Api::V2010::AccountContext::TokenPage, Api::V2010::AccountContext::TranscriptionPage, Api::V2010::AccountContext::UsageList::RecordList::AllTimePage, Api::V2010::AccountContext::UsageList::RecordList::DailyPage, Api::V2010::AccountContext::UsageList::RecordList::LastMonthPage, Api::V2010::AccountContext::UsageList::RecordList::MonthlyPage, Api::V2010::AccountContext::UsageList::RecordList::ThisMonthPage, Api::V2010::AccountContext::UsageList::RecordList::TodayPage, Api::V2010::AccountContext::UsageList::RecordList::YearlyPage, Api::V2010::AccountContext::UsageList::RecordList::YesterdayPage, Api::V2010::AccountContext::UsageList::RecordPage, Api::V2010::AccountContext::UsageList::TriggerPage, Api::V2010::AccountContext::UsagePage, Api::V2010::AccountContext::ValidationRequestPage, Api::V2010::AccountPage, Autopilot::V1::AssistantContext::DefaultsPage, Autopilot::V1::AssistantContext::DialoguePage, Autopilot::V1::AssistantContext::FieldTypeContext::FieldValuePage, Autopilot::V1::AssistantContext::FieldTypePage, Autopilot::V1::AssistantContext::ModelBuildPage, Autopilot::V1::AssistantContext::QueryPage, Autopilot::V1::AssistantContext::StyleSheetPage, Autopilot::V1::AssistantContext::TaskContext::FieldPage, Autopilot::V1::AssistantContext::TaskContext::SamplePage, Autopilot::V1::AssistantContext::TaskContext::TaskActionsPage, Autopilot::V1::AssistantContext::TaskContext::TaskStatisticsPage, Autopilot::V1::AssistantContext::TaskPage, Autopilot::V1::AssistantContext::WebhookPage, Autopilot::V1::AssistantPage, Autopilot::V1::RestoreAssistantPage, Bulkexports::V1::ExportConfigurationPage, Bulkexports::V1::ExportContext::DayPage, Bulkexports::V1::ExportContext::ExportCustomJobPage, Bulkexports::V1::ExportList::JobPage, Bulkexports::V1::ExportPage, Chat::V1::CredentialPage, Chat::V1::ServiceContext::ChannelContext::InvitePage, Chat::V1::ServiceContext::ChannelContext::MemberPage, Chat::V1::ServiceContext::ChannelContext::MessagePage, Chat::V1::ServiceContext::ChannelPage, Chat::V1::ServiceContext::RolePage, Chat::V1::ServiceContext::UserContext::UserChannelPage, Chat::V1::ServiceContext::UserPage, Chat::V1::ServicePage, Chat::V2::CredentialPage, Chat::V2::ServiceContext::BindingPage, Chat::V2::ServiceContext::ChannelContext::InvitePage, Chat::V2::ServiceContext::ChannelContext::MemberPage, Chat::V2::ServiceContext::ChannelContext::MessagePage, Chat::V2::ServiceContext::ChannelContext::WebhookPage, Chat::V2::ServiceContext::ChannelPage, Chat::V2::ServiceContext::RolePage, Chat::V2::ServiceContext::UserContext::UserBindingPage, Chat::V2::ServiceContext::UserContext::UserChannelPage, Chat::V2::ServiceContext::UserPage, Chat::V2::ServicePage, Conversations::V1::ConfigurationContext::WebhookPage, Conversations::V1::ConfigurationPage, Conversations::V1::ConversationContext::MessageContext::DeliveryReceiptPage, Conversations::V1::ConversationContext::MessagePage, Conversations::V1::ConversationContext::ParticipantPage, Conversations::V1::ConversationContext::WebhookPage, Conversations::V1::ConversationPage, Conversations::V1::CredentialPage, Conversations::V1::ParticipantConversationPage, Conversations::V1::RolePage, Conversations::V1::ServiceContext::BindingPage, Conversations::V1::ServiceContext::ConfigurationContext::NotificationPage, Conversations::V1::ServiceContext::ConfigurationPage, Conversations::V1::ServiceContext::ConversationContext::MessageContext::DeliveryReceiptPage, Conversations::V1::ServiceContext::ConversationContext::MessagePage, Conversations::V1::ServiceContext::ConversationContext::ParticipantPage, Conversations::V1::ServiceContext::ConversationContext::WebhookPage, Conversations::V1::ServiceContext::ConversationPage, Conversations::V1::ServiceContext::ParticipantConversationPage, Conversations::V1::ServiceContext::RolePage, Conversations::V1::ServiceContext::UserContext::UserConversationPage, Conversations::V1::ServiceContext::UserPage, Conversations::V1::ServicePage, Conversations::V1::UserContext::UserConversationPage, Conversations::V1::UserPage, Events::V1::EventTypePage, Events::V1::SchemaContext::SchemaVersionPage, Events::V1::SchemaPage, Events::V1::SinkContext::SinkTestPage, Events::V1::SinkContext::SinkValidatePage, Events::V1::SinkPage, Events::V1::SubscriptionContext::SubscribedEventPage, Events::V1::SubscriptionPage, Fax::V1::FaxContext::FaxMediaPage, Fax::V1::FaxPage, FlexApi::V1::ChannelPage, FlexApi::V1::ConfigurationPage, FlexApi::V1::FlexFlowPage, FlexApi::V1::WebChannelPage, FrontlineApi::V1::UserPage, Insights::V1::CallContext::CallSummaryPage, Insights::V1::CallContext::EventPage, Insights::V1::CallContext::MetricPage, Insights::V1::CallPage, Insights::V1::CallSummariesPage, Insights::V1::RoomContext::ParticipantPage, Insights::V1::RoomPage, IpMessaging::V1::CredentialPage, IpMessaging::V1::ServiceContext::ChannelContext::InvitePage, IpMessaging::V1::ServiceContext::ChannelContext::MemberPage, IpMessaging::V1::ServiceContext::ChannelContext::MessagePage, IpMessaging::V1::ServiceContext::ChannelPage, IpMessaging::V1::ServiceContext::RolePage, IpMessaging::V1::ServiceContext::UserContext::UserChannelPage, IpMessaging::V1::ServiceContext::UserPage, IpMessaging::V1::ServicePage, IpMessaging::V2::CredentialPage, IpMessaging::V2::ServiceContext::BindingPage, IpMessaging::V2::ServiceContext::ChannelContext::InvitePage, IpMessaging::V2::ServiceContext::ChannelContext::MemberPage, IpMessaging::V2::ServiceContext::ChannelContext::MessagePage, IpMessaging::V2::ServiceContext::ChannelContext::WebhookPage, IpMessaging::V2::ServiceContext::ChannelPage, IpMessaging::V2::ServiceContext::RolePage, IpMessaging::V2::ServiceContext::UserContext::UserBindingPage, IpMessaging::V2::ServiceContext::UserContext::UserChannelPage, IpMessaging::V2::ServiceContext::UserPage, IpMessaging::V2::ServicePage, Lookups::V1::PhoneNumberPage, Messaging::V1::BrandRegistrationPage, Messaging::V1::DeactivationsPage, Messaging::V1::ExternalCampaignPage, Messaging::V1::ServiceContext::AlphaSenderPage, Messaging::V1::ServiceContext::PhoneNumberPage, Messaging::V1::ServiceContext::ShortCodePage, Messaging::V1::ServiceContext::UsAppToPersonPage, Messaging::V1::ServiceContext::UsAppToPersonUsecasePage, Messaging::V1::ServicePage, Messaging::V1::UsecasePage, Monitor::V1::AlertPage, Monitor::V1::EventPage, Notify::V1::CredentialPage, Notify::V1::ServiceContext::BindingPage, Notify::V1::ServiceContext::NotificationPage, Notify::V1::ServicePage, Numbers::V2::RegulatoryComplianceList::BundleContext::EvaluationPage, Numbers::V2::RegulatoryComplianceList::BundleContext::ItemAssignmentPage, Numbers::V2::RegulatoryComplianceList::BundlePage, Numbers::V2::RegulatoryComplianceList::EndUserPage, Numbers::V2::RegulatoryComplianceList::EndUserTypePage, Numbers::V2::RegulatoryComplianceList::RegulationPage, Numbers::V2::RegulatoryComplianceList::SupportingDocumentPage, Numbers::V2::RegulatoryComplianceList::SupportingDocumentTypePage, Numbers::V2::RegulatoryCompliancePage, Twilio::REST::Preview::BulkExports::ExportConfigurationPage, Twilio::REST::Preview::BulkExports::ExportContext::DayPage, Twilio::REST::Preview::BulkExports::ExportContext::ExportCustomJobPage, Twilio::REST::Preview::BulkExports::ExportList::JobPage, Twilio::REST::Preview::BulkExports::ExportPage, Twilio::REST::Preview::DeployedDevices::FleetContext::CertificatePage, Twilio::REST::Preview::DeployedDevices::FleetContext::DeploymentPage, Twilio::REST::Preview::DeployedDevices::FleetContext::DevicePage, Twilio::REST::Preview::DeployedDevices::FleetContext::KeyPage, Twilio::REST::Preview::DeployedDevices::FleetPage, Twilio::REST::Preview::HostedNumbers::AuthorizationDocumentContext::DependentHostedNumberOrderPage, Twilio::REST::Preview::HostedNumbers::AuthorizationDocumentPage, Twilio::REST::Preview::HostedNumbers::HostedNumberOrderPage, Twilio::REST::Preview::Marketplace::AvailableAddOnContext::AvailableAddOnExtensionPage, Twilio::REST::Preview::Marketplace::AvailableAddOnPage, Twilio::REST::Preview::Marketplace::InstalledAddOnContext::InstalledAddOnExtensionPage, Twilio::REST::Preview::Marketplace::InstalledAddOnPage, Twilio::REST::Preview::Sync::ServiceContext::DocumentContext::DocumentPermissionPage, Twilio::REST::Preview::Sync::ServiceContext::DocumentPage, Twilio::REST::Preview::Sync::ServiceContext::SyncListContext::SyncListItemPage, Twilio::REST::Preview::Sync::ServiceContext::SyncListContext::SyncListPermissionPage, Twilio::REST::Preview::Sync::ServiceContext::SyncListPage, Twilio::REST::Preview::Sync::ServiceContext::SyncMapContext::SyncMapItemPage, Twilio::REST::Preview::Sync::ServiceContext::SyncMapContext::SyncMapPermissionPage, Twilio::REST::Preview::Sync::ServiceContext::SyncMapPage, Twilio::REST::Preview::Sync::ServicePage, Twilio::REST::Preview::TrustedComms::BrandedChannelContext::ChannelPage, Twilio::REST::Preview::TrustedComms::BrandedChannelPage, Twilio::REST::Preview::TrustedComms::BrandsInformationPage, Twilio::REST::Preview::TrustedComms::CpsPage, Twilio::REST::Preview::TrustedComms::CurrentCallPage, Twilio::REST::Preview::Understand::AssistantContext::AssistantFallbackActionsPage, Twilio::REST::Preview::Understand::AssistantContext::AssistantInitiationActionsPage, Twilio::REST::Preview::Understand::AssistantContext::DialoguePage, Twilio::REST::Preview::Understand::AssistantContext::FieldTypeContext::FieldValuePage, Twilio::REST::Preview::Understand::AssistantContext::FieldTypePage, Twilio::REST::Preview::Understand::AssistantContext::ModelBuildPage, Twilio::REST::Preview::Understand::AssistantContext::QueryPage, Twilio::REST::Preview::Understand::AssistantContext::StyleSheetPage, Twilio::REST::Preview::Understand::AssistantContext::TaskContext::FieldPage, Twilio::REST::Preview::Understand::AssistantContext::TaskContext::SamplePage, Twilio::REST::Preview::Understand::AssistantContext::TaskContext::TaskActionsPage, Twilio::REST::Preview::Understand::AssistantContext::TaskContext::TaskStatisticsPage, Twilio::REST::Preview::Understand::AssistantContext::TaskPage, Twilio::REST::Preview::Understand::AssistantPage, Twilio::REST::Preview::Wireless::CommandPage, Twilio::REST::Preview::Wireless::RatePlanPage, Twilio::REST::Preview::Wireless::SimContext::UsagePage, Twilio::REST::Preview::Wireless::SimPage, Twilio::REST::Pricing::V1::MessagingList::CountryPage, Twilio::REST::Pricing::V1::MessagingPage, Twilio::REST::Pricing::V1::PhoneNumberList::CountryPage, Twilio::REST::Pricing::V1::PhoneNumberPage, Twilio::REST::Pricing::V1::VoiceList::CountryPage, Twilio::REST::Pricing::V1::VoiceList::NumberPage, Twilio::REST::Pricing::V1::VoicePage, Twilio::REST::Pricing::V2::VoiceList::CountryPage, Twilio::REST::Pricing::V2::VoiceList::NumberPage, Twilio::REST::Pricing::V2::VoicePage, Twilio::REST::Proxy::V1::ServiceContext::PhoneNumberPage, Twilio::REST::Proxy::V1::ServiceContext::SessionContext::InteractionPage, Twilio::REST::Proxy::V1::ServiceContext::SessionContext::ParticipantContext::MessageInteractionPage, Twilio::REST::Proxy::V1::ServiceContext::SessionContext::ParticipantPage, Twilio::REST::Proxy::V1::ServiceContext::SessionPage, Twilio::REST::Proxy::V1::ServiceContext::ShortCodePage, Twilio::REST::Proxy::V1::ServicePage, Serverless::V1::ServiceContext::AssetContext::AssetVersionPage, Serverless::V1::ServiceContext::AssetPage, Serverless::V1::ServiceContext::BuildContext::BuildStatusPage, Serverless::V1::ServiceContext::BuildPage, Serverless::V1::ServiceContext::EnvironmentContext::DeploymentPage, Serverless::V1::ServiceContext::EnvironmentContext::LogPage, Serverless::V1::ServiceContext::EnvironmentContext::VariablePage, Serverless::V1::ServiceContext::EnvironmentPage, Serverless::V1::ServiceContext::FunctionContext::FunctionVersionContext::FunctionVersionContentPage, Serverless::V1::ServiceContext::FunctionContext::FunctionVersionPage, Serverless::V1::ServiceContext::FunctionPage, Serverless::V1::ServicePage, Studio::V1::FlowContext::EngagementContext::EngagementContextPage, Studio::V1::FlowContext::EngagementContext::StepContext::StepContextPage, Studio::V1::FlowContext::EngagementContext::StepPage, Studio::V1::FlowContext::EngagementPage, Studio::V1::FlowContext::ExecutionContext::ExecutionContextPage, Studio::V1::FlowContext::ExecutionContext::ExecutionStepContext::ExecutionStepContextPage, Studio::V1::FlowContext::ExecutionContext::ExecutionStepPage, Studio::V1::FlowContext::ExecutionPage, Studio::V1::FlowPage, Studio::V2::FlowContext::ExecutionContext::ExecutionContextPage, Studio::V2::FlowContext::ExecutionContext::ExecutionStepContext::ExecutionStepContextPage, Studio::V2::FlowContext::ExecutionContext::ExecutionStepPage, Studio::V2::FlowContext::ExecutionPage, Studio::V2::FlowContext::FlowRevisionPage, Studio::V2::FlowContext::FlowTestUserPage, Studio::V2::FlowPage, Studio::V2::FlowValidatePage, Supersim::V1::CommandPage, Supersim::V1::FleetPage, Supersim::V1::NetworkAccessProfileContext::NetworkAccessProfileNetworkPage, Supersim::V1::NetworkAccessProfilePage, Supersim::V1::NetworkPage, Supersim::V1::SimContext::BillingPeriodPage, Supersim::V1::SimPage, Supersim::V1::SmsCommandPage, Supersim::V1::UsageRecordPage, Sync::V1::ServiceContext::DocumentContext::DocumentPermissionPage, Sync::V1::ServiceContext::DocumentPage, Sync::V1::ServiceContext::SyncListContext::SyncListItemPage, Sync::V1::ServiceContext::SyncListContext::SyncListPermissionPage, Sync::V1::ServiceContext::SyncListPage, Sync::V1::ServiceContext::SyncMapContext::SyncMapItemPage, Sync::V1::ServiceContext::SyncMapContext::SyncMapPermissionPage, Sync::V1::ServiceContext::SyncMapPage, Sync::V1::ServiceContext::SyncStreamContext::StreamMessagePage, Sync::V1::ServiceContext::SyncStreamPage, Sync::V1::ServicePage, Taskrouter::V1::WorkspaceContext::ActivityPage, Taskrouter::V1::WorkspaceContext::EventPage, Taskrouter::V1::WorkspaceContext::TaskChannelPage, Taskrouter::V1::WorkspaceContext::TaskContext::ReservationPage, Taskrouter::V1::WorkspaceContext::TaskPage, Taskrouter::V1::WorkspaceContext::TaskQueueContext::TaskQueueCumulativeStatisticsPage, Taskrouter::V1::WorkspaceContext::TaskQueueContext::TaskQueueRealTimeStatisticsPage, Taskrouter::V1::WorkspaceContext::TaskQueueContext::TaskQueueStatisticsPage, Taskrouter::V1::WorkspaceContext::TaskQueueList::TaskQueuesStatisticsPage, Taskrouter::V1::WorkspaceContext::TaskQueuePage, Taskrouter::V1::WorkspaceContext::WorkerContext::ReservationPage, Taskrouter::V1::WorkspaceContext::WorkerContext::WorkerChannelPage, Taskrouter::V1::WorkspaceContext::WorkerContext::WorkerStatisticsPage, Taskrouter::V1::WorkspaceContext::WorkerContext::WorkersCumulativeStatisticsPage, Taskrouter::V1::WorkspaceContext::WorkerContext::WorkersRealTimeStatisticsPage, Taskrouter::V1::WorkspaceContext::WorkerList::WorkersStatisticsPage, Taskrouter::V1::WorkspaceContext::WorkerPage, Taskrouter::V1::WorkspaceContext::WorkflowContext::WorkflowCumulativeStatisticsPage, Taskrouter::V1::WorkspaceContext::WorkflowContext::WorkflowRealTimeStatisticsPage, Taskrouter::V1::WorkspaceContext::WorkflowContext::WorkflowStatisticsPage, Taskrouter::V1::WorkspaceContext::WorkflowPage, Taskrouter::V1::WorkspaceContext::WorkspaceCumulativeStatisticsPage, Taskrouter::V1::WorkspaceContext::WorkspaceRealTimeStatisticsPage, Taskrouter::V1::WorkspaceContext::WorkspaceStatisticsPage, Taskrouter::V1::WorkspacePage, Trunking::V1::TrunkContext::CredentialListPage, Trunking::V1::TrunkContext::IpAccessControlListPage, Trunking::V1::TrunkContext::OriginationUrlPage, Trunking::V1::TrunkContext::PhoneNumberPage, Trunking::V1::TrunkContext::RecordingPage, Trunking::V1::TrunkPage, Trusthub::V1::CustomerProfilesContext::CustomerProfilesChannelEndpointAssignmentPage, Trusthub::V1::CustomerProfilesContext::CustomerProfilesEntityAssignmentsPage, Trusthub::V1::CustomerProfilesContext::CustomerProfilesEvaluationsPage, Trusthub::V1::CustomerProfilesPage, Trusthub::V1::EndUserPage, Trusthub::V1::EndUserTypePage, Trusthub::V1::PoliciesPage, Trusthub::V1::SupportingDocumentPage, Trusthub::V1::SupportingDocumentTypePage, Trusthub::V1::TrustProductsContext::TrustProductsChannelEndpointAssignmentPage, Trusthub::V1::TrustProductsContext::TrustProductsEntityAssignmentsPage, Trusthub::V1::TrustProductsContext::TrustProductsEvaluationsPage, Trusthub::V1::TrustProductsPage, Verify::V2::FormPage, Verify::V2::ServiceContext::AccessTokenPage, Verify::V2::ServiceContext::EntityContext::ChallengeContext::NotificationPage, Verify::V2::ServiceContext::EntityContext::ChallengePage, Verify::V2::ServiceContext::EntityContext::FactorPage, Verify::V2::ServiceContext::EntityContext::NewFactorPage, Verify::V2::ServiceContext::EntityPage, Verify::V2::ServiceContext::MessagingConfigurationPage, Verify::V2::ServiceContext::RateLimitContext::BucketPage, Verify::V2::ServiceContext::RateLimitPage, Verify::V2::ServiceContext::VerificationCheckPage, Verify::V2::ServiceContext::VerificationPage, Verify::V2::ServiceContext::WebhookPage, Verify::V2::ServicePage, Verify::V2::VerificationAttemptPage, Video::V1::CompositionHookPage, Video::V1::CompositionPage, Video::V1::CompositionSettingsPage, Video::V1::RecordingPage, Video::V1::RecordingSettingsPage, Video::V1::RoomContext::ParticipantContext::PublishedTrackPage, Video::V1::RoomContext::ParticipantContext::SubscribeRulesPage, Video::V1::RoomContext::ParticipantContext::SubscribedTrackPage, Video::V1::RoomContext::ParticipantPage, Video::V1::RoomContext::RecordingRulesPage, Video::V1::RoomContext::RoomRecordingPage, Video::V1::RoomPage, Voice::V1::ByocTrunkPage, Voice::V1::ConnectionPolicyContext::ConnectionPolicyTargetPage, Voice::V1::ConnectionPolicyPage, Voice::V1::DialingPermissionsList::BulkCountryUpdatePage, Voice::V1::DialingPermissionsList::CountryContext::HighriskSpecialPrefixPage, Voice::V1::DialingPermissionsList::CountryPage, Voice::V1::DialingPermissionsList::SettingsPage, Voice::V1::DialingPermissionsPage, Voice::V1::IpRecordPage, Voice::V1::SourceIpMappingPage, Wireless::V1::CommandPage, Wireless::V1::RatePlanPage, Wireless::V1::SimContext::DataSessionPage, Wireless::V1::SimContext::UsageRecordPage, Wireless::V1::SimPage, Wireless::V1::UsageRecordPage

Constant Summary collapse

META_KEYS =
[
  'end',
  'first_page_uri',
  'next_page_uri',
  'last_page_uri',
  'page',
  'page_size',
  'previous_page_uri',
  'total',
  'num_pages',
  'start',
  'uri'
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(version, response) ⇒ Page

Returns a new instance of Page.


23
24
25
26
27
28
29
30
# File 'lib/twilio-ruby/framework/rest/page.rb', line 23

def initialize(version, response)
  payload = process_response(response)

  @version = version
  @payload = payload
  @solution = {}
  @records = load_page(payload)
end

Instance Method Details

#eachObject


92
93
94
95
96
# File 'lib/twilio-ruby/framework/rest/page.rb', line 92

def each
  @records.each do |record|
    yield get_instance(record)
  end
end

#get_instance(payload) ⇒ Object


72
73
74
# File 'lib/twilio-ruby/framework/rest/page.rb', line 72

def get_instance(payload)
  raise Twilio::REST::TwilioError, 'Page.get_instance() must be implemented in the derived class'
end

#load_page(payload) ⇒ Object


40
41
42
43
44
45
46
47
48
49
50
# File 'lib/twilio-ruby/framework/rest/page.rb', line 40

def load_page(payload)
  if payload['meta'] && payload['meta']['key']
    return payload[payload['meta']['key']]
  else
    keys = payload.keys
    key = keys - META_KEYS
    return payload[key.first] if key.size == 1
  end

  raise Twilio::REST::TwilioError, 'Page Records can not be deserialized'
end

#next_pageObject


84
85
86
87
88
89
90
# File 'lib/twilio-ruby/framework/rest/page.rb', line 84

def next_page
  return nil unless next_page_url

  response = @version.domain.request('GET', next_page_url)

  self.class.new(@version, response, @solution)
end

#next_page_urlObject


62
63
64
65
66
67
68
69
70
# File 'lib/twilio-ruby/framework/rest/page.rb', line 62

def next_page_url
  if @payload['meta'] && @payload['meta']['next_page_url']
    return @version.domain.absolute_url(URI.parse(@payload['meta']['next_page_url']).request_uri)
  elsif @payload['next_page_uri']
    return @version.domain.absolute_url(@payload['next_page_uri'])
  end

  nil
end

#previous_pageObject


76
77
78
79
80
81
82
# File 'lib/twilio-ruby/framework/rest/page.rb', line 76

def previous_page
  return nil unless previous_page_url

  response = @version.domain.request('GET', previous_page_url)

  self.class.new(@version, response, @solution)
end

#previous_page_urlObject


52
53
54
55
56
57
58
59
60
# File 'lib/twilio-ruby/framework/rest/page.rb', line 52

def previous_page_url
  if @payload['meta'] && @payload['meta']['previous_page_url']
    return @version.domain.absolute_url(URI.parse(@payload['meta']['previous_page_url']).request_uri)
  elsif @payload['previous_page_uri']
    return @version.domain.absolute_url(@payload['previous_page_uri'])
  end

  nil
end

#process_response(response) ⇒ Object


32
33
34
35
36
37
38
# File 'lib/twilio-ruby/framework/rest/page.rb', line 32

def process_response(response)
  if response.status_code != 200
    raise Twilio::REST::RestError.new('Unable to fetch page', response)
  end

  response.body
end

#to_sObject


98
99
100
# File 'lib/twilio-ruby/framework/rest/page.rb', line 98

def to_s
  '#<Page>'
end