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$
  6.  *
  7.  * @package Services_Ebay
  8.  * @author  Stephan Schmidt <schst@php.net>
  9.  * @link    http://developer.ebay.com/DevZone/docs/API_Doc/Functions/GetItemShipping/GetItemShippingLogic.htm
  10.  */
  11. {
  12.    /**
  13.     * verb of the API call
  14.     *
  15.     * @var  string 
  16.     */
  17.     protected $verb = 'GetItemShipping';
  18.  
  19.    /**
  20.     * arguments of the call
  21.     *
  22.     * @var  array 
  23.     */
  24.     protected $args = array(
  25.                             'QuantitySold' => 1
  26.                         );
  27.  
  28.    /**
  29.     * parameter map that is used, when scalar parameters are passed
  30.     *
  31.     * @var  array 
  32.     */
  33.     protected $paramMap = array(
  34.                                  'ItemID',
  35.                                  'DestinationPostalCode',
  36.                                  'QuantitySold'
  37.                                 );
  38.     
  39.    /**
  40.     * make the API call
  41.     *
  42.     * @param    object Services_Ebay_Session 
  43.     * @return   string 
  44.     */
  45.     public function call(Services_Ebay_Session $session)
  46.     {
  47.         $return = parent::call($session);
  48.         
  49.         if (isset($return['ShippingDetails']['ShippingServiceOptions'][0])) {
  50.             $return['ShippingDetails']['ShippingServiceOptions'$return['ShippingDetails']['ShippingServiceOptions'];
  51.             unset($return['ShippingDetails']['ShippingServiceOptions']);
  52.         else {
  53.             $return['ShippingDetails']['ShippingServiceOptions'= array$return['ShippingDetails']['ShippingServiceOptions');
  54.             unset($return['ShippingRate']['ShippingServiceOptions']);
  55.         }
  56.         
  57.         return $return['ShippingDetails'];
  58.     }
  59. }
  60. ?>

Documentation generated on Mon, 11 Mar 2019 15:49:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.