Esempio n. 1
0
 /**
  * Get Service Status
  * Returns the service status of a particular MWS API section. The operation
  *         takes no input.
  *         All API sections within the API are required to implement this operation.
  *
  * @param mixed $request array of parameters for MarketplaceWebServiceSellers_Model_GetServiceStatus request or MarketplaceWebServiceSellers_Model_GetServiceStatus object itself
  * @see MarketplaceWebServiceSellers_Model_GetServiceStatusRequest
  * @return MarketplaceWebServiceSellers_Model_GetServiceStatusResponse
  *
  * @throws MarketplaceWebServiceSellers_Exception
  */
 public function getServiceStatus($request)
 {
     if (!$request instanceof MarketplaceWebServiceSellers_Model_GetServiceStatusRequest) {
         $request = new MarketplaceWebServiceSellers_Model_GetServiceStatusRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'GetServiceStatus';
     $httpResponse = $this->_invoke($parameters);
     $response = MarketplaceWebServiceSellers_Model_GetServiceStatusResponse::fromXML($httpResponse['ResponseBody']);
     $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
     return $response;
 }
 * Uncomment to try out Mock Service that simulates MarketplaceWebServiceSellers
 * responses without calling MarketplaceWebServiceSellers service.
 *
 * Responses are loaded from local XML files. You can tweak XML files to
 * experiment with various outputs during development
 *
 * XML files available under MarketplaceWebServiceSellers/Mock tree
 *
 ***********************************************************************/
// $service = new MarketplaceWebServiceSellers_Mock();
/************************************************************************
 * Setup request parameters and uncomment invoke to try out
 * sample for Get Service Status Action
 ***********************************************************************/
// @TODO: set request. Action can be passed as MarketplaceWebServiceSellers_Model_GetServiceStatus
$request = new MarketplaceWebServiceSellers_Model_GetServiceStatusRequest();
$request->setSellerId(MERCHANT_ID);
// object or array of parameters
invokeGetServiceStatus($service, $request);
/**
 * Get Get Service Status Action Sample
 * Gets competitive pricing and related information for a product identified by
 * the MarketplaceId and ASIN.
 *
 * @param MarketplaceWebServiceSellers_Interface $service instance of MarketplaceWebServiceSellers_Interface
 * @param mixed $request MarketplaceWebServiceSellers_Model_GetServiceStatus or array of parameters
 */
function invokeGetServiceStatus(MarketplaceWebServiceSellers_Interface $service, $request)
{
    try {
        $response = $service->GetServiceStatus($request);