Class AsyncIncoming


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

      • sync

        public Incoming sync()
        Switches to the sync SDK.
        Returns:
        The sync 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 async call builder
      • listDirect

        public java.util.concurrent.CompletableFuture<ListIncomingMessagesResponse> listDirect()
        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:
        CompletableFuture<ListIncomingMessagesResponse> - The async response
      • list

        public java.util.concurrent.CompletableFuture<ListIncomingMessagesResponse> list​(java.util.Optional<java.lang.Long> page,
                                                                                         java.util.Optional<java.lang.Long> limit,
                                                                                         java.util.Optional<Options> options)
        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:
        CompletableFuture<ListIncomingMessagesResponse> - The async response
      • 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 async call builder
      • getByIds

        public java.util.concurrent.CompletableFuture<GetIncomingMessagesResponse> getByIds​(java.util.List<java.lang.Long> ids)
        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:
        CompletableFuture<GetIncomingMessagesResponse> - The async response
      • getByIds

        public java.util.concurrent.CompletableFuture<GetIncomingMessagesResponse> getByIds​(java.util.List<java.lang.Long> ids,
                                                                                            java.util.Optional<Options> options)
        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:
        CompletableFuture<GetIncomingMessagesResponse> - The async response