Class: Sensr::Plan

Inherits:
SensrObject show all
Defined in:
lib/sensr/plan.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SensrObject

#attributes, #attributes=, #id, #method_missing

Constructor Details

#initialize(hash) ⇒ Plan

:nodoc:



4
5
6
# File 'lib/sensr/plan.rb', line 4

def initialize(hash) # :nodoc:
  super(hash)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Sensr::SensrObject

Class Method Details

.currentObject

Get the current user’s plan



9
10
11
12
# File 'lib/sensr/plan.rb', line 9

def self.current
  response = Sensr.request(:get, Sensr.api_base_url + '/plans/current', nil)
  Plan.new(response)
end