Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lowest priced offers classes #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/MarketplaceWebServiceProducts/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,32 @@ public function getLowestOfferListingsForASIN($request)
}


/**
* Get Lowest Offer Priced For ASIN
* Returns lowest priced offers for a single product, based on ASIN.
*
* @param mixed $request array of parameters for MarketplaceWebServiceProducts_Model_GetLowestPricedOffersForASIN request or MarketplaceWebServiceProducts_Model_GetLowestPricedOffersForASIN object itself
* @see MarketplaceWebServiceProducts_Model_GetLowestPricedOffersForASINRequest
* @return MarketplaceWebServiceProducts_Model_GetLowestPricedOffersForASINResponse
*
* @throws MarketplaceWebServiceProducts_Exception
*/
public function getLowestPricedOffersForASIN($request)
{
if (!($request instanceof MarketplaceWebServiceProducts_Model_GetLowestPricedOffersForASINRequest)) {
$request = new MarketplaceWebServiceProducts_Model_GetLowestPricedOffersForASINRequest($request);
}
$parameters = $request->toQueryParameterArray();
$parameters['Action'] = 'GetLowestPricedOffersForASIN';
$httpResponse = $this->_invoke($parameters);

$response = MarketplaceWebServiceProducts_Model_GetLowestPricedOffersForASINResponse
::fromXML($httpResponse['ResponseBody']);
$response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
return $response;
}


/**
* Get Lowest Offer Listings For SKU
* Gets some of the lowest prices based on the product identified by the given
Expand Down
1 change: 1 addition & 0 deletions src/MarketplaceWebServiceProducts/Model/ASINIdentifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public function __construct($data = null)
$this->_fields = array(
'MarketplaceId' => array('FieldValue' => null, 'FieldType' => 'string'),
'ASIN' => array('FieldValue' => null, 'FieldType' => 'string'),
'ItemCondition' => array('FieldValue' => null, 'FieldType' => 'string'),
);
parent::__construct($data);
}
Expand Down
100 changes: 100 additions & 0 deletions src/MarketplaceWebServiceProducts/Model/BuyBoxPrice.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?php
/*******************************************************************************
* Copyright 2009-2014 Amazon Services. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
*
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at: http://aws.amazon.com/apache2.0
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*******************************************************************************
* PHP Version 5
* @category Amazon
* @package Marketplace Web Service Products
* @version 2011-10-01
* Library Version: 2014-10-20
* Generated: Fri Oct 17 17:59:56 GMT 2014
*/

/**
* MarketplaceWebServiceProducts_Model_BuyBoxPrice
*
* Properties:
* <ul>
*
* <li>LandedPrice: MarketplaceWebServiceProducts_Model_LandedPrice</li>
* <li>ListingPrice: MarketplaceWebServiceProducts_Model_LandedPrice</li>
* <li>Shipping: MarketplaceWebServiceProducts_Model_LandedPrice</li>
* <li>condition: string</li>
*
* </ul>
*/
class MarketplaceWebServiceProducts_Model_BuyBoxPrice extends MarketplaceWebServiceProducts_Model
{
public function __construct($data = null)
{
$this->_fields = array(
'LandedPrice' => array(
'FieldValue' => null,
'FieldType' => 'MarketplaceWebServiceProducts_Model_LandedPrice'
),
'ListingPrice' => array(
'FieldValue' => null,
'FieldType' => 'MarketplaceWebServiceProducts_Model_LandedPrice'
),
'Shipping' => array(
'FieldValue' => null,
'FieldType' => 'MarketplaceWebServiceProducts_Model_LandedPrice'
),
'condition' => array('FieldValue' => null, 'FieldType' => '@string'),
);
parent::__construct($data);
}

/**
* Get the value of the condition property.
*
* @return String condition.
*/
public function getcondition()
{
return $this->_fields['condition']['FieldValue'];
}

/**
* Set the value of the condition property.
*
* @param string $value condition
* @return $this This instance
*/
public function setcondition($value)
{
$this->_fields['condition']['FieldValue'] = $value;
return $this;
}

/**
* Check to see if condition is set.
*
* @return true if condition is set.
*/
public function isSetcondition()
{
return !is_null($this->_fields['condition']['FieldValue']);
}

/**
* Set the value of condition, return this.
*
* @param condition
* The new value to set.
*
* @return $this This instance.
*/
public function withcondition($value)
{
$this->setcondition($value);
return $this;
}
}
42 changes: 42 additions & 0 deletions src/MarketplaceWebServiceProducts/Model/BuyBoxPriceList.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php
/*******************************************************************************
* Copyright 2009-2014 Amazon Services. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
*
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at: http://aws.amazon.com/apache2.0
* This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*******************************************************************************
* PHP Version 5
* @category Amazon
* @package Marketplace Web Service Products
* @version 2011-10-01
* Library Version: 2014-10-20
* Generated: Fri Oct 17 17:59:56 GMT 2014
*/

/**
* MarketplaceWebServiceProducts_Model_BuyBoxPriceList
*
* Properties:
* <ul>
*
* <li>OfferCount: MarketplaceWebServiceProducts_Model_BuyBoxPrice</li>
*
* </ul>
*/
class MarketplaceWebServiceProducts_Model_BuyBoxPriceList extends MarketplaceWebServiceProducts_Model
{
public function __construct($data = null)
{
$this->_fields = array(
'BuyBoxPrice' => array(
'FieldValue' => array(),
'FieldType' => array('MarketplaceWebServiceProducts_Model_BuyBoxPrice')
),
);
parent::__construct($data);
}
}
Loading