Class: Model

Abstract~Model(data) → {void}

Abstract data model

Constructor

new Model(data) → {void}

Parameters:
Name Type Description
data object
Source:
Returns:
Type
void

Methods

getField(field, defaultValue) → {*}

Get a field value.

Get a field value.

Parameters:
Name Type Default Description
field string
defaultValue * null
Source:
Returns:
Type
*

hasField(field) → {boolean}

Check if a field is defined.

Check if a field is defined.

Parameters:
Name Type Description
field string
Source:
Returns:
Type
boolean

setField(field, value) → {Model}

Set a field value.

Set a field value.

Parameters:
Name Type Description
field string
value *
Source:
Returns:
Type
Model

toObject() → {Object}

Get the data for the request.

Get the data for the request.

Source:
Returns:
Type
Object