KJ\Magento\Command\Order\Create\DummyCommand::_getShippingMethodCode PHP Method

_getShippingMethodCode() protected method

protected _getShippingMethodCode ( )
    protected function _getShippingMethodCode()
    {
        $shippingMethodCode = $this->_input->getOption('shipping');
        if (!$shippingMethodCode) {
            return $this->_availableSippingMethods[0];
        }
        if (!in_array($shippingMethodCode, $this->_availableSippingMethods)) {
            throw new \Exception('Shipping method is not supported.');
        }
        return $shippingMethodCode;
    }