Class RestRepository


  • public class RestRepository
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      RestRepository​(java.lang.String projectId, java.lang.String apiToken, java.lang.String spaceName)  
    • Constructor Detail

      • RestRepository

        public RestRepository​(java.lang.String projectId,
                              java.lang.String apiToken,
                              java.lang.String spaceName)
    • Method Detail

      • phoneLookUp

        public LookUp phoneLookUp​(java.lang.String phoneNumber)
        This endpoint allows you to look up validity and formatting information about a number. You can optionally lookup additional information about the number such as carrier and caller ID data.
        Parameters:
        phoneNumber - Phone number to look up
        Returns:
        LookUp
      • sendMfa

        public MfaResponse sendMfa​(int type,
                                   java.lang.String to,
                                   java.lang.String from,
                                   java.lang.String message)
                            throws SignalWireException
        Multi-factor authentication
        Parameters:
        type - type of Multifactor authentication 1 for sms and 2 for voice
        Returns:
        MfaResponse
        Throws:
        SignalWireException
      • listVerifyCallerIds

        public VerifyCaller listVerifyCallerIds()
        Returns a list of your Verified Caller IDs. The caller IDs are returned sorted by creation date, with the most recent caller IDs appearing first.
        Returns:
        VerifyCaller
      • createCallerId

        public VerifyCaller.CallerId createCallerId​(java.lang.String name,
                                                    java.lang.String extension,
                                                    java.lang.String number)
                                             throws SignalWireException
        To send a verification call to a number, you send a POST request to the Verified Caller ID resource.
        Parameters:
        name - Name of the call numbeer
        extension - Extension of the phone number
        number - Phone number
        Returns:
        CallerId
        Throws:
        SignalWireException
      • getCallerId

        public VerifyCaller.CallerId getCallerId​(java.lang.String id)
        To retrieve an existing Verified Caller ID, you send a GET request to the Verified Caller ID resource. Use the unique ID that was returned from your previous request to identify the specific Verified Caller ID.
        Parameters:
        id - id of the caller Id
        Returns:
        CallerId
      • updateCallerId

        public VerifyCaller.CallerId updateCallerId​(java.lang.String id,
                                                    java.lang.String name)
                                             throws SignalWireException
        o update an existing Verified Caller ID, you send a `PUT request to the Verified Caller ID resource. Any parameters not passed in will remain unchanged.
        Parameters:
        id - id of the callerID
        name - name of the callerId
        Returns:
        CallerId
        Throws:
        SignalWireException
      • deleteCallerId

        public SuccessResponse deleteCallerId​(java.lang.String id)
        Permanently deletes a Verified Caller ID. You will no longer be able to place calls from this phone number.
        Parameters:
        id - unique id of the callerId
        Returns:
        SuccessResponse
      • validateCallerId

        public VerifyCaller.CallerId validateCallerId​(java.lang.String id,
                                                      java.lang.String verification_code)
                                               throws SignalWireException
        Supplies the verification code that was read during the verification call.
        Parameters:
        id - unique id of the Verification ID
        verification_code - code sent to either sms or phone
        Returns:
        CalleriD
        Throws:
        SignalWireException