/**
  * Void Transport Request
  * Voids a previously-confirmed transport request. It only succeeds for requests
  *     made by the VoidDeadline provided in the PartneredEstimate component of the
  *     response of the GetTransportContent operation for a shipment. Currently this
  *     deadline is 24 hours after confirming a transport request for a partnered small parcel
  *     request and 1 hour after confirming a transport request for a partnered LTL/TL
  *     request, though this is subject to change at any time without notice.
  *
  * @param mixed $request array of parameters for FBAInboundServiceMWS_Model_VoidTransportRequest request or FBAInboundServiceMWS_Model_VoidTransportRequest object itself
  * @see FBAInboundServiceMWS_Model_VoidTransportInputRequest
  * @return FBAInboundServiceMWS_Model_VoidTransportRequestResponse
  *
  * @throws FbaInbound_Exception
  */
 public function voidTransportRequest($request)
 {
     if (!$request instanceof Model\FBAInboundServiceMWS_Model_VoidTransportInputRequest) {
         //require_once (dirname(__FILE__) . '/Model/VoidTransportInputRequest.php');
         $request = new FBAInboundServiceMWS_Model_VoidTransportInputRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'VoidTransportRequest';
     $httpResponse = $this->_invoke($parameters);
     //require_once (dirname(__FILE__) . '/Model/VoidTransportRequestResponse.php');
     $response = Model\FBAInboundServiceMWS_Model_VoidTransportRequestResponse::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 Void Transport Request Action
 ***********************************************************************/
// @TODO: set request. Action can be passed as FBAInboundServiceMWS_Model_VoidTransportRequest
$request = new FBAInboundServiceMWS_Model_VoidTransportInputRequest();
$request->setSellerId(MERCHANT_ID);
// object or array of parameters
invokeVoidTransportRequest($service, $request);
/**
 * Get Void Transport Request 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_VoidTransportRequest or array of parameters
 */
function invokeVoidTransportRequest(FBAInboundServiceMWS_Interface $service, $request)
{
    try {
        $response = $service->VoidTransportRequest($request);
Exemple #3
0
 /**
  * Void Transport Request
  * Voids a previously-confirmed transport request. It only succeeds for requests
  *     made by the VoidDeadline provided in the PartneredEstimate component of the
  *     response of the GetTransportContent operation for a shipment. Currently this
  *     deadline is 24 hours after confirming a transport request for a partnered small parcel
  *     request and 1 hour after confirming a transport request for a partnered LTL/TL
  *     request, though this is subject to change at any time without notice.
  *
  * @param mixed $request array of parameters for FBAInboundServiceMWS_Model_VoidTransportRequest request or FBAInboundServiceMWS_Model_VoidTransportRequest object itself
  * @see FBAInboundServiceMWS_Model_VoidTransportInputRequest
  * @return FBAInboundServiceMWS_Model_VoidTransportRequestResponse
  *
  * @throws FBAInboundServiceMWS_Exception
  */
 public function voidTransportRequest($request)
 {
     if (!$request instanceof FBAInboundServiceMWS_Model_VoidTransportInputRequest) {
         $request = new FBAInboundServiceMWS_Model_VoidTransportInputRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'VoidTransportRequest';
     $httpResponse = $this->_invoke($parameters);
     $response = FBAInboundServiceMWS_Model_VoidTransportRequestResponse::fromXML($httpResponse['ResponseBody']);
     $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
     return $response;
 }