Class AsyncIncoming
- java.lang.Object
-
- pl.gsmservice.gateway.AsyncIncoming
-
public class AsyncIncoming extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GetIncomingMessagesRequestBuildergetByIds()Get the incoming messages by IDsjava.util.concurrent.CompletableFuture<GetIncomingMessagesResponse>getByIds(java.util.List<java.lang.Long> ids)Get the incoming messages by IDsjava.util.concurrent.CompletableFuture<GetIncomingMessagesResponse>getByIds(java.util.List<java.lang.Long> ids, java.util.Optional<Options> options)Get the incoming messages by IDsListIncomingMessagesRequestBuilderlist()List the received SMS messagesjava.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 messagesjava.util.concurrent.CompletableFuture<ListIncomingMessagesResponse>listDirect()List the received SMS messagesIncomingsync()Switches to the sync SDK.
-
-
-
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 passpage(number of page with received messages which you want to access,Longtype) and alimit(max of received messages per page,Longtype) 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 aslimitparameter value.
As a successful result aListIncomingMessagesResponseobject will be returned withincomingMessagesproperty of typeList<IncomingMessage>containingIncomingMessageobjects, each object per single received message.
ListIncomingMessagesResponseobject will contain also aheadersproperty where you can findX-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) andX-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 passpage(number of page with received messages which you want to access,Longtype) and alimit(max of received messages per page,Longtype) 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 aslimitparameter value.
As a successful result aListIncomingMessagesResponseobject will be returned withincomingMessagesproperty of typeList<IncomingMessage>containingIncomingMessageobjects, each object per single received message.
ListIncomingMessagesResponseobject will contain also aheadersproperty where you can findX-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) andX-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 passpage(number of page with received messages which you want to access,Longtype) and alimit(max of received messages per page,Longtype) 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 aslimitparameter value.
As a successful result aListIncomingMessagesResponseobject will be returned withincomingMessagesproperty of typeList<IncomingMessage>containingIncomingMessageobjects, each object per single received message.
ListIncomingMessagesResponseobject will contain also aheadersproperty where you can findX-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) andX-Limit(messages count per single page) elements.- Parameters:
page- Page number of resultslimit- Number of results on one pageoptions- 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 theirids. 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 aGetIncomingMessagesResponseobject will be returned with anincomingMessagesproperty of typeList<IncomingMessage>containingIncomingMessageobjects, each object per single received message.
GetIncomingMessagesResponseobject will contain also aheadersproperty where you can findX-Success-Count(a count of incoming messages which were found and returned correctly) andX-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 theirids. 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 aGetIncomingMessagesResponseobject will be returned with anincomingMessagesproperty of typeList<IncomingMessage>containingIncomingMessageobjects, each object per single received message.
GetIncomingMessagesResponseobject will contain also aheadersproperty where you can findX-Success-Count(a count of incoming messages which were found and returned correctly) andX-Error-Count(count of incoming messages which were not found) elements.- Parameters:
ids- Listof 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 theirids. 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 aGetIncomingMessagesResponseobject will be returned with anincomingMessagesproperty of typeList<IncomingMessage>containingIncomingMessageobjects, each object per single received message.
GetIncomingMessagesResponseobject will contain also aheadersproperty where you can findX-Success-Count(a count of incoming messages which were found and returned correctly) andX-Error-Count(count of incoming messages which were not found) elements.- Parameters:
ids- Listof 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
-
-