You are here

TaxRatePluginInterface.php in Ubercart 8.4

Namespace

Drupal\uc_tax

File

uc_tax/src/TaxRatePluginInterface.php
View source
<?php

namespace Drupal\uc_tax;

use Drupal\Component\Plugin\ConfigurableInterface;
use Drupal\Component\Plugin\PluginInspectionInterface;
use Drupal\Core\Plugin\PluginFormInterface;
use Drupal\uc_order\OrderInterface;

/**
 * Defines an interface for TaxRate plugins.
 */
interface TaxRatePluginInterface extends PluginInspectionInterface, ConfigurableInterface, PluginFormInterface {

  /**
   * Returns a short description of this tax rate.
   *
   * @return string
   *   The description.
   */
  public function getSummary();

  /**
   * Returns the amount of tax for the order.
   *
   * @param \Drupal\uc_order\OrderInterface $order
   *   The order that is being processed.
   *
   * @return \Drupal\uc_tax\TaxLineItem
   */
  public function calculateTax(OrderInterface $order);

}

Interfaces

Namesort descending Description
TaxRatePluginInterface Defines an interface for TaxRate plugins.