public function sendTestMessageToDestination($sqsUrl) { $request = new \MWSSubscriptionsService_Model_SendTestNotificationToDestinationInput(); $request->setSellerId($this->config->getMerchantId()); $request->setMarketplaceId($this->config->getMarketPlaceId()); $request->setDestination($this->createDestination($sqsUrl)); $response = $this->service->SendTestNotificationToDestination($request); return $response; }
/** * Send Test Notification To Destination * Send a test Notification to the specified destination. * * @param mixed $request array of parameters for MWSSubscriptionsService_Model_SendTestNotificationToDestination request or MWSSubscriptionsService_Model_SendTestNotificationToDestination object itself * @see MWSSubscriptionsService_Model_SendTestNotificationToDestinationInput * @return MWSSubscriptionsService_Model_SendTestNotificationToDestinationResponse * * @throws MWSSubscriptionsService_Exception */ public function sendTestNotificationToDestination($request) { if (!$request instanceof MWSSubscriptionsService_Model_SendTestNotificationToDestinationInput) { require_once dirname(__FILE__) . '/Model/SendTestNotificationToDestinationInput.php'; $request = new MWSSubscriptionsService_Model_SendTestNotificationToDestinationInput($request); } $parameters = $request->toQueryParameterArray(); $parameters['Action'] = 'SendTestNotificationToDestination'; $httpResponse = $this->_invoke($parameters); require_once dirname(__FILE__) . '/Model/SendTestNotificationToDestinationResponse.php'; $response = MWSSubscriptionsService_Model_SendTestNotificationToDestinationResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
* Uncomment to try out Mock Service that simulates MWSSubscriptionsService * responses without calling MWSSubscriptionsService service. * * Responses are loaded from local XML files. You can tweak XML files to * experiment with various outputs during development * * XML files available under MWSSubscriptionsService/Mock tree * ***********************************************************************/ // $service = new MWSSubscriptionsService_Mock(); /************************************************************************ * Setup request parameters and uncomment invoke to try out * sample for Send Test Notification To Destination Action ***********************************************************************/ // @TODO: set request. Action can be passed as MWSSubscriptionsService_Model_SendTestNotificationToDestination $request = new MWSSubscriptionsService_Model_SendTestNotificationToDestinationInput(); $request->setSellerId(MERCHANT_ID); // object or array of parameters invokeSendTestNotificationToDestination($service, $request); /** * Get Send Test Notification To Destination Action Sample * Gets competitive pricing and related information for a product identified by * the MarketplaceId and ASIN. * * @param MWSSubscriptionsService_Interface $service instance of MWSSubscriptionsService_Interface * @param mixed $request MWSSubscriptionsService_Model_SendTestNotificationToDestination or array of parameters */ function invokeSendTestNotificationToDestination(MWSSubscriptionsService_Interface $service, $request) { try { $response = $service->SendTestNotificationToDestination($request);