import v1.1.0_beta1 | 2009-08-21
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
* @subpackage Amazon
|
||||
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Offer.php 8064 2008-02-16 10:58:39Z thomas $
|
||||
* @version $Id: Offer.php 14534 2009-03-30 11:14:53Z yoshida@zend.co.jp $
|
||||
*/
|
||||
|
||||
|
||||
@ -31,6 +31,46 @@
|
||||
*/
|
||||
class Zend_Service_Amazon_Offer
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $MerchantId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $GlancePage;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $Condition;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $OfferListingId;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $Price;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $CurrencyCode;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $Availability;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
public $IsEligibleForSuperSaverShipping = false;
|
||||
|
||||
/**
|
||||
* Parse the given Offer element
|
||||
*
|
||||
@ -47,7 +87,10 @@ class Zend_Service_Amazon_Offer
|
||||
$this->OfferListingId = (string) $xpath->query('./az:OfferListing/az:OfferListingId/text()', $dom)->item(0)->data;
|
||||
$this->Price = (int) $xpath->query('./az:OfferListing/az:Price/az:Amount/text()', $dom)->item(0)->data;
|
||||
$this->CurrencyCode = (string) $xpath->query('./az:OfferListing/az:Price/az:CurrencyCode/text()', $dom)->item(0)->data;
|
||||
$this->Availability = (string) $xpath->query('./az:OfferListing/az:Availability/text()', $dom)->item(0)->data;
|
||||
$availability = $xpath->query('./az:OfferListing/az:Availability/text()', $dom)->item(0);
|
||||
if($availability instanceof DOMText) {
|
||||
$this->Availability = (string) $availability->data;
|
||||
}
|
||||
$result = $xpath->query('./az:OfferListing/az:IsEligibleForSuperSaverShipping/text()', $dom);
|
||||
if ($result->length >= 1) {
|
||||
$this->IsEligibleForSuperSaverShipping = (bool) $result->item(0)->data;
|
||||
|
Reference in New Issue
Block a user