Module: Telnyx::APIOperations::List

Included in:
Telnyx::AccessIPAddress, Telnyx::AccessIPRange, Telnyx::Address, Telnyx::AlphanumericSenderId, Telnyx::AuthenticationProviders, Telnyx::AvailablePhoneNumber, BatchMdrReport, BillingGroup, Brand, BulkCreation, BulkSimCardAction, BusinessIdentitie, CallControlApplication, CallEvent, CallRecording, Campaign, ChannelZone, Comment, Conference, Connection, CredentialConnection, CsvDownload, DetailRecord, Documents, DynamicEmergencyEndpoint, Enum, Event, FQDN, FQDNConnection, Fax, FaxApplication, GlobalIp, GlobalIpAllowedPort, GlobalIpAssignment, GlobalIpAssignmentHealth, GlobalIpAssignmentUsage, GlobalIpLatency, GlobalIpProtocol, GlobalIpUsage, IP, IPConnection, ListObject, ManagedAccount, MdrUsageReport, Media, MessagingHostedNumberOrder, MessagingPhoneNumber, MessagingProfile, MessagingTollfreeVerification, MessagingUrlDomain, MobileOperatorNetwork, MobilePushCredential, Network, NotificationChannel, NotificationEvent, NotificationEventCondition, NotificationProfile, NotificationSetting, NumberBlockOrder, NumberOrder, NumberOrderDocument, NumberReservation, OtaUpdate, OutboundVoiceProfile, PartnerCampaign, PhoneNumber, PhoneNumberAssignmentByProfile, PhoneNumberBlockJob, PhoneNumberCampaign, PhoneNumberRegulatoryRequirement, PortingOrder, Portout, PrivateWirelessGateway, PublicInternetGateway, Region, RegulatoryRequirement, Requirement, RequirementType, Room, RoomComposition, RoomParticipant, RoomRecording, RoomSession, ShortCode, SimCard, SimCardAction, SimCardDataUsageNotification, SimCardGroup, SimCardGroupAction, SimCardOrder, TelephonyCredential, TexmlApplication, VerifiedCallsDisplayProfile, VerifyProfile, VirtualCrossConnect, VirtualCrossConnectRegion, Wdr, WebhookDeliverie, WireguardInterface, WireguardPeer, WirelessDetailRecordsReport
Defined in:
lib/telnyx/api_operations/list.rb

Instance Method Summary collapse

Instance Method Details

#list(filters = {}, opts = {}) ⇒ Object Also known as: all



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/telnyx/api_operations/list.rb', line 6

def list(filters = {}, opts = {})
  opts = Util.normalize_opts(opts)

  resp, opts = request(:get, resource_url, filters, opts)
  obj = ListObject.construct_from(resp.data.merge(url: resource_url), opts)

  # set filters so that we can fetch the same limit, expansions, and
  # predicates when accessing the next and previous pages
  #
  # just for general cleanliness, remove any paging options
  obj.filters = filters.dup
  # obj.filters.delete(:page) # undo this as it interferes with the pagination system...

  obj
end