|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.createsend.CreateSendBase
com.createsend.Templates
public class Templates
Provides methods for accessing all Template resources in the Campaign Monitor API *
Field Summary |
---|
Fields inherited from class com.createsend.CreateSendBase |
---|
jerseyClient, urlEncodingScheme |
Constructor Summary | |
---|---|
Templates(AuthenticationDetails auth)
Constructor used to create new templates. |
|
Templates(AuthenticationDetails auth,
java.lang.String templateID)
Constructor for working with existing templates. |
Method Summary | |
---|---|
java.lang.String |
create(java.lang.String clientID,
TemplateForCreate template)
Creates a new template for the specified client. |
void |
delete()
Deletes the template with the current ID |
TemplateDetails |
get()
Gets the details of the current template |
java.lang.String |
getTemplateID()
Gets the current template ID. |
void |
setTemplateID(java.lang.String templateID)
Sets the ID of the template to apply API calls to. |
void |
update(TemplateForCreate template)
Updates a template with the specified details |
Methods inherited from class com.createsend.CreateSendBase |
---|
refreshToken |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Templates(AuthenticationDetails auth)
auth
- The authentication details to use when making API calls.
May be either an OAuthAuthenticationDetails or
ApiKeyAuthenticationDetails instance.public Templates(AuthenticationDetails auth, java.lang.String templateID)
auth
- The authentication details to use when making API calls.
May be either an OAuthAuthenticationDetails or
ApiKeyAuthenticationDetails instance.templateID
- The Template ID to use when making API calls.Method Detail |
---|
public java.lang.String getTemplateID()
public void setTemplateID(java.lang.String templateID)
templateID
- The ID of the template to apply API calls to.public java.lang.String create(java.lang.String clientID, TemplateForCreate template) throws CreateSendException
clientID
- The ID of the client to create the template for.template
- The template details.
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public TemplateDetails get() throws CreateSendException
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public void update(TemplateForCreate template) throws CreateSendException
template
- The template details to use
CreateSendException
- Thrown when the API responds with HTTP Status >= 400public void delete() throws CreateSendException
CreateSendException
- Thrown when the API responds with HTTP Status >= 400
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |