Fetch USPS Regional Rates¶
The USPS does not return regional rates during a fetch all rates call (getAllRates()). You must specify a service and appropriate container parameter.
Example:
<?php
$rate = new \RocketShipIt\Rate('USPS');
$rate->setParameter('toCountry','US');
$rate->setParameter('toCode','90210');
$rate->setParameter('service', 'Priority Commercial');
$package = new \RocketShipIt\Package('USPS');
$package->setParameter('weight', '5');
$package->setParameter('container', 'Regional Rate Box A');
$rate->addPackageToShipment($package);
$response = $rate->getRate();
See also Apendix A