protected function setErrors($response, $key)
    {
        foreach ($response->{$key} as $error) {
            $this->setError($error->code, $error->description);
        }
    }
protected function setErrors($response, $key)
    {
        foreach ($response->{$key} as $error) {
            $this->setError($error->code, $error->description);
        }
    }
protected function setErrors ( $ response , $ key ) { foreach ( $ response -> { $ key } as $ error ) { $ this -> setError ( $ error -> code , $ error -> description ) ; } }
Set errors from response

@param  array  $response
@param  string  $key
@return void
Set errors from response