/**
  * Put Transport Content
  * A write operation which sellers use to provide transportation details regarding
  *     how an inbound shipment will arrive at Amazon's Fulfillment Centers.
  *
  * @param mixed $request array of parameters for FBAInboundServiceMWS_Model_PutTransportContent request or FBAInboundServiceMWS_Model_PutTransportContent object itself
  * @see FBAInboundServiceMWS_Model_PutTransportContentRequest
  * @return FBAInboundServiceMWS_Model_PutTransportContentResponse
  *
  * @throws FbaInbound_Exception
  */
 public function putTransportContent($request)
 {
     if (!$request instanceof Model\FBAInboundServiceMWS_Model_PutTransportContentRequest) {
         //require_once (dirname(__FILE__) . '/Model/PutTransportContentRequest.php');
         $request = new FBAInboundServiceMWS_Model_PutTransportContentRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'PutTransportContent';
     $httpResponse = $this->_invoke($parameters);
     //require_once (dirname(__FILE__) . '/Model/PutTransportContentResponse.php');
     $response = Model\FBAInboundServiceMWS_Model_PutTransportContentResponse::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 Put Transport Content Action
 ***********************************************************************/
// @TODO: set request. Action can be passed as FBAInboundServiceMWS_Model_PutTransportContent
$request = new FBAInboundServiceMWS_Model_PutTransportContentRequest();
$request->setSellerId(MERCHANT_ID);
// object or array of parameters
invokePutTransportContent($service, $request);
/**
 * Get Put Transport Content 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_PutTransportContent or array of parameters
 */
function invokePutTransportContent(FBAInboundServiceMWS_Interface $service, $request)
{
    try {
        $response = $service->PutTransportContent($request);
示例#3
0
文件: Client.php 项目: stephlanj/mws
 /**
  * Put Transport Content
  * A write operation which sellers use to provide transportation details regarding
  *     how an inbound shipment will arrive at Amazon's Fulfillment Centers.
  *
  * @param mixed $request array of parameters for FBAInboundServiceMWS_Model_PutTransportContent request or FBAInboundServiceMWS_Model_PutTransportContent object itself
  * @see FBAInboundServiceMWS_Model_PutTransportContentRequest
  * @return FBAInboundServiceMWS_Model_PutTransportContentResponse
  *
  * @throws FBAInboundServiceMWS_Exception
  */
 public function putTransportContent($request)
 {
     if (!$request instanceof FBAInboundServiceMWS_Model_PutTransportContentRequest) {
         $request = new FBAInboundServiceMWS_Model_PutTransportContentRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'PutTransportContent';
     $httpResponse = $this->_invoke($parameters);
     $response = FBAInboundServiceMWS_Model_PutTransportContentResponse::fromXML($httpResponse['ResponseBody']);
     $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
     return $response;
 }