Sha256: c2cfc5bb4bb34e300d43ee25a20a1e230b6dcf47dcad594ff7760e12f59c6305

Contents?: true

Size: 528 Bytes

Versions: 107

Compression:

Stored size: 528 Bytes

Contents

module Avo
  module Licensing
    class LicenseManager
      def initialize(hq_response)
        @hq_response = hq_response
      end

      def license
        case @hq_response["id"]
        when "community"
          CommunityLicense.new @hq_response
        when "pro", "advanced"
          ProLicense.new @hq_response
        else
          NilLicense.new @hq_response
        end
      end

      def self.refresh_license(request)
        new(Licensing::HQ.new(request).fresh_response).license
      end
    end
  end
end

Version data entries

107 entries across 107 versions & 1 rubygems

Version Path
avo-3.14.3 lib/avo/licensing/license_manager.rb
avo-3.14.2 lib/avo/licensing/license_manager.rb
avo-3.14.1 lib/avo/licensing/license_manager.rb
avo-3.14.0 lib/avo/licensing/license_manager.rb
avo-3.13.7 lib/avo/licensing/license_manager.rb
avo-3.13.6 lib/avo/licensing/license_manager.rb
avo-3.13.5 lib/avo/licensing/license_manager.rb
avo-3.13.4 lib/avo/licensing/license_manager.rb
avo-3.13.3 lib/avo/licensing/license_manager.rb
avo-3.13.2 lib/avo/licensing/license_manager.rb
avo-3.13.1 lib/avo/licensing/license_manager.rb
avo-3.13.0 lib/avo/licensing/license_manager.rb
avo-3.12.0 lib/avo/licensing/license_manager.rb
avo-3.11.10 lib/avo/licensing/license_manager.rb
avo-3.11.9 lib/avo/licensing/license_manager.rb
avo-3.11.8 lib/avo/licensing/license_manager.rb
avo-3.11.7 lib/avo/licensing/license_manager.rb
avo-3.11.6 lib/avo/licensing/license_manager.rb
avo-3.11.5 lib/avo/licensing/license_manager.rb
avo-3.11.4 lib/avo/licensing/license_manager.rb