public function isAvailable($email, $entity = false)
    {
        $this->resetRestClient();

        $this->restClient->getConfig()->setPath(
            'request.options/headers/php-auth-user',
            $this->login
        );

        $this->restClient->getConfig()->setPath(
            'request.options/headers/php-auth-pw',
            $this->password
        );

        $parameters = array(
            'userEmail' => $email,
            'entity' => $entity ?: $this->entity
        );
        $command = $this->restClient->getCommand(
            'IsAvailable',
            $parameters
        );

        $result = $this->executeRest($command, $parameters);

        return $result['is_available'];
    }
public function isAvailable($email, $entity = false)
    {
        $this->resetRestClient();

        $this->restClient->getConfig()->setPath(
            'request.options/headers/php-auth-user',
            $this->login
        );

        $this->restClient->getConfig()->setPath(
            'request.options/headers/php-auth-pw',
            $this->password
        );

        $parameters = array(
            'userEmail' => $email,
            'entity' => $entity ?: $this->entity
        );
        $command = $this->restClient->getCommand(
            'IsAvailable',
            $parameters
        );

        $result = $this->executeRest($command, $parameters);

        return $result['is_available'];
    }
public function isAvailable ( $ email , $ entity = false ) { $ this -> resetRestClient ( ) ; $ this -> restClient -> getConfig ( ) -> setPath ( 'request.options/headers/php-auth-user' , $ this -> login ) ; $ this -> restClient -> getConfig ( ) -> setPath ( 'request.options/headers/php-auth-pw' , $ this -> password ) ; $ parameters = array ( 'userEmail' => $ email , 'entity' => $ entity ? : $ this -> entity ) ; $ command = $ this -> restClient -> getCommand ( 'IsAvailable' , $ parameters ) ; $ result = $ this -> executeRest ( $ command , $ parameters ) ; return $ result [ 'is_available' ] ; }
Check if given email can be used to create an HiPay wallet
Enforce the entity to the one given on object construction if false.

@param string $email
@param bool $entity

@return bool if array is empty

@throws Exception
Check if given email can be used to create an HiPay wallet Enforce the entity to the one given on object construction if false .