You are here

interface LocalTaxTypeInterface in Commerce Core 8.2

Defines the interface for local tax type plugins.

Local tax types store one or more tax zones with their corresponding tax rates.

Hierarchy

Expanded class hierarchy of LocalTaxTypeInterface

All classes that implement LocalTaxTypeInterface

2 files declare their use of LocalTaxTypeInterface
BuildZonesEvent.php in modules/tax/src/Event/BuildZonesEvent.php
StoreTax.php in modules/tax/src/StoreTax.php

File

modules/tax/src/Plugin/Commerce/TaxType/LocalTaxTypeInterface.php, line 13

Namespace

Drupal\commerce_tax\Plugin\Commerce\TaxType
View source
interface LocalTaxTypeInterface extends TaxTypeInterface {

  /**
   * Gets whether tax should be rounded at the order item level.
   *
   * @return bool
   *   TRUE if tax should be rounded at the order item level, FALSE otherwise.
   */
  public function shouldRound();

  /**
   * Gets the tax zones.
   *
   * @return \Drupal\commerce_tax\TaxZone[]
   *   The tax zones, keyed by ID.
   */
  public function getZones();

  /**
   * Gets the tax zones which match the given address.
   *
   * @param \CommerceGuys\Addressing\AddressInterface $address
   *   The address.
   *
   * @return \Drupal\commerce_tax\TaxZone[]
   *   The tax zones, keyed by ID.
   */
  public function getMatchingZones(AddressInterface $address);

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
DerivativeInspectionInterface::getBaseId public function Gets the base_plugin_id of the plugin instance. 1
DerivativeInspectionInterface::getDerivativeId public function Gets the derivative_id of the plugin instance. 1
LocalTaxTypeInterface::getMatchingZones public function Gets the tax zones which match the given address. 1
LocalTaxTypeInterface::getZones public function Gets the tax zones. 1
LocalTaxTypeInterface::shouldRound public function Gets whether tax should be rounded at the order item level. 1
PluginFormInterface::buildConfigurationForm public function Form constructor. 36
PluginFormInterface::submitConfigurationForm public function Form submission handler. 32
PluginFormInterface::validateConfigurationForm public function Form validation handler. 18
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
TaxTypeInterface::applies public function Checks whether the tax type applies to the given order. 1
TaxTypeInterface::apply public function Applies the tax type to the given order. 1
TaxTypeInterface::getLabel public function Gets the tax type label. 1
TaxTypeInterface::getWeight public function Gets the tax type weight. 1
TaxTypeInterface::isDisplayInclusive public function Gets whether the tax type is display inclusive. 1