Model/Apiconnector/Client.php
public function postContacts($email)
    {
        $url = $this->getApiEndpoint() . self::REST_CONTACTS;
        $data = [
            'Email' => $email,
            'EmailType' => 'Html',
        ];
        $this->setUrl($url)
            ->setVerb('POST')
            ->buildPostBody($data);

        $response = $this->execute();

        if (isset($response->message)) {
            $message = $email . ' , url ' . $url . ', ' . $response->message;
            $this->helper->debug('postContacts', [$message]);
        }

        return $response;
    }
public function postContacts($email)
    {
        $url = $this->getApiEndpoint() . self::REST_CONTACTS;
        $data = [
            'Email' => $email,
            'EmailType' => 'Html',
        ];
        $this->setUrl($url)
            ->setVerb('POST')
            ->buildPostBody($data);

        $response = $this->execute();

        if (isset($response->message)) {
            $message = $email . ' , url ' . $url . ', ' . $response->message;
            $this->helper->debug('postContacts', [$message]);
        }

        return $response;
    }
public function postContacts ( $ email ) { $ url = $ this -> getApiEndpoint ( ) . self :: REST_CONTACTS ; $ data = [ 'Email' => $ email , 'EmailType' => 'Html' , ] ; $ this -> setUrl ( $ url ) -> setVerb ( 'POST' ) -> buildPostBody ( $ data ) ; $ response = $ this -> execute ( ) ; if ( isset ( $ response -> message ) ) { $ message = $ email . ' , url ' . $ url . ', ' . $ response -> message ; $ this -> helper -> debug ( 'postContacts' , [ $ message ] ) ; } return $ response ; }
Creates a contact.

@param string $email

@return null
@throws \Exception
Creates a contact .