Ejemplo n.º 1
0
 /**
  * Confirm Transport Request
  * Confirms the estimate returned by the EstimateTransportRequest operation.
  *     Once this operation has been called successfully, the seller agrees to allow Amazon to charge
  *     their account the amount returned in the estimate.
  *
  * @param mixed $request array of parameters for FBAInboundServiceMWS_Model_ConfirmTransportRequest request or FBAInboundServiceMWS_Model_ConfirmTransportRequest object itself
  * @see FBAInboundServiceMWS_Model_ConfirmTransportInputRequest
  * @return FBAInboundServiceMWS_Model_ConfirmTransportRequestResponse
  *
  * @throws FBAInboundServiceMWS_Exception
  */
 public function confirmTransportRequest($request)
 {
     if (!$request instanceof FBAInboundServiceMWS_Model_ConfirmTransportInputRequest) {
         $request = new FBAInboundServiceMWS_Model_ConfirmTransportInputRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'ConfirmTransportRequest';
     $httpResponse = $this->_invoke($parameters);
     $response = FBAInboundServiceMWS_Model_ConfirmTransportRequestResponse::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 Confirm Transport Request Action
 ***********************************************************************/
// @TODO: set request. Action can be passed as FBAInboundServiceMWS_Model_ConfirmTransportRequest
$request = new FBAInboundServiceMWS_Model_ConfirmTransportInputRequest();
$request->setSellerId(MERCHANT_ID);
// object or array of parameters
invokeConfirmTransportRequest($service, $request);
/**
 * Get Confirm 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_ConfirmTransportRequest or array of parameters
 */
function invokeConfirmTransportRequest(FBAInboundServiceMWS_Interface $service, $request)
{
    try {
        $response = $service->ConfirmTransportRequest($request);