Esempio n. 1
0
 /**
  * Convert GetFeedSubmissionListRequest to name value pairs
  * @param MarketplaceWebService_Model_GetFeedSubmissionListRequest $request
  * @return array
  */
 private function convertGetFeedSubmissionList($request)
 {
     $parameters = array();
     $parameters['Action'] = 'GetFeedSubmissionList';
     if ($request->isSetMarketplace()) {
         $parameters['Marketplace'] = $request->getMarketplace();
     }
     if ($request->isSetMerchant()) {
         $parameters['Merchant'] = $request->getMerchant();
     }
     if ($request->isSetFeedSubmissionIdList()) {
         $feedSubmissionIdList = $request->getFeedSubmissionIdList();
         foreach ($feedSubmissionIdList->getId() as $idIndex => $id) {
             $parameters['FeedSubmissionIdList' . '.' . 'Id' . '.' . ($idIndex + 1)] = $id;
         }
     }
     if ($request->isSetMaxCount()) {
         $parameters['MaxCount'] = $request->getMaxCount();
     }
     if ($request->isSetFeedTypeList()) {
         $feedTypeList = $request->getFeedTypeList();
         foreach ($feedTypeList->getType() as $typeIndex => $type) {
             $parameters['FeedTypeList' . '.' . 'Type' . '.' . ($typeIndex + 1)] = $type;
         }
     }
     if ($request->isSetFeedProcessingStatusList()) {
         $feedProcessingStatusList = $request->getFeedProcessingStatusList();
         foreach ($feedProcessingStatusList->getStatus() as $statusIndex => $status) {
             $parameters['FeedProcessingStatusList' . '.' . 'Status' . '.' . ($statusIndex + 1)] = $status;
         }
     }
     if ($request->isSetSubmittedFromDate()) {
         $parameters['SubmittedFromDate'] = $this->getFormattedTimestamp($request->getSubmittedFromDate());
     }
     if ($request->isSetSubmittedToDate()) {
         $parameters['SubmittedToDate'] = $this->getFormattedTimestamp($request->getSubmittedToDate());
     }
     if ($request->isSetMWSAuthToken()) {
         $parameters['MWSAuthToken'] = $request->getMWSAuthToken();
     }
     return array(CONVERTED_PARAMETERS_KEY => $parameters, CONVERTED_HEADERS_KEY => $this->defaultHeaders);
 }