public function usePlan($x){
        if (is_array($x)){
            $this->options['ShipmentId'] = $x['ShipmentId'];
            
            $this->setShipmentId($x['ShipmentId']);
            $this->setDestination($x['DestinationFulfillmentCenterId']);

            //label preference is not a direct match to preview results
            if ($x['LabelPrepType'] == 'AMAZON_LABEL') {
                $this->setLabelPrepPreference('AMAZON_LABEL_PREFERRED');
            } else {
                $this->setLabelPrepPreference('SELLER_LABEL');
            }
            
            $this->setItems($x['Items']);
            
        } else {
           $this->log("usePlan requires an array",'Warning');
           return false; 
        }
    }
public function usePlan($x){
        if (is_array($x)){
            $this->options['ShipmentId'] = $x['ShipmentId'];
            
            $this->setShipmentId($x['ShipmentId']);
            $this->setDestination($x['DestinationFulfillmentCenterId']);

            //label preference is not a direct match to preview results
            if ($x['LabelPrepType'] == 'AMAZON_LABEL') {
                $this->setLabelPrepPreference('AMAZON_LABEL_PREFERRED');
            } else {
                $this->setLabelPrepPreference('SELLER_LABEL');
            }
            
            $this->setItems($x['Items']);
            
        } else {
           $this->log("usePlan requires an array",'Warning');
           return false; 
        }
    }
public function usePlan ( $ x ) { if ( is_array ( $ x ) ) { $ this -> options [ 'ShipmentId' ] = $ x [ 'ShipmentId' ] ; $ this -> setShipmentId ( $ x [ 'ShipmentId' ] ) ; $ this -> setDestination ( $ x [ 'DestinationFulfillmentCenterId' ] ) ; //label preference is not a direct match to preview results if ( $ x [ 'LabelPrepType' ] == 'AMAZON_LABEL' ) { $ this -> setLabelPrepPreference ( 'AMAZON_LABEL_PREFERRED' ) ; } else { $ this -> setLabelPrepPreference ( 'SELLER_LABEL' ) ; } $ this -> setItems ( $ x [ 'Items' ] ) ; } else { $ this -> log ( "usePlan requires an array" , 'Warning' ) ; return false ; } }
Automatically fills in the necessary fields using a planner array.

This is a quick way to set the shipment ID, destination, label prep type, and items.
Note that the label preperation preference will be set to "AMAZON_LABEL_PREFERRED" if the
fulfillment preview selects the label type as "AMAZON_LABEL" and "SELLER_LABEL" otherwise.
This information is required to submit a shipment, but this method is not required.
@param array $x <p>plan array from <i>AmazonShipmentPlanner</i></p>
@return boolean <b>FALSE</b> if improper input
Automatically fills in the necessary fields using a planner array .