/** * Submit Feed * Uploads a file for processing together with the necessary * metadata to process the file, such as which type of feed it is. * PurgeAndReplace if true means that your existing e.g. inventory is * wiped out and replace with the contents of this feed - use with * caution (the default is false). * * @see http://docs.amazonwebservices.com/${docPath}SubmitFeed.html * @param mixed $request array of parameters for MarketplaceWebService_Model_SubmitFeed request or MarketplaceWebService_Model_SubmitFeed object itself * @see MarketplaceWebService_Model_SubmitFeed * @return MarketplaceWebService_Model_SubmitFeedResponse MarketplaceWebService_Model_SubmitFeedResponse * * @throws MarketplaceWebService_Exception */ public function submitFeed($request) { //// require_once ('MarketplaceWebService/Model/SubmitFeedResponse.php'); return MarketplaceWebService_Model_SubmitFeedResponse::fromXML($this->invoke('SubmitFeed')); }
/** * Submit Feed * Uploads a file for processing together with the necessary * metadata to process the file, such as which type of feed it is. * PurgeAndReplace if true means that your existing e.g. inventory is * wiped out and replace with the contents of this feed - use with * caution (the default is false). * * @see http://docs.amazonwebservices.com/${docPath}SubmitFeed.html * @param mixed $request array of parameters for MarketplaceWebService_Model_SubmitFeedRequest request * or MarketplaceWebService_Model_SubmitFeedRequest object itself * @see MarketplaceWebService_Model_SubmitFeed * @return MarketplaceWebService_Model_SubmitFeedResponse MarketplaceWebService_Model_SubmitFeedResponse * * @throws MarketplaceWebService_Exception */ public function submitFeed($request) { if (!$request instanceof MarketplaceWebService_Model_SubmitFeedRequest) { require_once dirname(__FILE__) . '/Model/SubmitFeedRequest.php'; $request = new MarketplaceWebService_Model_SubmitFeedRequest($request); } require_once dirname(__FILE__) . '/Model/SubmitFeedResponse.php'; $httpResponse = $this->invoke($this->convertSubmitFeed($request), $request->getFeedContent(), $request->getContentMd5()); $response = MarketplaceWebService_Model_SubmitFeedResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
/** * @param \MarketplaceWebService_Model_SubmitFeedResponse $response */ private function handleThrottling(\MarketplaceWebService_Model_SubmitFeedResponse $response) { /** @var $headersMetadata \MarketplaceWebService_Model_ResponseHeaderMetadata */ $headersMetadata = $response->getResponseHeaderMetadata(); //$quotaMax = $headersMetadata->getQuotaMax(); $quotaRemaining = $headersMetadata->getQuotaRemaining(); //$requestTimeStamp = $headersMetadata->getTimestamp(); //$requestId = $headersMetadata->getRequestId(); //$resetsAt = $headersMetadata->getQuotaResetsAt(); while ($quotaRemaining < 1) { echo 'FeedClient: Has been reached the limit of requests. Waiting 5 minutes to continue... ' . 'QuotaRemaining: ' . $quotaRemaining; sleep(5 * 60); } }
/** * Submit Feed * Uploads a file for processing together with the necessary * metadata to process the file, such as which type of feed it is. * PurgeAndReplace if true means that your existing e.g. inventory is * wiped out and replace with the contents of this feed - use with * caution (the default is false). * * @see http://docs.amazonwebservices.com/${docPath}SubmitFeed.html * @param mixed $request array of parameters for MarketplaceWebService_Model_SubmitFeedRequest request * or MarketplaceWebService_Model_SubmitFeedRequest object itself * @see MarketplaceWebService_Model_SubmitFeed * @return MarketplaceWebService_Model_SubmitFeedResponse MarketplaceWebService_Model_SubmitFeedResponse * * @throws MarketplaceWebService_Exception */ public function submitFeed($request) { if (!$request instanceof MarketplaceWebService_Model_SubmitFeedRequest) { //require_once ('MarketplaceWebService/Model/SubmitFeedRequest.php'); $request = new MarketplaceWebService_Model_SubmitFeedRequest($request); } //require_once ('MarketplaceWebService/Model/SubmitFeedResponse.php'); return MarketplaceWebService_Model_SubmitFeedResponse::fromXML($this->invoke($this->convertSubmitFeed($request), $request->getFeedContent(), $request->getContentMd5())); }
/** * Submit Feed * Uploads a file for processing together with the necessary * metadata to process the file, such as which type of feed it is. * PurgeAndReplace if true means that your existing e.g. inventory is * wiped out and replace with the contents of this feed - use with * caution (the default is false). * * @see http://docs.amazonwebservices.com/${docPath}SubmitFeed.html * @param mixed $request array of parameters for MarketplaceWebService_Model_SubmitFeed request or MarketplaceWebService_Model_SubmitFeed object itself * @see MarketplaceWebService_Model_SubmitFeed * @return MarketplaceWebService_Model_SubmitFeedResponse MarketplaceWebService_Model_SubmitFeedResponse * * @throws MarketplaceWebService_Exception */ public function submitFeed($request) { return MarketplaceWebService_Model_SubmitFeedResponse::fromXML($this->invoke('SubmitFeed')); }
/** * Submit Feed * Uploads a file for processing together with the necessary * metadata to process the file, such as which type of feed it is. * PurgeAndReplace if true means that your existing e.g. inventory is * wiped out and replace with the contents of this feed - use with * caution (the default is false). * * @see http://docs.amazonwebservices.com/${docPath}SubmitFeed.html * @param mixed $request array of parameters for MarketplaceWebService_Model_SubmitFeedRequest request * or MarketplaceWebService_Model_SubmitFeedRequest object itself * @see MarketplaceWebService_Model_SubmitFeed * @return MarketplaceWebService_Model_SubmitFeedResponse MarketplaceWebService_Model_SubmitFeedResponse * * @throws MarketplaceWebService_Exception */ public function submitFeed($request) { if (!$request instanceof MarketplaceWebService_Model_SubmitFeedRequest) { require_once 'MarketplaceWebService/Model/SubmitFeedRequest.php'; $request = new MarketplaceWebService_Model_SubmitFeedRequest($request); } require_once 'MarketplaceWebService/Model/SubmitFeedResponse.php'; $httpResponse = $this->invoke($this->convertSubmitFeed($request), $request->getFeedContent(), $request->getContentMd5()); try { $response = MarketplaceWebService_Model_SubmitFeedResponse::fromXML($httpResponse['ResponseBody']); /* Rethrow on deserializer error */ } catch (Exception $e) { require_once 'MarketplaceWebService/Exception.php'; // log to db - error $success = 'Error'; $this->dblogger->updateLog(array('result' => $e->getMessage(), 'success' => $success)); throw new MarketplaceWebService_Exception(array('Exception' => $e, 'Message' => $e->getMessage())); } $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
/** * Submit Feed * Uploads a file for processing together with the necessary * metadata to process the file, such as which type of feed it is. * PurgeAndReplace if true means that your existing e.g. inventory is * wiped out and replace with the contents of this feed - use with * caution (the default is false). * * @see http://docs.amazonwebservices.com/${docPath}SubmitFeed.html * @param mixed $request array of parameters for MarketplaceWebService_Model_SubmitFeed request or MarketplaceWebService_Model_SubmitFeed object itself * @see MarketplaceWebService_Model_SubmitFeed * @return MarketplaceWebService_Model_SubmitFeedResponse MarketplaceWebService_Model_SubmitFeedResponse * * @throws MarketplaceWebService_Exception */ public function submitFeed($request) { require_once dirname(__FILE__) . '/Model/SubmitFeedResponse.php'; return MarketplaceWebService_Model_SubmitFeedResponse::fromXML($this->invoke('SubmitFeed')); }