Sha256: 7355bad9a412d882cee584ea901cd4ce9620ea37252a0ecb8102980455f431af

Contents?: true

Size: 481 Bytes

Versions: 4

Compression:

Stored size: 481 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

4 entries across 4 versions & 1 rubygems

Version Path
nurego-1.1.17 lib/nurego/offering.rb
nurego-1.1.16 lib/nurego/offering.rb
nurego-1.1.15 lib/nurego/offering.rb
nurego-1.1.14 lib/nurego/offering.rb