Services_Ebay
[ class tree: Services_Ebay ] [ index: Services_Ebay ] [ all elements ]

Source for file User.php

Documentation is available at User.php

  1. <?PHP
  2. /**
  3.  * Model for an eBay user
  4.  *
  5.  *
  6.  * @package Services_Ebay
  7.  * @author  Stephan Schmidt <schst@php.net>
  8.  */
  9. {
  10.    /**
  11.     * property that stores the unique identifier (=pk) of the model
  12.     *
  13.     * @var string 
  14.     */
  15.     protected $primaryKey = 'UserId';
  16.  
  17.     /**
  18.     * get the feedback for the user
  19.     *
  20.     * @param    int     Detail Level
  21.     * @param    int     starting page
  22.     * @param    int     items per page
  23.     * @link     http://developer.ebay.com/DevZone/docs/API_Doc/Functions/GetFeedback/GetFeedback.htm
  24.     */
  25.     public function GetFeedback($DetailLevel = Services_Ebay::FEEDBACK_BRIEF$StartingPage = 1$ItemsPerPage = 25)
  26.     {
  27.         $args = array(
  28.                        'UserId'       => $this->properties['UserId'],
  29.                        'StartingPage' => $StartingPage,
  30.                        'ItemsPerPage' => $ItemsPerPage,
  31.                        'DetailLevel'  => $DetailLevel
  32.                     );
  33.         $call Services_Ebay::loadAPICall('GetFeedback');
  34.         $call->setArgs($args);
  35.         
  36.         return $call->call($this->session);
  37.     }
  38.     
  39.    /**
  40.     * get the list of items the user is selling
  41.     *
  42.     * @param    array   all arguments
  43.     * @link     http://developer.ebay.com/DevZone/docs/API_Doc/Functions/GetSellerList/GetSellerList.htm
  44.     */
  45.     public function GetSellerList($args = array())
  46.     {
  47.         $defaultArgs = array(
  48.                        'UserId'       => $this->properties['UserId'],
  49.                        'DetailLevel'  => 16
  50.                     );
  51.         $args array_merge($defaultArgs$args);
  52.         $call Services_Ebay::loadAPICall('GetSellerList');
  53.         $call->setArgs($args);
  54.         
  55.         return $call->call($this->session);
  56.     }
  57.  
  58.    /**
  59.     * get list of items on which the user is/has been bidding
  60.     *
  61.     * @link     http://developer.ebay.com/DevZone/docs/API_Doc/Functions/GetBidderList/GetBidderList.htm
  62.     */
  63.     public function GetBidderList($Active = 1$DetailLevel = 32$Days = null$EndTimeFrom = null$EndTimeTo = null)
  64.     {
  65.         $args = array(
  66.                        'UserId'       => $this->properties['UserId'],
  67.                        'Active'       => $Active,
  68.                        'DetailLevel'  => 32,
  69.                        'Days'         => $Days,
  70.                        'EndTimeFrom'  => $EndTimeFrom,
  71.                        'EndTimeTo'    => $EndTimeTo
  72.                     );
  73.         $call Services_Ebay::loadAPICall('GetBidderList');
  74.         $call->setArgs($args);
  75.         
  76.         return $call->call($this->session);
  77.     }
  78.  
  79.    /**
  80.     * leave feedback for the user
  81.     *
  82.     * @param    array   all arguments
  83.     * @link     http://developer.ebay.com/DevZone/docs/API_Doc/Functions/LeaveFeedback/LeaveFeedbackLogic.htm
  84.     */
  85.     public function LeaveFeedback($ItemId$CommentType$Comment$TransactionId = null)
  86.     {
  87.         $args = array(
  88.                        'TargetUser'   => $this->properties['UserId'],
  89.                        'ItemId'       => $ItemId,
  90.                        'CommentType'  => $CommentType,
  91.                        'Comment'      => $Comment
  92.                     );
  93.         if (!is_null($TransactionId)) {
  94.             $args['TransactionId'$TransactionId;
  95.         }
  96.         $call Services_Ebay::loadAPICall('LeaveFeedback');
  97.         $call->setArgs($args);
  98.         
  99.         return $call->call($this->session);
  100.     }
  101. }
  102. ?>

Documentation generated on Mon, 11 Mar 2019 13:58:48 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.