コード例 #1
0
ファイル: FeedClient.php プロジェクト: pablosoria/MWS
 /**
  * @param \MarketplaceWebService_Model_SubmitFeedResponse $response
  * @param \DOMDocument $feedObj
  *
  * @return AmazonRequest
  */
 private function getRequestData(\MarketplaceWebService_Model_SubmitFeedResponse $response, \DOMDocument $feedObj)
 {
     $responseMetadata = null;
     $feedSubmissionInfo = null;
     if ($response->isSetResponseMetadata()) {
         /** @var  $responseMetadata \MarketplaceWebService_Model_ResponseMetadata */
         $responseMetadata = $response->getResponseMetadata();
     }
     if ($response->isSetSubmitFeedResult()) {
         /** @var  $submitFeedResult \MarketplaceWebService_Model_SubmitFeedResult */
         $submitFeedResult = $response->getSubmitFeedResult();
         if ($submitFeedResult->isSetFeedSubmissionInfo()) {
             /** @var  $feedSubmissionInfo \MarketplaceWebService_Model_FeedSubmissionInfo */
             $feedSubmissionInfo = $submitFeedResult->getFeedSubmissionInfo();
         }
     }
     $headersMetadata = $response->getResponseHeaderMetadata();
     $amazonRequest = new $this->requestClass($responseMetadata->getRequestId(), $feedSubmissionInfo->getFeedSubmissionId(), $feedSubmissionInfo->getFeedType(), $feedSubmissionInfo->getSubmittedDate(), $feedObj->saveXML(), AmazonRequest::REQUEST_TYPE_FEED, $feedSubmissionInfo->getFeedProcessingStatus(), $headersMetadata->getQuotaRemaining());
     return $amazonRequest;
 }