Class: Nurego::Organization
- Inherits:
-
APIResource
- Object
- NuregoObject
- APIResource
- Nurego::Organization
- Includes:
- APIOperations::List, APIOperations::Update
- Defined in:
- lib/nurego/organization.rb
Instance Attribute Summary
Attributes inherited from NuregoObject
Instance Method Summary collapse
- #bills ⇒ Object
- #entitlements(feature_id = nil, external_id = nil) ⇒ Object
- #instances ⇒ Object
- #paymentmethod ⇒ Object
Methods included from APIOperations::Update
Methods included from APIOperations::List
Methods inherited from APIResource
class_name, #refresh, retrieve, url, #url
Methods inherited from NuregoObject
#[], #[]=, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #to_hash, #to_json, #to_s, #values
Constructor Details
This class inherits a constructor from Nurego::NuregoObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Nurego::NuregoObject
Instance Method Details
#bills ⇒ Object
14 15 16 |
# File 'lib/nurego/organization.rb', line 14 def bills Bill.all({ :organization => id }, @api_key)[:bills] end |
#entitlements(feature_id = nil, external_id = nil) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/nurego/organization.rb', line 18 def entitlements(feature_id = nil, external_id = nil) if external_id Entitlement.all({:organization => external_id, :feature_id => feature_id }, @api_key) else Entitlement.all({:organization => id, :feature_id => feature_id, :provider_name => 'internal' }, @api_key) end 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 |