SellerInfo.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id: SellerInfo.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-2015 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_SellerInfo extends Zend_Service_Ebay_Finding_Abstract
  35. {
  36. /**
  37. * Visual indicator of user's feedback score.
  38. *
  39. * Applicable values:
  40. *
  41. * None
  42. * No graphic displayed, feedback score 0-9.
  43. *
  44. * Yellow
  45. * Yellow Star, feedback score 10-49.
  46. *
  47. * Blue
  48. * Blue Star, feedback score 50-99.
  49. *
  50. * Turquoise
  51. * Turquoise Star, feedback score 100-499.
  52. *
  53. * Purple
  54. * Purple Star, feedback score 500-999.
  55. *
  56. * Red
  57. * Red Star, feedback score 1,000-4,999.
  58. *
  59. * Green
  60. * Green Star, feedback score 5,000-9,999.
  61. *
  62. * YellowShooting
  63. * Yellow Shooting Star, feedback score 10,000-24,999.
  64. *
  65. * TurquoiseShooting
  66. * Turquoise Shooting Star, feedback score 25,000-49,999.
  67. *
  68. * PurpleShooting
  69. * Purple Shooting Star, feedback score 50,000-99,999.
  70. *
  71. * RedShooting
  72. * Red Shooting Star, feedback score 100,000-499,000 and above.
  73. *
  74. * GreenShooting
  75. * Green Shooting Star, feedback score 500,000-999,000 and above.
  76. *
  77. * SilverShooting
  78. * Silver Shooting Star, feedback score 1,000,000 or more.
  79. *
  80. * @var string
  81. */
  82. public $feedbackRatingStar;
  83. /**
  84. * The aggregate feedback score of the seller.
  85. *
  86. * A seller's feedback score is their net positive feedback minus their net
  87. * negative feedback. Feedback scores are a quantitative expression of the
  88. * desirability of dealing with a seller in a transaction.
  89. *
  90. * @var integer
  91. */
  92. public $feedbackScore;
  93. /**
  94. * The percentage value of a user's positive feedback (their positive
  95. * feedbackScore divided by their total positive plus negative feedback).
  96. *
  97. * @var float
  98. */
  99. public $positiveFeedbackPercent;
  100. /**
  101. * The seller's eBay user name; a unique value.
  102. *
  103. * @var string
  104. */
  105. public $sellerUserName;
  106. /**
  107. * Indicates whether the seller of the item is top-rated.
  108. *
  109. * A top-rated seller:
  110. * - Consistently receives highest buyers' ratings
  111. * - Ships items quickly
  112. * - Has earned a track record of excellent service
  113. *
  114. * eBay regularly reviews the performance of these sellers to confirm they
  115. * continue to meet the program's requirements.
  116. *
  117. * This field is returned for the following sites only: US (EBAY-US), Motors
  118. * (EBAY-MOTOR), DE (EBAY-DE), AT (EBAY-AT), and CH (EBAY-CH).
  119. *
  120. * @var boolean
  121. */
  122. public $topRatedSeller;
  123. /**
  124. * @return void
  125. */
  126. protected function _init()
  127. {
  128. parent::_init();
  129. $ns = Zend_Service_Ebay_Finding::XMLNS_FINDING;
  130. $this->feedbackRatingStar = $this->_query(".//$ns:feedbackRatingStar[1]", 'string');
  131. $this->feedbackScore = $this->_query(".//$ns:feedbackScore[1]", 'integer');
  132. $this->positiveFeedbackPercent = $this->_query(".//$ns:positiveFeedbackPercent[1]", 'float');
  133. $this->sellerUserName = $this->_query(".//$ns:sellerUserName[1]", 'string');
  134. $this->topRatedSeller = $this->_query(".//$ns:topRatedSeller[1]", 'boolean');
  135. }
  136. }