Class SimReader

    • Constructor Detail

      • SimReader

        public SimReader()
    • Method Detail

      • setStatus

        public SimReader setStatus​(Sim.Status status)
        Only return Sims with this status..
        Parameters:
        status - Only return Sims with this status.
        Returns:
        this
      • setIccid

        public SimReader setIccid​(String iccid)
        Return Sims with this Iccid. Currently this should be a list with maximum size 1..
        Parameters:
        iccid - Return Sims with this Iccid.
        Returns:
        this
      • setRatePlan

        public SimReader setRatePlan​(String ratePlan)
        Only return Sims with this Rate Plan..
        Parameters:
        ratePlan - Only return Sims with this Rate Plan.
        Returns:
        this
      • setEId

        public SimReader setEId​(String eId)
        Only return Sims with this EID..
        Parameters:
        eId - Only return Sims with this EID.
        Returns:
        this
      • setSimRegistrationCode

        public SimReader setSimRegistrationCode​(String simRegistrationCode)
        Only return Sims with this registration code..
        Parameters:
        simRegistrationCode - Only return Sims with this registration code.
        Returns:
        this
      • read

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

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

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

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

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