You are here

interface BillingScheduleInterface in Commerce Recurring Framework 8

Same name in this branch
  1. 8 src/Entity/BillingScheduleInterface.php \Drupal\commerce_recurring\Entity\BillingScheduleInterface
  2. 8 src/Plugin/Commerce/BillingSchedule/BillingScheduleInterface.php \Drupal\commerce_recurring\Plugin\Commerce\BillingSchedule\BillingScheduleInterface

Provides the interface for billing schedules.

Responsible for generating billing periods, used to determine when the customer should be charged.

Hierarchy

Expanded class hierarchy of BillingScheduleInterface

All classes that implement BillingScheduleInterface

See also

\Drupal\commerce_recurring\BillingPeriod

1 file declares its use of BillingScheduleInterface
BillingScheduleManager.php in src/BillingScheduleManager.php

File

src/Plugin/Commerce/BillingSchedule/BillingScheduleInterface.php, line 20

Namespace

Drupal\commerce_recurring\Plugin\Commerce\BillingSchedule
View source
interface BillingScheduleInterface extends ConfigurableInterface, DependentPluginInterface, PluginFormInterface, PluginInspectionInterface {

  /**
   * Gets the billing schedule label.
   *
   * @return string
   *   The billing schedule label.
   */
  public function getLabel();

  /**
   * Checks whether the billing schedule allows trials.
   *
   * @return bool
   *   TRUE if the billing schedule allows trials, FALSE otherwise.
   */
  public function allowTrials();

  /**
   * Generates the trial period.
   *
   * @param \Drupal\Core\Datetime\DrupalDateTime $start_date
   *   The trial start date/time.
   *
   * @return \Drupal\commerce_recurring\BillingPeriod
   *   The trial period.
   */
  public function generateTrialPeriod(DrupalDateTime $start_date);

  /**
   * Generates the first billing period.
   *
   * @param \Drupal\Core\Datetime\DrupalDateTime $start_date
   *   The billing start date/time.
   *
   * @return \Drupal\commerce_recurring\BillingPeriod
   *   The billing period.
   */
  public function generateFirstBillingPeriod(DrupalDateTime $start_date);

  /**
   * Generates the next billing period.
   *
   * @param \Drupal\Core\Datetime\DrupalDateTime $start_date
   *   The billing start date/time.
   * @param \Drupal\commerce_recurring\BillingPeriod $billing_period
   *   The current billing period.
   *
   * @return \Drupal\commerce_recurring\BillingPeriod
   *   The billing period.
   */
  public function generateNextBillingPeriod(DrupalDateTime $start_date, BillingPeriod $billing_period);

}

Members

Namesort descending Modifiers Type Description Overrides
BillingScheduleInterface::allowTrials public function Checks whether the billing schedule allows trials. 1
BillingScheduleInterface::generateFirstBillingPeriod public function Generates the first billing period. 2
BillingScheduleInterface::generateNextBillingPeriod public function Generates the next billing period. 2
BillingScheduleInterface::generateTrialPeriod public function Generates the trial period. 1
BillingScheduleInterface::getLabel public function Gets the billing schedule label. 1
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
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