The reply
Object¶
-
class
IVoxaReply
()¶ The
reply
object is used by the framework to render voxa responses, it takes all of yourstatements
,cards
anddirectives
and generates a proper json response for each platform.-
IVoxaReply.IVoxaReply.
clear
()¶ Resets the response object
-
IVoxaReply.IVoxaReply.
terminate
()¶ Sends a flag to indicate the session will be closed.
-
IVoxaReply.IVoxaReply.
addStatement
(statement, isPlain)¶ Adds statements to the
Reply
Arguments: - statement – The string to be spoken by the voice assistant
- isPlain – Indicates if the statement is plain text, if null, it means is SSML
-
IVoxaReply.IVoxaReply.
addReprompt
(statement, isPlain)¶ Adds the reprompt text to the
Reply
Arguments: - statement – The string to be spoken by the voice assistant as a reprompt
- isPlain – Indicates if the statement is plain text, if null, it means is SSML
-
IVoxaReply.IVoxaReply.
hasDirective
()¶ Verifies if the reply has directives
Returns: A boolean flag indicating if the reply object has any kind of directives
-
IVoxaReply.IVoxaReply.
saveSession
(event)¶ Converts the model object into session attributes
Arguments: - event – A Voxa event with session attributes
-
For the speceific classes used in every platform you can check: