/** * https://wiki.ecommerce.pb.com/display/TECH4/Get+Quote * * @return QuoteSet */ public function getQuote($inputData) { $url = static::getApiURL($this->config, 'checkout_api_endpoint') . '/quotes'; $request = new API\Request\GetQuoteRequest($url, $inputData); $inputMapper = new Mapper\GetQuote\ModifierInputMapper($this->config); $inputMapper->setNextMapper(new Mapper\GetQuote\ArrayInputMapper($this->config)); $request->setInputMapper($inputMapper); $request->setOutputMapper(new Mapper\GetQuote\OutputMapper($this->config)); $auth = $this->getAuth(); $request->setAuth($auth['type'], $auth['value']); $request->sendRequest(); \XLite\Module\XC\PitneyBowes\Model\Shipping\Processor\PitneyBowes::logDebug('getQuote API called with: ' . PHP_EOL . 'URL: ' . $url . PHP_EOL . 'Cache hash: ' . $this->getQuoteCacheKey($inputData) . PHP_EOL . 'Request: ' . var_export($request->getRawRequest(), true) . PHP_EOL . 'Response: ' . $request->getRawResponse() . PHP_EOL); return $request->getResponse(); }
/** * */ public function getResponse() { $this->response = new \PEAR2\HTTP\Request\Response(array(), $this->body, array(), array()); return parent::getResponse(); }