You are here

SupportsTrackingInterface.php in Commerce Shipping 8.2

File

src/Plugin/Commerce/ShippingMethod/SupportsTrackingInterface.php
View source
<?php

namespace Drupal\commerce_shipping\Plugin\Commerce\ShippingMethod;

use Drupal\commerce_shipping\Entity\ShipmentInterface;

/**
 * Defines the interface for shipping methods which support tracking.
 */
interface SupportsTrackingInterface {

  /**
   * Gets the tracking url for the given shipment.
   *
   * @param \Drupal\commerce_shipping\Entity\ShipmentInterface $shipment
   *   The shipment.
   *
   * @return \Drupal\core\Url|null
   *   The tracking URL, or NULL if not available yet.
   */
  public function getTrackingUrl(ShipmentInterface $shipment);

}

Interfaces

Namesort descending Description
SupportsTrackingInterface Defines the interface for shipping methods which support tracking.