Class finesse.restservices.Contact
JavaScript representation of a Contact object. Also exposes
methods to operate on the object against the server.
Defined in: Contact.js.
Constructor Attributes | Constructor Name and Description |
---|---|
finesse.restservices.Contact(options)
|
Method Attributes | Method Name and Description |
---|---|
add(newValues, handlers)
Add
|
|
createPostSuccessHandler(contact, contentBody, successHandler)
|
|
createPutSuccessHandler(contact, contentBody, successHandler)
|
|
Getter for the description.
|
|
Getter for the firstName.
|
|
Getter for the lastName.
|
|
Getter for the phoneNumber.
|
|
update(newValues, handlers)
Update
|
Class Detail
finesse.restservices.Contact(options)
- Parameters:
- {Object} options
- An object with the following properties:
- id: The id of the object being constructed
- onLoad(this): (optional) when the object is successfully loaded from the server
- onChange(this): (optional) when an update notification of the object is received
- onAdd(this): (optional) when a notification that the object is created is received
- onDelete(this): (optional) when a notification that the object is deleted is received
- onError(rsp): (optional) if loading of the object fails, invoked with the error response object:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- parentObj: (optional) The parent object
Method Detail
add(newValues, handlers)
Add
- Parameters:
- newValues
- handlers
createPostSuccessHandler(contact, contentBody, successHandler)
- Parameters:
- contact
- contentBody
- successHandler
createPutSuccessHandler(contact, contentBody, successHandler)
- Parameters:
- contact
- contentBody
- successHandler
{String}
getDescription()
Getter for the description.
- Returns:
- {String} The description.
{String}
getFirstName()
Getter for the firstName.
- Returns:
- {String} The firstName.
{String}
getLastName()
Getter for the lastName.
- Returns:
- {String} The lastName.
{String}
getPhoneNumber()
Getter for the phoneNumber.
- Returns:
- {String} The phoneNumber.
update(newValues, handlers)
Update
- Parameters:
- newValues
- handlers