/**
  * sample_GetItemTransactions::dispatchCall()
  * 
  * Dispatch the call
  *
  * @param array $params array of parameters for the eBay API call
  * 
  * @return boolean success
  */
 public function dispatchCall($params)
 {
     $req = new GetItemTransactionsRequestType();
     $req->setItemID($params['ItemID']);
     $res = $this->proxy->GetItemTransactions($req);
     if ($this->testValid($res)) {
         $this->dumpObject($res);
         return true;
     } else {
         return false;
     }
 }
 /**
  * @return GetItemTransactionsResponseType
  * @param GetItemTransactionsRequestType $request 
  */
 function GetItemTransactions($request)
 {
     $request->setVersion(EBAY_WSDL_VERSION);
     return $this->call('GetItemTransactions', $request);
 }
Пример #3
0
 function updateSingleTransaction($session, $id)
 {
     $this->initServiceProxy($session);
     // get transaction item to update
     $transaction = $this->getItem($id);
     // build request
     $req = new GetItemTransactionsRequestType();
     $req->ItemID = $transaction['item_id'];
     $req->TransactionID = $transaction['transaction_id'];
     WPLE()->logger->info('ItemID: ' . $req->ItemID);
     WPLE()->logger->info('TransactionID: ' . $req->TransactionID);
     // $req->DetailLevel = $Facet_DetailLevelCodeType->ReturnAll;
     $req->setDetailLevel('ReturnAll');
     $req->setIncludeContainingOrder(true);
     // download the data
     $res = $this->_cs->GetItemTransactions($req);
     // handle response and check if successful
     if ($this->handleResponse($res)) {
         // since GetItemTransactions returns the Item object outside of the Transaction object,
         // we need to rearrange it before we pass it to handleTransactionType()
         $Transaction = $res->TransactionArray[0];
         $Transaction->Item = $res->Item;
         $this->handleTransactionType('TransactionType', $Transaction);
         WPLE()->logger->info(sprintf("Transaction %s updated successfully.", $req->TransactionID));
     } else {
         WPLE()->logger->error("Error on transactions update" . print_r($res, 1));
     }
 }