protected function extractSingleItemData(array $data) {
        if ($this->singleResponseKey && !array_key_exists($this->singleResponseKey, $data)) {
            throw new Exception('Invalid response, missing field ' . $this->singleResponseKey);
        }

        return ($this->singleResponseKey) ? $data[$this->singleResponseKey] : $data;
    }
protected function extractSingleItemData(array $data) {
        if ($this->singleResponseKey && !array_key_exists($this->singleResponseKey, $data)) {
            throw new Exception('Invalid response, missing field ' . $this->singleResponseKey);
        }

        return ($this->singleResponseKey) ? $data[$this->singleResponseKey] : $data;
    }
protected function extractSingleItemData ( array $ data ) { if ( $ this -> singleResponseKey && ! array_key_exists ( $ this -> singleResponseKey , $ data ) ) { throw new Exception ( 'Invalid response, missing field ' . $ this -> singleResponseKey ) ; } return ( $ this -> singleResponseKey ) ? $ data [ $ this -> singleResponseKey ] : $ data ; }
Takes the raw JSON response and extracts the item data

@param array $data
@return array
@throws Exception
Takes the raw JSON response and extracts the item data