/zf/library/Zend/Service/Ebay/Finding/ShippingInfo.php

http://github.com/eryx/php-framework-benchmark · PHP · 126 lines · 19 code · 7 blank · 100 comment · 0 complexity · 60232ebad213c1d02890f55d12678cea MD5 · raw file

  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-2011 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-2011 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. * The shipping method that was used for determining the cost of shipping.
  44. *
  45. * For example: flat rate, calculated, or free. The seller specifies the
  46. * available shipping services when they list the item.
  47. *
  48. * Applicable values:
  49. *
  50. * Calculated
  51. * The calculated shipping model: The posted cost of shipping is based
  52. * on the buyer-selected shipping service, chosen by the buyer from the
  53. * different shipping services offered by the seller. The shipping costs
  54. * are calculated by eBay and the shipping carrier, based on the buyer's
  55. * address. Any packaging and handling costs established by the seller
  56. * are automatically rolled into the total.
  57. *
  58. * CalculatedDomesticFlatInternational
  59. * The seller specified one or more calculated domestic shipping
  60. * services and one or more flat international shipping services.
  61. *
  62. * Flat
  63. * The flat-rate shipping model: The seller establishes the cost of
  64. * shipping and any shipping insurance, regardless of what any
  65. * buyer-selected shipping service might charge the seller.
  66. *
  67. * FlatDomesticCalculatedInternational
  68. * The seller specified one or more flat domestic shipping services and
  69. * one or more calculated international shipping services.
  70. *
  71. * Free
  72. * Free is used when the seller has declared that shipping is free for
  73. * the buyer.
  74. *
  75. * FreePickup
  76. * No shipping available, the buyer must pick up the item from the
  77. * seller.
  78. *
  79. * Freight
  80. * The freight shipping model: the cost of shipping is determined by a
  81. * third party, FreightQuote.com, based on the buyer's address (postal
  82. * code).
  83. *
  84. * FreightFlat
  85. * The flat rate shipping model: the seller establishes the cost of
  86. * freight shipping and freight insurance, regardless of what any
  87. * buyer-selected shipping service might charge the seller.
  88. *
  89. * NotSpecified
  90. * The seller did not specify the shipping type.
  91. *
  92. * @var string
  93. */
  94. public $shippingType;
  95. /**
  96. * An international location or region to which the seller is willing to
  97. * ship the item.
  98. *
  99. * Returned only for items that have shipToLocations specified.
  100. *
  101. * @link http://developer.ebay.com/DevZone/finding/CallRef/Enums/shipToLocationList.html
  102. * @var string[]
  103. */
  104. public $shipToLocations;
  105. /**
  106. * @return void
  107. */
  108. protected function _init()
  109. {
  110. parent::_init();
  111. $ns = Zend_Service_Ebay_Finding::XMLNS_FINDING;
  112. $this->shippingServiceCost = $this->_query(".//$ns:shippingServiceCost[1]", 'float');
  113. $this->shippingType = $this->_query(".//$ns:shippingType[1]", 'string');
  114. $this->shipToLocations = $this->_query(".//$ns:shipToLocations", 'string', true);
  115. $this->_attributes['shippingServiceCost'] = array(
  116. 'currencyId' => $this->_query(".//$ns:shippingServiceCost[1]/@currencyId[1]", 'string')
  117. );
  118. }
  119. }