public function generateToken(array $data)
    {
        $response = $this->post($this->getLocation() . '/customer-token', $data)
            ->status('200')
            ->contentType('application/json')
            ->getJson();

        return $response;
    }
public function generateToken(array $data)
    {
        $response = $this->post($this->getLocation() . '/customer-token', $data)
            ->status('200')
            ->contentType('application/json')
            ->getJson();

        return $response;
    }
public function generateToken ( array $ data ) { $ response = $ this -> post ( $ this -> getLocation ( ) . '/customer-token' , $ data ) -> status ( '200' ) -> contentType ( 'application/json' ) -> getJson ( ) ; return $ response ; }
Generates consumer token.

@param array $data Token data

@throws ConnectorException When the API replies with an error response
@throws RequestException   When an error is encountered
@throws \RuntimeException  If the location header is missing
@throws \RuntimeException  If the API replies with an unexpected response
@throws \LogicException    When Guzzle cannot populate the response

@return array Token data
Generates consumer token .