value; } /** * Checks if the billing cycle is recurring. * * Payments are recurring if the billing cycle is monthly or yearly. * * @return bool */ public function isRecurring(): bool { return match ($this) { BillingCycle::MONTHLY, BillingCycle::YEARLY => true, default => false, }; } public function isRenewable(): bool { return match ($this) { BillingCycle::MONTHLY, BillingCycle::YEARLY, BillingCycle::LIFETIME => true, default => false, }; } }