public function USPSRateRequest::buildRate in Commerce USPS 8
Initialize the rate request object needed for the USPS API.
Overrides USPSRateRequestBase::buildRate
File
- src/
USPSRateRequest.php, line 129
Class
- USPSRateRequest
- Class USPSRateRequest.
Namespace
Drupal\commerce_uspsCode
public function buildRate() {
// Invoke the parent to initialize the uspsRequest.
parent::buildRate();
// Add each package to the request.
foreach ($this
->getPackages() as $package) {
$this->uspsRequest
->addPackage($package);
}
}