ShippingInfo.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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-2010 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. * @see Zend_Service_Ebay_Finding_Abstract
  24. */
  25. require_once 'Zend/Service/Ebay/Finding/Abstract.php';
  26. /**
  27. * @category Zend
  28. * @package Zend_Service
  29. * @subpackage Ebay
  30. * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  31. * @license http://framework.zend.com/license/new-bsd New BSD License
  32. * @uses Zend_Service_Ebay_Finding_Abstract
  33. */
  34. class Zend_Service_Ebay_Finding_ShippingInfo extends Zend_Service_Ebay_Finding_Abstract
  35. {
  36. /**
  37. * The basic shipping cost of the item.
  38. *
  39. * @var float
  40. */
  41. public $shippingServiceCost;
  42. /**
  43. * Currency in which the monetary amount is specified.
  44. *
  45. * @link http://developer.ebay.com/DevZone/finding/CallRef/Enums/currencyIdList.html
  46. * @var string
  47. */
  48. public $shippingServiceCost_currencyId;
  49. /**
  50. * The shipping method that was used for determining the cost of shipping.
  51. *
  52. * For example: flat rate, calculated, or free. The seller specifies the
  53. * available shipping services when they list the item.
  54. *
  55. * Applicable values:
  56. *
  57. * Calculated
  58. * The calculated shipping model: The posted cost of shipping is based
  59. * on the buyer-selected shipping service, chosen by the buyer from the
  60. * different shipping services offered by the seller. The shipping costs
  61. * are calculated by eBay and the shipping carrier, based on the buyer's
  62. * address. Any packaging and handling costs established by the seller
  63. * are automatically rolled into the total.
  64. *
  65. * CalculatedDomesticFlatInternational
  66. * The seller specified one or more calculated domestic shipping
  67. * services and one or more flat international shipping services.
  68. *
  69. * Flat
  70. * The flat-rate shipping model: The seller establishes the cost of
  71. * shipping and any shipping insurance, regardless of what any
  72. * buyer-selected shipping service might charge the seller.
  73. *
  74. * FlatDomesticCalculatedInternational
  75. * The seller specified one or more flat domestic shipping services and
  76. * one or more calculated international shipping services.
  77. *
  78. * Free
  79. * Free is used when the seller has declared that shipping is free for
  80. * the buyer.
  81. *
  82. * FreePickup
  83. * No shipping available, the buyer must pick up the item from the
  84. * seller.
  85. *
  86. * Freight
  87. * The freight shipping model: the cost of shipping is determined by a
  88. * third party, FreightQuote.com, based on the buyer's address (postal
  89. * code).
  90. *
  91. * FreightFlat
  92. * The flat rate shipping model: the seller establishes the cost of
  93. * freight shipping and freight insurance, regardless of what any
  94. * buyer-selected shipping service might charge the seller.
  95. *
  96. * NotSpecified
  97. * The seller did not specify the shipping type.
  98. *
  99. * @var string
  100. */
  101. public $shippingType;
  102. /**
  103. * An international location or region to which the seller is willing to
  104. * ship the item.
  105. *
  106. * Returned only for items that have shipToLocations specified.
  107. *
  108. * @link http://developer.ebay.com/DevZone/finding/CallRef/Enums/shipToLocationList.html
  109. * @var string[]
  110. */
  111. public $shipToLocations;
  112. /**
  113. * @return void
  114. */
  115. protected function _init()
  116. {
  117. parent::_init();
  118. $ns = Zend_Service_Ebay_Finding::XMLNS_FINDING;
  119. $this->shippingServiceCost = $this->_query(".//$ns:shippingServiceCost[1]", 'float');
  120. $this->shippingServiceCost_currencyId = $this->_query(".//$ns:shippingServiceCost[1]/@currencyId[1]", 'string');
  121. $this->shippingType = $this->_query(".//$ns:shippingType[1]", 'string');
  122. $this->shipToLocations = $this->_query(".//$ns:shipToLocations", 'string', true);
  123. }
  124. }