private function parse() {
        $data = json_decode($this->httpResponse->getBody(), true);

        foreach ($data['messages'] as $message) {
            $msg = new Message($message);
            $this->messages[] = $msg;

            if ($message['type'] === 'error' || $message['type'] === 'non-document-error') {
                $this->errors[] = $msg;
            } else if ($message['type'] === 'warning') {
                $this->warnings[] = $msg;
            }
        }
    }
private function parse() {
        $data = json_decode($this->httpResponse->getBody(), true);

        foreach ($data['messages'] as $message) {
            $msg = new Message($message);
            $this->messages[] = $msg;

            if ($message['type'] === 'error' || $message['type'] === 'non-document-error') {
                $this->errors[] = $msg;
            } else if ($message['type'] === 'warning') {
                $this->warnings[] = $msg;
            }
        }
    }
private function parse ( ) { $ data = json_decode ( $ this -> httpResponse -> getBody ( ) , true ) ; foreach ( $ data [ 'messages' ] as $ message ) { $ msg = new Message ( $ message ) ; $ this -> messages [ ] = $ msg ; if ( $ message [ 'type' ] === 'error' || $ message [ 'type' ] === 'non-document-error' ) { $ this -> errors [ ] = $ msg ; } else if ( $ message [ 'type' ] === 'warning' ) { $ this -> warnings [ ] = $ msg ; } } }
Parse the received response into a usable format
Parse the received response into a usable format