Class Incoming
- java.lang.Object
-
- pl.gsmservice.gateway.Incoming
-
public class Incoming extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsyncIncomingasync()Switches to the async SDK.GetIncomingMessagesRequestBuildergetByIds()Get the incoming messages by IDsGetIncomingMessagesResponsegetByIds(java.util.List<java.lang.Long> ids)Get the incoming messages by IDsGetIncomingMessagesResponsegetByIds(java.util.List<java.lang.Long> ids, java.util.Optional<Options> options)Get the incoming messages by IDsListIncomingMessagesRequestBuilderlist()List the received SMS messagesListIncomingMessagesResponselist(java.util.Optional<java.lang.Long> page, java.util.Optional<java.lang.Long> limit, java.util.Optional<Options> options)List the received SMS messagesListIncomingMessagesResponselistDirect()List the received SMS messages
-
-
-
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 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 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 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 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 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:
- 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 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 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 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:
- 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 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:
- The response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
-