You are here

public function ShippingMethodInterface::calculateRates in Commerce Shipping 8.2

Calculates rates for the given shipment.

Parameters

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

Return value

\Drupal\commerce_shipping\ShippingRate[] The rates.

3 methods override ShippingMethodInterface::calculateRates()
ExceptionThrower::calculateRates in tests/modules/commerce_shipping_test/src/Plugin/Commerce/ShippingMethod/ExceptionThrower.php
Calculates rates for the given shipment.
FlatRate::calculateRates in src/Plugin/Commerce/ShippingMethod/FlatRate.php
Calculates rates for the given shipment.
Test::calculateRates in tests/modules/commerce_shipping_test/src/Plugin/Commerce/ShippingMethod/Test.php
Calculates rates for the given shipment.

File

src/Plugin/Commerce/ShippingMethod/ShippingMethodInterface.php, line 58

Class

ShippingMethodInterface
Defines the base interface for shipping methods.

Namespace

Drupal\commerce_shipping\Plugin\Commerce\ShippingMethod

Code

public function calculateRates(ShipmentInterface $shipment);