lib/OktaAPIAppsHelpers.js
function constructAppUserModel(id, externalId, created, lastUpdated, scope, status, 
                            statusChanged, passwordChanged, syncState, lastSync, 
                            credentials, lastSync, links) {
    var model = {};
    if(id) model.id = id;
    if(externalId) model.externalId = externalId;
    if(created) model.created = created;
    if(lastUpdated) model.lastUpdated = lastUpdated;
    if(scope) model.scope = scope;
    if(status) model.status = status;
    if(statusChanged) model.statusChanged = statusChanged;
    if(passwordChanged) model.passwordChanged = passwordChanged;
    if(syncState) model.syncState = syncState;
    if(lastSync) model.lastSync = lastSync;
    if(credentials) model.credentials = credentials;
    if(lastSync) model.lastSync = lastSync;
    if(links) model.links = links;

    return model;
}
function constructAppUserModel(id, externalId, created, lastUpdated, scope, status, 
                            statusChanged, passwordChanged, syncState, lastSync, 
                            credentials, lastSync, links) {
    var model = {};
    if(id) model.id = id;
    if(externalId) model.externalId = externalId;
    if(created) model.created = created;
    if(lastUpdated) model.lastUpdated = lastUpdated;
    if(scope) model.scope = scope;
    if(status) model.status = status;
    if(statusChanged) model.statusChanged = statusChanged;
    if(passwordChanged) model.passwordChanged = passwordChanged;
    if(syncState) model.syncState = syncState;
    if(lastSync) model.lastSync = lastSync;
    if(credentials) model.credentials = credentials;
    if(lastSync) model.lastSync = lastSync;
    if(links) model.links = links;

    return model;
}
Constructs an object that reflects the structure of an App User Model
@method constructAppUserModel
@param id                unique key for User
@param externalId        id of user in target app
@param created           timestamp when app user was created
@param lastUpdated       timestamp when app user was last updated
@param scope             toggles the assignment between user or group scope
@param status            status of app user
@param statusChanged     timestamp when status was last changed
@param passwordChanged   timestamp when app password last changed
@param syncState         synchronization state for app user
@param lastSync          timestamp when last sync operation was executed
@param credentials       credentials for assigned app
@param profile           app-specific profile for the user
@param links             discoverable resources related to the app user
@returns {}              the AppUserModel object