You are here

public function Rolling::generateFirstBillingPeriod in Commerce Recurring Framework 8

Generates the first billing period.

Parameters

\Drupal\Core\Datetime\DrupalDateTime $start_date: The billing start date/time.

Return value

\Drupal\commerce_recurring\BillingPeriod The billing period.

Overrides BillingScheduleInterface::generateFirstBillingPeriod

File

src/Plugin/Commerce/BillingSchedule/Rolling.php, line 25

Class

Rolling
Provides a rolling interval billing schedule.

Namespace

Drupal\commerce_recurring\Plugin\Commerce\BillingSchedule

Code

public function generateFirstBillingPeriod(DrupalDateTime $start_date) {
  return new BillingPeriod($start_date, $this
    ->getInterval()
    ->add($start_date));
}