diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 91157707..1bad4eaa 100755 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -37,3 +37,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - SHQ16-1026 - display selected carrier and code for single carrier display - SHQ16-1117 - correct customer group in request + +## [20.0.9] - 2016-06-23 +### Added +- SHQ16-1119 - process merged rates diff --git a/src/Helper/Data.php b/src/Helper/Data.php index bf1189be..ca861267 100755 --- a/src/Helper/Data.php +++ b/src/Helper/Data.php @@ -45,7 +45,6 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper { protected static $showTransId; - protected static $wsTimeout; protected $prodAttributes; protected $baseCurrencyRate; @@ -264,60 +263,6 @@ public function getMultiAddressTemplate() return 'checkout/multishipping/shipping.phtml'; } - - /** - * Retrieve url for getting allowed methods - * @return string - */ - public function getAllowedMethodGatewayUrl() - { - return $this->_getGatewayUrl().'allowed_methods'; - } - - /** - * Retrieve url for getting shipping rates - * @return string - */ - public function getRateGatewayUrl() - { - return $this->_getGatewayUrl().'rates'; - - } - - /* - * *Retrieve url for retrieving attributes - */ - public function getAttributeGatewayUrl() - { - return $this->_getGatewayUrl().'attributes/get'; - } - - /* - * *Retrieve url for retrieving attributes - */ - public function getCheckSynchronizedUrl() - { - return $this->_getGatewayUrl().'attributes/check'; - } - - /* - * Retrieve configured timeout for webservice - */ - public function getWebserviceTimeout() - { - - if (self::$wsTimeout==NULL) { - $timeout = $this->getConfigValue('carriers/shipper/ws_timeout'); - if(!is_numeric($timeout) || $timeout < 120) { - $timeout = 120; - } - self::$wsTimeout = $timeout; - } - return self::$wsTimeout; - } - - - public function encodeShippingDetails($shippingDetails) { return $this->jsonHelper->jsonEncode($shippingDetails); @@ -496,29 +441,6 @@ public function getAttribute($attribute_code, $store = null) { return $attribute; } - - /** - * Returns url to use - live if present, otherwise dev - * @return array - */ - protected function _getGatewayUrl() - { - $live = $this->_cleanUpUrl($this->getConfigValue('carriers/shipper/live_url')); - - $test = $this->_cleanUpUrl($this->getConfigValue('carriers/shipper/url')); - return $this->getConfigValue('carriers/shipper/sandbox_mode') ? $test : $live; - } - - protected function _cleanUpUrl($urlStart) - { - $url = trim($urlStart); - $lastChar = substr("abcdef", -1); - if($lastChar != '/') { - $url .= '/'; - } - return $url; - } - /** * Get carrier by its code * diff --git a/src/Helper/Rest.php b/src/Helper/Rest.php new file mode 100644 index 00000000..98e949a4 --- /dev/null +++ b/src/Helper/Rest.php @@ -0,0 +1,137 @@ +restHelper = $restHelper; + $this->shipperHelperData = $shipperHelperData; + $this->restHelper->setBaseUrl($this->getGatewayUrl()); + } + + /** + * Retrieve url for getting allowed methods + * @return string + */ + public function getAllowedMethodGatewayUrl() + { + return $this->restHelper->getAllowedMethodGatewayUrl(); + } + + /** + * Retrieve url for getting shipping rates + * @return string + */ + public function getRateGatewayUrl() + { + return $this->restHelper->getRateGatewayUrl(); + + } + + /* + * *Retrieve url for retrieving attributes + */ + public function getAttributeGatewayUrl() + { + return $this->restHelper->getAttributeGatewayUrl(); + } + + /* + * *Retrieve url for retrieving attributes + */ + public function getCheckSynchronizedUrl() + { + return $this->restHelper->getCheckSynchronizedUrl(); + } + + /* + * Retrieve configured timeout for webservice + */ + public function getWebserviceTimeout() + { + + if (self::$wsTimeout==NULL) { + $timeout = $this->shipperHelperData->getConfigValue('carriers/shipper/ws_timeout'); + if(!is_numeric($timeout) || $timeout < 120) { + $timeout = 120; + } + self::$wsTimeout = $timeout; + } + return self::$wsTimeout; + } + + + /** + * Returns url to use - live if present, otherwise dev + * @return array + */ + protected function getGatewayUrl() + { + $live = $this->cleanUpUrl($this->shipperHelperData->getConfigValue('carriers/shipper/live_url')); + + $test = $this->cleanUpUrl($this->shipperHelperData->getConfigValue('carriers/shipper/url')); + return $this->shipperHelperData->getConfigValue('carriers/shipper/sandbox_mode') ? $test : $live; + } + + protected function cleanUpUrl($urlStart) + { + $url = trim($urlStart); + $lastChar = substr("abcdef", -1); + if($lastChar != '/') { + $url .= '/'; + } + return $url; + } +} \ No newline at end of file diff --git a/src/Model/Carrier/Processor/ShipperMapper.php b/src/Model/Carrier/Processor/ShipperMapper.php index f28c9a09..d1f5a457 100755 --- a/src/Model/Carrier/Processor/ShipperMapper.php +++ b/src/Model/Carrier/Processor/ShipperMapper.php @@ -111,6 +111,14 @@ class ShipperMapper * @var Request\Shipping\SelectedOptionsFactory */ private $selectedOptionsFactory; + /* + * @var \ShipperHQ\WS\Rate\Request\Checkout\CartFactory + */ + private $cartFactory; + /* + * @var \ShipperHQ\WS\Rate\Request\Checkout\Item + */ + private $itemFactory; /** * @var WS\Shared\AddressFactory */ @@ -143,6 +151,10 @@ class ShipperMapper * @var \ShipperHQ\WS\Rate\Request\Checkout\PhysicalBuildingDetailFactory */ protected $physicalBuildingDetailFactory; + /** + * @var \ShipperHQ\WS\Rate\Request\Checkout\StockDetailFactory + */ + protected $stockDetailFactory; function __construct(\ShipperHQ\Shipper\Helper\Data $shipperDataHelper, \Magento\Customer\Model\GroupFactory $groupFactory, @@ -154,13 +166,16 @@ function __construct(\ShipperHQ\Shipper\Helper\Data $shipperDataHelper, \ShipperHQ\WS\Rate\Request\CustomerDetailsFactory $customerDetailsFactory, \ShipperHQ\WS\Rate\Request\ShipDetailsFactory $shipDetailsFactory, \ShipperHQ\WS\Rate\Request\Shipping\SelectedOptionsFactory $selectedOptionsFactory, + \ShipperHQ\WS\Rate\Request\Checkout\CartFactory $cartFactory, + \ShipperHQ\WS\Rate\Request\Checkout\ItemFactory $itemFactory, \Magento\Tax\Model\Calculation $taxCalculation, \ShipperHQ\Shipper\Helper\LogAssist $shipperLogger, \Magento\Catalog\Helper\Product\Configuration $productConfiguration, \Magento\Framework\App\ProductMetadata $productMetadata, \Magento\Backend\Block\Template\Context $context, StockHandler $stockHandler, - \ShipperHQ\WS\Rate\Request\Checkout\PhysicalBuildingDetailFactory $physicalBuildingDetailFactory + \ShipperHQ\WS\Rate\Request\Checkout\PhysicalBuildingDetailFactory $physicalBuildingDetailFactory, + \ShipperHQ\WS\Rate\Request\Checkout\StockDetailFactory $stockDetailFactory ) { @@ -174,6 +189,8 @@ function __construct(\ShipperHQ\Shipper\Helper\Data $shipperDataHelper, $this->rateRequestFactory = $rateRequestFactory; $this->shipperLogger = $shipperLogger; $this->selectedOptionsFactory = $selectedOptionsFactory; + $this->cartFactory = $cartFactory; + $this->itemFactory = $itemFactory; $this->addressFactory = $addressFactory; $this->infoRequestFactory = $infoRequestFactory; $this->credentialsFactory = $credentialsFactory; @@ -182,6 +199,7 @@ function __construct(\ShipperHQ\Shipper\Helper\Data $shipperDataHelper, $this->shipDetailsFactory = $shipDetailsFactory; $this->stockHandler = $stockHandler; $this->physicalBuildingDetailFactory = $physicalBuildingDetailFactory; + $this->stockDetailFactory = $stockDetailFactory; } /** @@ -249,12 +267,13 @@ public function getCredentials($storeId = null) */ public function getCartDetails($request) { - $cart = []; - $cart['declaredValue'] = $request->getPackageValue(); - $cart['freeShipping'] = (bool)$request->getFreeShipping(); - $cart['items'] = $this->getFormattedItems($request, $request->getAllItems()); + $cartDetails = $this->cartFactory->create([ + 'declaredValue' => $request->getPackageValue(), + 'freeShipping' => (bool)$request->getFreeShipping(), + 'items' => $this->getFormattedItems($request, $request->getAllItems()) + ]); + return $cartDetails; - return $cart; } @@ -418,45 +437,46 @@ private function getFormattedItems($request, $magentoItems, $childItems = false) } $warehouseDetails = $this->getWarehouseDetails($magentoItem); $pickupLocationDetails = $this->getPickupLocationDetails($magentoItem); - $formattedItem = [ + $formattedItem = $this->itemFactory->create([ 'id' => $id, 'sku' => $magentoItem->getSku(), - 'storePrice' => $magentoItem->getPrice() ? $magentoItem->getPrice() : 0, - 'weight' => $weight, 'qty' => $magentoItem->getQty() ? floatval($magentoItem->getQty()) : 0, - 'type' => $productType, - 'items' => [], // child items - 'basePrice' => $magentoItem->getBasePrice(), - 'taxInclBasePrice' => $magentoItem->getBasePriceInclTax() ? $magentoItem->getBasePriceInclTax() : 0, - 'taxInclStorePrice' => $magentoItem->getPriceInclTax() ? $magentoItem->getPriceInclTax() : 0, + 'weight' => $weight, 'rowTotal' => $magentoItem->getRowTotal(), + 'basePrice' => $magentoItem->getBasePrice(), 'baseRowTotal' => $magentoItem->getBaseRowTotal(), + 'discountAmount' => $magentoItem->getDiscountAmount(), 'discountPercent' => $magentoItem->getDiscountPercent(), 'discountedBasePrice' => $magentoItem->getBasePrice() - ($magentoItem->getBaseDiscountAmount() / $magentoItem->getQty()), 'discountedStorePrice' => $magentoItem->getPrice() - ($magentoItem->getDiscountAmount() / $magentoItem->getQty()), 'discountedTaxInclBasePrice' => $magentoItem->getBasePrice() - ($magentoItem->getBaseDiscountAmount() / $magentoItem->getQty()) + ($magentoItem->getBaseTaxAmount() / $magentoItem->getQty()), 'discountedTaxInclStorePrice' => $magentoItem->getPrice() - ($magentoItem->getDiscountAmount() / $magentoItem->getQty()) + ($magentoItem->getTaxAmount() / $magentoItem->getQty()), - 'attributes' => $options ? array_merge(self::populateAttributes($stdAttributes, $magentoItem), $options) : self::populateAttributes($stdAttributes, $magentoItem), - 'legacyAttributes' => self::populateAttributes(self::$legacyAttributeNames, $magentoItem), - 'baseCurrency' => $request->getBaseCurrency()->getCurrencyCode(), + 'fixedPrice' => $fixedPrice, + 'fixedWeight' => $fixedWeight, + 'freeShipping' => (bool)$magentoItem->getFreeShipping(), 'packageCurrency' => $request->getPackageCurrency()->getCurrencyCode(), + 'baseCurrency' => $request->getBaseCurrency()->getCurrencyCode(), 'storeBaseCurrency' => $this->storeManager->getStore()->getBaseCurrencyCode(), 'storeCurrentCurrency' => $this->storeManager->getStore()->getCurrentCurrencyCode(), + 'storePrice' => $magentoItem->getPrice() ? $magentoItem->getPrice() : 0, + 'taxInclBasePrice' => $magentoItem->getBasePriceInclTax() ? $magentoItem->getBasePriceInclTax() : 0, + 'taxInclStorePrice' => $magentoItem->getPriceInclTax() ? $magentoItem->getPriceInclTax() : 0, 'taxPercentage' => $taxPercentage, - 'freeShipping' => (bool)$magentoItem->getFreeShipping(), + 'type' => $productType, + 'items' => [], // child items + 'attributes' => $options ? array_merge(self::populateAttributes($stdAttributes, $magentoItem), $options) : self::populateAttributes($stdAttributes, $magentoItem), + 'legacyAttributes' => self::populateAttributes(self::$legacyAttributeNames, $magentoItem), 'additionalAttributes' => self::getCustomAttributes($magentoItem), - 'fixedPrice' => $fixedPrice, - 'fixedWeight' => $fixedWeight, 'warehouseDetails' => $warehouseDetails, 'pickupLocationDetails' => $pickupLocationDetails - ]; + ]); if(count($warehouseDetails) == 0) { - $formattedItem['defaultWarehouseStockDetail'] = $this->getDefaultWarehouseStockDetail($magentoItem); + $formattedItem->setDefaultWarehouseStockDetail($this->getDefaultWarehouseStockDetail($magentoItem)); } if (!$childItems) { - $formattedItem['items'] = $this->getFormattedItems( - $request, $magentoItem->getChildren(), true); + $formattedItem->setItems($this->getFormattedItems( + $request, $magentoItem->getChildren(), true)); } $formattedItems[] = $formattedItem; @@ -526,14 +546,14 @@ protected function getWarehouseDetails($item) } $admin_value= $attribute->setStoreId(0)->getSource()->getOptionText($aValue); $valueString = is_array($admin_value) ? implode('', $admin_value) : $admin_value; - /* $warehouseDetail = $this->physicalBuildingDetailFactory->create(['name' => $valueString, + $warehouseDetail = $this->physicalBuildingDetailFactory->create(['name' => $valueString, 'inventoryCount' => $this->stockHandler->getOriginInventoryCount($valueString,$item, $product), 'availabilityDate' => $this->stockHandler->getOriginAvailabilityDate($valueString,$item, $product), - 'inStock' => $this->stockHandler->getOriginInstock($valueString,$item, $product)]); */ - $warehouseDetail = ['name' => $valueString, + 'inStock' => $this->stockHandler->getOriginInstock($valueString,$item, $product)]); + /* $warehouseDetail = ['name' => $valueString, 'inventoryCount' => $this->stockHandler->getOriginInventoryCount($valueString,$item, $product), 'availabilityDate' => $this->stockHandler->getOriginAvailabilityDate($valueString,$item, $product), - 'inStock' => $this->stockHandler->getOriginInstock($valueString,$item, $product)]; + 'inStock' => $this->stockHandler->getOriginInstock($valueString,$item, $product)];*/ $details[] = $warehouseDetail; } } @@ -554,14 +574,14 @@ protected function getPickupLocationDetails($item) foreach($itemLocations as $aValue) { $admin_value= $attribute->setStoreId(0)->getSource()->getOptionText($aValue); $valueString = is_array($admin_value) ? implode('', $admin_value) : $admin_value; - /* $locationDetail = $this->physicalBuildingDetailFactory->create(['name' => $valueString, + $locationDetail = $this->physicalBuildingDetailFactory->create(['name' => $valueString, 'inventoryCount' => $this->stockHandler->getLocationInventoryCount($valueString,$item, $product), 'availabilityDate' => $this->stockHandler->getLocationAvailabilityDate($valueString,$item, $product), - 'inStock' => $this->stockHandler->getLocationInstock($valueString,$item, $product)]); */ - $locationDetail = ['name' => $valueString, + 'inStock' => $this->stockHandler->getLocationInstock($valueString,$item, $product)]); + /* $locationDetail = ['name' => $valueString, 'inventoryCount' => $this->stockHandler->getLocationInventoryCount($valueString,$item, $product), 'availabilityDate' => $this->stockHandler->getLocationAvailabilityDate($valueString,$item, $product), - 'inStock' => $this->stockHandler->getLocationInstock($valueString,$item, $product)]; + 'inStock' => $this->stockHandler->getLocationInstock($valueString,$item, $product)];*/ $details[] = $locationDetail; } } @@ -571,14 +591,14 @@ protected function getPickupLocationDetails($item) protected function getDefaultWarehouseStockDetail($item) { - $product = $item->getProduct(); - /* $details = $this->stockDetailFactory->create([ - 'inventoryCount' => $this->stockHandler->getOriginInventoryCount($valueString,$item, $product), - 'availabilityDate' => $this->stockHandler->getOriginAvailabilityDate($valueString,$item, $product), - 'inStock' => $this->stockHandler->getOriginInstock($valueString,$item, $product)]); */ - $details = ['inventoryCount' => $this->stockHandler->getInventoryCount($item, $product), + $product = $item->getProduct(); + $details = $this->stockDetailFactory->create([ + 'inventoryCount' => $this->stockHandler->getInventoryCount($item, $product), + 'availabilityDate' => $this->stockHandler->getAvailabilityDate($item, $product), + 'inStock' => $this->stockHandler->getInstock($item, $product)]); + /* $details = ['inventoryCount' => $this->stockHandler->getInventoryCount($item, $product), 'availabilityDate' => $this->stockHandler->getAvailabilityDate($item, $product), - 'inStock' => $this->stockHandler->getInstock($item, $product)]; + 'inStock' => $this->stockHandler->getInstock($item, $product)];*/ return $details; diff --git a/src/Model/Carrier/Shipper.php b/src/Model/Carrier/Shipper.php index a7cc54cd..1f3d4bf2 100755 --- a/src/Model/Carrier/Shipper.php +++ b/src/Model/Carrier/Shipper.php @@ -89,6 +89,10 @@ class Shipper * @var \ShipperHQ\Shipper\Helper\Data */ protected $shipperDataHelper; + /* + *@var \ShipperHQ\Shipper\Helper\Rest + */ + protected $restHelper; /** * @var \Magento\Quote\Model\Quote\Address\RateResult\MethodFactory @@ -142,6 +146,7 @@ class Shipper /** * @param \ShipperHQ\Shipper\Helper\Data $shipperDataHelper + * @param \ShipperHQ\Shipper\Helper\Rest $restHelper * @param \ShipperHQ\Shipper\Helper\CarrierCache $carrierCache * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig * @param \ShipperHQ\Shipper\Helper\LogAssist $shipperLogger @@ -161,6 +166,7 @@ class Shipper */ public function __construct( \ShipperHQ\Shipper\Helper\Data $shipperDataHelper, + \ShipperHQ\Shipper\Helper\Rest $restHelper, \ShipperHQ\Shipper\Helper\CarrierCache $carrierCache, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \ShipperHQ\Shipper\Helper\LogAssist $shipperLogger, @@ -181,6 +187,7 @@ public function __construct( ) { $this->shipperDataHelper = $shipperDataHelper; + $this->restHelper = $restHelper; $this->configHelper = $configHelper; $this->shipperMapper = $shipperMapper; $this->rateFactory = $resultFactory; @@ -297,9 +304,9 @@ public function getAllShippingMethods() $allMethodsRequest = $this->shipperMapper->getCredentialsTranslation(); $requestString = serialize($allMethodsRequest); $resultSet = $this->carrierCache->getCachedQuotes($requestString, $this->getCarrierCode()); - $timeout = $this->shipperDataHelper->getWebserviceTimeout(); + $timeout = $this->restHelper->getWebserviceTimeout(); if (!$resultSet) { - $allowedMethodUrl = $this->shipperDataHelper->getAllowedMethodGatewayUrl(); + $allowedMethodUrl = $this->restHelper->getAllowedMethodGatewayUrl(); $resultSet = $this->shipperWSClientFactory->create()->sendAndReceive( $this->shipperMapper->getCredentialsTranslation(), $allowedMethodUrl, $timeout); if(is_object($resultSet['result'])) { @@ -428,11 +435,11 @@ protected function getQuotes() { $requestString = serialize($this->shipperRequest); $resultSet = $this->carrierCache->getCachedQuotes($requestString, $this->getCarrierCode()); - $timeout = $this->shipperDataHelper->getWebserviceTimeout(); + $timeout = $this->restHelper->getWebserviceTimeout(); if (!$resultSet) { $initVal = microtime(true); $resultSet = $this->shipperWSClientFactory->create()->sendAndReceive($this->shipperRequest, - $this->shipperDataHelper->getRateGatewayUrl(), $timeout); + $this->restHelper->getRateGatewayUrl(), $timeout); $elapsed = microtime(true) - $initVal; $this->shipperLogger->postDebug('Shipperhq_Shipper', 'Short lapse',$elapsed); @@ -604,21 +611,32 @@ protected function processRatesResponse($shipperResponse, $transactionId) $configSetttings = $this->configSettingsFactory->create([ 'hideNotifications' => $this->shipperDataHelper->getConfigFlag('carriers/shipper/hide_notify'), 'transactionIdEnabled' => $this->shipperDataHelper->isTransactionIdEnabled(), - 'locale' => $this->getLocaleInGlobals()]); - + 'locale' => $this->getLocaleInGlobals(), + 'shipperHQCode' => $this->_code, + 'shipperHQTitle' => $this->shipperDataHelper->getConfigFlag('carriers/shipper/title')]); + $splitCarrierGroupDetail = []; foreach ($carrierGroups as $carrierGroup) { $carrierGroupDetail = $this->shipperRateHelper->extractCarriergroupDetail($carrierGroup, $transactionId); - $this->setCarriergroupOnItems($carrierGroupDetail, $carrierGroup->products); //Pass off each carrier group to helper to decide best fit to process it. //Push result back into our array foreach ($carrierGroup->carrierRates as $carrierRate) { $this->carrierConfigHandler->saveCarrierResponseDetails($carrierRate, $carrierGroupDetail, false); - $carrierResultWithRates = $this->shipperRateHelper->extractShipperHQRates($carrierRate, $carrierGroupDetail, $configSetttings); + $carrierResultWithRates = $this->shipperRateHelper->extractShipperHQRates($carrierRate, $carrierGroupDetail, $configSetttings, $splitCarrierGroupDetail); $ratesArray[] = $carrierResultWithRates; } } + //check for configuration here for display + if($shipperResponse->mergedRateResponse) { + $mergedRatesArray = []; + foreach($shipperResponse->mergedRateResponse->carrierRates as $carrierRate) { + $mergedResultWithRates = $this->shipperRateHelper->extractShipperHQMergedRates($carrierRate, $splitCarrierGroupDetail, $configSetttings); + $mergedRatesArray[] = $mergedResultWithRates; + } + $ratesArray = $mergedRatesArray; + } + $carriergroupDescriber = $shipperResponse->globalSettings->carrierGroupDescription; if ($carriergroupDescriber != '') { $this->carrierConfigHandler->saveConfig($this->shipperDataHelper->getCarrierGroupDescPath(), diff --git a/src/Model/Synchronizer.php b/src/Model/Synchronizer.php index 740df3b1..b5960630 100755 --- a/src/Model/Synchronizer.php +++ b/src/Model/Synchronizer.php @@ -66,6 +66,10 @@ class Synchronizer extends \Magento\Framework\Model\AbstractModel * @var \ShipperHQ\Shipper\Helper\Data */ protected $shipperDataHelper; + /* + *@var \ShipperHQ\Shipper\Helper\Rest + */ + protected $restHelper; /** * @var \Magento\Framework\Registry @@ -127,6 +131,7 @@ class Synchronizer extends \Magento\Framework\Model\AbstractModel */ public function __construct( \ShipperHQ\Shipper\Helper\Data $shipperDataHelper, + \ShipperHQ\Shipper\Helper\Rest $restHelper, \ShipperHQ\Shipper\Helper\CarrierCache $carrierCache, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \ShipperHQ\Shipper\Helper\LogAssist $shipperLogger, @@ -143,6 +148,7 @@ public function __construct( ) { $this->shipperDataHelper = $shipperDataHelper; + $this->restHelper = $restHelper; $this->shipperMapper = $shipperMapper; $this->registry = $registry; $this->shipperLogger = $shipperLogger; @@ -202,7 +208,7 @@ public function checkSynchStatus($saveTime = false) { if ($this->shipperDataHelper->getConfigValue('carriers/shipper/active')) { - $synchCheckUrl = $this->shipperDataHelper->getCheckSynchronizedUrl(); + $synchCheckUrl = $this->restHelper->getCheckSynchronizedUrl(); $result = $this->send($synchCheckUrl); $synchResult = $result['result']; $debugData = array( @@ -234,7 +240,7 @@ public function checkSynchStatus($saveTime = false) protected function send($url, $request = null) { - $timeout = $this->shipperDataHelper->getWebserviceTimeout(); + $timeout = $this->restHelper->getWebserviceTimeout(); if(is_null($request)) { $request = $this->shipperMapper->getCredentialsTranslation(); } @@ -248,7 +254,7 @@ protected function send($url, $request = null) protected function getLatestAttributeData() { $result = array(); - $synchronizeUrl = $this->shipperDataHelper->getAttributeGatewayUrl(); + $synchronizeUrl = $this->restHelper->getAttributeGatewayUrl(); $resultSet = $this->send($synchronizeUrl); $allAttributesResponse = $resultSet['result'];