Package pl.gsmservice.gateway
Class Senders
- java.lang.Object
-
- pl.gsmservice.gateway.Senders
-
- All Implemented Interfaces:
SDKMethodInterfaces.MethodCallAddSender,SDKMethodInterfaces.MethodCallDeleteSender,SDKMethodInterfaces.MethodCallListSenders,SDKMethodInterfaces.MethodCallSetDefaultSender
public class Senders extends java.lang.Object implements SDKMethodInterfaces.MethodCallListSenders, SDKMethodInterfaces.MethodCallAddSender, SDKMethodInterfaces.MethodCallDeleteSender, SDKMethodInterfaces.MethodCallSetDefaultSender
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AddSenderRequestBuilderadd()Add a new sender name Define a new allowed sender on your account.AddSenderResponseadd(SenderInput request)Add a new sender name Define a new allowed sender on your account.AddSenderResponseadd(SenderInput request, java.util.Optional<Options> options)Add a new sender name Define a new allowed sender on your account.DeleteSenderRequestBuilderdelete()Delete a sender name Removes defined sender name from your account.DeleteSenderResponsedelete(java.lang.String sender)Delete a sender name Removes defined sender name from your account.DeleteSenderResponsedelete(java.lang.String sender, java.util.Optional<Options> options)Delete a sender name Removes defined sender name from your account.ListSendersRequestBuilderlist()List allowed senders names Get a list of allowed senders defined in your account.ListSendersResponselist(java.util.Optional<Options> options)List allowed senders names Get a list of allowed senders defined in your account.ListSendersResponselistDirect()List allowed senders names Get a list of allowed senders defined in your account.SetDefaultSenderRequestBuildersetDefault()Set default sender name Set default sender name to one of the senders names already defined on your account.SetDefaultSenderResponsesetDefault(java.lang.String sender)Set default sender name Set default sender name to one of the senders names already defined on your account.SetDefaultSenderResponsesetDefault(java.lang.String sender, java.util.Optional<Options> options)Set default sender name Set default sender name to one of the senders names already defined on your account.
-
-
-
Method Detail
-
list
public ListSendersRequestBuilder list()
List allowed senders names Get a list of allowed senders defined in your account. The request doesn't contain a body or any parameters. As a successful result an array with `Sender` objects will be returned, each object per single sender. Senders are being registered by providers and operators. Registered senders get *Active* status and can be used then to send messages. *Pending* senders are also returned by API (with proper `status`) but until registration they cannot be used. 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
-
listDirect
public ListSendersResponse listDirect() throws java.lang.Exception
List allowed senders names Get a list of allowed senders defined in your account. The request doesn't contain a body or any parameters. As a successful result an array with `Sender` objects will be returned, each object per single sender. Senders are being registered by providers and operators. Registered senders get *Active* status and can be used then to send messages. *Pending* senders are also returned by API (with proper `status`) but until registration they cannot be used. 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 response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
list
public ListSendersResponse list(java.util.Optional<Options> options) throws java.lang.Exception
List allowed senders names Get a list of allowed senders defined in your account. The request doesn't contain a body or any parameters. As a successful result an array with `Sender` objects will be returned, each object per single sender. Senders are being registered by providers and operators. Registered senders get *Active* status and can be used then to send messages. *Pending* senders are also returned by API (with proper `status`) but until registration they cannot be used. 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:
listin interfaceSDKMethodInterfaces.MethodCallListSenders- Parameters:
options- additional options- Returns:
- The response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
add
public AddSenderRequestBuilder add()
Add a new sender name Define a new allowed sender on your account. The request body should contain a `Sender` object with two properties: `sender` (defines sender name) and `description`. The secont parameter is very important - sender names are being registered by providers and operators. Only fully registered sender names can be used to send messages. Providers need sometimes detailed description of case in which the sender will be used to eliminate frauds. After verifing it they make a decisions if such sender name can be registered. Please carefully fill this property with the extensive description of a sender name (what will be its use, what the name mean, etc). As a successful result a single `Sender` object will be returned. Registered senders get *Active* status and can be used then to send messages. Pending Senders are also returned by API (with proper `status`) but until registration they cannot be used. Response will also include meta-data header: `X-Sandbox` (if a request was made in Sandbox or Production system). 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
-
add
public AddSenderResponse add(SenderInput request) throws java.lang.Exception
Add a new sender name Define a new allowed sender on your account. The request body should contain a `Sender` object with two properties: `sender` (defines sender name) and `description`. The secont parameter is very important - sender names are being registered by providers and operators. Only fully registered sender names can be used to send messages. Providers need sometimes detailed description of case in which the sender will be used to eliminate frauds. After verifing it they make a decisions if such sender name can be registered. Please carefully fill this property with the extensive description of a sender name (what will be its use, what the name mean, etc). As a successful result a single `Sender` object will be returned. Registered senders get *Active* status and can be used then to send messages. Pending Senders are also returned by API (with proper `status`) but until registration they cannot be used. Response will also include meta-data header: `X-Sandbox` (if a request was made in Sandbox or Production system). 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:
request- The request object containing all of the parameters for the API call.- Returns:
- The response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
add
public AddSenderResponse add(SenderInput request, java.util.Optional<Options> options) throws java.lang.Exception
Add a new sender name Define a new allowed sender on your account. The request body should contain a `Sender` object with two properties: `sender` (defines sender name) and `description`. The secont parameter is very important - sender names are being registered by providers and operators. Only fully registered sender names can be used to send messages. Providers need sometimes detailed description of case in which the sender will be used to eliminate frauds. After verifing it they make a decisions if such sender name can be registered. Please carefully fill this property with the extensive description of a sender name (what will be its use, what the name mean, etc). As a successful result a single `Sender` object will be returned. Registered senders get *Active* status and can be used then to send messages. Pending Senders are also returned by API (with proper `status`) but until registration they cannot be used. Response will also include meta-data header: `X-Sandbox` (if a request was made in Sandbox or Production system). 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:
addin interfaceSDKMethodInterfaces.MethodCallAddSender- Parameters:
request- The request object containing all of the parameters for the API call.options- additional options- Returns:
- The response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
delete
public DeleteSenderRequestBuilder delete()
Delete a sender name Removes defined sender name from your account. This endpoint accepts a path `sender` parameter with empty request body. You should pass the full sender name to delete it. Sender name will be deleted immediately. As a successful response only HTTP status code of *204* will be returned in header with empty response body. Response will also include meta-data header: `X-Sandbox` (if a request was made in Sandbox or Production system). 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
-
delete
public DeleteSenderResponse delete(java.lang.String sender) throws java.lang.Exception
Delete a sender name Removes defined sender name from your account. This endpoint accepts a path `sender` parameter with empty request body. You should pass the full sender name to delete it. Sender name will be deleted immediately. As a successful response only HTTP status code of *204* will be returned in header with empty response body. Response will also include meta-data header: `X-Sandbox` (if a request was made in Sandbox or Production system). 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:
sender- Sender name to be removed- Returns:
- The response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
delete
public DeleteSenderResponse delete(java.lang.String sender, java.util.Optional<Options> options) throws java.lang.Exception
Delete a sender name Removes defined sender name from your account. This endpoint accepts a path `sender` parameter with empty request body. You should pass the full sender name to delete it. Sender name will be deleted immediately. As a successful response only HTTP status code of *204* will be returned in header with empty response body. Response will also include meta-data header: `X-Sandbox` (if a request was made in Sandbox or Production system). 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:
deletein interfaceSDKMethodInterfaces.MethodCallDeleteSender- Parameters:
sender- Sender name to be removedoptions- additional options- Returns:
- The response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
setDefault
public SetDefaultSenderRequestBuilder setDefault()
Set default sender name Set default sender name to one of the senders names already defined on your account. Default sender name can be used while sending messages when you not pass any other defined sender to `Sms` object while sending message. This endpoint accepts a path `sender` parameter with empty request body. You should pass the full sender name to set it as default on your account. As a successful response only HTTP status code of *204* will be returned in header with empty response body. Response will also include meta-data header: `X-Sandbox` (if a request was made in Sandbox or Production system). 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
-
setDefault
public SetDefaultSenderResponse setDefault(java.lang.String sender) throws java.lang.Exception
Set default sender name Set default sender name to one of the senders names already defined on your account. Default sender name can be used while sending messages when you not pass any other defined sender to `Sms` object while sending message. This endpoint accepts a path `sender` parameter with empty request body. You should pass the full sender name to set it as default on your account. As a successful response only HTTP status code of *204* will be returned in header with empty response body. Response will also include meta-data header: `X-Sandbox` (if a request was made in Sandbox or Production system). 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:
sender- Sender name to set as default- Returns:
- The response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
setDefault
public SetDefaultSenderResponse setDefault(java.lang.String sender, java.util.Optional<Options> options) throws java.lang.Exception
Set default sender name Set default sender name to one of the senders names already defined on your account. Default sender name can be used while sending messages when you not pass any other defined sender to `Sms` object while sending message. This endpoint accepts a path `sender` parameter with empty request body. You should pass the full sender name to set it as default on your account. As a successful response only HTTP status code of *204* will be returned in header with empty response body. Response will also include meta-data header: `X-Sandbox` (if a request was made in Sandbox or Production system). 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:
setDefaultin interfaceSDKMethodInterfaces.MethodCallSetDefaultSender- Parameters:
sender- Sender name to set as defaultoptions- additional options- Returns:
- The response from the API call
- Throws:
java.lang.Exception- if the API call fails
-
-