home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / php / PEAR / Services / Ebay / Call / AddShipment.php < prev    next >
Encoding:
PHP Script  |  2008-07-02  |  1.5 KB  |  65 lines

  1. <?PHP
  2. /**
  3.  * Add a shipment
  4.  *
  5.  * $Id: AddShipment.php,v 1.2 2004/10/29 21:16:50 schst Exp $
  6.  *
  7.  * @package Services_Ebay
  8.  * @author  Stephan Schmidt <schst@php.net>
  9.  */
  10. class Services_Ebay_Call_AddShipment extends Services_Ebay_Call 
  11. {
  12.    /**
  13.     * verb of the API call
  14.     *
  15.     * @var  string
  16.     */
  17.     protected $verb = 'AddShipment';
  18.  
  19.    /**
  20.     * options that will be passed to the serializer
  21.     *
  22.     * @var  array
  23.     */
  24.     protected $serializerOptions = array(
  25.                                             'defaultTagName' => 'Transaction'
  26.                                         );
  27.    /**
  28.     * parameter map that is used, when scalar parameters are passed
  29.     *
  30.     * @var  array
  31.     */
  32.     protected $paramMap = array();
  33.  
  34.    /**
  35.     * constructor
  36.     *
  37.     * @param    array
  38.     */
  39.     public function __construct($args)
  40.     {
  41.         $item = $args[0];
  42.         
  43.         if (!$item instanceof Services_Ebay_Model_Shipment ) {
  44.             throw new Services_Ebay_Exception( 'No shipment passed.' );
  45.         }
  46.         $this->item = $item;
  47.         $this->args['Shipment'] = $item->toArray();
  48.     }
  49.     
  50.    /**
  51.     * make the API call
  52.     *
  53.     * @param    object Services_Ebay_Session
  54.     * @return   string
  55.     */
  56.     public function call(Services_Ebay_Session $session)
  57.     {
  58.         $return = parent::call($session);
  59.         echo '<pre>';
  60.         print_r($return);
  61.         echo '</pre>';
  62.         return false;
  63.     }
  64. }
  65. ?>