Class Incoming


  • public class Incoming
    extends java.lang.Object
    • Method Detail

      • async

        public AsyncIncoming async()
        Switches to the async SDK.
        Returns:
        The async SDK
      • list

        public ListIncomingMessagesRequestBuilder list()
        List the received SMS messages



        Get the details of all received messages from your account incoming messages box. This method supports pagination so you have to pass page (number of page with received messages which you want to access, Long type) and a limit (max of received messages per page, Long type) parameters. Please use builder style:

        
         ListIncomingMessagesResponse res = sdk.incoming().list()
            .page(1L)
            .limit(10L)
            .call();
         

        Messages are fetched from the latest one. This method will accept maximum 50 as limit parameter value.

        As a successful result a ListIncomingMessagesResponse object will be returned with incomingMessages property of type List<IncomingMessage> containing IncomingMessage objects, each object per single received message.

        ListIncomingMessagesResponse object will contain also a headers property where you can find X-Total-Results (a total count of all received messages which are available in incoming box on your account), X-Total-Pages (a total number of all pages with results), X-Current-Page (A current page number) and X-Limit (messages count per single page) elements.
        Returns:
        The call builder
      • listDirect

        public ListIncomingMessagesResponse listDirect()
                                                throws java.lang.Exception
        List the received SMS messages



        Get the details of all received messages from your account incoming messages box. This method supports pagination so you have to pass page (number of page with received messages which you want to access, Long type) and a limit (max of received messages per page, Long type) parameters. Please use builder style:

        
         ListIncomingMessagesResponse res = sdk.incoming().list()
            .page(1L)
            .limit(10L)
            .call();
         

        Messages are fetched from the latest one. This method will accept maximum 50 as limit parameter value.

        As a successful result a ListIncomingMessagesResponse object will be returned with incomingMessages property of type List<IncomingMessage> containing IncomingMessage objects, each object per single received message.

        ListIncomingMessagesResponse object will contain also a headers property where you can find X-Total-Results (a total count of all received messages which are available in incoming box on your account), X-Total-Pages (a total number of all pages with results), X-Current-Page (A current page number) and X-Limit (messages count per single page) elements.
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • list

        public ListIncomingMessagesResponse list​(java.util.Optional<java.lang.Long> page,
                                                 java.util.Optional<java.lang.Long> limit,
                                                 java.util.Optional<Options> options)
                                          throws java.lang.Exception
        List the received SMS messages



        Get the details of all received messages from your account incoming messages box. This method supports pagination so you have to pass page (number of page with received messages which you want to access, Long type) and a limit (max of received messages per page, Long type) parameters. Please use builder style:

        
         ListIncomingMessagesResponse res = sdk.incoming().list()
            .page(1L)
            .limit(10L)
            .call();
         

        Messages are fetched from the latest one. This method will accept maximum 50 as limit parameter value.

        As a successful result a ListIncomingMessagesResponse object will be returned with incomingMessages property of type List<IncomingMessage> containing IncomingMessage objects, each object per single received message.

        ListIncomingMessagesResponse object will contain also a headers property where you can find X-Total-Results (a total count of all received messages which are available in incoming box on your account), X-Total-Pages (a total number of all pages with results), X-Current-Page (A current page number) and X-Limit (messages count per single page) elements.
        Parameters:
        page - Page number of results
        limit - Number of results on one page
        options - additional options
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • getByIds

        public GetIncomingMessagesRequestBuilder getByIds()
        Get the incoming messages by IDs



        Get the details of one or more received messages using their ids. You should pass the ListOf() containing unique incoming message IDs (Long type) which details you want to fetch. Please use builder style:

        
         GetIncomingMessagesResponse res = sdk.incoming().getByIds()
            .ids(List.of(43456L))
            .call();
         

        The method will accept maximum 50 identifiers in one call.

        As a successful result a GetIncomingMessagesResponse object will be returned with an incomingMessages property of type List<IncomingMessage> containing IncomingMessage objects, each object per single received message.

        GetIncomingMessagesResponse object will contain also a headers property where you can find X-Success-Count (a count of incoming messages which were found and returned correctly) and X-Error-Count (count of incoming messages which were not found) elements.
        Returns:
        The call builder
      • getByIds

        public GetIncomingMessagesResponse getByIds​(java.util.List<java.lang.Long> ids)
                                             throws java.lang.Exception
        Get the incoming messages by IDs



        Get the details of one or more received messages using their ids. You should pass the ListOf() containing unique incoming message IDs (Long type) which details you want to fetch. Please use builder style:

        
         GetIncomingMessagesResponse res = sdk.incoming().getByIds()
            .ids(List.of(43456L))
            .call();
         

        The method will accept maximum 50 identifiers in one call.

        As a successful result a GetIncomingMessagesResponse object will be returned with an incomingMessages property of type List<IncomingMessage> containing IncomingMessage objects, each object per single received message.

        GetIncomingMessagesResponse object will contain also a headers property where you can find X-Success-Count (a count of incoming messages which were found and returned correctly) and X-Error-Count (count of incoming messages which were not found) elements.
        Parameters:
        ids - List of Message IDs assigned by the system. The system will accept a maximum of 50 identifiers in one call.
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails
      • getByIds

        public GetIncomingMessagesResponse getByIds​(java.util.List<java.lang.Long> ids,
                                                    java.util.Optional<Options> options)
                                             throws java.lang.Exception
        Get the incoming messages by IDs



        Get the details of one or more received messages using their ids. You should pass the ListOf() containing unique incoming message IDs (Long type) which details you want to fetch. Please use builder style:

        
         GetIncomingMessagesResponse res = sdk.incoming().getByIds()
            .ids(List.of(43456L))
            .call();
         

        The method will accept maximum 50 identifiers in one call.

        As a successful result a GetIncomingMessagesResponse object will be returned with an incomingMessages property of type List<IncomingMessage> containing IncomingMessage objects, each object per single received message.

        GetIncomingMessagesResponse object will contain also a headers property where you can find X-Success-Count (a count of incoming messages which were found and returned correctly) and X-Error-Count (count of incoming messages which were not found) elements.
        Parameters:
        ids - List of Message IDs assigned by the system. The system will accept a maximum of 50 identifiers in one call.
        options - additional options
        Returns:
        The response from the API call
        Throws:
        java.lang.Exception - if the API call fails