public function Fixed::generateNextBillingPeriod in Commerce Recurring Framework 8
Generates the next billing period.
Parameters
\Drupal\Core\Datetime\DrupalDateTime $start_date: The billing start date/time.
\Drupal\commerce_recurring\BillingPeriod $billing_period: The current billing period.
Return value
\Drupal\commerce_recurring\BillingPeriod The billing period.
Overrides BillingScheduleInterface::generateNextBillingPeriod
File
- src/
Plugin/ Commerce/ BillingSchedule/ Fixed.php, line 108
Class
- Fixed
- Provides a fixed interval billing schedule.
Namespace
Drupal\commerce_recurring\Plugin\Commerce\BillingScheduleCode
public function generateNextBillingPeriod(DrupalDateTime $start_date, BillingPeriod $billing_period) {
$next_start_date = $billing_period
->getEndDate();
return new BillingPeriod($next_start_date, $this
->getInterval()
->add($next_start_date));
}