private function getDefaultMethod($price, $cost = null)
    {
        $method = $this->rateMethodFactory->create();
        $method->setData('carrier', $this->getCarrierCode());
        $method->setData('carrier_title', 'Shopgate');
        $method->setData('method', $this->method);
        $method->setData('method_title', $this->getConfigData('name'));
        $method->setData('cost', $cost ? : $price);
        $method->setPrice($price);

        return $method;
    }
private function getDefaultMethod($price, $cost = null)
    {
        $method = $this->rateMethodFactory->create();
        $method->setData('carrier', $this->getCarrierCode());
        $method->setData('carrier_title', 'Shopgate');
        $method->setData('method', $this->method);
        $method->setData('method_title', $this->getConfigData('name'));
        $method->setData('cost', $cost ? : $price);
        $method->setPrice($price);

        return $method;
    }
private function getDefaultMethod ( $ price , $ cost = null ) { $ method = $ this -> rateMethodFactory -> create ( ) ; $ method -> setData ( 'carrier' , $ this -> getCarrierCode ( ) ) ; $ method -> setData ( 'carrier_title' , 'Shopgate' ) ; $ method -> setData ( 'method' , $ this -> method ) ; $ method -> setData ( 'method_title' , $ this -> getConfigData ( 'name' ) ) ; $ method -> setData ( 'cost' , $ cost ? : $ price ) ; $ method -> setPrice ( $ price ) ; return $ method ; }
Return the default shopgate payment method

@param float        $price
@param float | null $cost

@return \Magento\Quote\Model\Quote\Address\RateResult\Method
Return the default shopgate payment method