* Uncomment to try out Mock Service that simulates FBAInboundServiceMWS * responses without calling FBAInboundServiceMWS service. * * Responses are loaded from local XML files. You can tweak XML files to * experiment with various outputs during development * * XML files available under FBAInboundServiceMWS/Mock tree * ***********************************************************************/ // $service = new FBAInboundServiceMWS_Mock(); /************************************************************************ * Setup request parameters and uncomment invoke to try out * sample for Get Preorder Info Action ***********************************************************************/ // @TODO: set request. Action can be passed as FBAInboundServiceMWS_Model_GetPreorderInfo $request = new FBAInboundServiceMWS_Model_GetPreorderInfoRequest(); $request->setSellerId(MERCHANT_ID); // object or array of parameters invokeGetPreorderInfo($service, $request); /** * Get Get Preorder Info Action Sample * Gets competitive pricing and related information for a product identified by * the MarketplaceId and ASIN. * * @param FBAInboundServiceMWS_Interface $service instance of FBAInboundServiceMWS_Interface * @param mixed $request FBAInboundServiceMWS_Model_GetPreorderInfo or array of parameters */ function invokeGetPreorderInfo(FBAInboundServiceMWS_Interface $service, $request) { try { $response = $service->GetPreorderInfo($request);
/** * Get Preorder Info * Given a shipment id. as input, based on the release date of the items in the * shipment, this API returns the suggested need By Date that the shipment items * must reach Amazon FC to successfully fulfill Pre-Orders without any promise * breaks. * This API also returns the confirmed Fullfillable date. All items in the * shipment that have a release date on or after this date would have the * pre-order buy box show up on the detail page if this shipment is marked as a * pre-orderable. * * @param mixed $request array of parameters for FBAInboundServiceMWS_Model_GetPreorderInfo request or FBAInboundServiceMWS_Model_GetPreorderInfo object itself * @see FBAInboundServiceMWS_Model_GetPreorderInfoRequest * @return FBAInboundServiceMWS_Model_GetPreorderInfoResponse * * @throws FBAInboundServiceMWS_Exception */ public function getPreorderInfo($request) { if (!$request instanceof FBAInboundServiceMWS_Model_GetPreorderInfoRequest) { require_once dirname(__FILE__) . '/Model/GetPreorderInfoRequest.php'; $request = new FBAInboundServiceMWS_Model_GetPreorderInfoRequest($request); } $parameters = $request->toQueryParameterArray(); $parameters['Action'] = 'GetPreorderInfo'; $httpResponse = $this->_invoke($parameters); require_once dirname(__FILE__) . '/Model/GetPreorderInfoResponse.php'; $response = FBAInboundServiceMWS_Model_GetPreorderInfoResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }