You are here

public function USPSRateRequestInterface::getRates in Commerce USPS 8

Fetch rates for the shipping method.

Parameters

\Drupal\commerce_shipping\Entity\ShipmentInterface $commerce_shipment: The commerce shipment.

\Drupal\commerce_shipping\Entity\ShippingMethodInterface $shipping_method: The shipping method being rated.

Return value

array An array of ShippingRate objects.

1 method overrides USPSRateRequestInterface::getRates()
USPSRateRequestBase::getRates in src/USPSRateRequestBase.php
Fetch rates from the USPS API.

File

src/USPSRateRequestInterface.php, line 26

Class

USPSRateRequestInterface
The interface for fetching and returning rates using the USPS API.

Namespace

Drupal\commerce_usps

Code

public function getRates(ShipmentInterface $commerce_shipment, ShippingMethodInterface $shipping_method);