/**
 * (c) by aheadware.com
 */
"use strict";

var app = app || {};
app.model = app.model || {};

/**
 * ActionToken Model
 */
app.model.ActionToken = function( data )
{
    var entToken = data || null;

    this.getAction = function()
    {
        return ( entToken && entToken.action ) ? entToken.action : null;
    };

    this.getActionData = function()
    {
        return ( entToken && entToken.action_data_js ) ? entToken.action_data_js : null;
    };

    this.getAccountId = function()
    {
        return ( entToken && entToken.related_account_id ) ? entToken.related_account_id : null;
    };

    this.getToken = function()
    {
        return ( entToken && entToken.token ) ? entToken.token : null;
    };

    this.isValid = function()
    {
        return ( entToken !== null && entToken.token !== null );
    };
};