Sha256: ac21d765a878346a58f71bc2f94e799909a1781d692a6688e84257575ca91a5a

Contents?: true

Size: 479 Bytes

Versions: 7

Compression:

Stored size: 479 Bytes

Contents

module Nurego
  class Offering < APIResource

    def self.retrieve(id, api_key=nil)
      raise NotImplementedError.new("Offering cannot be retrieved with ID. Retrieve an offering using Offering.current")
    end

    def self.current(params = {}, api_key = nil)
      response, api_key = Nurego.request(:get, self.url, api_key, params)
      Util.convert_to_nurego_object(response, api_key)
    end

    def plans
      Plan.all({:offering => id }, @api_key)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nurego-1.0.9 lib/nurego/offering.rb
nurego-1.0.8 lib/nurego/offering.rb
nurego-1.0.7 lib/nurego/offering.rb
nurego-1.0.6 lib/nurego/offering.rb
nurego-1.0.5 lib/nurego/offering.rb
nurego-1.0.4 lib/nurego/offering.rb
nurego-1.0.1 lib/nurego/offering.rb