You are here

interface TaxNumberTypeInterface in Commerce Core 8.2

Defines the base interface for tax number types.

Hierarchy

Expanded class hierarchy of TaxNumberTypeInterface

All classes that implement TaxNumberTypeInterface

File

modules/tax/src/Plugin/Commerce/TaxNumberType/TaxNumberTypeInterface.php, line 11

Namespace

Drupal\commerce_tax\Plugin\Commerce\TaxNumberType
View source
interface TaxNumberTypeInterface extends PluginInspectionInterface, DerivativeInspectionInterface {

  /**
   * Gets the tax number type label.
   *
   * @return string
   *   The tax number type label.
   */
  public function getLabel();

  /**
   * Gets the supported countries.
   *
   * @return string[]
   *   A list of country codes.
   */
  public function getCountries();

  /**
   * Gets the tax number examples.
   *
   * @return string[]
   *   The examples.
   */
  public function getExamples();

  /**
   * Gets the tax number examples, formatted for display.
   *
   * @return string
   *   The formatted examples.
   */
  public function getFormattedExamples();

  /**
   * Canonicalizes the given tax number.
   *
   * @param string $tax_number
   *   The tax number.
   *
   * @return string
   *   The canonicalized tax number.
   */
  public function canonicalize($tax_number);

  /**
   * Validates the given tax number.
   *
   * @param string $tax_number
   *   The tax number.
   *
   * @return bool
   *   TRUE if the given tax number if valid, FALSE otherwise.
   */
  public function validate($tax_number);

}

Members

Namesort descending Modifiers Type Description Overrides
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
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
TaxNumberTypeInterface::canonicalize public function Canonicalizes the given tax number. 1
TaxNumberTypeInterface::getCountries public function Gets the supported countries. 1
TaxNumberTypeInterface::getExamples public function Gets the tax number examples. 1
TaxNumberTypeInterface::getFormattedExamples public function Gets the tax number examples, formatted for display. 1
TaxNumberTypeInterface::getLabel public function Gets the tax number type label. 1
TaxNumberTypeInterface::validate public function Validates the given tax number. 3