public function createShipment(){
        if (!isset($this->options['ShipmentId'])){
            $this->log("Shipment ID must be set in order to create it",'Warning');
            return false;
        }
        if (!array_key_exists('InboundShipmentHeader.ShipmentName',$this->options)){
            $this->log("Header must be set in order to make a shipment",'Warning');
            return false;
        }
        if (!array_key_exists('InboundShipmentHeader.ShipFromAddress.Name',$this->options)){
            $this->log("Address must be set in order to make a shipment",'Warning');
            return false;
        }
        if (!array_key_exists('InboundShipmentItems.member.1.SellerSKU',$this->options)){
            $this->log("Items must be set in order to make a shipment",'Warning');
            return false;
        }
        $this->options['Action'] = 'CreateInboundShipment';
        
        $url = $this->urlbase.$this->urlbranch;
        
        $query = $this->genQuery();
        
        $path = $this->options['Action'].'Result';
        if ($this->mockMode){
           $xml = $this->fetchMockFile()->$path;
        } else {
            $response = $this->sendRequest($url, array('Post'=>$query));
            
            if (!$this->checkResponse($response)){
                return false;
            }
            
            $xml = simplexml_load_string($response['body'])->$path;
        }
        $this->shipmentId = (string)$xml->ShipmentId;
        
        if ($this->shipmentId){
            $this->log("Successfully created Shipment #".$this->shipmentId);
            return true;
        } else {
            return false;
        }
    }
public function createShipment(){
        if (!isset($this->options['ShipmentId'])){
            $this->log("Shipment ID must be set in order to create it",'Warning');
            return false;
        }
        if (!array_key_exists('InboundShipmentHeader.ShipmentName',$this->options)){
            $this->log("Header must be set in order to make a shipment",'Warning');
            return false;
        }
        if (!array_key_exists('InboundShipmentHeader.ShipFromAddress.Name',$this->options)){
            $this->log("Address must be set in order to make a shipment",'Warning');
            return false;
        }
        if (!array_key_exists('InboundShipmentItems.member.1.SellerSKU',$this->options)){
            $this->log("Items must be set in order to make a shipment",'Warning');
            return false;
        }
        $this->options['Action'] = 'CreateInboundShipment';
        
        $url = $this->urlbase.$this->urlbranch;
        
        $query = $this->genQuery();
        
        $path = $this->options['Action'].'Result';
        if ($this->mockMode){
           $xml = $this->fetchMockFile()->$path;
        } else {
            $response = $this->sendRequest($url, array('Post'=>$query));
            
            if (!$this->checkResponse($response)){
                return false;
            }
            
            $xml = simplexml_load_string($response['body'])->$path;
        }
        $this->shipmentId = (string)$xml->ShipmentId;
        
        if ($this->shipmentId){
            $this->log("Successfully created Shipment #".$this->shipmentId);
            return true;
        } else {
            return false;
        }
    }
public function createShipment ( ) { if ( ! isset ( $ this -> options [ 'ShipmentId' ] ) ) { $ this -> log ( "Shipment ID must be set in order to create it" , 'Warning' ) ; return false ; } if ( ! array_key_exists ( 'InboundShipmentHeader.ShipmentName' , $ this -> options ) ) { $ this -> log ( "Header must be set in order to make a shipment" , 'Warning' ) ; return false ; } if ( ! array_key_exists ( 'InboundShipmentHeader.ShipFromAddress.Name' , $ this -> options ) ) { $ this -> log ( "Address must be set in order to make a shipment" , 'Warning' ) ; return false ; } if ( ! array_key_exists ( 'InboundShipmentItems.member.1.SellerSKU' , $ this -> options ) ) { $ this -> log ( "Items must be set in order to make a shipment" , 'Warning' ) ; return false ; } $ this -> options [ 'Action' ] = 'CreateInboundShipment' ; $ url = $ this -> urlbase . $ this -> urlbranch ; $ query = $ this -> genQuery ( ) ; $ path = $ this -> options [ 'Action' ] . 'Result' ; if ( $ this -> mockMode ) { $ xml = $ this -> fetchMockFile ( ) -> $ path ; } else { $ response = $ this -> sendRequest ( $ url , array ( 'Post' => $ query ) ) ; if ( ! $ this -> checkResponse ( $ response ) ) { return false ; } $ xml = simplexml_load_string ( $ response [ 'body' ] ) -> $ path ; } $ this -> shipmentId = ( string ) $ xml -> ShipmentId ; if ( $ this -> shipmentId ) { $ this -> log ( "Successfully created Shipment #" . $ this -> shipmentId ) ; return true ; } else { return false ; } }
Sends a request to Amazon to create an Inbound Shipment.

Submits a <i>CreateInboundShipment</i> request to Amazon. In order to do this,
all parameters must be set. Data for these headers can be generated using an
<i>AmazonShipmentPlanner</i> object. Amazon will send back the Shipment ID
as a response, which can be retrieved using <i>getShipmentId</i>.
@return boolean <b>TRUE</b> if success, <b>FALSE</b> if something goes wrong
Sends a request to Amazon to create an Inbound Shipment .