* Uncomment to try out Mock Service that simulates FBAOutboundServiceMWS * responses without calling FBAOutboundServiceMWS service. * * Responses are loaded from local XML files. You can tweak XML files to * experiment with various outputs during development * * XML files available under FBAOutboundServiceMWS/Mock tree * ***********************************************************************/ // $service = new FBAOutboundServiceMWS_Mock(); /************************************************************************ * Setup request parameters and uncomment invoke to try out * sample for Create Fulfillment Order Action ***********************************************************************/ // @TODO: set request. Action can be passed as MwsFbaOutboundServiceModel_CreateFulfillmentOrder $request = new MwsFbaOutboundServiceModel_CreateFulfillmentOrderRequest(); $request->setSellerId(MERCHANT_ID); // object or array of parameters invokeCreateFulfillmentOrder($service, $request); /** * Get Create Fulfillment Order Action Sample * Gets competitive pricing and related information for a product identified by * the MarketplaceId and ASIN. * * @param FBAOutboundServiceMWS_Interface $service instance of FBAOutboundServiceMWS_Interface * @param mixed $request MwsFbaOutboundServiceModel_CreateFulfillmentOrder or array of parameters */ function invokeCreateFulfillmentOrder(FBAOutboundServiceMWS_Interface $service, $request) { try { $response = $service->CreateFulfillmentOrder($request);
/** * Create Fulfillment Order * The SellerFulfillmentOrderId must be unique for all fulfillment * orders created by the seller. If your system already has a * unique order identifier, then that may be a good value to put in * this field. * * This DisplayableOrderDateTime will appear as the "order date" in * recipient-facing materials such as the packing slip. The format * must be timestamp. * * * The DisplayableOrderId will appear as the "order id" in those * materials, and the DisplayableOrderComment will appear as well. * * ShippingSpeedCategory is the Service Level Agreement for how long it * will take a shipment to be transported from the fulfillment center * to the recipient, once shipped. no default. * The following shipping speeds are available for US domestic: * * Standard, 3-5 business days * * Expedited, 2 business days * * Priority, 1 business day * * Shipping speeds may vary elsewhere. Please consult your manual for published SLAs. * * * DestinationAddress is the address the items will be shipped to. * * FulfillmentPolicy indicates how unfulfillable items should be * handled. default is FillOrKill. * * FillOrKill if any item is determined to be unfulfillable * before any items have started shipping, the entire order is * considered unfulfillable. Once any part of the order has * started shipping, as much of the order as possible will be * shipped. * * FillAll never consider any item unfulfillable. Items must * either be fulfilled or merchant-cancelled. * * FillAllAvailable fulfill as much of the order as possible. * * FulfillmentMethod indicates the intended recipient channel for the * order whether it be a consumer order or inventory return. * default is Consumer. * The available methods to fulfill a given order: * * Consumer indicates a customer order, this is the default. * * Removal indicates that the inventory should be returned to the * specified destination address. * * * NotificationEmailList can be used to provide a list of e-mail * addresses to receive ship-complete e-mail notifications. These * e-mails are customer-facing e-mails sent by FBA on behalf of * the seller. * * @param mixed $request array of parameters for MwsFbaOutboundServiceModel_CreateFulfillmentOrder request or MwsFbaOutboundServiceModel_CreateFulfillmentOrder object itself * @see MwsFbaOutboundServiceModel_CreateFulfillmentOrderRequest * @return MwsFbaOutboundServiceModel_CreateFulfillmentOrderResponse * * @throws FbaOutbound_Exception */ public function createFulfillmentOrder($request) { if (!$request instanceof Model\MwsFbaOutboundServiceModel_CreateFulfillmentOrderRequest) { //require_once (dirname(__FILE__) . '/Model/CreateFulfillmentOrderRequest.php'); $request = new MwsFbaOutboundServiceModel_CreateFulfillmentOrderRequest($request); } $parameters = $request->toQueryParameterArray(); $parameters['Action'] = 'CreateFulfillmentOrder'; $httpResponse = $this->_invoke($parameters); //require_once (dirname(__FILE__) . '/Model/CreateFulfillmentOrderResponse.php'); $response = Model\MwsFbaOutboundServiceModel_CreateFulfillmentOrderResponse::fromXML($httpResponse['ResponseBody']); $response->setResponseHeaderMetadata($httpResponse['ResponseHeaderMetadata']); return $response; }