public function sendData($data)
    {
        $httpResponse = $this->sendRequest($data);

        $responseClass = $this->getResponseClassName();
        return $this->response = new $responseClass($this, $httpResponse);
    }
public function sendData($data)
    {
        $httpResponse = $this->sendRequest($data);

        $responseClass = $this->getResponseClassName();
        return $this->response = new $responseClass($this, $httpResponse);
    }
public function sendData ( $ data ) { $ httpResponse = $ this -> sendRequest ( $ data ) ; $ responseClass = $ this -> getResponseClassName ( ) ; return $ this -> response = new $ responseClass ( $ this , $ httpResponse ) ; }
Send the request to the API then build the response object

@param mixed $data  The data to encode and send to the API endpoint

@return JsonResponse
Send the request to the API then build the response object