* Uncomment to try out Mock Service that simulates FBAInventoryServiceMWS
 * responses without calling FBAInventoryServiceMWS service.
 *
 * Responses are loaded from local XML files. You can tweak XML files to
 * experiment with various outputs during development
 *
 * XML files available under FBAInventoryServiceMWS/Mock tree
 *
 ***********************************************************************/
// $service = new FBAInventoryServiceMWS_Mock();
/************************************************************************
 * Setup request parameters and uncomment invoke to try out
 * sample for List Inventory Supply Action
 ***********************************************************************/
// @TODO: set request. Action can be passed as FbaInventory_Model_ListInventorySupply
$request = new FbaInventory_Model_ListInventorySupplyRequest();
$request->setSellerId(MERCHANT_ID);
// object or array of parameters
invokeListInventorySupply($service, $request);
/**
 * Get List Inventory Supply Action Sample
 * Gets competitive pricing and related information for a product identified by
 * the MarketplaceId and ASIN.
 *
 * @param FBAInventoryServiceMWS_Interface $service instance of FBAInventoryServiceMWS_Interface
 * @param mixed $request FbaInventory_Model_ListInventorySupply or array of parameters
 */
function invokeListInventorySupply(FBAInventoryServiceMWS_Interface $service, $request)
{
    try {
        $response = $service->ListInventorySupply($request);
 /**
  * List Inventory Supply
  * Get information about the supply of seller-owned inventory in
  *     Amazon's fulfillment network. "Supply" is inventory that is available
  *     for fulfilling (a.k.a. Multi-Channel Fulfillment) orders. In general
  *     this includes all sellable inventory that has been received by Amazon,
  *     that is not reserved for existing orders or for internal FC processes,
  *     and also inventory expected to be received from inbound shipments.
  * 
  *     This operation provides 2 typical usages by setting different 
  *     ListInventorySupplyRequest value:
  *     
  *     1. Set value to SellerSkus and not set value to QueryStartDateTime, 
  *     this operation will return all sellable inventory that has been received 
  *     by Amazon's fulfillment network for these SellerSkus.
  * 
  *     2. Not set value to SellerSkus and set value to QueryStartDateTime,
  *     This operation will return information about the supply of all seller-owned
  *     inventory in Amazon's fulfillment network, for inventory items that may have had
  *     recent changes in inventory levels. It provides the most efficient mechanism 
  *     for clients to maintain local copies of inventory supply data.
  * 
  *     Only 1 of these 2 parameters (SellerSkus and QueryStartDateTime) can be set value for 1 request.
  *     If both with values or neither with values, an exception will be thrown.
  * 
  *     This operation is used with ListInventorySupplyByNextToken
  *     to paginate over the resultset. Begin pagination by invoking the
  *     ListInventorySupply operation, and retrieve the first set of
  *     results. If more results are available,continuing iteratively requesting further 
  *     pages results by invoking the ListInventorySupplyByNextToken operation (each time 
  *     passing in the NextToken value from the previous result), until the returned NextToken
  *     is null, indicating no further results are available.
  *
  * @param mixed $request array of parameters for FbaInventory_Model_ListInventorySupply request or FbaInventory_Model_ListInventorySupply object itself
  * @see FbaInventory_Model_ListInventorySupplyRequest
  * @return FbaInventory_Model_ListInventorySupplyResponse
  *
  * @throws FbaInventory_Exception
  */
 public function listInventorySupply($request)
 {
     if (!$request instanceof Model\FbaInventory_Model_ListInventorySupplyRequest) {
         //require_once (dirname(__FILE__) . '/Model/ListInventorySupplyRequest.php');
         $request = new FbaInventory_Model_ListInventorySupplyRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'ListInventorySupply';
     $httpResponse = $this->_invoke($parameters);
     //require_once (dirname(__FILE__) . '/Model/ListInventorySupplyResponse.php');
     $response = Model\FbaInventory_Model_ListInventorySupplyResponse::fromXML($httpResponse['ResponseBody']);
     $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
     return $response;
 }