Class: Puree::Organisation
- Defined in:
- lib/puree/organisation.rb
Overview
Organisation resource
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#address ⇒ Array<Hash>
Address.
-
#email ⇒ Array<String>
Email.
-
#initialize(base_url: nil, username: nil, password: nil, basic_auth: nil) ⇒ Organisation
constructor
A new instance of Organisation.
-
#metadata ⇒ Hash
All metadata.
-
#name ⇒ String
Name.
-
#organisation ⇒ Array<Hash>
Organisation.
-
#parent ⇒ Hash
Parent.
-
#phone ⇒ Array<String>
Phone.
-
#type ⇒ String
Type.
-
#url ⇒ Array<String>
URL.
Methods inherited from Resource
#created, #get, #locale, #modified, #set_content, #uuid
Constructor Details
#initialize(base_url: nil, username: nil, password: nil, basic_auth: nil) ⇒ Organisation
Returns a new instance of Organisation.
11 12 13 14 15 16 17 |
# File 'lib/puree/organisation.rb', line 11 def initialize(base_url: nil, username: nil, password: nil, basic_auth: nil) super(api: :organisation, base_url: base_url, username: username, password: password, basic_auth: basic_auth) end |
Instance Method Details
#address ⇒ Array<Hash>
Address
22 23 24 |
# File 'lib/puree/organisation.rb', line 22 def address @metadata['address'] end |
#email ⇒ Array<String>
29 30 31 |
# File 'lib/puree/organisation.rb', line 29 def email @metadata['email'] end |
#metadata ⇒ Hash
All metadata
78 79 80 |
# File 'lib/puree/organisation.rb', line 78 def @metadata end |
#name ⇒ String
Name
36 37 38 |
# File 'lib/puree/organisation.rb', line 36 def name @metadata['name'] end |
#organisation ⇒ Array<Hash>
Organisation
43 44 45 |
# File 'lib/puree/organisation.rb', line 43 def organisation @metadata['organisation'] end |
#parent ⇒ Hash
Parent
50 51 52 |
# File 'lib/puree/organisation.rb', line 50 def parent @metadata['parent'] end |
#phone ⇒ Array<String>
Phone
57 58 59 |
# File 'lib/puree/organisation.rb', line 57 def phone @metadata['phone'] end |
#type ⇒ String
Type
64 65 66 |
# File 'lib/puree/organisation.rb', line 64 def type @metadata['type'] end |
#url ⇒ Array<String>
URL
71 72 73 |
# File 'lib/puree/organisation.rb', line 71 def url @metadata['url'] end |