public function BillingSchedule::setBillingType in Commerce Recurring Framework 8
Sets the billing type.
Parameters
string $billing_type: The billing type.
Return value
$this
Overrides BillingScheduleInterface::setBillingType
File
- src/
Entity/ BillingSchedule.php, line 177
Class
- BillingSchedule
- Defines the billing schedule entity class.
Namespace
Drupal\commerce_recurring\EntityCode
public function setBillingType($billing_type) {
if (!in_array($billing_type, [
self::BILLING_TYPE_PREPAID,
self::BILLING_TYPE_POSTPAID,
])) {
throw new \InvalidArgumentException(sprintf('Invalid billing type "%s" provided.'));
}
$this->billingType = $billing_type;
return $this;
}