* 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 My Price For ASIN Action ***********************************************************************/ // @TODO: set request. Action can be passed as GetMyPriceForASIN $request = new GetMyPriceForASINRequest(); $request->setSellerId(MERCHANT_ID); // object or array of parameters invokeGetMyPriceForASIN($service, $request); /** * Get Get My Price 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 GetMyPriceForASIN or array of parameters */ function invokeGetMyPriceForASIN(MwsProductsInterface $service, $request) { try { $response = $service->GetMyPriceForASIN($request);
/** * Get My Price For ASIN * <!-- Wrong doc in current code --> * * @param mixed $request array of parameters for GetMyPriceForASIN request or GetMyPriceForASIN object itself * * @see GetMyPriceForASINRequest * @return Model\GetMyPriceForASINResponse * * @throws MwsProductsException */ public function getMyPriceForASIN($request) { if (!$request instanceof Model\GetMyPriceForASINRequest) { $request = new Model\GetMyPriceForASINRequest($request); } $parameters = $request->toQueryParameterArray(); $parameters['Action'] = 'GetMyPriceForASIN'; $httpResponse = $this->_invoke($parameters); $response = Model\GetMyPriceForASINResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }