You are here

interface InvoiceTotalSummaryInterface in Commerce Invoice 8.2

Hierarchy

Expanded class hierarchy of InvoiceTotalSummaryInterface

All classes that implement InvoiceTotalSummaryInterface

2 files declare their use of InvoiceTotalSummaryInterface
InvoiceConfirmationMail.php in src/Mail/InvoiceConfirmationMail.php
InvoiceTotalSummary.php in src/Plugin/Field/FieldFormatter/InvoiceTotalSummary.php

File

src/InvoiceTotalSummaryInterface.php, line 7

Namespace

Drupal\commerce_invoice
View source
interface InvoiceTotalSummaryInterface {

  /**
   * Builds the totals for the given invoice.
   *
   * @param \Drupal\commerce_invoice\Entity\InvoiceInterface $invoice
   *   The invoice.
   *
   * @return array
   *   An array of totals with the following elements:
   *     - subtotal: The order subtotal price.
   *     - adjustments: The adjustments:
   *         - type: The adjustment type.
   *         - label: The adjustment label.
   *         - amount: The adjustment amount.
   *         - percentage: The decimal adjustment percentage, when available.
   *     - total: The invoice total price.
   */
  public function buildTotals(InvoiceInterface $invoice);

}

Members

Namesort descending Modifiers Type Description Overrides
InvoiceTotalSummaryInterface::buildTotals public function Builds the totals for the given invoice. 1