* Uncomment to try out Mock Service that simulates MWSCustomerService * responses without calling MWSCustomerService service. * * Responses are loaded from local XML files. You can tweak XML files to * experiment with various outputs during development * * XML files available under MWSCustomerService/Mock tree * ***********************************************************************/ // $service = new MWSCustomerService_Mock(); /************************************************************************ * Setup request parameters and uncomment invoke to try out * sample for List Customers By Next Token Action ***********************************************************************/ // @TODO: set request. Action can be passed as MWSCustomerService_Model_ListCustomersByNextToken $request = new MWSCustomerService_Model_ListCustomersByNextTokenRequest(); $request->setSellerId(MERCHANT_ID); // object or array of parameters invokeListCustomersByNextToken($service, $request); /** * Get List Customers By Next Token Action Sample * Gets competitive pricing and related information for a product identified by * the MarketplaceId and ASIN. * * @param MWSCustomerService_Interface $service instance of MWSCustomerService_Interface * @param mixed $request MWSCustomerService_Model_ListCustomersByNextToken or array of parameters */ function invokeListCustomersByNextToken(MWSCustomerService_Interface $service, $request) { try { $response = $service->ListCustomersByNextToken($request);
/** * List Customers By Next Token * Returns the next page of results * based on the next token given from a previous call to * ListCustomers or ListCustomersByNextToken, plus a next token * that can be used to obtain the next page of results, if any. * * @param mixed $request array of parameters for MWSCustomerService_Model_ListCustomersByNextToken request or MWSCustomerService_Model_ListCustomersByNextToken object itself * @see MWSCustomerService_Model_ListCustomersByNextTokenRequest * @return MWSCustomerService_Model_ListCustomersByNextTokenResponse * * @throws Customer_Exception */ public function listCustomersByNextToken($request) { if (!$request instanceof Model\MWSCustomerService_Model_ListCustomersByNextTokenRequest) { //require_once (dirname(__FILE__) . '/Model/ListCustomersByNextTokenRequest.php'); $request = new MWSCustomerService_Model_ListCustomersByNextTokenRequest($request); } $parameters = $request->toQueryParameterArray(); $parameters['Action'] = 'ListCustomersByNextToken'; $httpResponse = $this->_invoke($parameters); //require_once (dirname(__FILE__) . '/Model/ListCustomersByNextTokenResponse.php'); $response = Model\MWSCustomerService_Model_ListCustomersByNextTokenResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }