/library/Zend/Service/Ebay/Finding/ShippingInfo.php
PHP | 126 lines | 19 code | 7 blank | 100 comment | 0 complexity | fab07f2cdc0cbfe0ae4224a53294d579 MD5 | raw file
Possible License(s): AGPL-1.0
1<?php
2/**
3 * Zend Framework
4 *
5 * LICENSE
6 *
7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
14 *
15 * @category Zend
16 * @package Zend_Service
17 * @subpackage Ebay
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: ShippingInfo.php 22791 2010-08-04 16:11:47Z renanbr $
21 */
22
23/**
24 * @see Zend_Service_Ebay_Finding_Abstract
25 */
26require_once 'Zend/Service/Ebay/Finding/Abstract.php';
27
28/**
29 * @category Zend
30 * @package Zend_Service
31 * @subpackage Ebay
32 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
33 * @license http://framework.zend.com/license/new-bsd New BSD License
34 * @uses Zend_Service_Ebay_Finding_Abstract
35 */
36class Zend_Service_Ebay_Finding_ShippingInfo extends Zend_Service_Ebay_Finding_Abstract
37{
38 /**
39 * The basic shipping cost of the item.
40 *
41 * @var float
42 */
43 public $shippingServiceCost;
44
45 /**
46 * The shipping method that was used for determining the cost of shipping.
47 *
48 * For example: flat rate, calculated, or free. The seller specifies the
49 * available shipping services when they list the item.
50 *
51 * Applicable values:
52 *
53 * Calculated
54 * The calculated shipping model: The posted cost of shipping is based
55 * on the buyer-selected shipping service, chosen by the buyer from the
56 * different shipping services offered by the seller. The shipping costs
57 * are calculated by eBay and the shipping carrier, based on the buyer's
58 * address. Any packaging and handling costs established by the seller
59 * are automatically rolled into the total.
60 *
61 * CalculatedDomesticFlatInternational
62 * The seller specified one or more calculated domestic shipping
63 * services and one or more flat international shipping services.
64 *
65 * Flat
66 * The flat-rate shipping model: The seller establishes the cost of
67 * shipping and any shipping insurance, regardless of what any
68 * buyer-selected shipping service might charge the seller.
69 *
70 * FlatDomesticCalculatedInternational
71 * The seller specified one or more flat domestic shipping services and
72 * one or more calculated international shipping services.
73 *
74 * Free
75 * Free is used when the seller has declared that shipping is free for
76 * the buyer.
77 *
78 * FreePickup
79 * No shipping available, the buyer must pick up the item from the
80 * seller.
81 *
82 * Freight
83 * The freight shipping model: the cost of shipping is determined by a
84 * third party, FreightQuote.com, based on the buyer's address (postal
85 * code).
86 *
87 * FreightFlat
88 * The flat rate shipping model: the seller establishes the cost of
89 * freight shipping and freight insurance, regardless of what any
90 * buyer-selected shipping service might charge the seller.
91 *
92 * NotSpecified
93 * The seller did not specify the shipping type.
94 *
95 * @var string
96 */
97 public $shippingType;
98
99 /**
100 * An international location or region to which the seller is willing to
101 * ship the item.
102 *
103 * Returned only for items that have shipToLocations specified.
104 *
105 * @link http://developer.ebay.com/DevZone/finding/CallRef/Enums/shipToLocationList.html
106 * @var string[]
107 */
108 public $shipToLocations;
109
110 /**
111 * @return void
112 */
113 protected function _init()
114 {
115 parent::_init();
116 $ns = Zend_Service_Ebay_Finding::XMLNS_FINDING;
117
118 $this->shippingServiceCost = $this->_query(".//$ns:shippingServiceCost[1]", 'float');
119 $this->shippingType = $this->_query(".//$ns:shippingType[1]", 'string');
120 $this->shipToLocations = $this->_query(".//$ns:shipToLocations", 'string', true);
121
122 $this->_attributes['shippingServiceCost'] = array(
123 'currencyId' => $this->_query(".//$ns:shippingServiceCost[1]/@currencyId[1]", 'string')
124 );
125 }
126}