From f3c166d13550af8e15b552691366275e3b26fec8 Mon Sep 17 00:00:00 2001
From: "@ChristelLoftus" <christel@bob.co.za>
Date: Tue, 6 Aug 2024 12:51:27 +0200
Subject: [PATCH] add to fetch rates

---
 Model/Carrier/BobGo.php | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/Model/Carrier/BobGo.php b/Model/Carrier/BobGo.php
index d54a1f2..4482890 100644
--- a/Model/Carrier/BobGo.php
+++ b/Model/Carrier/BobGo.php
@@ -1360,21 +1360,30 @@ class BobGo extends AbstractCarrier implements CarrierInterface
         if (!$this->getConfigFlag('active')) {
             return false;
         }
-        /** @var Method $method */
+
+        /** @var \Magento\Shipping\Model\Rate\Result $result */
+        $result = $this->rateResultFactory->create();
+
+        /** @var \Magento\Quote\Model\Quote\Address\RateResult\Method $method */
         $method = $this->rateMethodFactory->create();
+
         $method->setCarrier($this->_code);
         $method->setCarrierTitle($this->getConfigData('title'));
+
         $method->setMethod($this->_code);
         $method->setMethodTitle($this->getConfigData('name'));
-        $shippingCost = (float)$this->getConfigData('shipping_cost');
+
+        $shippingCost = (float) $this->getConfigData('shipping_cost');
+
         $method->setPrice($shippingCost);
         $method->setCost($shippingCost);
-        /** @var Result $result */
-        $result = $this->rateResultFactory->create();
+
         $result->append($method);
+
         return $result;
     }
 
+
     public function getAllowedMethods(): array
     {
         return [$this->_code => $this->getConfigData('name')];
-- 
GitLab