private function parseResponseToIntuitResponse($passedHeaders, $passedBody, $passedHttpResponseCode, $clientName){
     if($clientName == CoreConstants::CLIENT_CURL){
        if(isset($passedHeaders)){
            $this->setHeaders($passedHeaders);
        }else{
            throw new SdkException("The response header from cURL is null.");
        }

        if(isset($passedBody)){
            $this->body = $passedBody;
        }else{
            throw new SdkException("The Http Response Body from cURL is null.");
        }

        if(isset($passedHttpResponseCode)){
            $this->httpResponseCode = (int)$passedHttpResponseCode;
            $this->setFaultHandler($this->getBody(), $this->getStatusCode(), $this->getIntuitTid());
        }else{
            throw new SdkException("Passed Http status code from cURL is null.");
        }
     }else{
        throw new SdkException("This should not be thrown. IntuitResponse currently don't support parse other client response to Intuit Response other than curl.");
     }

   }
private function parseResponseToIntuitResponse($passedHeaders, $passedBody, $passedHttpResponseCode, $clientName){
     if($clientName == CoreConstants::CLIENT_CURL){
        if(isset($passedHeaders)){
            $this->setHeaders($passedHeaders);
        }else{
            throw new SdkException("The response header from cURL is null.");
        }

        if(isset($passedBody)){
            $this->body = $passedBody;
        }else{
            throw new SdkException("The Http Response Body from cURL is null.");
        }

        if(isset($passedHttpResponseCode)){
            $this->httpResponseCode = (int)$passedHttpResponseCode;
            $this->setFaultHandler($this->getBody(), $this->getStatusCode(), $this->getIntuitTid());
        }else{
            throw new SdkException("Passed Http status code from cURL is null.");
        }
     }else{
        throw new SdkException("This should not be thrown. IntuitResponse currently don't support parse other client response to Intuit Response other than curl.");
     }

   }
private function parseResponseToIntuitResponse ( $ passedHeaders , $ passedBody , $ passedHttpResponseCode , $ clientName ) { if ( $ clientName == CoreConstants :: CLIENT_CURL ) { if ( isset ( $ passedHeaders ) ) { $ this -> setHeaders ( $ passedHeaders ) ; } else { throw new SdkException ( "The response header from cURL is null." ) ; } if ( isset ( $ passedBody ) ) { $ this -> body = $ passedBody ; } else { throw new SdkException ( "The Http Response Body from cURL is null." ) ; } if ( isset ( $ passedHttpResponseCode ) ) { $ this -> httpResponseCode = ( int ) $ passedHttpResponseCode ; $ this -> setFaultHandler ( $ this -> getBody ( ) , $ this -> getStatusCode ( ) , $ this -> getIntuitTid ( ) ) ; } else { throw new SdkException ( "Passed Http status code from cURL is null." ) ; } } else { throw new SdkException ( "This should not be thrown. IntuitResponse currently don't support parse other client response to Intuit Response other than curl." ) ; } }
Parse the response from different http client response and set the Intuit response.
@param String | Array   http client returned eaders
@param String           http client returned body
@param Int              http client returned status code
@param String           http client name
Parse the response from different http client response and set the Intuit response .