public function USPSShipmentBase::getPackage in Commerce USPS 8
Get the RatePackage object.
Parameters
\Drupal\commerce_shipping\Entity\ShipmentInterface $commerce_shipment: The commerce shipment entity.
Return value
\USPS\RatePackage The RatePackage object.
Overrides USPSShipmentInterface::getPackage
File
- src/
USPSShipmentBase.php, line 74
Class
- USPSShipmentBase
- Class that sets the shipment details needed for the USPS request.
Namespace
Drupal\commerce_uspsCode
public function getPackage(ShipmentInterface $commerce_shipment) {
$this->commerceShipment = $commerce_shipment;
$this
->buildPackage($commerce_shipment);
$this
->alterPackage();
return $this->uspsPackage;
}