Class EmailTemplate
java.lang.Object
com.auth0.json.mgmt.emailtemplates.EmailTemplate
Class that represents an Email Template object. Related to the
EmailTemplatesEntity entity.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBody()Getter for the template code.getFrom()Getter for the sender of the emailgetName()Getter for the name of the template.Getter the URL to redirect the user to after a successful action.Getter for the subject of the email.Getter for the syntax used in the template's code.Getter for the lifetime in seconds that the link within the email will be valid for.Whether or not this template is enabled.voidSets the template codevoidsetEnabled(Boolean enabled) Enables or disables this template.voidSets the sender of the emailvoidSets the name of the template.voidsetResultUrl(String resultUrl) Sets the URL to redirect the user to after a successful action.voidsetSubject(String subject) Sets the subject of the email.voidSets for the syntax to be used in the template's code.voidsetUrlLifetimeInSeconds(Integer urlLifetimeInSeconds) Sets the lifetime in seconds that the link within the email will be valid for.
-
Constructor Details
-
EmailTemplate
public EmailTemplate()
-
-
Method Details
-
getName
Getter for the name of the template.- Returns:
- the name.
-
setName
Sets the name of the template.- Parameters:
name- the name to set for this template
-
getBody
Getter for the template code.- Returns:
- the template code.
-
setBody
Sets the template code- Parameters:
body- the code this template will have
-
getFrom
Getter for the sender of the email- Returns:
- the sender of the email
-
setFrom
Sets the sender of the email- Parameters:
from- the sender of the email
-
getResultUrl
Getter the URL to redirect the user to after a successful action.- Returns:
- the URL to redirect the user to after a successful action.
-
setResultUrl
Sets the URL to redirect the user to after a successful action.- Parameters:
resultUrl- the URL to redirect the user to after a successful action.
-
getSubject
Getter for the subject of the email.- Returns:
- the subject of the email.
-
setSubject
Sets the subject of the email.- Parameters:
subject- the subject of the email.
-
getSyntax
Getter for the syntax used in the template's code.- Returns:
- the syntax used in the template's code.
-
setSyntax
Sets for the syntax to be used in the template's code. Default value is 'liquid'- Parameters:
syntax- the syntax to be used in the template's code.
-
getUrlLifetimeInSeconds
Getter for the lifetime in seconds that the link within the email will be valid for.- Returns:
- the lifetime in seconds that the link within the email will be valid for.
-
setUrlLifetimeInSeconds
Sets the lifetime in seconds that the link within the email will be valid for.- Parameters:
urlLifetimeInSeconds- the lifetime in seconds that the link within the email will be valid for.
-
isEnabled
Whether or not this template is enabled.- Returns:
- true if this template is enabled, false otherwise.
-
setEnabled
Enables or disables this template.- Parameters:
enabled- whether this template is enabled or not.
-