/** * List Carts By Next Token * Returns the next page of results based on the next token given from a previous call to * ListCarts or ListCartsByNextToken. The output includes a next token * that can be used to obtain the next page of results, if there are any. * * @param mixed $request array of parameters for MWSCartService_Model_ListCartsByNextToken request or MWSCartService_Model_ListCartsByNextToken object itself * @see MWSCartService_Model_ListCartsByNextTokenRequest * @return MWSCartService_Model_ListCartsByNextTokenResponse * * @throws MWSCartService_Exception */ public function listCartsByNextToken($request) { if (!$request instanceof MWSCartService_Model_ListCartsByNextTokenRequest) { require_once dirname(__FILE__) . '/Model/ListCartsByNextTokenRequest.php'; $request = new MWSCartService_Model_ListCartsByNextTokenRequest($request); } $parameters = $request->toQueryParameterArray(); $parameters['Action'] = 'ListCartsByNextToken'; $httpResponse = $this->_invoke($parameters); require_once dirname(__FILE__) . '/Model/ListCartsByNextTokenResponse.php'; $response = MWSCartService_Model_ListCartsByNextTokenResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }
* Uncomment to try out Mock Service that simulates MWSCartService * responses without calling MWSCartService service. * * Responses are loaded from local XML files. You can tweak XML files to * experiment with various outputs during development * * XML files available under MWSCartService/Mock tree * ***********************************************************************/ // $service = new MWSCartService_Mock(); /************************************************************************ * Setup request parameters and uncomment invoke to try out * sample for List Carts By Next Token Action ***********************************************************************/ // @TODO: set request. Action can be passed as MWSCartService_Model_ListCartsByNextToken $request = new MWSCartService_Model_ListCartsByNextTokenRequest(); $request->setSellerId(MERCHANT_ID); // object or array of parameters invokeListCartsByNextToken($service, $request); /** * Get List Carts By Next Token Action Sample * Gets competitive pricing and related information for a product identified by * the MarketplaceId and ASIN. * * @param MWSCartService_Interface $service instance of MWSCartService_Interface * @param mixed $request MWSCartService_Model_ListCartsByNextToken or array of parameters */ function invokeListCartsByNextToken(MWSCartService_Interface $service, $request) { try { $response = $service->ListCartsByNextToken($request);