* Uncomment to try out Mock Service that simulates MarketplaceWebServiceProducts
 * responses without calling MarketplaceWebServiceProducts service.
 *
 * Responses are loaded from local XML files. You can tweak XML files to
 * experiment with various outputs during development
 *
 * XML files available under MarketplaceWebServiceProducts/Mock tree
 *
 ***********************************************************************/
// $service = new MwsProductsMock();
/************************************************************************
 * Setup request parameters and uncomment invoke to try out
 * sample for Get Lowest Offer Listings For SKU Action
 ***********************************************************************/
// @TODO: set request. Action can be passed as GetLowestOfferListingsForSKU
$request = new GetLowestOfferListingsForSKURequest();
$request->setSellerId(MERCHANT_ID);
// object or array of parameters
invokeGetLowestOfferListingsForSKU($service, $request);
/**
 * Get Get Lowest Offer Listings For SKU Action Sample
 * Gets competitive pricing and related information for a product identified by
 * the MarketplaceId and ASIN.
 *
 * @param MwsProductsInterface $service instance of MwsProductsInterface
 * @param mixed                                   $request GetLowestOfferListingsForSKU or array of parameters
 */
function invokeGetLowestOfferListingsForSKU(MwsProductsInterface $service, $request)
{
    try {
        $response = $service->GetLowestOfferListingsForSKU($request);
Example #2
0
 /**
  * Get Lowest Offer Listings For SKU
  * Gets some of the lowest prices based on the product identified by the given
  * SellerId and SKU.
  *
  * @param mixed $request array of parameters for GetLowestOfferListingsForSKU request or GetLowestOfferListingsForSKU object itself
  *
  * @see GetLowestOfferListingsForSKURequest
  * @return Model\GetLowestOfferListingsForSKUResponse
  *
  * @throws MwsProductsException
  */
 public function getLowestOfferListingsForSKU($request)
 {
     if (!$request instanceof Model\GetLowestOfferListingsForSKURequest) {
         $request = new Model\GetLowestOfferListingsForSKURequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'GetLowestOfferListingsForSKU';
     $httpResponse = $this->_invoke($parameters);
     $response = Model\GetLowestOfferListingsForSKUResponse::fromXML($httpResponse['ResponseBody']);
     $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
     return $response;
 }