src/Operation/MarketingPermission.php
public function update($email, $hasPermission)
    {
        $request = $this->initApiRequest(
            $this->account->getApiToken(Token::API_EMAIL),
            $this->account->getName(),
            $this->activeDomain
        );

        $request->setPath(ApiRequest::PATH_MARKETING_PERMISSION);
        $replaceParams = array('{email}' => $email, '{state}' => $hasPermission ? 'true' : 'false');
        $request->setReplaceParams($replaceParams);
        $response = $request->postRaw('');

        return self::checkResponse($request, $response);
    }
public function update($email, $hasPermission)
    {
        $request = $this->initApiRequest(
            $this->account->getApiToken(Token::API_EMAIL),
            $this->account->getName(),
            $this->activeDomain
        );

        $request->setPath(ApiRequest::PATH_MARKETING_PERMISSION);
        $replaceParams = array('{email}' => $email, '{state}' => $hasPermission ? 'true' : 'false');
        $request->setReplaceParams($replaceParams);
        $response = $request->postRaw('');

        return self::checkResponse($request, $response);
    }
public function update ( $ email , $ hasPermission ) { $ request = $ this -> initApiRequest ( $ this -> account -> getApiToken ( Token :: API_EMAIL ) , $ this -> account -> getName ( ) , $ this -> activeDomain ) ; $ request -> setPath ( ApiRequest :: PATH_MARKETING_PERMISSION ) ; $ replaceParams = array ( '{email}' => $ email , '{state}' => $ hasPermission ? 'true' : 'false' ) ; $ request -> setReplaceParams ( $ replaceParams ) ; $ response = $ request -> postRaw ( '' ) ; return self :: checkResponse ( $ request , $ response ) ; }
Update customer marketing permission
@param string $email
@param bool $hasPermission
@return bool
Update customer marketing permission