/**
  * Update Inbound Shipment
  * Updates an pre-existing inbound shipment specified by the 
  * ShipmentId. It may include up to 200 items.
  * If InboundShipmentHeader is set. it replaces the header information 
  * for the given shipment.
  * If InboundShipmentItems is set. it adds, replaces and removes 
  * the line time to inbound shipment.
  * For non-existing item, it will add the item for new line item; 
  * For existing line items, it will replace the QuantityShipped for the item.
  * For QuantityShipped = 0, it indicates the item should be removed from the shipment
  * 
  * This operation will simply return a shipment Id upon success,
  * otherwise an explicit error will be returned.
  *
  * @param mixed $request array of parameters for FBAInboundServiceMWS_Model_UpdateInboundShipment request or FBAInboundServiceMWS_Model_UpdateInboundShipment object itself
  * @see FBAInboundServiceMWS_Model_UpdateInboundShipmentRequest
  * @return FBAInboundServiceMWS_Model_UpdateInboundShipmentResponse
  *
  * @throws FbaInbound_Exception
  */
 public function updateInboundShipment($request)
 {
     if (!$request instanceof Model\FBAInboundServiceMWS_Model_UpdateInboundShipmentRequest) {
         //require_once (dirname(__FILE__) . '/Model/UpdateInboundShipmentRequest.php');
         $request = new FBAInboundServiceMWS_Model_UpdateInboundShipmentRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'UpdateInboundShipment';
     $httpResponse = $this->_invoke($parameters);
     //require_once (dirname(__FILE__) . '/Model/UpdateInboundShipmentResponse.php');
     $response = Model\FBAInboundServiceMWS_Model_UpdateInboundShipmentResponse::fromXML($httpResponse['ResponseBody']);
     $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
     return $response;
 }
 * 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 Update Inbound Shipment Action
 ***********************************************************************/
// @TODO: set request. Action can be passed as FBAInboundServiceMWS_Model_UpdateInboundShipment
$request = new FBAInboundServiceMWS_Model_UpdateInboundShipmentRequest();
$request->setSellerId(MERCHANT_ID);
// object or array of parameters
invokeUpdateInboundShipment($service, $request);
/**
 * Get Update Inbound Shipment 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_UpdateInboundShipment or array of parameters
 */
function invokeUpdateInboundShipment(FBAInboundServiceMWS_Interface $service, $request)
{
    try {
        $response = $service->UpdateInboundShipment($request);
Beispiel #3
0
 /**
  * Update Inbound Shipment
  * Updates an pre-existing inbound shipment specified by the
  * ShipmentId. It may include up to 200 items.
  * If InboundShipmentHeader is set. it replaces the header information
  * for the given shipment.
  * If InboundShipmentItems is set. it adds, replaces and removes
  * the line time to inbound shipment.
  * For non-existing item, it will add the item for new line item;
  * For existing line items, it will replace the QuantityShipped for the item.
  * For QuantityShipped = 0, it indicates the item should be removed from the shipment
  *
  * This operation will simply return a shipment Id upon success,
  * otherwise an explicit error will be returned.
  *
  * @param mixed $request array of parameters for FBAInboundServiceMWS_Model_UpdateInboundShipment request or FBAInboundServiceMWS_Model_UpdateInboundShipment object itself
  * @see FBAInboundServiceMWS_Model_UpdateInboundShipmentRequest
  * @return FBAInboundServiceMWS_Model_UpdateInboundShipmentResponse
  *
  * @throws FBAInboundServiceMWS_Exception
  */
 public function updateInboundShipment($request)
 {
     if (!$request instanceof FBAInboundServiceMWS_Model_UpdateInboundShipmentRequest) {
         $request = new FBAInboundServiceMWS_Model_UpdateInboundShipmentRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'UpdateInboundShipment';
     $httpResponse = $this->_invoke($parameters);
     $response = FBAInboundServiceMWS_Model_UpdateInboundShipmentResponse::fromXML($httpResponse['ResponseBody']);
     $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
     return $response;
 }