
| Current Path : /var/www/html/store/web/modules/contrib/commerce_shipping/src/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/store/web/modules/contrib/commerce_shipping/src/ShipmentManagerInterface.php |
<?php
namespace Drupal\commerce_shipping;
use Drupal\commerce_shipping\Entity\ShipmentInterface;
/**
* Manages shipments.
*/
interface ShipmentManagerInterface {
/**
* Applies the given shipping rate to the given shipment.
*
* @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
* The shipment.
* @param \Drupal\commerce_shipping\ShippingRate $rate
* The shipping rate.
*/
public function applyRate(ShipmentInterface $shipment, ShippingRate $rate);
/**
* Calculates rates for the given shipment.
*
* @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
* The shipment.
*
* @return \Drupal\commerce_shipping\ShippingRate[]
* The rates.
*/
public function calculateRates(ShipmentInterface $shipment);
/**
* Selects the default rate for the given shipment.
*
* @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
* The shipment.
* @param \Drupal\commerce_shipping\ShippingRate[] $rates
* The available rates.
*
* @return \Drupal\commerce_shipping\ShippingRate
* The selected rate.
*/
public function selectDefaultRate(ShipmentInterface $shipment, array $rates);
}