Sha256: 4189f9b9e7a2a52599bee1ab6546d4253445e60b1976a4ce933415ca53191da4

Contents?: true

Size: 522 Bytes

Versions: 69

Compression:

Stored size: 522 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"
          ProLicense.new @hq_response
        else
          NullLicense.new @hq_response
        end
      end

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

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
avo-2.14.3.pre.4.tosqlfix lib/avo/licensing/license_manager.rb
avo-2.14.3.pre.3.jsbundling lib/avo/licensing/license_manager.rb
avo-2.14.3.pre.2.tailwindcss lib/avo/licensing/license_manager.rb
avo-2.14.3.pre.1.branding lib/avo/licensing/license_manager.rb
avo-2.14.2 lib/avo/licensing/license_manager.rb
avo-2.14.2.pre.1 lib/avo/licensing/license_manager.rb
avo-2.14.1 lib/avo/licensing/license_manager.rb
avo-2.14.1.pre.1 lib/avo/licensing/license_manager.rb
avo-2.14.0 lib/avo/licensing/license_manager.rb
avo-2.13.6.pre.2 lib/avo/licensing/license_manager.rb
avo-2.13.6.pre.1 lib/avo/licensing/license_manager.rb
avo-2.13.5.pre.2 lib/avo/licensing/license_manager.rb
avo-2.13.5.pre.1 lib/avo/licensing/license_manager.rb
avo-2.13.4.pre.1 lib/avo/licensing/license_manager.rb
avo-2.13.3.pre.4 lib/avo/licensing/license_manager.rb
avo-2.13.3.pre.3 lib/avo/licensing/license_manager.rb
avo-2.13.3.pre.2 lib/avo/licensing/license_manager.rb
avo-2.13.3.pre.1 lib/avo/licensing/license_manager.rb
avo-2.13.2.pre.2 lib/avo/licensing/license_manager.rb
avo-2.13.2.pre.1 lib/avo/licensing/license_manager.rb