API Docs for: 2.6
Show:

CallerNote Class

Module: caller_note

Abstraction of a caller note.

It can throw exceptions.

Constructor

CallerNote

(
  • data
)
Object

Parameters:

  • data Object
    • number String

      The caller/called number that is associated with the note

    • creator String

      The creator of the caller note

    • text String

      The text of the note

    • reservation String

      The reservation option. If the creator has booked the callback from the expressed number

    • visibility String

      It can be "private" or "public"

    • expiration String

      It's the expiration date of the note. It must use the YYYYMMDD format, e.g. to express the date of "12 june 2013" you must use 20130612

Returns:

Object:

The caller note object.

Methods

isValidVisibility

(
  • visibility
)
Boolean

Check if the specified visibility is correct.

Parameters:

  • visibility String

Returns:

Boolean:

True if the visibility is correct

toJSON

() Object

Returns the JSON representation of the object.

{
    text:        "example of text", // the message
    number:      "214",             // the number associated with the note
    creator:     "221",             // the user creator
    expiration:  "20131001",        // the expiration date of the note
    visibility:  "private",         // the visibility of the note
    reservation: false              // the reservation status
}

Returns:

Object:

The JSON representation of the object.

toString

() String

Return the readable string of the caller note.

Returns:

String:

The readable description of the caller note

Properties

creator

String private

The caller note creator.

expiration

String private

The expiration date of the note. It's use the YYYYMMDD format.

number

String private

The number associated with the note.

reservation

Boolean private

The reservation status of the note.

text

String private

The text of the message.

visibility

String private

The visibility type.

VISIBILITY

Object private

The visibility types of the caller note.

Default: { PUBLIC: 'public', PRIVATE: 'private' }