/**
  * Get Carts
  * Returns cart information for
  *         one or more customers, given a seller-directed customer ID.
  *         There is a maximum number of customer IDs supported per request.
  *         See service documentation for that limit.
  *
  * @param mixed $request array of parameters for Cart_Model_GetCarts request or Cart_Model_GetCarts object itself
  * @see Cart_Model_GetCartsRequest
  * @return Cart_Model_GetCartsResponse
  *
  * @throws Cart_Exception
  */
 public function getCarts($request)
 {
     if (!$request instanceof Model\Cart_Model_GetCartsRequest) {
         //            //require_once (dirname(__FILE__) . '/Model/GetCartsRequest.php');
         $request = new Cart_Model_GetCartsRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'GetCarts';
     $httpResponse = $this->_invoke($parameters);
     //        //require_once (dirname(__FILE__) . '/Model/GetCartsResponse.php');
     $response = Model\Cart_Model_GetCartsResponse::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 Get Carts Action
 ***********************************************************************/
// @TODO: set request. Action can be passed as Cart_Model_GetCarts
$request = new Cart_Model_GetCartsRequest();
$request->setSellerId(MERCHANT_ID);
// object or array of parameters
invokeGetCarts($service, $request);
/**
 * Get Get Carts 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 Cart_Model_GetCarts or array of parameters
 */
function invokeGetCarts(MWSCartService_Interface $service, $request)
{
    try {
        $response = $service->GetCarts($request);