Package pl.gsmservice.gateway
Class Outgoing
- java.lang.Object
-
- pl.gsmservice.gateway.Outgoing
-
- All Implemented Interfaces:
SDKMethodInterfaces.MethodCallCancelMessages,SDKMethodInterfaces.MethodCallGetMessages,SDKMethodInterfaces.MethodCallListMessages
public class Outgoing extends java.lang.Object implements SDKMethodInterfaces.MethodCallGetMessages, SDKMethodInterfaces.MethodCallCancelMessages, SDKMethodInterfaces.MethodCallListMessages
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CancelMessagesRequestBuildercancelScheduled()Cancel a scheduled messages Cancel messages using their `ids` which were scheduled to be sent at a specific time.CancelMessagesResponsecancelScheduled(java.util.List<java.lang.Long> ids)Cancel a scheduled messages Cancel messages using their `ids` which were scheduled to be sent at a specific time.CancelMessagesResponsecancelScheduled(java.util.List<java.lang.Long> ids, java.util.Optional<Options> options)Cancel a scheduled messages Cancel messages using their `ids` which were scheduled to be sent at a specific time.GetMessagesRequestBuildergetByIds()Get the messages details and status by IDs Check the current status and details of one or more messages using their `ids`.GetMessagesResponsegetByIds(java.util.List<java.lang.Long> ids)Get the messages details and status by IDs Check the current status and details of one or more messages using their `ids`.GetMessagesResponsegetByIds(java.util.List<java.lang.Long> ids, java.util.Optional<Options> options)Get the messages details and status by IDs Check the current status and details of one or more messages using their `ids`.ListMessagesRequestBuilderlist()Lists the history of sent messages Get the details and current status of all of sent messages from your account message history.ListMessagesResponselist(java.util.Optional<java.lang.Long> page, java.util.Optional<java.lang.Long> limit, java.util.Optional<Options> options)Lists the history of sent messages Get the details and current status of all of sent messages from your account message history.ListMessagesResponselistDirect()Lists the history of sent messages Get the details and current status of all of sent messages from your account message history.Smssms()
-
-
-
Method Detail
-
sms
public final Sms sms()
-
getByIds
public GetMessagesRequestBuilder getByIds()
Get the messages details and status by IDs Check the current status and details of one or more messages using their `ids`. You have to pass the unique message *IDs* as path parameter, which were returned after sending a message. If you want to get the details of multiple messages at once, please separate their IDs with a comma. The system will accept maximum 50 identifiers in one call. If you need to get details of larger volume of messages, please split it to several separate requests. As a successful result an array with `Message` objects will be returned, each object per single found message. Response will also include meta-data headers: `X-Success-Count` (a count of messages which were found and returned correctly) and `X-Error-Count` (count of messages which were not found). If you pass duplicated IDs, API will return data of this message only once. This request have to be authenticated using **API Access Token**. In case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807)).- Returns:
- The call builder
-
getByIds
public GetMessagesResponse getByIds(java.util.List<java.lang.Long> ids) throws java.lang.Exception
Get the messages details and status by IDs Check the current status and details of one or more messages using their `ids`. You have to pass the unique message *IDs* as path parameter, which were returned after sending a message. If you want to get the details of multiple messages at once, please separate their IDs with a comma. The system will accept maximum 50 identifiers in one call. If you need to get details of larger volume of messages, please split it to several separate requests. As a successful result an array with `Message` objects will be returned, each object per single found message. Response will also include meta-data headers: `X-Success-Count` (a count of messages which were found and returned correctly) and `X-Error-Count` (count of messages which were not found). If you pass duplicated IDs, API will return data of this message only once. This request have to be authenticated using **API Access Token**. In case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807)).- Parameters:
ids- Message IDs assigned by the system (separated by comma). 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 GetMessagesResponse getByIds(java.util.List<java.lang.Long> ids, java.util.Optional<Options> options) throws java.lang.Exception
Get the messages details and status by IDs Check the current status and details of one or more messages using their `ids`. You have to pass the unique message *IDs* as path parameter, which were returned after sending a message. If you want to get the details of multiple messages at once, please separate their IDs with a comma. The system will accept maximum 50 identifiers in one call. If you need to get details of larger volume of messages, please split it to several separate requests. As a successful result an array with `Message` objects will be returned, each object per single found message. Response will also include meta-data headers: `X-Success-Count` (a count of messages which were found and returned correctly) and `X-Error-Count` (count of messages which were not found). If you pass duplicated IDs, API will return data of this message only once. This request have to be authenticated using **API Access Token**. In case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807)).- Specified by:
getByIdsin interfaceSDKMethodInterfaces.MethodCallGetMessages- Parameters:
ids- Message IDs assigned by the system (separated by comma). 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
-
cancelScheduled
public CancelMessagesRequestBuilder cancelScheduled()
Cancel a scheduled messages Cancel messages using their `ids` which were scheduled to be sent at a specific time. You have to pass the unique message IDs as path parameter, which were returned after sending a message. If you want to cancel multiple messages at once, please separate their IDs with a comma. The system will accept maximum 50 identifiers in one call. If you need to cancel larger volume of messages, please split it to several separate requests. You can cancel only messages with *SCHEDULED* status. As a successful result an array with `CancelledMessage` objects will be returned, each object per single message id. The `status` property will contain a status code of operation - `204` if message was cancelled successfully and other code if an error occured with cancelling a given message. In case of an error, an `error` property will contain `ErrorResponse` object with the details of an error. Response will also include meta-data headers: `X-Success-Count` (a count of messages which were cancelled successfully), `X-Error-Count` (count of messages which were not cancelled) and `X-Sandbox` (if a request was made in Sandbox or Production system). If you pass duplicated message IDs in one call, API will process them only once. This request have to be authenticated using **API Access Token**. In case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807)).- Returns:
- The call builder
-
cancelScheduled
public CancelMessagesResponse cancelScheduled(java.util.List<java.lang.Long> ids) throws java.lang.Exception
Cancel a scheduled messages Cancel messages using their `ids` which were scheduled to be sent at a specific time. You have to pass the unique message IDs as path parameter, which were returned after sending a message. If you want to cancel multiple messages at once, please separate their IDs with a comma. The system will accept maximum 50 identifiers in one call. If you need to cancel larger volume of messages, please split it to several separate requests. You can cancel only messages with *SCHEDULED* status. As a successful result an array with `CancelledMessage` objects will be returned, each object per single message id. The `status` property will contain a status code of operation - `204` if message was cancelled successfully and other code if an error occured with cancelling a given message. In case of an error, an `error` property will contain `ErrorResponse` object with the details of an error. Response will also include meta-data headers: `X-Success-Count` (a count of messages which were cancelled successfully), `X-Error-Count` (count of messages which were not cancelled) and `X-Sandbox` (if a request was made in Sandbox or Production system). If you pass duplicated message IDs in one call, API will process them only once. This request have to be authenticated using **API Access Token**. In case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807)).- Parameters:
ids- Message IDs assigned by the system (separated by comma). 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
-
cancelScheduled
public CancelMessagesResponse cancelScheduled(java.util.List<java.lang.Long> ids, java.util.Optional<Options> options) throws java.lang.Exception
Cancel a scheduled messages Cancel messages using their `ids` which were scheduled to be sent at a specific time. You have to pass the unique message IDs as path parameter, which were returned after sending a message. If you want to cancel multiple messages at once, please separate their IDs with a comma. The system will accept maximum 50 identifiers in one call. If you need to cancel larger volume of messages, please split it to several separate requests. You can cancel only messages with *SCHEDULED* status. As a successful result an array with `CancelledMessage` objects will be returned, each object per single message id. The `status` property will contain a status code of operation - `204` if message was cancelled successfully and other code if an error occured with cancelling a given message. In case of an error, an `error` property will contain `ErrorResponse` object with the details of an error. Response will also include meta-data headers: `X-Success-Count` (a count of messages which were cancelled successfully), `X-Error-Count` (count of messages which were not cancelled) and `X-Sandbox` (if a request was made in Sandbox or Production system). If you pass duplicated message IDs in one call, API will process them only once. This request have to be authenticated using **API Access Token**. In case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807)).- Specified by:
cancelScheduledin interfaceSDKMethodInterfaces.MethodCallCancelMessages- Parameters:
ids- Message IDs assigned by the system (separated by comma). 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
-
list
public ListMessagesRequestBuilder list()
Lists the history of sent messages Get the details and current status of all of sent messages from your account message history. This endpoint supports pagination so you have to pass as query parameters a `page` value (number of page with messages which you want to access) and a `limit` value (max of messages per page). Messages are fetched from the latest one. The system will accept maximum **50** as `limit` parameter value. If you need to get details of larger volume of messages, please access them with next pages. As a successful result an array with `Message` objects will be returned, each object per single message. Response will also include meta-data headers: `X-Total-Results` (a total count of all messages which are available in history 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). This request have to be authenticated using **API Access Token**. A response contains also a special `Link` header which includes *URIs* to access next, previous, first and last page with messages (which complies with [RFC 5988](https://www.rfc-editor.org/rfc/rfc5988)). In case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807)).- Returns:
- The call builder
-
listDirect
public ListMessagesResponse listDirect() throws java.lang.Exception
Lists the history of sent messages Get the details and current status of all of sent messages from your account message history. This endpoint supports pagination so you have to pass as query parameters a `page` value (number of page with messages which you want to access) and a `limit` value (max of messages per page). Messages are fetched from the latest one. The system will accept maximum **50** as `limit` parameter value. If you need to get details of larger volume of messages, please access them with next pages. As a successful result an array with `Message` objects will be returned, each object per single message. Response will also include meta-data headers: `X-Total-Results` (a total count of all messages which are available in history 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). This request have to be authenticated using **API Access Token**. A response contains also a special `Link` header which includes *URIs* to access next, previous, first and last page with messages (which complies with [RFC 5988](https://www.rfc-editor.org/rfc/rfc5988)). In case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807)).- Returns:
- The response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
list
public ListMessagesResponse list(java.util.Optional<java.lang.Long> page, java.util.Optional<java.lang.Long> limit, java.util.Optional<Options> options) throws java.lang.Exception
Lists the history of sent messages Get the details and current status of all of sent messages from your account message history. This endpoint supports pagination so you have to pass as query parameters a `page` value (number of page with messages which you want to access) and a `limit` value (max of messages per page). Messages are fetched from the latest one. The system will accept maximum **50** as `limit` parameter value. If you need to get details of larger volume of messages, please access them with next pages. As a successful result an array with `Message` objects will be returned, each object per single message. Response will also include meta-data headers: `X-Total-Results` (a total count of all messages which are available in history 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). This request have to be authenticated using **API Access Token**. A response contains also a special `Link` header which includes *URIs* to access next, previous, first and last page with messages (which complies with [RFC 5988](https://www.rfc-editor.org/rfc/rfc5988)). In case of an error, the `ErrorResponse` object will be returned with proper HTTP header status code (our error response complies with [RFC 9457](https://www.rfc-editor.org/rfc/rfc7807)).- Specified by:
listin interfaceSDKMethodInterfaces.MethodCallListMessages- 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
-
-