Skip to content
Merged
8 changes: 6 additions & 2 deletions app/code/Magento/Ups/Model/Carrier.php
Original file line number Diff line number Diff line change
Expand Up @@ -1118,8 +1118,7 @@ protected function _getRestQuotes()
"AddressLine" => ["{$params['49_residential']}"],
"StateProvinceCode" => "{$params['destRegionCode']}",
"PostalCode" => "{$params['19_destPostal']}",
"CountryCode" => "{$params['22_destCountry']}",
"ResidentialAddressIndicator" => "{$residentialAddressIndicator}"
"CountryCode" => "{$params['22_destCountry']}"
]
],
"ShipFrom" => [
Expand All @@ -1134,6 +1133,11 @@ protected function _getRestQuotes()
]
];

if ($params['49_residential'] === '01') {
$rateParams['RateRequest']['Shipment']['ShipTo']['Address']['ResidentialAddressIndicator']
= $residentialAddressIndicator;
}

if ($this->getConfigFlag('negotiated_active')) {
$rateParams['RateRequest']['Shipment']['ShipmentRatingOptions']['TPFCNegotiatedRatesIndicator'] = "Y";
$rateParams['RateRequest']['Shipment']['ShipmentRatingOptions']['NegotiatedRatesIndicator'] = "Y";
Expand Down