|
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: ListingInfo.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_ListingInfo extends Zend_Service_Ebay_Finding_Abstract |
|
37 { |
|
38 /** |
|
39 * Shows whether or not the seller will accept a best offer for the |
|
40 * associated item. |
|
41 * |
|
42 * Best Offer allows a buyer to make a lower-priced binding offer on a fixed |
|
43 * price item. Buyers cannot see how many offers have been made (only the |
|
44 * seller can see this information). To make a best offer on a listing, use |
|
45 * the eBay Web site. |
|
46 * |
|
47 * @var boolean |
|
48 */ |
|
49 public $bestOfferEnabled; |
|
50 |
|
51 /** |
|
52 * Used with competitive-bid auctions, the associated item includes a Buy It |
|
53 * Now option if this value returns true. |
|
54 * |
|
55 * Buy It Now lets a user purchase the item at a fixed price, effectively |
|
56 * ending the auction. On most sites, the Buy It Now option is removed (and |
|
57 * this value returns false) once a valid bid is made on the associated item |
|
58 * (a valid bid could be a bid above the reserve price). |
|
59 * |
|
60 * @var boolean |
|
61 */ |
|
62 public $buyItNowAvailable; |
|
63 |
|
64 /** |
|
65 * The Buy It Now Price of the item (if any), in the currency of the site on |
|
66 * which the item was listed. |
|
67 * |
|
68 * You can use this field to determine if the item was originally listed |
|
69 * with Buy It Now, even if the Buy It Now option is no longer available for |
|
70 * the item. |
|
71 * |
|
72 * For Basic Fixed-Price (FixedPrice), Store Inventory (StoreInventory), and |
|
73 * Ad Format (AdFormat) listings, currentPrice is the current fixed price. |
|
74 * |
|
75 * Only returned if an item was listed with Buy It Now. |
|
76 * |
|
77 * @var float |
|
78 */ |
|
79 public $buyItNowPrice; |
|
80 |
|
81 /** |
|
82 * The listing's Buy It Now Price (if any), converted into the currency of |
|
83 * the site to which you sent your search request. |
|
84 * |
|
85 * For active items, refresh this value every 24 hours to pick up changes in |
|
86 * conversion rates (if this value has been converted). |
|
87 * |
|
88 * Price fields are returned as doubles, not necessarily in the traditional |
|
89 * monetary format of the site's country. For example, a US Dollar value |
|
90 * might be returned as 3.880001 instead of 3.88. |
|
91 * |
|
92 * Only returned if an item was listed with Buy It Now. |
|
93 * |
|
94 * @var float |
|
95 */ |
|
96 public $convertedBuyItNowPrice; |
|
97 |
|
98 /** |
|
99 * Time stamp specifying when the listing is scheduled to end, or the actual |
|
100 * end time if the item listing has ended. |
|
101 * |
|
102 * This value is returned in GMT, the ISO 8601 date and time format |
|
103 * (YYYY-MM-DDTHH:MM:SS.SSSZ). See the "dateTime" type for information about |
|
104 * the time format, and for details on converting to and from the GMT time |
|
105 * zone. |
|
106 * |
|
107 * @var integer |
|
108 */ |
|
109 public $endTime; |
|
110 |
|
111 /** |
|
112 * If true, a generic gift icon displays next the listing's title in search |
|
113 * and browse pages. |
|
114 * |
|
115 * @var boolean |
|
116 */ |
|
117 public $gift; |
|
118 |
|
119 /** |
|
120 * The format of the listing, such as online auction, fixed price, or |
|
121 * advertisement. |
|
122 * |
|
123 * Applicable values: |
|
124 * |
|
125 * AdFormat |
|
126 * Advertisement to solicit inquiries on listings such as real estate. |
|
127 * Permits no bidding on that item, service, or property. To express |
|
128 * interest, a buyer fills out a contact form that eBay forwards to the |
|
129 * seller as a lead. This format does not enable buyers and sellers to |
|
130 * transact online through eBay and eBay Feedback is not available for |
|
131 * ad format listings. |
|
132 * |
|
133 * Auction |
|
134 * Competitive-bid online auction format. Buyers engage in competitive |
|
135 * bidding, although Buy It Now may be offered as long as no valid bids |
|
136 * have been placed. Online auctions are listed on eBay.com; they can |
|
137 * also be listed in a seller's eBay Store if the seller is a Store |
|
138 * owner. |
|
139 * |
|
140 * AuctionWithBIN |
|
141 * Same as Auction format, but Buy It Now is enabled. AuctionWithBIN |
|
142 * changes to Auction if a valid bid has been placed on the item. Valid |
|
143 * bids include bids that are equal to or above any specified reserve |
|
144 * price. |
|
145 * |
|
146 * Classified |
|
147 * Classified Ads connect buyers and sellers, who then complete the sale |
|
148 * outside of eBay. This format does not enable buyers and sellers to |
|
149 * transact online through eBay and eBay Feedback is not available for |
|
150 * these listing types. |
|
151 * |
|
152 * FixedPrice |
|
153 * A fixed-price listing. Auction-style bidding is not allowed. On some |
|
154 * sites, this auction format is also known as "Buy It Now Only" (not to |
|
155 * be confused with the Buy It Now option available with |
|
156 * competitive-bidding auctions). Fixed-price listings appear on |
|
157 * eBay.com; they can also be listed in a seller's eBay Store if the |
|
158 * seller is a Store owner. |
|
159 * |
|
160 * StoreInventory |
|
161 * A fixed-price format for eBay Store sellers. Store Inventory listings |
|
162 * appear after other listings in regular browse and search item |
|
163 * listings on eBay. Store items have a lower Insertion Fee and longer |
|
164 * listing durations. This selling type can only be specified by sellers |
|
165 * who have an eBay Store. Store Inventory listings are listed on |
|
166 * eBay.com as well as in the seller's eBay Store. |
|
167 * |
|
168 * @var string |
|
169 */ |
|
170 public $listingType; |
|
171 |
|
172 /** |
|
173 * Time stamp that eBay recorded as the moment the listing was made |
|
174 * available. |
|
175 * |
|
176 * This value is returned in GMT, the ISO 8601 date and time format |
|
177 * (YYYY-MM-DDTHH:MM:SS.SSSZ). See the "dateTime" type for information about |
|
178 * the time format, and for details on converting to and from the GMT time |
|
179 * zone. Note that it is possible for startTime to be different from the |
|
180 * value returned by GetSingleItem. |
|
181 * |
|
182 * @var integer |
|
183 */ |
|
184 public $startTime; |
|
185 |
|
186 /** |
|
187 * @return void |
|
188 */ |
|
189 protected function _init() |
|
190 { |
|
191 parent::_init(); |
|
192 $ns = Zend_Service_Ebay_Finding::XMLNS_FINDING; |
|
193 |
|
194 $this->bestOfferEnabled = $this->_query(".//$ns:bestOfferEnabled[1]", 'boolean'); |
|
195 $this->buyItNowAvailable = $this->_query(".//$ns:buyItNowAvailable[1]", 'boolean'); |
|
196 $this->buyItNowPrice = $this->_query(".//$ns:buyItNowPrice[1]", 'float'); |
|
197 $this->convertedBuyItNowPrice = $this->_query(".//$ns:convertedBuyItNowPrice[1]", 'float'); |
|
198 $this->endTime = $this->_query(".//$ns:endTime[1]", 'string'); |
|
199 $this->gift = $this->_query(".//$ns:gift[1]", 'boolean'); |
|
200 $this->listingType = $this->_query(".//$ns:listingType[1]", 'string'); |
|
201 $this->startTime = $this->_query(".//$ns:startTime[1]", 'string'); |
|
202 |
|
203 $this->_attributes['buyItNowPrice'] = array( |
|
204 'currencyId' => $this->_query(".//$ns:buyItNowPrice[1]/@currencyId[1]", 'string') |
|
205 ); |
|
206 |
|
207 $this->_attributes['convertedBuyItNowPrice'] = array( |
|
208 'currencyId' => $this->_query(".//$ns:convertedBuyItNowPrice[1]/@currencyId[1]", 'string') |
|
209 ); |
|
210 } |
|
211 } |