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

Source for file GetItemShipping.php

Documentation is available at GetItemShipping.php

  1. <?PHP
  2. /**
  3.  * Get shipping costs for an item
  4.  *
  5.  * $Id: GetItemShipping.php,v 1.1 2004/10/28 17:14:53 schst Exp $
  6.  *
  7.  * @package Services_Ebay
  8.  * @author  Stephan Schmidt <schst@php.net>
  9.  */
  10. {
  11.    /**
  12.     * verb of the API call
  13.     *
  14.     * @var  string 
  15.     */
  16.     protected $verb = 'GetItemShipping';
  17.  
  18.    /**
  19.     * arguments of the call
  20.     *
  21.     * @var  array 
  22.     */
  23.     protected $args = array(
  24.                             'QuantitySold' => 1
  25.                         );
  26.  
  27.    /**
  28.     * parameter map that is used, when scalar parameters are passed
  29.     *
  30.     * @var  array 
  31.     */
  32.     protected $paramMap = array(
  33.                                  'ItemId',
  34.                                  'ShipToZipCode',
  35.                                  'QuantitySold'
  36.                                 );
  37.     
  38.    /**
  39.     * make the API call
  40.     *
  41.     * @param    object Services_Ebay_Session 
  42.     * @return   string 
  43.     */
  44.     public function call(Services_Ebay_Session $session)
  45.     {
  46.         $return = parent::call($session);
  47.         
  48.         if (isset($return['ShippingRate']['ShippingServiceOptions']['ShippingServiceOption'][0])) {
  49.             $return['ShippingRate']['ShippingServiceOptions'$return['ShippingRate']['ShippingServiceOptions']['ShippingServiceOption'];
  50.             unset($return['ShippingRate']['ShippingServiceOptions']['ShippingServiceOption']);
  51.         else {
  52.             $return['ShippingRate']['ShippingServiceOptions'= array$return['ShippingRate']['ShippingServiceOptions']['ShippingServiceOption');
  53.             unset($return['ShippingRate']['ShippingServiceOptions']['ShippingServiceOption']);
  54.         }
  55.         
  56.         
  57.         
  58.         return $return['ShippingRate'];
  59.     }
  60. }
  61. ?>

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