public function listSubscriptions() { $request = new \MWSSubscriptionsService_Model_ListSubscriptionsInput(); $request->setSellerId($this->config->getMerchantId()); $request->setMarketplaceId($this->config->getMarketPlaceId()); $response = $this->service->ListSubscriptions($request); //echo $this->debugResponse($response); /* @var \MWSSubscriptionsService_Model_ListSubscriptionsResult $result */ $result = $response->getListSubscriptionsResult(); /* @var \MWSSubscriptionsService_Model_SubscriptionList $subscriptionList */ $subscriptionList = $result->getSubscriptionList(); $destinationArray = array(); /* @var \MWSSubscriptionsService_Model_Subscription $subscription */ foreach ($subscriptionList->getmember() as $subscription) { /* @var \MWSSubscriptionsService_Model_Destination $destination */ $destination = $subscription->getDestination(); //echo $destination->getDeliveryChannel(); //echo $subscription->getIsEnabled(); $destinationArray[] = $this->getDestinationLink($destination); } return $destinationArray; }
* 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 List Subscriptions Action ***********************************************************************/ // @TODO: set request. Action can be passed as MWSSubscriptionsService_Model_ListSubscriptions $request = new MWSSubscriptionsService_Model_ListSubscriptionsInput(); $request->setSellerId(MERCHANT_ID); // object or array of parameters invokeListSubscriptions($service, $request); /** * Get List Subscriptions 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_ListSubscriptions or array of parameters */ function invokeListSubscriptions(MWSSubscriptionsService_Interface $service, $request) { try { $response = $service->ListSubscriptions($request); echo "Service Response\n";