You are here

interface ShipmentManagerInterface in Commerce Shipping 8.2

Manages shipments.

Hierarchy

Expanded class hierarchy of ShipmentManagerInterface

All classes that implement ShipmentManagerInterface

1 file declares its use of ShipmentManagerInterface
ShippingRateWidget.php in src/Plugin/Field/FieldWidget/ShippingRateWidget.php

File

src/ShipmentManagerInterface.php, line 10

Namespace

Drupal\commerce_shipping
View source
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);

}

Members

Namesort descending Modifiers Type Description Overrides
ShipmentManagerInterface::applyRate public function Applies the given shipping rate to the given shipment. 1
ShipmentManagerInterface::calculateRates public function Calculates rates for the given shipment. 1
ShipmentManagerInterface::selectDefaultRate public function Selects the default rate for the given shipment. 1