public function add(array $data)
    {
        //if there is no content set throw error as it is a required field
        if (!isset($data['content'])) {
            throw new PipedriveMissingFieldError('You must include a "content" field when inserting a note');
        }

        //if there is no deal, person, organisation id set throw error as one of the fields is required
        if (!isset($data['deal_id']) && !isset($data['person_id']) && !isset($data['org_id'])) {
            throw new PipedriveMissingFieldError('You must include one of the following "deal_id", "person_id", "org_id" field when inserting a note');
        }

        return $this->curl->post('notes', $data);
    }
public function add(array $data)
    {
        //if there is no content set throw error as it is a required field
        if (!isset($data['content'])) {
            throw new PipedriveMissingFieldError('You must include a "content" field when inserting a note');
        }

        //if there is no deal, person, organisation id set throw error as one of the fields is required
        if (!isset($data['deal_id']) && !isset($data['person_id']) && !isset($data['org_id'])) {
            throw new PipedriveMissingFieldError('You must include one of the following "deal_id", "person_id", "org_id" field when inserting a note');
        }

        return $this->curl->post('notes', $data);
    }
public function add ( array $ data ) { //if there is no content set throw error as it is a required field if ( ! isset ( $ data [ 'content' ] ) ) { throw new PipedriveMissingFieldError ( 'You must include a "content" field when inserting a note' ) ; } //if there is no deal, person, organisation id set throw error as one of the fields is required if ( ! isset ( $ data [ 'deal_id' ] ) && ! isset ( $ data [ 'person_id' ] ) && ! isset ( $ data [ 'org_id' ] ) ) { throw new PipedriveMissingFieldError ( 'You must include one of the following "deal_id", "person_id", "org_id" field when inserting a note' ) ; } return $ this -> curl -> post ( 'notes' , $ data ) ; }
Adds a note

@param  array $data note detials
@return array returns detials of the note
Adds a note