public function customersNotesCreate($note, $site = null)
    {
        if (empty($note['customer']['id']) && empty($note['customer']['externalId'])) {
            throw new \InvalidArgumentException(
                'Customer identifier must be set'
            );
        }

        /* @noinspection PhpUndefinedMethodInspection */
        return $this->client->makeRequest(
            '/customers/notes/create',
            "POST",
            $this->fillSite($site, ['note' => json_encode($note)])
        );
    }
public function customersNotesCreate($note, $site = null)
    {
        if (empty($note['customer']['id']) && empty($note['customer']['externalId'])) {
            throw new \InvalidArgumentException(
                'Customer identifier must be set'
            );
        }

        /* @noinspection PhpUndefinedMethodInspection */
        return $this->client->makeRequest(
            '/customers/notes/create',
            "POST",
            $this->fillSite($site, ['note' => json_encode($note)])
        );
    }
public function customersNotesCreate ( $ note , $ site = null ) { if ( empty ( $ note [ 'customer' ] [ 'id' ] ) && empty ( $ note [ 'customer' ] [ 'externalId' ] ) ) { throw new \ InvalidArgumentException ( 'Customer identifier must be set' ) ; } /* @noinspection PhpUndefinedMethodInspection */ return $ this -> client -> makeRequest ( '/customers/notes/create' , "POST" , $ this -> fillSite ( $ site , [ 'note' => json_encode ( $ note ) ] ) ) ; }
Create customer note

@param array $note (default: array())
@param string $site     (default: null)

@throws \InvalidArgumentException
@throws \RetailCrm\Exception\CurlException
@throws \RetailCrm\Exception\InvalidJsonException

@return \RetailCrm\Response\ApiResponse
Create customer note