original_string: protected function doRequest($method, $apiMethod, array $data = [])
      {
          $url = $this->config['endpoint'] . $apiMethod;
          $data = $this->mergeData($this->createAuthData(), $data);
  
          $response = $this->getGuzzleClient()->request($method, $url, ['json' => $data]);
          $responseContent = \GuzzleHttp\json_decode($response->getBody());
  
          if (!property_exists($responseContent, 'success') || !$responseContent->success) {
              throw new InvalidRequestException($method, $url, $data, $response);
          }
  
          return $responseContent;
      }
code: protected function doRequest($method, $apiMethod, array $data = [])
      {
          $url = $this->config['endpoint'] . $apiMethod;
          $data = $this->mergeData($this->createAuthData(), $data);
  
          $response = $this->getGuzzleClient()->request($method, $url, ['json' => $data]);
          $responseContent = \GuzzleHttp\json_decode($response->getBody());
  
          if (!property_exists($responseContent, 'success') || !$responseContent->success) {
              throw new InvalidRequestException($method, $url, $data, $response);
          }
  
          return $responseContent;
      }
code_tokens: protected function doRequest ( $ method , $ apiMethod , array $ data = [ ] ) { $ url = $ this -> config [ 'endpoint' ] . $ apiMethod ; $ data = $ this -> mergeData ( $ this -> createAuthData ( ) , $ data ) ; $ response = $ this -> getGuzzleClient ( ) -> request ( $ method , $ url , [ 'json' => $ data ] ) ; $ responseContent = \ GuzzleHttp \ json_decode ( $ response -> getBody ( ) ) ; if ( ! property_exists ( $ responseContent , 'success' ) || ! $ responseContent -> success ) { throw new InvalidRequestException ( $ method , $ url , $ data , $ response ) ; } return $ responseContent ; }
docstring: Send request to SalesManago API.
  
  @param  string $method    HTTP Method
  @param  string $apiMethod API Method
  @param  array  $data      Request data
  @return array
docstring_tokens: Send request to SalesManago API .