Class Senders
- java.lang.Object
-
- pl.gsmservice.gateway.Senders
-
public class Senders extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AddSenderRequestBuilderadd()Add a new sender nameAddSenderResponseadd(SenderInput request)Add a new sender nameAddSenderResponseadd(SenderInput request, java.util.Optional<Options> options)Add a new sender nameAsyncSendersasync()Switches to the async SDK.DeleteSenderRequestBuilderdelete()Delete a sender nameDeleteSenderResponsedelete(java.lang.String sender)Delete a sender nameDeleteSenderResponsedelete(java.lang.String sender, java.util.Optional<Options> options)Delete a sender nameListSendersRequestBuilderlist()List allowed senders namesListSendersResponselist(java.util.Optional<Options> options)List allowed senders namesListSendersResponselistDirect()List allowed senders namesSetDefaultSenderRequestBuildersetDefault()Set default sender nameSetDefaultSenderResponsesetDefault(java.lang.String sender)Set default sender nameSetDefaultSenderResponsesetDefault(java.lang.String sender, java.util.Optional<Options> options)Set default sender name
-
-
-
Method Detail
-
async
public AsyncSenders async()
Switches to the async SDK.- Returns:
- The async SDK
-
list
public ListSendersRequestBuilder list()
List allowed senders names
Get a list of allowed senders defined in your account. The method doesn't take any parameters. Please use builder style:
ListSendersResponse res = sdk.senders().list() .call();
As a successful result aListSendersResponseobject will be returned wichsendersproperty of typeList<Sender>containingSenderobjects, each object per single sender.- 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 method doesn't take any parameters. Please use builder style:
ListSendersResponse res = sdk.senders().list() .call();
As a successful result aListSendersResponseobject will be returned wichsendersproperty of typeList<Sender>containingSenderobjects, each object per single sender.- 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 method doesn't take any parameters. Please use builder style:
ListSendersResponse res = sdk.senders().list() .call();
As a successful result aListSendersResponseobject will be returned wichsendersproperty of typeList<Sender>containingSenderobjects, each object per single sender.- 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. You should pass as parameter aSenderInputobject with two properties:sender(defines sender name) anddescription. Please use builder style:
AddSenderResponse res = sdk.senders().add() .request(req) .call();
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 aAddSenderResponseobject will be returned with asenderproperty containing aSenderobject with details and status of added sender name.- 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. You should pass as parameter aSenderInputobject with two properties:sender(defines sender name) anddescription. Please use builder style:
AddSenderResponse res = sdk.senders().add() .request(req) .call();
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 aAddSenderResponseobject will be returned with asenderproperty containing aSenderobject with details and status of added sender name.- Parameters:
request- The request object containing all 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. You should pass as parameter aSenderInputobject with two properties:sender(defines sender name) anddescription. Please use builder style:
AddSenderResponse res = sdk.senders().add() .request(req) .call();
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 aAddSenderResponseobject will be returned with asenderproperty containing aSenderobject with details and status of added sender name.- Parameters:
request- The request object containing all 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 method accepts astringwith a sender name you want to remove. Please use builder style:
DeleteSenderResponse res = sdk.senders().delete() .sender("Podpis") .call();
Sender name will be deleted immediately.
As a successful response aDeleteSenderResponseobject will de returned withstatusCodeproperty of204.- 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 method accepts astringwith a sender name you want to remove. Please use builder style:
DeleteSenderResponse res = sdk.senders().delete() .sender("Podpis") .call();
Sender name will be deleted immediately.
As a successful response aDeleteSenderResponseobject will de returned withstatusCodeproperty of204.- 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 method accepts astringwith a sender name you want to remove. Please use builder style:
DeleteSenderResponse res = sdk.senders().delete() .sender("Podpis") .call();
Sender name will be deleted immediately.
As a successful response aDeleteSenderResponseobject will de returned withstatusCodeproperty of204.- 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. This method accepts astringcontaining a sender name to be set as default on your account. Please use a builder style:
SetDefaultSenderResponse res = sdk.senders().setDefault() .sender("Podpis") .call();
As a successful response aSetDefaultSenderResponsewill be returned withstatusCodeproperty of204.- 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. This method accepts astringcontaining a sender name to be set as default on your account. Please use a builder style:
SetDefaultSenderResponse res = sdk.senders().setDefault() .sender("Podpis") .call();
As a successful response aSetDefaultSenderResponsewill be returned withstatusCodeproperty of204.- 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. This method accepts astringcontaining a sender name to be set as default on your account. Please use a builder style:
SetDefaultSenderResponse res = sdk.senders().setDefault() .sender("Podpis") .call();
As a successful response aSetDefaultSenderResponsewill be returned withstatusCodeproperty of204.- 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
-
-