public function __construct(ApiResult $result) { $res = $result->getResult(); $this->_actionId = isset($res->actionId) ? $res->actionId : null; $this->_pixels = isset($res->pixels) ? $res->pixels : null; $this->_sid1 = isset($res->sid1) ? $res->sid1 : null; $this->_sid2 = isset($res->sid2) ? $res->sid2 : null; $this->_sid3 = isset($res->sid3) ? $res->sid3 : null; $this->_affiliate = isset($res->affiliate) ? $res->affiliate : null; $this->_campaign = isset($res->campaign) ? $res->campaign : null; $this->_commission = isset($res->commission) ? $res->commission : null; }
/** * Process the raw guzzle response * * @param ResponseInterface $response * @param $time * * @return ApiResult */ protected function _processResponse(ResponseInterface $response, $time) { $apiResult = new ApiResult($response, true); $apiResult->setTotalTime(number_format((microtime(true) - $time) * 1000, 3)); return $apiResult; }