* 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 ASIN Action ***********************************************************************/ // @TODO: set request. Action can be passed as GetLowestOfferListingsForASIN $request = new GetLowestOfferListingsForASINRequest(); $request->setSellerId(MERCHANT_ID); // object or array of parameters invokeGetLowestOfferListingsForASIN($service, $request); /** * Get Get Lowest Offer Listings For ASIN 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 GetLowestOfferListingsForASIN or array of parameters */ function invokeGetLowestOfferListingsForASIN(MwsProductsInterface $service, $request) { try { $response = $service->GetLowestOfferListingsForASIN($request);
/** * Get Lowest Offer Listings For ASIN * Gets some of the lowest prices based on the product identified by the given * MarketplaceId and ASIN. * * @param mixed $request array of parameters for GetLowestOfferListingsForASIN request or GetLowestOfferListingsForASIN object itself * * @see GetLowestOfferListingsForASINRequest * @return Model\GetLowestOfferListingsForASINResponse * * @throws MwsProductsException */ public function getLowestOfferListingsForASIN($request) { if (!$request instanceof Model\GetLowestOfferListingsForASINRequest) { $request = new Model\GetLowestOfferListingsForASINRequest($request); } $parameters = $request->toQueryParameterArray(); $parameters['Action'] = 'GetLowestOfferListingsForASIN'; $httpResponse = $this->_invoke($parameters); $response = Model\GetLowestOfferListingsForASINResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }