You are here

interface PaymentLineItemInterface in Payment 8.2

A payment line item.

Plugins can additionally implement the following interfaces:

Hierarchy

Expanded class hierarchy of PaymentLineItemInterface

All classes that implement PaymentLineItemInterface

10 files declare their use of PaymentLineItemInterface
LineItemCollection.php in src/LineItemCollection.php
LineItemCollectionInterface.php in src/LineItemCollectionInterface.php
LineItemCollectionTest.php in tests/src/Unit/LineItemCollectionTest.php
Payment.php in src/Entity/Payment.php
PaymentFactoryTest.php in modules/payment_reference/tests/src/Unit/PaymentFactoryTest.php

... See full list

File

src/Plugin/Payment/LineItem/PaymentLineItemInterface.php, line 21

Namespace

Drupal\payment\Plugin\Payment\LineItem
View source
interface PaymentLineItemInterface extends PluginInspectionInterface, PluginFormInterface, PaymentAwareInterface {

  /**
   * Gets the amount.
   *
   * @return float|int|string
   *   A numeric value.
   */
  public function getAmount();

  /**
   * Return this line item's total amount.
   *
   * @return float
   */
  function getTotalAmount();

  /**
   * Sets the machine name.
   *
   * @param string $name
   *
   * @return static
   */
  public function setName($name);

  /**
   * Gets the machine name.
   *
   * @return string
   */
  public function getName();

  /**
   * Gets the line item description.
   *
   * @return string
   */
  public function getDescription();

  /**
   * Gets the currency_code.
   *
   * @return string
   */
  public function getCurrencyCode();

  /**
   * Sets the quantity.
   *
   * @param int|float $quantity
   *
   * @return static
   */
  public function setQuantity($quantity);

  /**
   * Gets the quantity.
   *
   * @return int|float
   */
  public function getQuantity();

}

Members

Namesort descending Modifiers Type Description Overrides
PaymentAwareInterface::getPayment public function Gets the payment. 1
PaymentAwareInterface::setPayment public function Sets the payment. 1
PaymentLineItemInterface::getAmount public function Gets the amount. 1
PaymentLineItemInterface::getCurrencyCode public function Gets the currency_code. 1
PaymentLineItemInterface::getDescription public function Gets the line item description. 1
PaymentLineItemInterface::getName public function Gets the machine name. 1
PaymentLineItemInterface::getQuantity public function Gets the quantity. 1
PaymentLineItemInterface::getTotalAmount function Return this line item's total amount. 1
PaymentLineItemInterface::setName public function Sets the machine name. 1
PaymentLineItemInterface::setQuantity public function Sets the quantity. 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