Class: Nurego::Customer
Instance Attribute Summary
Attributes inherited from NuregoObject
#api_key
Class Method Summary
collapse
Instance Method Summary
collapse
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
.cancel_account ⇒ Object
23
24
25
26
|
# File 'lib/nurego/customer.rb', line 23
def self.cancel_account
response, api_key = Nurego.request(:put, "/v1/customers/cancel", nil)
Util.convert_to_nurego_object(response, api_key)
end
|
.me(api_key = nil) ⇒ Object
5
6
7
8
|
# File 'lib/nurego/customer.rb', line 5
def self.me(api_key = nil)
response, api_key = Nurego.request(:get, me_url, api_key)
Util.convert_to_nurego_object(response, api_key)
end
|
.me_url ⇒ Object
14
15
16
|
# File 'lib/nurego/customer.rb', line 14
def self.me_url
'/v1/customers/me'
end
|
.update_plan(plan_guid, org_guid = nil) ⇒ Object
18
19
20
21
|
# File 'lib/nurego/customer.rb', line 18
def self.update_plan(plan_guid, org_guid = nil)
response, api_key = Nurego.request(:put, "/v1/customers/plan", nil, { :plan_id => plan_guid, :org_id => org_guid })
Util.convert_to_nurego_object(response, api_key)
end
|
Instance Method Details
#organizations ⇒ Object
10
11
12
|
# File 'lib/nurego/customer.rb', line 10
def organizations
Organization.all({:customer => id }, @api_key)
end
|