public function getByEmail($email)
    {
        if (!is_string($email) || empty($email)) {
            return null;
        }

        $parameters = array(
            'api_action' => 'contact_view_email',
            'email' => $email
        );

        $response = $this->request($parameters);



        if ($response === null || $response->getStatusCode() !== 200) {
            return null;
        }

        $json = $response->getBody()->getContents();

        return $this->serializer->deserialize(
            $this->removeResultInformation($json),
            \FondOfPHP\ActiveCampaign\DataTransferObject\Contact::class,
            'json'
        );
    }
public function getByEmail($email)
    {
        if (!is_string($email) || empty($email)) {
            return null;
        }

        $parameters = array(
            'api_action' => 'contact_view_email',
            'email' => $email
        );

        $response = $this->request($parameters);



        if ($response === null || $response->getStatusCode() !== 200) {
            return null;
        }

        $json = $response->getBody()->getContents();

        return $this->serializer->deserialize(
            $this->removeResultInformation($json),
            \FondOfPHP\ActiveCampaign\DataTransferObject\Contact::class,
            'json'
        );
    }
public function getByEmail ( $ email ) { if ( ! is_string ( $ email ) || empty ( $ email ) ) { return null ; } $ parameters = array ( 'api_action' => 'contact_view_email' , 'email' => $ email ) ; $ response = $ this -> request ( $ parameters ) ; if ( $ response === null || $ response -> getStatusCode ( ) !== 200 ) { return null ; } $ json = $ response -> getBody ( ) -> getContents ( ) ; return $ this -> serializer -> deserialize ( $ this -> removeResultInformation ( $ json ) , \ FondOfPHP \ ActiveCampaign \ DataTransferObject \ Contact :: class , 'json' ) ; }
Retrieve by email

@param $email
@return null|\FondOfPHP\ActiveCampaign\DataTransferObject\Contact
Retrieve by email