Class ReplyTemplate

Represents a reply template.

Examples

ReplyTemplate rt;

rt.load(2); // Loads a reply template with ID = 2

Parser p;

Constructors

ReplyTemplate()

Initializes a new instance of the ReplyTemplate class.

Declaration

ReplyTemplate

Examples

ReplyTemplate rt;

rt.load(2); // Loads a reply template with id = 2

Parser p;

Methods

getAttachments(Integer)

Gets all attachment IDs belonging to a reply template.

Declaration

Integer[] getAttachments(Integer lang)

Parameters

Type Name Description
Integer lang Language as an integer.

Returns

Type Description
Integer[] Attachment IDs belonging to a reply template.

getHtmlBody(Integer)

Returns the reply template HTML body, in the language given by language. If language does not exists it will return default language.

Declaration

String getHtmlBody(Integer language)

Parameters

Type Name Description
Integer language Language as an integer.

Returns

Type Description
String The reply template HTML body, in the language given.

getName()

Returns the name of the reply template.

Declaration

String getName()

Returns

Type Description
String The name of the reply template.

getPlainBody(Integer)

Returns the reply template plain text body in the given language (if available). If language does not exists, it will return default language.

Declaration

String getPlainBody(Integer language)

Parameters

Type Name Description
Integer language Language as an integer.

Returns

Type Description
String The reply template plain text body in the given language.

getSmsBody(Integer)

Returns the reply template SMS body, in the language given by language ID. If language does not exists it will return default language.

Declaration

String getSmsBody(Integer language)

Parameters

Type Name Description
Integer language Language as an integer.

Returns

Type Description
String The reply template SMS body in the language given.

getSubject(Integer)

Returns the reply template subject, in the language given by language. If language does not exists it will return default language.

Declaration

String getSubject(Integer language)

Parameters

Type Name Description
Integer language Language as an integer.

Returns

Type Description
String The reply template plain-text subject in the language given.

load(Integer)

This function loads a reply template to the object.

Declaration

Bool load(Integer id)

Parameters

Type Name Description
Integer id Reply template ID.

Returns

Type Description
Bool True if reply template with given ID loaded successfully; otherwise, false.