Ejemplo n.º 1
0
 /**
  * Get Shipment
  * Gets an existing shipment, including the label status, label content, shipping information.
  *
  * @param mixed $request array of parameters for MWSMerchantFulfillmentService_Model_GetShipment request or MWSMerchantFulfillmentService_Model_GetShipment object itself
  * @see MWSMerchantFulfillmentService_Model_GetShipmentRequest
  * @return MWSMerchantFulfillmentService_Model_GetShipmentResponse
  *
  * @throws MWSMerchantFulfillmentService_Exception
  */
 public function getShipment($request)
 {
     if (!$request instanceof MWSMerchantFulfillmentService_Model_GetShipmentRequest) {
         require_once dirname(__FILE__) . '/Model/GetShipmentRequest.php';
         $request = new MWSMerchantFulfillmentService_Model_GetShipmentRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'GetShipment';
     $httpResponse = $this->_invoke($parameters);
     require_once dirname(__FILE__) . '/Model/GetShipmentResponse.php';
     $response = MWSMerchantFulfillmentService_Model_GetShipmentResponse::fromXML($httpResponse['ResponseBody']);
     $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
     return $response;
 }
Ejemplo n.º 2
0
 /**
  * Get Shipment
  * Gets an existing shipment, including the label status, label content, shipping information.
  *
  * @param mixed $request array of parameters for MWSMerchantFulfillmentService_Model_GetShipment request or MWSMerchantFulfillmentService_Model_GetShipment object itself
  * @see MWSMerchantFulfillmentService_Model_GetShipment
  * @return MWSMerchantFulfillmentService_Model_GetShipmentResponse
  *
  * @throws MWSMerchantFulfillmentService_Exception
  */
 public function getShipment($request)
 {
     require_once dirname(__FILE__) . '/Model/GetShipmentResponse.php';
     return MWSMerchantFulfillmentService_Model_GetShipmentResponse::fromXML($this->_invoke('GetShipment'));
 }