Does it have any additional meaning in addition to being an identifier? Any grouping? I checked UPS and it seems to be using it to determine whether and cgi(direct) or and xml request is coming through.
1 Answer
Yes, you are right it is only used to determine the type of request:
To get the quotes:
protected function _getQuotes()
{
switch ($this->getConfigData('type')) {
case 'UPS':
return $this->_getCgiQuotes();
case 'UPS_XML':
return $this->_getXmlQuotes();
default:
break;
}
return null;
}
To get the tracking:
public function getTracking($trackings)
{
if (!is_array($trackings)) {
$trackings = [$trackings];
}
if ($this->getConfigData('type') == 'UPS') {
$this->_getCgiTracking($trackings);
} elseif ($this->getConfigData('type') == 'UPS_XML') {
$this->setXMLAccessRequest();
$this->_getXmlTracking($trackings);
}
return $this->_result;
}
And to get the allowed methods:
public function getAllowedMethods()
{
$allowed = explode(',', $this->getConfigData('allowed_methods'));
$arr = [];
$isByCode = $this->getConfigData('type') == 'UPS_XML';
foreach ($allowed as $code) {
$arr[$code] = $isByCode ? $this->getShipmentByCode($code) : $this->configHelper->getCode('method', $code);
}
return $arr;
}