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;
}