2021-08-10 08:45:23 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class CustomWizard::Pro
|
|
|
|
NAMESPACE ||= "#{CustomWizard::PLUGIN_NAME}_pro"
|
|
|
|
|
|
|
|
attr_reader :authentication,
|
|
|
|
:subscription
|
|
|
|
|
|
|
|
def initialize
|
|
|
|
@authentication = CustomWizard::ProAuthentication.new
|
|
|
|
@subscription = CustomWizard::ProSubscription.new
|
|
|
|
end
|
|
|
|
|
|
|
|
def authorized?
|
|
|
|
@authentication.active?
|
|
|
|
end
|
|
|
|
|
|
|
|
def subscribed?
|
|
|
|
@subscription.active?
|
|
|
|
end
|
2021-08-10 11:00:42 +02:00
|
|
|
|
|
|
|
def self.subscribed?
|
|
|
|
self.new.subscribed?
|
|
|
|
end
|
2021-08-10 08:45:23 +02:00
|
|
|
end
|