original_string: 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'
          );
      }
code: 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'
          );
      }
code_tokens: 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' ) ; }
docstring: Retrieve by email
  
  @param $email
  @return null|\FondOfPHP\ActiveCampaign\DataTransferObject\Contact
docstring_tokens: Retrieve by email