/** * @inheritdoc */ public function __construct(\SimpleXMLElement $response) { parent::__construct($response); if (!empty($response->Item)) { $this->item = $response->Item; $this->listing_status = (string) $this->item->SellingStatus->ListingStatus; } }
/** * @inheritdoc */ public function __construct(\SimpleXMLElement $response) { parent::__construct($response); $this->response = $response; $this->count = XmlHelper::getAsInt($response, 'CategoryCount'); $this->min_reserve_price = XmlHelper::getAsDouble($response, 'MinimumReservePrice'); $this->reduce_reserve_allowed = XmlHelper::getAsBoolean($response, 'ReduceReserveAllowed'); $this->reserve_price_allowed = XmlHelper::getAsBoolean($response, 'ReservePriceAllowed'); $this->update_time = XmlHelper::getAsString($response, 'UpdateTime'); }
/** * @inheritdoc */ public function __construct(\SimpleXMLElement $response) { parent::__construct($response); $this->response = $response; if (!empty($response->ShippingLocationDetails)) { $this->shipping_location_details = array(); foreach ($response->ShippingLocationDetails as $item) { $this->shipping_location_details[(string) $item->ShippingLocation] = array('code' => XmlHelper::getAsString($item, 'ShippingLocation'), 'name' => XmlHelper::getAsString($item, 'Description'), 'time' => XmlHelper::getAsString($item, 'UpdateTime')); } } }
/** * End request - update log * * @param int $id * @param Response $response */ public static function endRequest($id, Response $response) { $data = array('status' => $response->isSuccess() ? self::STATUS_SUCCESS : self::STATUS_FAIL, 'error_count' => count($response->getErrors()), 'warning_count' => count($response->getWarnings()), 'success_rate' => $response->getSuccessRate(), 'end_datetime' => time()); db_query('UPDATE ?:ebay_transaction_log SET ?u WHERE id = ?i', $data, $id); }
/** * @param Product $product * @param Response $response * @param int $action */ protected static function checkResponse(Product $product, Response $response, $action) { $errors = $response->getErrors(); $warnings = $response->getWarnings(); foreach ($errors as $error) { ProductLogger::error($action, $product, $error['message'], $error['code']); static::setError($error['code'], $error['message']); } foreach ($warnings as $warning) { ProductLogger::warning($action, $product, $warning['message'], $warning['code']); } }
/** * @inheritdoc */ public function __construct(\SimpleXMLElement $response) { parent::__construct($response); $this->response = $response; }