/** * Get My Fees Estimate * Retrieves the fees estimate for the * products identified by the given * ASIN/SKU list. * * @param mixed $request array of parameters for MarketplaceWebServiceProducts_Model_GetMyFeesEstimate request or MarketplaceWebServiceProducts_Model_GetMyFeesEstimate object itself * @see MarketplaceWebServiceProducts_Model_GetMyFeesEstimateRequest * @return MarketplaceWebServiceProducts_Model_GetMyFeesEstimateResponse * * @throws MarketplaceWebServiceProducts_Exception */ public function getMyFeesEstimate($request) { if (!$request instanceof MarketplaceWebServiceProducts_Model_GetMyFeesEstimateRequest) { require_once dirname(__FILE__) . '/Model/GetMyFeesEstimateRequest.php'; $request = new MarketplaceWebServiceProducts_Model_GetMyFeesEstimateRequest($request); } $parameters = $request->toQueryParameterArray(); $parameters['Action'] = 'GetMyFeesEstimate'; $httpResponse = $this->_invoke($parameters); require_once dirname(__FILE__) . '/Model/GetMyFeesEstimateResponse.php'; $response = MarketplaceWebServiceProducts_Model_GetMyFeesEstimateResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
* 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 MarketplaceWebServiceProducts_Mock(); /************************************************************************ * Setup request parameters and uncomment invoke to try out * sample for Get My Fees Estimate Action ***********************************************************************/ // @TODO: set request. Action can be passed as MarketplaceWebServiceProducts_Model_GetMyFeesEstimate $request = new MarketplaceWebServiceProducts_Model_GetMyFeesEstimateRequest(); $request->setSellerId(MERCHANT_ID); // object or array of parameters invokeGetMyFeesEstimate($service, $request); /** * Get Get My Fees Estimate Action Sample * Gets competitive pricing and related information for a product identified by * the MarketplaceId and ASIN. * * @param MarketplaceWebServiceProducts_Interface $service instance of MarketplaceWebServiceProducts_Interface * @param mixed $request MarketplaceWebServiceProducts_Model_GetMyFeesEstimate or array of parameters */ function invokeGetMyFeesEstimate(MarketplaceWebServiceProducts_Interface $service, $request) { try { $response = $service->GetMyFeesEstimate($request);