Class: Scene7::Company
- Inherits:
-
Object
- Object
- Scene7::Company
- Defined in:
- lib/scene7/company.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
- #handle ⇒ Object
-
#initialize(attributes) ⇒ Company
constructor
A new instance of Company.
- #name ⇒ Object
- #root_path ⇒ Object
Constructor Details
#initialize(attributes) ⇒ Company
Returns a new instance of Company.
13 14 15 |
# File 'lib/scene7/company.rb', line 13 def initialize(attributes) @attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
11 12 13 |
# File 'lib/scene7/company.rb', line 11 def attributes @attributes end |
Class Method Details
.find_by_name(name) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/scene7/company.rb', line 3 def self.find_by_name(name) response = Scene7::Client.perform_request(:get_company_info, :company_name => name) company_data = response.to_hash[:get_company_info_return][:company_info] new(company_data) end |
Instance Method Details
#handle ⇒ Object
21 22 23 |
# File 'lib/scene7/company.rb', line 21 def handle attributes[:company_handle] end |
#name ⇒ Object
17 18 19 |
# File 'lib/scene7/company.rb', line 17 def name attributes[:name] end |
#root_path ⇒ Object
25 26 27 |
# File 'lib/scene7/company.rb', line 25 def root_path attributes[:root_path] end |