Exemplo n.º 1
0
 /**
  * get the item, for which the feedback was given
  *
  * @return object \Services\Ebay\Model\Item
  */
 public function getItem()
 {
     $args = array('Id' => $this->properties['ItemNumber']);
     $call = \Services\Ebay::loadAPICall('GetItem');
     $call->setArgs($args);
     return $call->call($this->session);
 }
<?php

/**
 * example that shows how to load an API call
 * and use it without the wrapper.
 *
 * $Id$
 *
 * @package     Services_Ebay
 * @subpackage  Examples
 * @author      Stephan Schmidt
 */
error_reporting(E_ALL);
require_once '../vendor/autoload.php';
require_once 'config.php';
$session = \Services\Ebay::getSession($devId, $appId, $certId);
$session->setToken($token);
$call = \Services\Ebay::loadAPICall('GetEbayOfficialTime');
$result = $call->call($session);
echo $result;
Exemplo n.º 3
0
 /**
  * get the user from eBay
  *
  * Use this to query by a previously set user id
  *
  * <code>
  * $user = \Services\Ebay::loadModel('User', 'superman-74', $session);
  * $user->Get();
  * </code>
  *
  * @param    string    ItemId
  * @see      Services_Ebay_Call_GetUser
  */
 public function Get($ItemId = null)
 {
     $args = array('UserId' => $this->properties['UserId'], 'ItemId' => $ItemId);
     $call = \Services\Ebay::loadAPICall('GetUser');
     $call->setArgs($args);
     $tmp = $call->call($this->session);
     $this->properties = $tmp->toArray();
     $this->eBayProperties = $this->properties;
     unset($tmp);
     return true;
 }
<?php

/**
 * example that shows how a call object is 
 * able to show its list of parameters
 *
 * $Id$
 *
 * @package     Services_Ebay
 * @subpackage  Examples
 * @author      Stephan Schmidt
 */
error_reporting(E_ALL);
require_once '../vendor/autoload.php';
require_once 'config.php';
$session = \Services\Ebay::getSession($devId, $appId, $certId);
$session->setToken($token);
$call = \Services\Ebay::loadAPICall('AddDispute');
echo '<pre>';
$call->describeCall();
echo '</pre>';
Exemplo n.º 5
0
 /**
  * Add a second chance offer
  *
  * This adds a new auction with exactly the same item data
  *
  * @return   object \Services\Ebay\Model\Item
  * @see      Services_Ebay_Call_AddSecondChanceItem
  */
 public function AddSecondChance($RecipientBidderUserId, $Duration = 'Days_3', $BuyItNowPrice = null)
 {
     $args = array('OriginalItemID' => $this->properties['ItemID'], 'RecipientBidderUserID' => $RecipientBidderUserId, 'Duration' => $Duration);
     if ($BuyItNowPrice !== null) {
         $args['BuyItNowPrice'] = $BuyItNowPrice;
     }
     $call = \Services\Ebay::loadAPICall('AddSecondChanceItem');
     $call->setArgs($args);
     return $call->call($this->session);
 }