/** * Get Service Status * Request to poll the system for availability. * Status is one of GREEN, RED representing: * GREEN: The service section is operating normally. * RED: The service section disruption. * * @param mixed $request array of parameters for MwsFbaOutboundServiceModel_GetServiceStatus request or MwsFbaOutboundServiceModel_GetServiceStatus object itself * @see MwsFbaOutboundServiceModel_GetServiceStatusRequest * @return MwsFbaOutboundServiceModel_GetServiceStatusResponse * * @throws FbaOutbound_Exception */ public function getServiceStatus($request) { if (!$request instanceof Model\MwsFbaOutboundServiceModel_GetServiceStatusRequest) { //require_once (dirname(__FILE__) . '/Model/GetServiceStatusRequest.php'); $request = new MwsFbaOutboundServiceModel_GetServiceStatusRequest($request); } $parameters = $request->toQueryParameterArray(); $parameters['Action'] = 'GetServiceStatus'; $httpResponse = $this->_invoke($parameters); //require_once (dirname(__FILE__) . '/Model/GetServiceStatusResponse.php'); $response = Model\MwsFbaOutboundServiceModel_GetServiceStatusResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
* Uncomment to try out Mock Service that simulates FBAOutboundServiceMWS * responses without calling FBAOutboundServiceMWS service. * * Responses are loaded from local XML files. You can tweak XML files to * experiment with various outputs during development * * XML files available under FBAOutboundServiceMWS/Mock tree * ***********************************************************************/ // $service = new FBAOutboundServiceMWS_Mock(); /************************************************************************ * Setup request parameters and uncomment invoke to try out * sample for Get Service Status Action ***********************************************************************/ // @TODO: set request. Action can be passed as MwsFbaOutboundServiceModel_GetServiceStatus $request = new MwsFbaOutboundServiceModel_GetServiceStatusRequest(); $request->setSellerId(MERCHANT_ID); // object or array of parameters invokeGetServiceStatus($service, $request); /** * Get Get Service Status Action Sample * Gets competitive pricing and related information for a product identified by * the MarketplaceId and ASIN. * * @param FBAOutboundServiceMWS_Interface $service instance of FBAOutboundServiceMWS_Interface * @param mixed $request MwsFbaOutboundServiceModel_GetServiceStatus or array of parameters */ function invokeGetServiceStatus(FBAOutboundServiceMWS_Interface $service, $request) { try { $response = $service->GetServiceStatus($request);