lib/nurego/offering.rb in nurego-1.0.9 vs lib/nurego/offering.rb in nurego-1.0.10

- old
+ new

@@ -1,13 +1,18 @@ module Nurego class Offering < APIResource - def self.retrieve(id, api_key=nil) + 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 self.my_plan(params = {}, api_key = nil) + response, api_key = Nurego.request(:get, self.url + '/my', api_key, params) Util.convert_to_nurego_object(response, api_key) end def plans Plan.all({:offering => id }, @api_key)