You are here

public function USPSRateRequestBase::getPackages in Commerce USPS 8

Get an array of USPS packages.

Return value

array An array of USPS packages.

2 calls to USPSRateRequestBase::getPackages()
USPSRateRequest::buildRate in src/USPSRateRequest.php
Initialize the rate request object needed for the USPS API.
USPSRateRequestInternational::buildRate in src/USPSRateRequestInternational.php
Initialize the rate request object needed for the USPS API.

File

src/USPSRateRequestBase.php, line 193

Class

USPSRateRequestBase
Class USPSRateRequest.

Namespace

Drupal\commerce_usps

Code

public function getPackages() {

  // @todo: Support multiple packages.
  return [
    $this->uspsShipment
      ->getPackage($this->commerceShipment),
  ];
}