Exemplo n.º 1
0
 /**
  * List Inbound Shipments
  * Get the first set of inbound shipments created by a Seller according to
  * the specified shipment status or the specified shipment Id. A NextToken
  * is also returned to further iterate through the Seller's remaining
  * shipments. If a NextToken is not returned, it indicates the end-of-data.
  * At least one of ShipmentStatusList and ShipmentIdList must be passed in.
  * if both are passed in, then only shipments that match the specified
  * shipment Id and specified shipment status will be returned.
  * the LastUpdatedBefore and LastUpdatedAfter are optional, they are used
  * to filter results based on last update time of the shipment.
  *
  * @param mixed $request array of parameters for FBAInboundServiceMWS_Model_ListInboundShipments request or FBAInboundServiceMWS_Model_ListInboundShipments object itself
  * @see FBAInboundServiceMWS_Model_ListInboundShipmentsRequest
  * @return FBAInboundServiceMWS_Model_ListInboundShipmentsResponse
  *
  * @throws FBAInboundServiceMWS_Exception
  */
 public function listInboundShipments($request)
 {
     if (!$request instanceof FBAInboundServiceMWS_Model_ListInboundShipmentsRequest) {
         $request = new FBAInboundServiceMWS_Model_ListInboundShipmentsRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'ListInboundShipments';
     $httpResponse = $this->_invoke($parameters);
     $response = FBAInboundServiceMWS_Model_ListInboundShipmentsResponse::fromXML($httpResponse['ResponseBody']);
     $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
     return $response;
 }
 /**
  * List Inbound Shipments
  * Get the first set of inbound shipments created by a Seller according to 
  * the specified shipment status or the specified shipment Id. A NextToken 
  * is also returned to further iterate through the Seller's remaining 
  * shipments. If a NextToken is not returned, it indicates the end-of-data.
  * At least one of ShipmentStatusList and ShipmentIdList must be passed in. 
  * if both are passed in, then only shipments that match the specified 
  * shipment Id and specified shipment status will be returned.
  * the LastUpdatedBefore and LastUpdatedAfter are optional, they are used 
  * to filter results based on last update time of the shipment.
  *
  * @param mixed $request array of parameters for FBAInboundServiceMWS_Model_ListInboundShipments request or FBAInboundServiceMWS_Model_ListInboundShipments object itself
  * @see FBAInboundServiceMWS_Model_ListInboundShipmentsRequest
  * @return FBAInboundServiceMWS_Model_ListInboundShipmentsResponse
  *
  * @throws FbaInbound_Exception
  */
 public function listInboundShipments($request)
 {
     if (!$request instanceof Model\FBAInboundServiceMWS_Model_ListInboundShipmentsRequest) {
         //require_once (dirname(__FILE__) . '/Model/ListInboundShipmentsRequest.php');
         $request = new FBAInboundServiceMWS_Model_ListInboundShipmentsRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'ListInboundShipments';
     $httpResponse = $this->_invoke($parameters);
     //require_once (dirname(__FILE__) . '/Model/ListInboundShipmentsResponse.php');
     $response = Model\FBAInboundServiceMWS_Model_ListInboundShipmentsResponse::fromXML($httpResponse['ResponseBody']);
     $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
     return $response;
 }
Exemplo n.º 3
0
 * Uncomment to try out Mock Service that simulates FBAInboundServiceMWS
 * responses without calling FBAInboundServiceMWS service.
 *
 * Responses are loaded from local XML files. You can tweak XML files to
 * experiment with various outputs during development
 *
 * XML files available under FBAInboundServiceMWS/Mock tree
 *
 ***********************************************************************/
// $service = new FBAInboundServiceMWS_Mock();
/************************************************************************
 * Setup request parameters and uncomment invoke to try out
 * sample for List Inbound Shipments Action
 ***********************************************************************/
// @TODO: set request. Action can be passed as FBAInboundServiceMWS_Model_ListInboundShipments
$request = new FBAInboundServiceMWS_Model_ListInboundShipmentsRequest();
$request->setSellerId(MERCHANT_ID);
// object or array of parameters
invokeListInboundShipments($service, $request);
/**
 * Get List Inbound Shipments Action Sample
 * Gets competitive pricing and related information for a product identified by
 * the MarketplaceId and ASIN.
 *
 * @param FBAInboundServiceMWS_Interface $service instance of FBAInboundServiceMWS_Interface
 * @param mixed $request FBAInboundServiceMWS_Model_ListInboundShipments or array of parameters
 */
function invokeListInboundShipments(FBAInboundServiceMWS_Interface $service, $request)
{
    try {
        $response = $service->ListInboundShipments($request);