/** * Extract tax records from the API response body for the quote. * * @param IBidirectionalApi * @param Mage_Sales_Model_Order_Quote * @return EbayEnterprise_Tax_Model_Result */ protected function _extractResponseResults(IBidirectionalApi $api, Mage_Sales_Model_Quote $quote) { try { $responseBody = $api->getResponseBody(); } catch (UnsupportedOperation $e) { // This exception handling is probably not necessary but // is technically possible. If the sdk flow of // getRequest->setRequest->send->getResponse is followed, // which is is by the one public method of this class, this // exception should never be thrown in this instance. If it // were to be thrown at all by the SDK, it would have already // happened during the "send" step. $this->logger->critical('Tax quote service response unsupported by SDK.', $this->logContext->getMetaData(__CLASS__, [], $e)); throw $this->_failTaxCollection(); } $responseParser = $this->taxFactory->createResponseQuoteParser($responseBody, $quote); return $this->taxFactory->createTaxResults($responseParser->getTaxRecords(), $responseParser->getTaxDuties(), $responseParser->getTaxFees()); }