|
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: SellingStatus.php 22791 2010-08-04 16:11:47Z renanbr $ |
|
21 */ |
|
22 |
|
23 /** |
|
24 * @see Zend_Service_Ebay_Finding_Abstract |
|
25 */ |
|
26 require_once 'Zend/Service/Ebay/Finding/Abstract.php'; |
|
27 |
|
28 /** |
|
29 * @category Zend |
|
30 * @package Zend_Service |
|
31 * @subpackage Ebay |
|
32 * @copyright Copyright (c) 2005-2010 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 */ |
|
36 class Zend_Service_Ebay_Finding_SellingStatus extends Zend_Service_Ebay_Finding_Abstract |
|
37 { |
|
38 /** |
|
39 * The number of bids that have been placed on the item. |
|
40 * |
|
41 * @var integer |
|
42 */ |
|
43 public $bidCount; |
|
44 |
|
45 /** |
|
46 * The listing's current price converted to the currency of the site |
|
47 * specified in the find request (globalId). |
|
48 * |
|
49 * @var float |
|
50 */ |
|
51 public $convertedCurrentPrice; |
|
52 |
|
53 /** |
|
54 * The current price of the item given in the currency of the site on which |
|
55 * the item is listed. |
|
56 * |
|
57 * That is, currentPrice is returned in the original listing currency. |
|
58 * |
|
59 * For competitive-bid item listings, currentPrice is the current minimum |
|
60 * bid price if the listing has no bids, or the current high bid if the |
|
61 * listing has bids. A Buy It Now price has no effect on currentPrice. |
|
62 * |
|
63 * For Basic Fixed-Price (FixedPrice), Store Inventory (StoreInventory), and |
|
64 * Ad Format (AdFormat) listings, currentPrice is the current fixed price. |
|
65 * |
|
66 * @var float |
|
67 */ |
|
68 public $currentPrice; |
|
69 |
|
70 /** |
|
71 * Specifies the listing's status in eBay's processing workflow. |
|
72 * |
|
73 * If an item's EndTime is in the past, but there are no details about the |
|
74 * buyer or high bidder (and the user is not anonymous), you can use |
|
75 * sellingState information to determine whether eBay has finished |
|
76 * processing the listing. |
|
77 * |
|
78 * Applicable values: |
|
79 * |
|
80 * Active |
|
81 * The listing is still live. It is also possible that the auction has |
|
82 * recently ended, but eBay has not completed the final processing |
|
83 * (e.g., the high bidder is still being determined). |
|
84 * |
|
85 * Canceled |
|
86 * The listing has been canceled by either the seller or eBay. |
|
87 * |
|
88 * Ended |
|
89 * The listing has ended and eBay has completed the processing of the |
|
90 * sale (if any). |
|
91 * |
|
92 * @var string |
|
93 */ |
|
94 public $sellingState; |
|
95 |
|
96 /** |
|
97 * Time left before the listing ends. |
|
98 * |
|
99 * The duration is represented in the ISO 8601 duration format |
|
100 * (PnYnMnDTnHnMnS). For listings that have ended, the time left is PT0S |
|
101 * (zero seconds). See the "duration" type for information about this time |
|
102 * format. |
|
103 * |
|
104 * @var string |
|
105 */ |
|
106 public $timeLeft; |
|
107 |
|
108 /** |
|
109 * @return void |
|
110 */ |
|
111 protected function _init() |
|
112 { |
|
113 parent::_init(); |
|
114 $ns = Zend_Service_Ebay_Finding::XMLNS_FINDING; |
|
115 |
|
116 $this->bidCount = $this->_query(".//$ns:bidCount[1]", 'integer'); |
|
117 $this->convertedCurrentPrice = $this->_query(".//$ns:convertedCurrentPrice[1]", 'float'); |
|
118 $this->currentPrice = $this->_query(".//$ns:currentPrice[1]", 'float'); |
|
119 $this->sellingState = $this->_query(".//$ns:sellingState[1]", 'string'); |
|
120 $this->timeLeft = $this->_query(".//$ns:timeLeft[1]", 'string'); |
|
121 |
|
122 $this->_attributes['convertedCurrentPrice'] = array( |
|
123 'currencyId' => $this->_query(".//$ns:convertedCurrentPrice[1]/@currencyId[1]", 'string') |
|
124 ); |
|
125 |
|
126 $this->_attributes['currentPrice'] = array( |
|
127 'currencyId' => $this->_query(".//$ns:currentPrice[1]/@currencyId[1]", 'string') |
|
128 ); |
|
129 } |
|
130 } |