Sha256: c2cfc5bb4bb34e300d43ee25a20a1e230b6dcf47dcad594ff7760e12f59c6305

Contents?: true

Size: 528 Bytes

Versions: 109

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

109 entries across 109 versions & 1 rubygems

Version Path
avo-3.0.1.beta16 lib/avo/licensing/license_manager.rb
avo-3.0.1.beta14 lib/avo/licensing/license_manager.rb
avo-3.0.1.beta12 lib/avo/licensing/license_manager.rb
avo-3.0.1.beta13 lib/avo/licensing/license_manager.rb
avo-3.0.1.beta10 lib/avo/licensing/license_manager.rb
avo-3.0.1.beta11 lib/avo/licensing/license_manager.rb
avo-3.0.0.pre19 lib/avo/licensing/license_manager.rb
avo-3.0.1.beta8 lib/avo/licensing/license_manager.rb
avo-3.0.1.beta9 lib/avo/licensing/license_manager.rb
avo-3.0.1.beta6 lib/avo/licensing/license_manager.rb
avo-3.0.1.beta7 lib/avo/licensing/license_manager.rb
avo-3.2.2 lib/avo/licensing/license_manager.rb
avo-3.2.1 lib/avo/licensing/license_manager.rb
avo-3.2.0 lib/avo/licensing/license_manager.rb
avo-3.1.7 lib/avo/licensing/license_manager.rb
avo-3.1.6 lib/avo/licensing/license_manager.rb
avo-3.1.5 lib/avo/licensing/license_manager.rb
avo-3.1.4 lib/avo/licensing/license_manager.rb
avo-3.1.3 lib/avo/licensing/license_manager.rb
avo-3.1.2 lib/avo/licensing/license_manager.rb