File indexing completed on 2024-12-29 05:28:02

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Service
0017  * @subpackage Ebay
0018  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0019  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0020  * @version    $Id: ShippingInfo.php 22791 2010-08-04 16:11:47Z renanbr $
0021  */
0022 
0023 /**
0024  * @see Zend_Service_Ebay_Finding_Abstract
0025  */
0026 // require_once 'Zend/Service/Ebay/Finding/Abstract.php';
0027 
0028 /**
0029  * @category   Zend
0030  * @package    Zend_Service
0031  * @subpackage Ebay
0032  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0033  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0034  * @uses       Zend_Service_Ebay_Finding_Abstract
0035  */
0036 class Zend_Service_Ebay_Finding_ShippingInfo extends Zend_Service_Ebay_Finding_Abstract
0037 {
0038     /**
0039      * The basic shipping cost of the item.
0040      *
0041      * @var float
0042      */
0043     public $shippingServiceCost;
0044 
0045     /**
0046      * The shipping method that was used for determining the cost of shipping.
0047      *
0048      * For example: flat rate, calculated, or free. The seller specifies the
0049      * available shipping services when they list the item.
0050      *
0051      * Applicable values:
0052      *
0053      *     Calculated
0054      *     The calculated shipping model: The posted cost of shipping is based
0055      *     on the buyer-selected shipping service, chosen by the buyer from the
0056      *     different shipping services offered by the seller. The shipping costs
0057      *     are calculated by eBay and the shipping carrier, based on the buyer's
0058      *     address. Any packaging and handling costs established by the seller
0059      *     are automatically rolled into the total.
0060      *
0061      *     CalculatedDomesticFlatInternational
0062      *     The seller specified one or more calculated domestic shipping
0063      *     services and one or more flat international shipping services.
0064      *
0065      *     Flat
0066      *     The flat-rate shipping model: The seller establishes the cost of
0067      *     shipping and any shipping insurance, regardless of what any
0068      *     buyer-selected shipping service might charge the seller.
0069      *
0070      *     FlatDomesticCalculatedInternational
0071      *     The seller specified one or more flat domestic shipping services and
0072      *     one or more calculated international shipping services.
0073      *
0074      *     Free
0075      *     Free is used when the seller has declared that shipping is free for
0076      *     the buyer.
0077      *
0078      *     FreePickup
0079      *     No shipping available, the buyer must pick up the item from the
0080      *     seller.
0081      *
0082      *     Freight
0083      *     The freight shipping model: the cost of shipping is determined by a
0084      *     third party, FreightQuote.com, based on the buyer's address (postal
0085      *     code).
0086      *
0087      *     FreightFlat
0088      *     The flat rate shipping model: the seller establishes the cost of
0089      *     freight shipping and freight insurance, regardless of what any
0090      *     buyer-selected shipping service might charge the seller.
0091      *
0092      *     NotSpecified
0093      *     The seller did not specify the shipping type.
0094      *
0095      * @var string
0096      */
0097     public $shippingType;
0098 
0099     /**
0100      * An international location or region to which the seller is willing to
0101      * ship the item.
0102      *
0103      * Returned only for items that have shipToLocations specified.
0104      *
0105      * @link http://developer.ebay.com/DevZone/finding/CallRef/Enums/shipToLocationList.html
0106      * @var  string[]
0107      */
0108     public $shipToLocations;
0109 
0110     /**
0111      * @return void
0112      */
0113     protected function _init()
0114     {
0115         parent::_init();
0116         $ns = Zend_Service_Ebay_Finding::XMLNS_FINDING;
0117 
0118         $this->shippingServiceCost = $this->_query(".//$ns:shippingServiceCost[1]", 'float');
0119         $this->shippingType        = $this->_query(".//$ns:shippingType[1]", 'string');
0120         $this->shipToLocations     = $this->_query(".//$ns:shipToLocations", 'string', true);
0121 
0122         $this->_attributes['shippingServiceCost'] = array(
0123             'currencyId' => $this->_query(".//$ns:shippingServiceCost[1]/@currencyId[1]", 'string')
0124         );
0125     }
0126 }