Пример #1
0
 /**
  * List Financial Events By Next Token
  * If ListFinancialEvents returns a nextToken, thus indicating that there are more financial events
  *         than returned that matched the given filter criteria, ListFinancialEventsByNextToken
  *         can be used to retrieve those events using that nextToken.
  *
  * @param mixed $request array of parameters for MWSFinancesService_Model_ListFinancialEventsByNextToken request or MWSFinancesService_Model_ListFinancialEventsByNextToken object itself
  * @see MWSFinancesService_Model_ListFinancialEventsByNextTokenRequest
  * @return MWSFinancesService_Model_ListFinancialEventsByNextTokenResponse
  *
  * @throws MWSFinancesService_Exception
  */
 public function listFinancialEventsByNextToken($request)
 {
     if (!$request instanceof MWSFinancesService_Model_ListFinancialEventsByNextTokenRequest) {
         require_once dirname(__FILE__) . '/Model/ListFinancialEventsByNextTokenRequest.php';
         $request = new MWSFinancesService_Model_ListFinancialEventsByNextTokenRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'ListFinancialEventsByNextToken';
     $httpResponse = $this->_invoke($parameters);
     require_once dirname(__FILE__) . '/Model/ListFinancialEventsByNextTokenResponse.php';
     $response = MWSFinancesService_Model_ListFinancialEventsByNextTokenResponse::fromXML($httpResponse['ResponseBody']);
     $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
     return $response;
 }
 * Uncomment to try out Mock Service that simulates MWSFinancesService
 * responses without calling MWSFinancesService service.
 *
 * Responses are loaded from local XML files. You can tweak XML files to
 * experiment with various outputs during development
 *
 * XML files available under MWSFinancesService/Mock tree
 *
 ***********************************************************************/
// $service = new MWSFinancesService_Mock();
/************************************************************************
 * Setup request parameters and uncomment invoke to try out
 * sample for List Financial Events By Next Token Action
 ***********************************************************************/
// @TODO: set request. Action can be passed as MWSFinancesService_Model_ListFinancialEventsByNextToken
$request = new MWSFinancesService_Model_ListFinancialEventsByNextTokenRequest();
$request->setSellerId(MERCHANT_ID);
// object or array of parameters
invokeListFinancialEventsByNextToken($service, $request);
/**
 * Get List Financial Events By Next Token Action Sample
 * Gets competitive pricing and related information for a product identified by
 * the MarketplaceId and ASIN.
 *
 * @param MWSFinancesService_Interface $service instance of MWSFinancesService_Interface
 * @param mixed $request MWSFinancesService_Model_ListFinancialEventsByNextToken or array of parameters
 */
function invokeListFinancialEventsByNextToken(MWSFinancesService_Interface $service, $request)
{
    try {
        $response = $service->ListFinancialEventsByNextToken($request);