You are here

protected function USPSShipmentBase::getPackageType in Commerce USPS 8

Determine the package type for the shipment.

Return value

\Drupal\commerce_shipping\Plugin\Commerce\PackageType\PackageTypeInterface The package type.

1 call to USPSShipmentBase::getPackageType()
USPSShipmentBase::setDimensions in src/USPSShipmentBase.php
Sets the package dimensions.

File

src/USPSShipmentBase.php, line 141

Class

USPSShipmentBase
Class that sets the shipment details needed for the USPS request.

Namespace

Drupal\commerce_usps

Code

protected function getPackageType() {

  // If the package is set on the shipment, use that.
  if (!empty($this->commerceShipment
    ->getPackageType())) {
    return $this->commerceShipment
      ->getPackageType();
  }

  // TODO return default shipment for shipping method.
}