Class: Nurego::Organization
Instance Attribute Summary
Attributes inherited from NuregoObject
#api_key
Class Method Summary
collapse
Instance Method Summary
collapse
#save, #serialize_params
included
Methods inherited from APIResource
class_name, #refresh, retrieve, url, #url
#[], #[]=, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #to_hash, #to_json, #to_s, #values
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Nurego::NuregoObject
Class Method Details
.entitlements(organization_id, params = {}, api_key = nil) ⇒ Object
18
19
20
|
# File 'lib/nurego/organization.rb', line 18
def self.entitlements(organization_id, params = {}, api_key = nil)
Entitlement.all(organization_id, {:feature_id => params[:feature_id] }, api_key)
end
|
Instance Method Details
14
15
16
|
# File 'lib/nurego/organization.rb', line 14
def bills
Bill.all({ :organization => id }, @api_key)[:bills]
end
|
#cancel(params = {}, api_key = nil) ⇒ Object
36
37
38
39
|
# File 'lib/nurego/organization.rb', line 36
def cancel(params = {}, api_key = nil)
response, api_key = Nurego.request(:post, url + '/cancel', api_key, params)
Util.convert_to_nurego_object(response, api_key)
end
|
#entitlements(feature_id = nil) ⇒ Object
22
23
24
|
# File 'lib/nurego/organization.rb', line 22
def entitlements(feature_id = nil)
Entitlement.all(id, {:feature_id => feature_id, :external_ids => 'false' }, @api_key)
end
|
#feature_data(params = {}, api_key = nil) ⇒ Object
31
32
33
34
|
# File 'lib/nurego/organization.rb', line 31
def feature_data(params = {}, api_key = nil)
response, api_key = Nurego.request(:get, url + "/feature_data", api_key, params)
Util.convert_to_nurego_object(response, api_key)
end
|
#instances ⇒ Object
6
7
8
|
# File 'lib/nurego/organization.rb', line 6
def instances
Instance.all({:organization => id }, @api_key)
end
|
#paymentmethod ⇒ Object
10
11
12
|
# File 'lib/nurego/organization.rb', line 10
def paymentmethod
PaymentMethod.all({:organization => id}, @api_key)
end
|
#plan(params = {}, api_key = nil) ⇒ Object
26
27
28
29
|
# File 'lib/nurego/organization.rb', line 26
def plan(params = {}, api_key = nil)
response, api_key = Nurego.request(:get, url + '/plan', api_key, params)
Util.convert_to_nurego_object(response, api_key)
end
|
#update_trial_period(params = {}, api_key = nil) ⇒ Object
:trial_days => total number of trial days
:trial_months => total number of trial months
exactly one of the trial_days | trial_months attributes should be passed.
:plan_id => "plan guid" | plan guid
48
49
50
51
|
# File 'lib/nurego/organization.rb', line 48
def update_trial_period(params = {}, api_key = nil)
response, api_key = Nurego.request(:post, url + '/update_trial_period', api_key, params)
Util.convert_to_nurego_object(response, api_key)
end
|