Model/Apiconnector/Client.php
public function setPreferencesForContact($contactId, $preferences)
    {
        $url = $this->getApiEndpoint() . "/v2/contact/" . $contactId . "/preferences";
        $this->setUrl($url)
            ->setVerb('PUT')
            ->buildPostBody($preferences);

        $response = $this->execute();

        if (isset($response->message)) {
            $this->helper->log('SET PREFERENCES FOR CONTACT: ' . $response->message);
        }

        return $response;
    }
public function setPreferencesForContact($contactId, $preferences)
    {
        $url = $this->getApiEndpoint() . "/v2/contact/" . $contactId . "/preferences";
        $this->setUrl($url)
            ->setVerb('PUT')
            ->buildPostBody($preferences);

        $response = $this->execute();

        if (isset($response->message)) {
            $this->helper->log('SET PREFERENCES FOR CONTACT: ' . $response->message);
        }

        return $response;
    }
public function setPreferencesForContact ( $ contactId , $ preferences ) { $ url = $ this -> getApiEndpoint ( ) . "/v2/contact/" . $ contactId . "/preferences" ; $ this -> setUrl ( $ url ) -> setVerb ( 'PUT' ) -> buildPostBody ( $ preferences ) ; $ response = $ this -> execute ( ) ; if ( isset ( $ response -> message ) ) { $ this -> helper -> log ( 'SET PREFERENCES FOR CONTACT: ' . $ response -> message ) ; } return $ response ; }
Opts in a given contact to preferences, or opts out a given contact from preferences

@param $contactId
@param $preferences

@return mixed
Opts in a given contact to preferences or opts out a given contact from preferences