Class LocalReader

    • Constructor Detail

      • LocalReader

        public LocalReader()
        Construct a new LocalReader.
      • LocalReader

        public LocalReader​(String pathAccountSid)
        Construct a new LocalReader.
        Parameters:
        pathAccountSid - The SID of the Account that created the resources to read
    • Method Detail

      • setBeta

        public LocalReader setBeta​(Boolean beta)
        Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`..
        Parameters:
        beta - Whether to include new phone numbers
        Returns:
        this
      • setFriendlyName

        public LocalReader setFriendlyName​(String friendlyName)
        A string that identifies the resources to read..
        Parameters:
        friendlyName - A string that identifies the resources to read
        Returns:
        this
      • setPhoneNumber

        public LocalReader setPhoneNumber​(PhoneNumber phoneNumber)
        The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit..
        Parameters:
        phoneNumber - The phone numbers of the resources to read
        Returns:
        this
      • setPhoneNumber

        public LocalReader setPhoneNumber​(String phoneNumber)
        The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit..
        Parameters:
        phoneNumber - The phone numbers of the resources to read
        Returns:
        this
      • setOrigin

        public LocalReader setOrigin​(String origin)
        Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included..
        Parameters:
        origin - Include phone numbers based on their origin. By default, phone numbers of all origin are included.
        Returns:
        this
      • read

        public ResourceSet<Local> read​(TwilioRestClient client)
        Make the request to the Twilio API to perform the read.
        Specified by:
        read in class Reader<Local>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Local ResourceSet
      • firstPage

        public Page<Local> firstPage​(TwilioRestClient client)
        Make the request to the Twilio API to perform the read.
        Specified by:
        firstPage in class Reader<Local>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Local ResourceSet
      • getPage

        public Page<Local> getPage​(String targetUrl,
                                   TwilioRestClient client)
        Retrieve the target page from the Twilio API.
        Specified by:
        getPage in class Reader<Local>
        Parameters:
        targetUrl - API-generated URL for the requested results page
        client - TwilioRestClient with which to make the request
        Returns:
        Local ResourceSet
      • nextPage

        public Page<Local> nextPage​(Page<Local> page,
                                    TwilioRestClient client)
        Retrieve the next page from the Twilio API.
        Specified by:
        nextPage in class Reader<Local>
        Parameters:
        page - current page
        client - TwilioRestClient with which to make the request
        Returns:
        Next Page
      • previousPage

        public Page<Local> previousPage​(Page<Local> page,
                                        TwilioRestClient client)
        Retrieve the previous page from the Twilio API.
        Specified by:
        previousPage in class Reader<Local>
        Parameters:
        page - current page
        client - TwilioRestClient with which to make the request
        Returns:
        Previous Page