* Uncomment to try out Mock Service that simulates MWSMerchantFulfillmentService
 * responses without calling MWSMerchantFulfillmentService service.
 *
 * Responses are loaded from local XML files. You can tweak XML files to
 * experiment with various outputs during development
 *
 * XML files available under MWSMerchantFulfillmentService/Mock tree
 *
 ***********************************************************************/
// $service = new MWSMerchantFulfillmentService_Mock();
/************************************************************************
 * Setup request parameters and uncomment invoke to try out
 * sample for Get Eligible Shipping Services Action
 ***********************************************************************/
// @TODO: set request. Action can be passed as MWSMerchantFulfillmentService_Model_GetEligibleShippingServices
$request = new MWSMerchantFulfillmentService_Model_GetEligibleShippingServicesRequest();
$request->setSellerId(MERCHANT_ID);
// object or array of parameters
invokeGetEligibleShippingServices($service, $request);
/**
 * Get Get Eligible Shipping Services Action Sample
 * Gets competitive pricing and related information for a product identified by
 * the MarketplaceId and ASIN.
 *
 * @param MWSMerchantFulfillmentService_Interface $service instance of MWSMerchantFulfillmentService_Interface
 * @param mixed $request MWSMerchantFulfillmentService_Model_GetEligibleShippingServices or array of parameters
 */
function invokeGetEligibleShippingServices(MWSMerchantFulfillmentService_Interface $service, $request)
{
    try {
        $response = $service->GetEligibleShippingServices($request);
Пример #2
0
 /**
  * Get Eligible Shipping Services
  * Gets a list of eligible shipping services for the shipment information specified.  The ShippingServiceId or
  *     ShippingServiceOfferingId can be used in CreateShipment to specify the shipping service or the specific offer
  *     respectively.  A list of carriers that are temporarily unavailable is also returned.
  *
  * @param mixed $request array of parameters for MWSMerchantFulfillmentService_Model_GetEligibleShippingServices request or MWSMerchantFulfillmentService_Model_GetEligibleShippingServices object itself
  * @see MWSMerchantFulfillmentService_Model_GetEligibleShippingServicesRequest
  * @return MWSMerchantFulfillmentService_Model_GetEligibleShippingServicesResponse
  *
  * @throws MWSMerchantFulfillmentService_Exception
  */
 public function getEligibleShippingServices($request)
 {
     if (!$request instanceof MWSMerchantFulfillmentService_Model_GetEligibleShippingServicesRequest) {
         require_once dirname(__FILE__) . '/Model/GetEligibleShippingServicesRequest.php';
         $request = new MWSMerchantFulfillmentService_Model_GetEligibleShippingServicesRequest($request);
     }
     $parameters = $request->toQueryParameterArray();
     $parameters['Action'] = 'GetEligibleShippingServices';
     $httpResponse = $this->_invoke($parameters);
     require_once dirname(__FILE__) . '/Model/GetEligibleShippingServicesResponse.php';
     $response = MWSMerchantFulfillmentService_Model_GetEligibleShippingServicesResponse::fromXML($httpResponse['ResponseBody']);
     $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']);
     return $response;
 }